@@ -46,7 +46,7 @@ |
||
| 46 | 46 | if(!empty($vardef['function']['returns']) && $vardef['function']['returns']== 'html'){ |
| 47 | 47 | $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); |
| 48 | 48 | return $this->fetch($this->findTemplate('EditViewFunction')); |
| 49 | - }else{ |
|
| 49 | + } else{ |
|
| 50 | 50 | $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex); |
| 51 | 51 | return $this->fetch($this->findTemplate('SearchView')); |
| 52 | 52 | } |
@@ -133,7 +133,7 @@ |
||
| 133 | 133 | try{ |
| 134 | 134 | $this->_last = $token = parent::getRequestToken($params); |
| 135 | 135 | return array('oauth_token' => $token->getToken(), 'oauth_token_secret' => $token->getTokenSecret()); |
| 136 | - }catch(Zend_Oauth_Exception $e){ |
|
| 136 | + } catch(Zend_Oauth_Exception $e){ |
|
| 137 | 137 | return array('oauth_token' => '', 'oauth_token_secret' => ''); |
| 138 | 138 | } |
| 139 | 139 | } |
@@ -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. |
@@ -77,8 +79,9 @@ discard block |
||
| 77 | 79 | { |
| 78 | 80 | global $current_user; |
| 79 | 81 | |
| 80 | - if(!empty($_REQUEST[$prefix.'record']) && !$skipRetrieve) |
|
| 81 | - $focus->retrieve($_REQUEST[$prefix.'record']); |
|
| 82 | + if(!empty($_REQUEST[$prefix.'record']) && !$skipRetrieve) { |
|
| 83 | + $focus->retrieve($_REQUEST[$prefix.'record']); |
|
| 84 | + } |
|
| 82 | 85 | |
| 83 | 86 | if(!empty($_POST['assigned_user_id']) && |
| 84 | 87 | ($focus->assigned_user_id != $_POST['assigned_user_id']) && |
@@ -240,8 +243,7 @@ discard block |
||
| 240 | 243 | if(isset($_REQUEST['return_module']) && $_REQUEST['return_module'] != "") |
| 241 | 244 | { |
| 242 | 245 | $return_module = $_REQUEST['return_module']; |
| 243 | - } |
|
| 244 | - else |
|
| 246 | + } else |
|
| 245 | 247 | { |
| 246 | 248 | $return_module = $return_module; |
| 247 | 249 | } |
@@ -275,14 +277,12 @@ discard block |
||
| 275 | 277 | $return_module = $_REQUEST['module']; |
| 276 | 278 | $return_action = $_REQUEST['return_action']; |
| 277 | 279 | // wp: return action needs to be set for one-click close in task list |
| 278 | - } |
|
| 279 | - else |
|
| 280 | + } else |
|
| 280 | 281 | { |
| 281 | 282 | // if we "Cancel", we go back to the list view. |
| 282 | 283 | $return_action = $_REQUEST['return_action']; |
| 283 | 284 | } |
| 284 | - } |
|
| 285 | - else |
|
| 285 | + } else |
|
| 286 | 286 | { |
| 287 | 287 | $return_action = "DetailView"; |
| 288 | 288 | } |
@@ -378,8 +378,7 @@ discard block |
||
| 378 | 378 | $focus=BeanFactory::getBean('Prospects'); |
| 379 | 379 | if(is_array($child_id)){ |
| 380 | 380 | $uids = $child_id; |
| 381 | - } |
|
| 382 | - else{ |
|
| 381 | + } else{ |
|
| 383 | 382 | $uids = array($child_id); |
| 384 | 383 | } |
| 385 | 384 | |
@@ -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. |
@@ -111,8 +113,9 @@ discard block |
||
| 111 | 113 | function _getTabs($tabs, $showTabs = true, $selectedGroup='All') |
| 112 | 114 | { |
| 113 | 115 | //WDong Bug: 12258 "All" tab in the middle of a record's detail view is not localized. |
| 114 | - if($selectedGroup=='All') |
|
| 115 | - $selectedGroup=translate('LBL_TABGROUP_ALL'); |
|
| 116 | + if($selectedGroup=='All') { |
|
| 117 | + $selectedGroup=translate('LBL_TABGROUP_ALL'); |
|
| 118 | + } |
|
| 116 | 119 | |
| 117 | 120 | // Set up a mapping from subpanelID, found in the $tabs list, to the source module name |
| 118 | 121 | // As the $GLOBALS['tabStructure'] array holds the Group Tabs by module name we need to efficiently convert between the two |
@@ -127,8 +130,9 @@ discard block |
||
| 127 | 130 | // Bug #44344 : Custom relationships under same module only show once in subpanel tabs |
| 128 | 131 | // use object property instead new object to have ability run unit test (can override subpanel_definitions) |
| 129 | 132 | $subpanel = $this->subpanel_definitions->load_subpanel( $subpanelID ); |
| 130 | - if ($subpanel !== false) |
|
| 131 | - $moduleNames [ $subpanelID ] = $subpanel->get_module_name() ; |
|
| 133 | + if ($subpanel !== false) { |
|
| 134 | + $moduleNames [ $subpanelID ] = $subpanel->get_module_name() ; |
|
| 135 | + } |
|
| 132 | 136 | } |
| 133 | 137 | |
| 134 | 138 | $groups = array () ; |
@@ -138,11 +142,12 @@ discard block |
||
| 138 | 142 | { |
| 139 | 143 | foreach( $subModules['modules'] as $key => $subModule ) |
| 140 | 144 | { |
| 141 | - foreach ( $tabs as $subpanelID ) |
|
| 142 | - if (isset($moduleNames[ $subpanelID ] ) && strcasecmp( $subModule , $moduleNames[ $subpanelID ] ) === 0) |
|
| 145 | + foreach ( $tabs as $subpanelID ) { |
|
| 146 | + if (isset($moduleNames[ $subpanelID ] ) && strcasecmp( $subModule , $moduleNames[ $subpanelID ] ) === 0) |
|
| 143 | 147 | { |
| 144 | 148 | // Bug #44344 : Custom relationships under same module only show once in subpanel tabs |
| 145 | 149 | $groups [ translate ( $mainTab ) ] [ 'modules' ] [] = $subpanelID ; |
| 150 | + } |
|
| 146 | 151 | $found [ $subpanelID ] = true ; |
| 147 | 152 | } |
| 148 | 153 | } |
@@ -152,8 +157,9 @@ discard block |
||
| 152 | 157 | |
| 153 | 158 | foreach( $tabs as $subpanelID ) |
| 154 | 159 | { |
| 155 | - if ( ! isset ( $found [ $subpanelID ] ) ) |
|
| 156 | - $groups [ translate ('LBL_TABGROUP_OTHER') ]['modules'] [] = $subpanelID ; |
|
| 160 | + if ( ! isset ( $found [ $subpanelID ] ) ) { |
|
| 161 | + $groups [ translate ('LBL_TABGROUP_OTHER') ]['modules'] [] = $subpanelID ; |
|
| 162 | + } |
|
| 157 | 163 | } |
| 158 | 164 | |
| 159 | 165 | /* Move history to same tab as activities */ |
@@ -168,8 +174,7 @@ discard block |
||
| 168 | 174 | /* Move hist from there to here */ |
| 169 | 175 | $groups[$mainTab]['modules'] []= 'history'; |
| 170 | 176 | } |
| 171 | - } |
|
| 172 | - else if(false !== ($i = array_search('history', array_map('strtolower', $group['modules'])))) |
|
| 177 | + } else if(false !== ($i = array_search('history', array_map('strtolower', $group['modules'])))) |
|
| 173 | 178 | { |
| 174 | 179 | unset($groups[$mainTab]['modules'][$i]); |
| 175 | 180 | if(empty($groups[$mainTab]['modules'])) |
@@ -184,10 +189,11 @@ discard block |
||
| 184 | 189 | * Note that if a tab group already exists with the name 'All', |
| 185 | 190 | * it will be overwritten in this union operation. |
| 186 | 191 | */ |
| 187 | - if(count($groups) <= 1) |
|
| 188 | - $groups = array(translate('LBL_TABGROUP_ALL') => array('label' => translate('LBL_TABGROUP_ALL'), 'modules' => $tabs)); |
|
| 189 | - else |
|
| 190 | - $groups = array(translate('LBL_TABGROUP_ALL') => array('label' => translate('LBL_TABGROUP_ALL'), 'modules' => $tabs)) + $groups; |
|
| 192 | + if(count($groups) <= 1) { |
|
| 193 | + $groups = array(translate('LBL_TABGROUP_ALL') => array('label' => translate('LBL_TABGROUP_ALL'), 'modules' => $tabs)); |
|
| 194 | + } else { |
|
| 195 | + $groups = array(translate('LBL_TABGROUP_ALL') => array('label' => translate('LBL_TABGROUP_ALL'), 'modules' => $tabs)) + $groups; |
|
| 196 | + } |
|
| 191 | 197 | /* Note - all $display checking and array_intersects with $tabs |
| 192 | 198 | * are now redundant (thanks to GroupedTabStructure), and could |
| 193 | 199 | * be removed for performance, but for now can stay to help ensure |
@@ -261,8 +267,7 @@ discard block |
||
| 261 | 267 | $sugarTab->setup($sugarTabs, $otherTabs, $displayTabs, $selectedGroup); |
| 262 | 268 | $sugarTab->display(); |
| 263 | 269 | } |
| 264 | - } |
|
| 265 | - else |
|
| 270 | + } else |
|
| 266 | 271 | { |
| 267 | 272 | $tabs = SubPanelTilesTabs::applyUserCustomLayoutToTabs($tabs, $selectedGroup); |
| 268 | 273 | |
@@ -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. |
@@ -69,53 +71,73 @@ discard block |
||
| 69 | 71 | |
| 70 | 72 | //from accounts |
| 71 | 73 | if ($defines['focus']->object_name == 'Account') { |
| 72 | - if(isset($defines['focus']->billing_address_street)) |
|
| 73 | - $additionalFormFields['primary_address_street'] = $defines['focus']->billing_address_street; |
|
| 74 | - if(isset($defines['focus']->billing_address_city)) |
|
| 75 | - $additionalFormFields['primary_address_city'] = $defines['focus']->billing_address_city; |
|
| 76 | - if(isset($defines['focus']->billing_address_state)) |
|
| 77 | - $additionalFormFields['primary_address_state'] = $defines['focus']->billing_address_state; |
|
| 78 | - if(isset($defines['focus']->billing_address_country)) |
|
| 79 | - $additionalFormFields['primary_address_country'] = $defines['focus']->billing_address_country; |
|
| 80 | - if(isset($defines['focus']->billing_address_postalcode)) |
|
| 81 | - $additionalFormFields['primary_address_postalcode'] = $defines['focus']->billing_address_postalcode; |
|
| 82 | - if(isset($defines['focus']->phone_office)) |
|
| 83 | - $additionalFormFields['phone_work'] = $defines['focus']->phone_office; |
|
| 84 | - if(isset($defines['focus']->id)) |
|
| 85 | - $additionalFormFields['account_id'] = $defines['focus']->id; |
|
| 74 | + if(isset($defines['focus']->billing_address_street)) { |
|
| 75 | + $additionalFormFields['primary_address_street'] = $defines['focus']->billing_address_street; |
|
| 76 | + } |
|
| 77 | + if(isset($defines['focus']->billing_address_city)) { |
|
| 78 | + $additionalFormFields['primary_address_city'] = $defines['focus']->billing_address_city; |
|
| 79 | + } |
|
| 80 | + if(isset($defines['focus']->billing_address_state)) { |
|
| 81 | + $additionalFormFields['primary_address_state'] = $defines['focus']->billing_address_state; |
|
| 82 | + } |
|
| 83 | + if(isset($defines['focus']->billing_address_country)) { |
|
| 84 | + $additionalFormFields['primary_address_country'] = $defines['focus']->billing_address_country; |
|
| 85 | + } |
|
| 86 | + if(isset($defines['focus']->billing_address_postalcode)) { |
|
| 87 | + $additionalFormFields['primary_address_postalcode'] = $defines['focus']->billing_address_postalcode; |
|
| 88 | + } |
|
| 89 | + if(isset($defines['focus']->phone_office)) { |
|
| 90 | + $additionalFormFields['phone_work'] = $defines['focus']->phone_office; |
|
| 91 | + } |
|
| 92 | + if(isset($defines['focus']->id)) { |
|
| 93 | + $additionalFormFields['account_id'] = $defines['focus']->id; |
|
| 94 | + } |
|
| 86 | 95 | } |
| 87 | 96 | //from contacts |
| 88 | 97 | if ($defines['focus']->object_name == 'Contact') { |
| 89 | - if(isset($defines['focus']->salutation)) |
|
| 90 | - $additionalFormFields['salutation'] = $defines['focus']->salutation; |
|
| 91 | - if(isset($defines['focus']->first_name)) |
|
| 92 | - $additionalFormFields['first_name'] = $defines['focus']->first_name; |
|
| 93 | - if(isset($defines['focus']->last_name)) |
|
| 94 | - $additionalFormFields['last_name'] = $defines['focus']->last_name; |
|
| 95 | - if(isset($defines['focus']->primary_address_street)) |
|
| 96 | - $additionalFormFields['primary_address_street'] = $defines['focus']->primary_address_street; |
|
| 97 | - if(isset($defines['focus']->primary_address_city)) |
|
| 98 | - $additionalFormFields['primary_address_city'] = $defines['focus']->primary_address_city; |
|
| 99 | - if(isset($defines['focus']->primary_address_state)) |
|
| 100 | - $additionalFormFields['primary_address_state'] = $defines['focus']->primary_address_state; |
|
| 101 | - if(isset($defines['focus']->primary_address_country)) |
|
| 102 | - $additionalFormFields['primary_address_country'] = $defines['focus']->primary_address_country; |
|
| 103 | - if(isset($defines['focus']->primary_address_postalcode)) |
|
| 104 | - $additionalFormFields['primary_address_postalcode'] = $defines['focus']->primary_address_postalcode; |
|
| 105 | - if(isset($defines['focus']->phone_work)) |
|
| 106 | - $additionalFormFields['phone_work'] = $defines['focus']->phone_work; |
|
| 107 | - if(isset($defines['focus']->id)) |
|
| 108 | - $additionalFormFields['contact_id'] = $defines['focus']->id; |
|
| 98 | + if(isset($defines['focus']->salutation)) { |
|
| 99 | + $additionalFormFields['salutation'] = $defines['focus']->salutation; |
|
| 100 | + } |
|
| 101 | + if(isset($defines['focus']->first_name)) { |
|
| 102 | + $additionalFormFields['first_name'] = $defines['focus']->first_name; |
|
| 103 | + } |
|
| 104 | + if(isset($defines['focus']->last_name)) { |
|
| 105 | + $additionalFormFields['last_name'] = $defines['focus']->last_name; |
|
| 106 | + } |
|
| 107 | + if(isset($defines['focus']->primary_address_street)) { |
|
| 108 | + $additionalFormFields['primary_address_street'] = $defines['focus']->primary_address_street; |
|
| 109 | + } |
|
| 110 | + if(isset($defines['focus']->primary_address_city)) { |
|
| 111 | + $additionalFormFields['primary_address_city'] = $defines['focus']->primary_address_city; |
|
| 112 | + } |
|
| 113 | + if(isset($defines['focus']->primary_address_state)) { |
|
| 114 | + $additionalFormFields['primary_address_state'] = $defines['focus']->primary_address_state; |
|
| 115 | + } |
|
| 116 | + if(isset($defines['focus']->primary_address_country)) { |
|
| 117 | + $additionalFormFields['primary_address_country'] = $defines['focus']->primary_address_country; |
|
| 118 | + } |
|
| 119 | + if(isset($defines['focus']->primary_address_postalcode)) { |
|
| 120 | + $additionalFormFields['primary_address_postalcode'] = $defines['focus']->primary_address_postalcode; |
|
| 121 | + } |
|
| 122 | + if(isset($defines['focus']->phone_work)) { |
|
| 123 | + $additionalFormFields['phone_work'] = $defines['focus']->phone_work; |
|
| 124 | + } |
|
| 125 | + if(isset($defines['focus']->id)) { |
|
| 126 | + $additionalFormFields['contact_id'] = $defines['focus']->id; |
|
| 127 | + } |
|
| 109 | 128 | } |
| 110 | 129 | |
| 111 | 130 | //from opportunities |
| 112 | 131 | if ($defines['focus']->object_name == 'Opportunity') { |
| 113 | - if(isset($defines['focus']->id)) |
|
| 114 | - $additionalFormFields['opportunity_id'] = $defines['focus']->id; |
|
| 115 | - if(isset($defines['focus']->account_name)) |
|
| 116 | - $additionalFormFields['account_name'] = $defines['focus']->account_name; |
|
| 117 | - if(isset($defines['focus']->account_id)) |
|
| 118 | - $additionalFormFields['account_id'] = $defines['focus']->account_id; |
|
| 132 | + if(isset($defines['focus']->id)) { |
|
| 133 | + $additionalFormFields['opportunity_id'] = $defines['focus']->id; |
|
| 134 | + } |
|
| 135 | + if(isset($defines['focus']->account_name)) { |
|
| 136 | + $additionalFormFields['account_name'] = $defines['focus']->account_name; |
|
| 137 | + } |
|
| 138 | + if(isset($defines['focus']->account_id)) { |
|
| 139 | + $additionalFormFields['account_id'] = $defines['focus']->account_id; |
|
| 140 | + } |
|
| 119 | 141 | } |
| 120 | 142 | |
| 121 | 143 | $button = $this->_get_form($defines, $additionalFormFields); |
@@ -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. |
@@ -53,8 +55,7 @@ discard block |
||
| 53 | 55 | if (is_array($layout_def['input_name0'])) |
| 54 | 56 | { |
| 55 | 57 | $values = $layout_def['input_name0']; |
| 56 | - } |
|
| 57 | - else |
|
| 58 | + } else |
|
| 58 | 59 | { |
| 59 | 60 | $values[] = $layout_def['input_name0']; |
| 60 | 61 | } |
@@ -182,12 +183,10 @@ discard block |
||
| 182 | 183 | //#31797 , we should get the table alias in a global registered array:selected_loaded_custom_links |
| 183 | 184 | if(!empty($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table']])){ |
| 184 | 185 | $display = strtoupper($reporter->selected_loaded_custom_links[$field_def['secondary_table']]['join_table_alias'].'_name'); |
| 185 | - } |
|
| 186 | - elseif(isset($field_def['rep_rel_name']) && isset($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['rep_rel_name']])) |
|
| 186 | + } elseif(isset($field_def['rep_rel_name']) && isset($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['rep_rel_name']])) |
|
| 187 | 187 | { |
| 188 | 188 | $display = strtoupper($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['rep_rel_name']]['join_table_alias'].'_name'); |
| 189 | - } |
|
| 190 | - elseif(!empty($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['name']])){ |
|
| 189 | + } elseif(!empty($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['name']])){ |
|
| 191 | 190 | $display = strtoupper($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['name']]['join_table_alias'].'_name'); |
| 192 | 191 | } |
| 193 | 192 | $cell = $layout_def['fields'][$display]; |
@@ -202,12 +201,10 @@ discard block |
||
| 202 | 201 | //#31797 , we should get the table alias in a global registered array:selected_loaded_custom_links |
| 203 | 202 | if(!empty($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table']])){ |
| 204 | 203 | $display = strtoupper($reporter->selected_loaded_custom_links[$field_def['secondary_table']]['join_table_alias'].'_name'); |
| 205 | - } |
|
| 206 | - elseif(isset($field_def['rep_rel_name']) && isset($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['rep_rel_name']])) |
|
| 204 | + } elseif(isset($field_def['rep_rel_name']) && isset($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['rep_rel_name']])) |
|
| 207 | 205 | { |
| 208 | 206 | $display = strtoupper($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['rep_rel_name']]['join_table_alias'].'_name'); |
| 209 | - } |
|
| 210 | - elseif(!empty($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['name']])){ |
|
| 207 | + } elseif(!empty($reporter->selected_loaded_custom_links) && !empty($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['name']])){ |
|
| 211 | 208 | $display = strtoupper($reporter->selected_loaded_custom_links[$field_def['secondary_table'].'_'.$field_def['name']]['join_table_alias'].'_name'); |
| 212 | 209 | } |
| 213 | 210 | $recordField = $this->getTruncatedColumnAlias(strtoupper($layout_def['table_alias']).'_'.strtoupper($layout_def['name'])); |
@@ -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. |
@@ -55,8 +57,7 @@ discard block |
||
| 55 | 57 | if(isset($layout_def['varname'])) |
| 56 | 58 | { |
| 57 | 59 | $key = strtoupper($layout_def['varname']); |
| 58 | - } |
|
| 59 | - else |
|
| 60 | + } else |
|
| 60 | 61 | { |
| 61 | 62 | $key = $this->_get_column_alias($layout_def); |
| 62 | 63 | $key = strtoupper($key); |
@@ -71,8 +72,7 @@ discard block |
||
| 71 | 72 | if(empty($layout_def['target_record_key'])) |
| 72 | 73 | { |
| 73 | 74 | $record = $layout_def['fields']['ID']; |
| 74 | - } |
|
| 75 | - else |
|
| 75 | + } else |
|
| 76 | 76 | { |
| 77 | 77 | $record_key = strtoupper($layout_def['target_record_key']); |
| 78 | 78 | $record = $layout_def['fields'][$record_key]; |
@@ -88,8 +88,7 @@ discard block |
||
| 88 | 88 | if(empty($layout_def['target_module'])) |
| 89 | 89 | { |
| 90 | 90 | $module = $layout_def['module']; |
| 91 | - } |
|
| 92 | - else |
|
| 91 | + } else |
|
| 93 | 92 | { |
| 94 | 93 | $module = $layout_def['target_module']; |
| 95 | 94 | } |
@@ -132,7 +131,7 @@ discard block |
||
| 132 | 131 | } |
| 133 | 132 | return '<a href="' . $link . '" >'."$value</a>"; |
| 134 | 133 | |
| 135 | - }else{ |
|
| 134 | + } else{ |
|
| 136 | 135 | return $value; |
| 137 | 136 | } |
| 138 | 137 | |
@@ -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. |
@@ -61,11 +63,9 @@ discard block |
||
| 61 | 63 | |
| 62 | 64 | if ($layout_def['module'] == 'Holidays'){ |
| 63 | 65 | $action = 'DeleteHolidayRelationship'; |
| 64 | - } |
|
| 65 | - else if ($layout_def['module'] == 'Users' || $layout_def['module'] == 'Contacts'){ |
|
| 66 | + } else if ($layout_def['module'] == 'Users' || $layout_def['module'] == 'Contacts'){ |
|
| 66 | 67 | $action = 'DeleteResourceRelationship'; |
| 67 | - } |
|
| 68 | - else{ |
|
| 68 | + } else{ |
|
| 69 | 69 | $action = 'DeleteRelationship'; |
| 70 | 70 | } |
| 71 | 71 | |
@@ -85,8 +85,7 @@ discard block |
||
| 85 | 85 | |
| 86 | 86 | if ($current_user->id == $focus->assigned_user_id || is_admin($current_user)){ |
| 87 | 87 | $is_owner = true; |
| 88 | - } |
|
| 89 | - else{ |
|
| 88 | + } else{ |
|
| 90 | 89 | $is_owner = false; |
| 91 | 90 | } |
| 92 | 91 | |
@@ -119,7 +118,7 @@ discard block |
||
| 119 | 118 | . ' class="listViewTdToolsS1"' |
| 120 | 119 | . " onclick=\"return confirm('$remove_confirmation_text');\"" |
| 121 | 120 | . ">$icon_remove_html $icon_remove_text</a>"; |
| 122 | - }else{ |
|
| 121 | + } else{ |
|
| 123 | 122 | return ''; |
| 124 | 123 | } |
| 125 | 124 | } |
@@ -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. |
@@ -56,8 +58,9 @@ discard block |
||
| 56 | 58 | $value = preg_replace("/^'/", "'%", $val, 1); |
| 57 | 59 | $value = preg_replace("/'$/", "%'", $value, 1); |
| 58 | 60 | $query .= $value; |
| 59 | - if ($key != ($arr_count - 1)) |
|
| 60 | - $query.= " OR " ; |
|
| 61 | + if ($key != ($arr_count - 1)) { |
|
| 62 | + $query.= " OR " ; |
|
| 63 | + } |
|
| 61 | 64 | } |
| 62 | 65 | return '('.$query.')'; |
| 63 | 66 | } |
@@ -68,7 +71,7 @@ discard block |
||
| 68 | 71 | foreach ($layout_def['input_name0'] as $value) { |
| 69 | 72 | if($value != ""){ |
| 70 | 73 | array_push($arr, "'".$GLOBALS['db']->quote($value)."'"); |
| 71 | - }else{ |
|
| 74 | + } else{ |
|
| 72 | 75 | array_push($arr, "'^^'"); |
| 73 | 76 | } |
| 74 | 77 | } |
@@ -82,8 +85,9 @@ discard block |
||
| 82 | 85 | $value = preg_replace("/^'/", "'%", $val, 1); |
| 83 | 86 | $value = preg_replace("/'$/", "%'", $value, 1); |
| 84 | 87 | $query .= $value; |
| 85 | - if ($key != ($arr_count - 1)) |
|
| 86 | - $query.= " OR " ; |
|
| 88 | + if ($key != ($arr_count - 1)) { |
|
| 89 | + $query.= " OR " ; |
|
| 90 | + } |
|
| 87 | 91 | } |
| 88 | 92 | return '('.$query.')'; |
| 89 | 93 | } |