get campaign id and timestamp of existing projects

This commit is contained in:
Marc Michalsky forumZFD 2020-09-29 16:14:10 +02:00
parent 350bb513a0
commit 0ce48fa58b
Signed by untrusted user who does not match committer: marc.koch
GPG key ID: 12406554CFB028B9

View file

@ -163,6 +163,15 @@ class TwingleProject {
}
if ($result['count'] == 1) {
// get campaign id
$this->id = $result['values'][0]['id'];
// set object timestamp to project last_update
$date = $result['values'][0][$cf_last_update];
$date = DateTime::createFromFormat('Y-m-d H:i:s', $date);
$this->timestamp = $date->getTimestamp();
return TRUE;
}
else {