Test Failed
Push — CI ( 02428e...3e0292 )
by Adam
55:43
created
include/SubPanel/SubPanel.php 1 patch
Braces   +20 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
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.
@@ -141,8 +143,7 @@  discard block
 block discarded – undo
141 143
 			if(empty($widget_data['widget_class']))
142 144
 			{
143 145
 				$widget_contents .= "widget_class not defined for top subpanel buttons";
144
-			}
145
-			else
146
+			} else
146 147
 			{
147 148
 				$widget_contents .= $layout_manager->widgetDisplay($widget_data);
148 149
 			}
@@ -163,7 +164,7 @@  discard block
 block discarded – undo
163 164
 
164 165
 		if(isset($this->listview)){
165 166
 			$ListView =& $this->listview;
166
-		}else{
167
+		} else{
167 168
 			$ListView = new ListView();
168 169
 		}
169 170
 		$ListView->initNewXTemplate($xTemplatePath,$this->subpanel_defs->mod_strings);
@@ -178,7 +179,9 @@  discard block
 block discarded – undo
178 179
 		$ListView->xTemplateAssign("SUBPANEL_ID", $this->subpanel_id);
179 180
 		$ListView->xTemplateAssign("SUBPANEL_SEARCH", $this->getSearchForm());
180 181
 		$display_sps = '';
181
-		if($this->search_query == '' && empty($this->collections)) $display_sps = 'display:none';
182
+		if($this->search_query == '' && empty($this->collections)) {
183
+		    $display_sps = 'display:none';
184
+		}
182 185
 		$ListView->xTemplateAssign("DISPLAY_SPS",$display_sps);
183 186
 
184 187
 		if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace']))
@@ -311,10 +314,12 @@  discard block
 block discarded – undo
311 314
   		$moduleInstaller = new ModuleInstaller();
312 315
   		$moduleInstaller->silent = true; // make sure that the ModuleInstaller->log() function doesn't echo while rebuilding the layoutdefs
313 316
   		$moduleInstaller->rebuild_layoutdefs();
314
-  		if (file_exists('modules/'.  $panel->parent_bean->module_dir . '/layout_defs.php'))
315
-  			include('modules/'.  $panel->parent_bean->module_dir . '/layout_defs.php');
316
-  		if (file_exists('custom/modules/'.  $panel->parent_bean->module_dir . '/Ext/Layoutdefs/layoutdefs.ext.php'))
317
-  			include('custom/modules/'.  $panel->parent_bean->module_dir . '/Ext/Layoutdefs/layoutdefs.ext.php');
317
+  		if (file_exists('modules/'.  $panel->parent_bean->module_dir . '/layout_defs.php')) {
318
+  		  			include('modules/'.  $panel->parent_bean->module_dir . '/layout_defs.php');
319
+  		}
320
+  		if (file_exists('custom/modules/'.  $panel->parent_bean->module_dir . '/Ext/Layoutdefs/layoutdefs.ext.php')) {
321
+  		  			include('custom/modules/'.  $panel->parent_bean->module_dir . '/Ext/Layoutdefs/layoutdefs.ext.php');
322
+  		}
318 323
   }
319 324
 
320 325
 	function get_subpanel_setup($module)
@@ -400,7 +405,9 @@  discard block
 block discarded – undo
400 405
 
401 406
 		$where_clauses = $searchForm->generateSearchWhere(true, $seed->module_dir);
402 407
 
403
-		if (count($where_clauses) > 0 )$this->search_query = '('. implode(' ) AND ( ', $where_clauses) . ')';
408
+		if (count($where_clauses) > 0 ) {
409
+		    $this->search_query = '('. implode(' ) AND ( ', $where_clauses) . ')';
410
+		}
404 411
 		$GLOBALS['log']->info("Subpanel Where Clause: $this->search_query");
405 412
 
406 413
 		return print_r($where_clauses,true);
@@ -436,8 +443,9 @@  discard block
 block discarded – undo
436 443
 
437 444
 			$searchForm->setup($subpanel_searchMetaData, $searchMetaData['searchFields'], 'SubpanelSearchFormGeneric.tpl', 'basic_search');
