set values and attributes in the right order
This commit is contained in:
parent
add87edded
commit
7a94e43801
1 changed files with 9 additions and 2 deletions
|
@ -43,14 +43,21 @@ class TwingleProject {
|
||||||
$this->values = $values;
|
$this->values = $values;
|
||||||
$this->project_id = $this->values['id'];
|
$this->project_id = $this->values['id'];
|
||||||
|
|
||||||
|
// Set timestamp
|
||||||
|
$this->timestamp = $this->values['last_update'];
|
||||||
|
|
||||||
// Translate values if values come from CiviCRM Campaign API
|
// Translate values if values come from CiviCRM Campaign API
|
||||||
if ($translate) {
|
if ($translate) {
|
||||||
$this->values = $this->translateValues(TRUE);
|
$this->values = $this->translateValues(TRUE);
|
||||||
$this->id = $values['id'];
|
$this->id = $values['id'];
|
||||||
|
} else {
|
||||||
|
// Format data types for import into CiviCRM
|
||||||
|
$this->formatForImport($this->values);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Format data types of the values for import into CiviCRM
|
// Add necessary values
|
||||||
$this->formatForImport($this->values);
|
$this->values['campaign_type_id'] = 'twingle_project';
|
||||||
|
$this->values['title'] = $this->values['name'];
|
||||||
|
|
||||||
// Fetch custom field mapping once
|
// Fetch custom field mapping once
|
||||||
self::init();
|
self::init();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue