@@ -1,5 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
| 3 | + die('Not A Valid Entry Point'); |
|
| 4 | +} |
|
| 3 | 5 | /********************************************************************************* |
| 4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
| 5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -1,5 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
| 3 | + die('Not A Valid Entry Point'); |
|
| 4 | +} |
|
| 3 | 5 | /********************************************************************************* |
| 4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
| 5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -66,31 +68,38 @@ discard block |
||
| 66 | 68 | $class_details = $module; |
| 67 | 69 | |
| 68 | 70 | // If keys were passed into the constructor, translate them from keys to values. |
| 69 | - if(!empty($class_details['module'])) |
|
| 70 | - $this->module = $class_details['module']; |
|
| 71 | - if(!empty($class_details['title'])) |
|
| 72 | - $this->title = $app_strings[$class_details['title']]; |
|
| 73 | - if(!empty($class_details['access_key'])) |
|
| 74 | - $this->access_key = $app_strings[$class_details['access_key']]; |
|
| 75 | - if(!empty($class_details['form_value'])) |
|
| 76 | - $this->form_value = translate($class_details['form_value'], $this->module); |
|
| 77 | - if(!empty($class_details['additional_form_fields'])) |
|
| 78 | - $this->additional_form_fields = $class_details['additional_form_fields']; |
|
| 71 | + if(!empty($class_details['module'])) { |
|
| 72 | + $this->module = $class_details['module']; |
|
| 73 | + } |
|
| 74 | + if(!empty($class_details['title'])) { |
|
| 75 | + $this->title = $app_strings[$class_details['title']]; |
|
| 76 | + } |
|
| 77 | + if(!empty($class_details['access_key'])) { |
|
| 78 | + $this->access_key = $app_strings[$class_details['access_key']]; |
|
| 79 | + } |
|
| 80 | + if(!empty($class_details['form_value'])) { |
|
| 81 | + $this->form_value = translate($class_details['form_value'], $this->module); |
|
| 82 | + } |
|
| 83 | + if(!empty($class_details['additional_form_fields'])) { |
|
| 84 | + $this->additional_form_fields = $class_details['additional_form_fields']; |
|
| 85 | + } |
|
| 79 | 86 | if(!empty($class_details['ACL'])){ |
| 80 | 87 | $this->acl = $class_details['ACL']; |
| 81 | 88 | } |
| 82 | - } |
|
| 83 | - else |
|
| 89 | + } else |
|
| 84 | 90 | { |
| 85 | 91 | $this->module = $module; |
| 86 | 92 | |
| 87 | 93 | // If keys were passed into the constructor, translate them from keys to values. |
| 88 | - if(!empty($title)) |
|
| 89 | - $this->title = $app_strings[$title]; |
|
| 90 | - if(!empty($access_key)) |
|
| 91 | - $this->access_key = $app_strings[$access_key]; |
|
| 92 | - if(!empty($form_value)) |
|
| 93 | - $this->form_value = translate($form_value, $module); |
|
| 94 | + if(!empty($title)) { |
|
| 95 | + $this->title = $app_strings[$title]; |
|
| 96 | + } |
|
| 97 | + if(!empty($access_key)) { |
|
| 98 | + $this->access_key = $app_strings[$access_key]; |
|
| 99 | + } |
|
| 100 | + if(!empty($form_value)) { |
|
| 101 | + $this->form_value = translate($form_value, $module); |
|
| 102 | + } |
|
| 94 | 103 | } |
| 95 | 104 | } |
| 96 | 105 | |
@@ -116,8 +125,7 @@ discard block |
||
| 116 | 125 | if(!empty($defines['focus']->$value)) |
| 117 | 126 | { |
| 118 | 127 | $additionalFormFields[$key] = $defines['focus']->$value; |
| 119 | - } |
|
| 120 | - else |
|
| 128 | + } else |
|
| 121 | 129 | { |
| 122 | 130 | $additionalFormFields[$key] = ''; |
| 123 | 131 | } |
@@ -128,8 +136,7 @@ discard block |
||
| 128 | 136 | if(!empty($this->module)) |
| 129 | 137 | { |
| 130 | 138 | $defines['child_module_name'] = $this->module; |
| 131 | - } |
|
| 132 | - else |
|
| 139 | + } else |
|
| 133 | 140 | { |
| 134 | 141 | $defines['child_module_name'] = $defines['module']; |
| 135 | 142 | } |
@@ -161,7 +168,7 @@ discard block |
||
| 161 | 168 | |
| 162 | 169 | if($currentModule == 'Campaigns'){ |
| 163 | 170 | $formValues['return_action'] = "DetailView"; |
| 164 | - }else{ |
|
| 171 | + } else{ |
|
| 165 | 172 | $formValues['return_action'] = $defines['action']; |
| 166 | 173 | if ( $formValues['return_action'] == 'SubPanelViewer' ) { |
| 167 | 174 | $formValues['return_action'] = 'DetailView'; |
@@ -195,8 +202,7 @@ discard block |
||
| 195 | 202 | { |
| 196 | 203 | if($defines['focus']->object_name=='Contact') { |
| 197 | 204 | $additionalFormFields['parent_type'] = 'Accounts'; |
| 198 | - } |
|
| 199 | - else { |
|
| 205 | + } else { |
|
| 200 | 206 | $additionalFormFields['parent_type'] = $defines['focus']->module_dir; |
| 201 | 207 | } |
| 202 | 208 | } |
@@ -205,8 +211,7 @@ discard block |
||
| 205 | 211 | if($defines['focus']->object_name=='Contact') { |
| 206 | 212 | $additionalFormFields['parent_name'] = $defines['focus']->account_name; |
| 207 | 213 | $additionalFormFields['account_name'] = $defines['focus']->account_name; |
| 208 | - } |
|
| 209 | - else { |
|
| 214 | + } else { |
|
| 210 | 215 | $additionalFormFields['parent_name'] = $defines['focus']->name; |
| 211 | 216 | } |
| 212 | 217 | } |
@@ -1,5 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
| 3 | + die('Not A Valid Entry Point'); |
|
| 4 | +} |
|
| 3 | 5 | /********************************************************************************* |
| 4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
| 5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -1,5 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
| 3 | + die('Not A Valid Entry Point'); |
|
| 4 | +} |
|
| 3 | 5 | /********************************************************************************* |
| 4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
| 5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -1,5 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
| 3 | + die('Not A Valid Entry Point'); |
|
| 4 | +} |
|
| 3 | 5 | /********************************************************************************* |
| 4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
| 5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -1,5 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
| 3 | + die('Not A Valid Entry Point'); |
|
| 4 | +} |
|
| 3 | 5 | /********************************************************************************* |
| 4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
| 5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -1,5 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
| 3 | + die('Not A Valid Entry Point'); |
|
| 4 | +} |
|
| 3 | 5 | /********************************************************************************* |
| 4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
| 5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -1,5 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
| 3 | + die('Not A Valid Entry Point'); |
|
| 4 | +} |
|
| 3 | 5 | /********************************************************************************* |
| 4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
| 5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -1,5 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
| 3 | + die('Not A Valid Entry Point'); |
|
| 4 | +} |
|
| 3 | 5 | /********************************************************************************* |
| 4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
| 5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |