code cleaning
removed unnecessary code
This commit is contained in:
parent
39fa2cc603
commit
18100e866b
2 changed files with 4 additions and 11 deletions
|
@ -43,7 +43,8 @@ class CRM_TwingleCampaign_Upgrader extends CRM_TwingleCampaign_Upgrader_Base {
|
||||||
// Create campaign types, custom fields and custom groups by the contents
|
// Create campaign types, custom fields and custom groups by the contents
|
||||||
// of the json file "campaigns.json"
|
// of the json file "campaigns.json"
|
||||||
|
|
||||||
$json_file = file_get_contents(E::path() . '/CRM/TwingleCampaign/Upgrader/resources/campaigns.json');
|
$json_file = file_get_contents(E::path() .
|
||||||
|
'/CRM/TwingleCampaign/Upgrader/resources/campaigns.json');
|
||||||
$campaign_info = json_decode($json_file, TRUE);
|
$campaign_info = json_decode($json_file, TRUE);
|
||||||
|
|
||||||
if (!$campaign_info) {
|
if (!$campaign_info) {
|
||||||
|
|
|
@ -74,7 +74,6 @@ class TwingleProject {
|
||||||
|
|
||||||
// Translate keys for import
|
// Translate keys for import
|
||||||
self::translateKeys($project, self::IN);
|
self::translateKeys($project, self::IN);
|
||||||
self::translateKeys($options, self::IN);
|
|
||||||
|
|
||||||
// Format values for import
|
// Format values for import
|
||||||
self::formatValues($project, self::IN);
|
self::formatValues($project, self::IN);
|
||||||
|
@ -212,13 +211,6 @@ class TwingleProject {
|
||||||
|
|
||||||
// Update attributes
|
// Update attributes
|
||||||
$this->values = array_merge($this->values, $values);
|
$this->values = array_merge($this->values, $values);
|
||||||
|
|
||||||
// Translate Twingle field names into custom field names
|
|
||||||
$translatedFields = $this->values;
|
|
||||||
self::translateCustomFields($translatedFields, self::IN);
|
|
||||||
|
|
||||||
// Set id
|
|
||||||
$translatedFields['id'] = $this->id;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue