code cleaning

removed unnecessary code
This commit is contained in:
Marc Michalsky forumZFD 2020-10-13 09:09:39 +02:00
parent 39fa2cc603
commit 18100e866b
Signed by untrusted user who does not match committer: marc.koch
GPG key ID: 12406554CFB028B9
2 changed files with 4 additions and 11 deletions

View file

@ -43,7 +43,8 @@ class CRM_TwingleCampaign_Upgrader extends CRM_TwingleCampaign_Upgrader_Base {
// Create campaign types, custom fields and custom groups by the contents
// 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);
if (!$campaign_info) {

View file

@ -72,9 +72,8 @@ class TwingleProject {
// If values come from Twingle API
elseif ($origin == self::TWINGLE) {
// Translate keys for import
// Translate keys for import
self::translateKeys($project, self::IN);
self::translateKeys($options, self::IN);
// Format values for import
self::formatValues($project, self::IN);
@ -212,13 +211,6 @@ class TwingleProject {
// Update attributes
$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;
}
@ -590,7 +582,7 @@ class TwingleProject {
'title' => $this->values['title'],
'id' => $this->id,
'project_id' => $this->values['id'],
'status' => $status,
'status' => $status,
];
}