438 445
 
439
-			if(!empty($this->collections))
440
-				$searchForm->searchFields['collection'] = array();
446
+			if(!empty($this->collections)) {
447
+							$searchForm->searchFields['collection'] = array();
448
+			}
441 449
 
442 450
 			$searchForm->populateFromRequest();
443 451
 
Please login to merge, or discard this patch.
include/SubPanel/SubPanelTilesTabs.php 1 patch
Braces   +22 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateLeadNameButton.php 1 patch
Braces   +63 added lines, -41 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetFieldrelate.php 1 patch
Braces   +8 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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']));
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetSubPanelDetailViewLink.php 1 patch
Braces   +7 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
132 131
             }
133 132
             return '<a href="' . $link . '" >'."$value</a>";
134 133
 
135
-		}else{
134
+		} else{
136 135
 			return $value;
137 136
 		}
138 137
 		
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetSubPanelRemoveButtonProjects.php 1 patch
Braces   +7 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
119 118
 			. ' class="listViewTdToolsS1"'
120 119
 			. " onclick=\"return confirm('$remove_confirmation_text');\""
121 120
 			. ">$icon_remove_html&nbsp;$icon_remove_text</a>";
122
-		}else{
121
+		} else{
123 122
 			return '';
124 123
 		}
125 124
 	}
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetFieldmultienum.php 1 patch
Braces   +10 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 	}
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetFieldsingleenum.php 1 patch
Braces   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
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.
@@ -49,18 +51,15 @@  discard block
 block discarded – undo
49 51
         if(!empty($layout_def['remove_blank']) && $layout_def['remove_blank']) {
50 52
             if ( is_array($layout_def['options']) ) {
51 53
                 $ops = $layout_def['options'];
52
-            }
53
-            elseif (isset($layout_def['options']) && isset($app_list_strings[$layout_def['options']])){ 
54
+            } elseif (isset($layout_def['options']) && isset($app_list_strings[$layout_def['options']])){ 
54 55
             	$ops = $app_list_strings[$layout_def['options']];
55 56
                 if(array_key_exists('', $app_list_strings[$layout_def['options']])) {
56 57
              	   unset($ops['']);
57 58
 	            }
58
-            }
59
-            else{
59
+            } else{
60 60
             	$ops = array();
61 61
             }
62
-        }
63
-        else {
62
+        } else {
64 63
             $ops = $app_list_strings[$layout_def['options']];
65 64
         }
66 65
         
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetReportField.php 1 patch
Braces   +11 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
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.
@@ -184,19 +186,20 @@  discard block
 block discarded – undo
184 186
  function queryOrderBy($layout_def)
185 187
  {
186 188
      $field_def = array();
187
-	if(!empty($this->reporter->all_fields[$layout_def['column_key']])) $field_def = $this->reporter->all_fields[$layout_def['column_key']];
189
+	if(!empty($this->reporter->all_fields[$layout_def['column_key']])) {
190
+	    $field_def = $this->reporter->all_fields[$layout_def['column_key']];
191
+	}
188 192
 
189 193
     if (!empty($layout_def['group_function']))
190 194
     {
191 195
         $order_by = $this->_get_column_alias($layout_def);
192
-    }
193
-    elseif (!empty($field_def['sort_on']))
196
+    } elseif (!empty($field_def['sort_on']))
194 197
 	{
195 198
 			$order_by = $layout_def['table_alias'].".".$field_def['sort_on'];
196
-            if(!empty($field_def['sort_on2']))
197
-                $order_by .= ', ' . $layout_def['table_alias'].".".$field_def['sort_on2'];
198
-    }
199
-	else {
199
+            if(!empty($field_def['sort_on2'])) {
200
+                            $order_by .= ', ' . $layout_def['table_alias'].".".$field_def['sort_on2'];
201
+            }
202
+    } else {
200 203
 		$order_by = $this->_get_column_alias($layout_def)." \n";
201 204
 	}
202 205
 
Please login to merge, or discard this patch.