Test Failed
Push — CI ( 0f01dd...c95a04 )
by Adam
55:13
created
modules/Home/index.php 1 patch
Braces   +25 added lines, -20 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.
@@ -97,8 +99,7 @@  discard block
 block discarded – undo
97 99
         $old_dashlets = array();
98 100
         $current_user->setPreference('columns', $old_columns, 0, 'home');
99 101
         $current_user->setPreference('dashlets', $old_dashlets, 0, 'home');
100
-    }
101
-    else{
102
+    } else{
102 103
         // This is here to get Sugar dashlets added above the rest
103 104
         $dashlets[create_guid()] = array ('className' => 'SugarFeedDashlet',
104 105
             'module' => 'SugarFeed',
@@ -135,8 +136,11 @@  discard block
 block discarded – undo
135 136
         $columns[1]['dashlets'] = array();
136 137
 
137 138
         foreach($dashlets as $guid=>$dashlet) {
138
-            if( $dashlet['forceColumn'] == 0 ) array_push($columns[0]['dashlets'], $guid);
139
-            else array_push($columns[1]['dashlets'], $guid);
139
+            if( $dashlet['forceColumn'] == 0 ) {
140
+                array_push($columns[0]['dashlets'], $guid);
141
+            } else {
142
+                array_push($columns[1]['dashlets'], $guid);
143
+            }
140 144
             $count++;
141 145
         }
142 146
     }
@@ -164,8 +168,9 @@  discard block
 block discarded – undo
164 168
     $dashlets = array_merge($dashlets,$dashletsDashboard);
165 169
     $current_user->setPreference('dashlets', $dashlets, 0, 'Home');
166 170
 }
167
-if ( !empty($pagesDashboard) || !empty($dashletsDashboard) )
171
+if ( !empty($pagesDashboard) || !empty($dashletsDashboard) ) {
168 172
     $current_user->resetPreferences('Dashboard');
173
+}
169 174
 
170 175
 if (empty($pages)){
171 176
     $pages = array();
@@ -202,12 +207,14 @@  discard block
 block discarded – undo
202 207
         // only display dashlets that are from visibile modules and that the user has permission to list
203 208
         if(!empty($id) && isset($dashlets[$id]) && is_file($dashlets[$id]['fileLocation'])) {
204 209
             $module = 'Home';
205
-            if ( !empty($dashletsFiles[$dashlets[$id]['className']]['module']) )
206
-                $module = $dashletsFiles[$dashlets[$id]['className']]['module'];
210
+            if ( !empty($dashletsFiles[$dashlets[$id]['className']]['module']) ) {
211
+                            $module = $dashletsFiles[$dashlets[$id]['className']]['module'];
212
+            }
207 213
             // Bug 24772 - Look into the user preference for the module the dashlet is a part of in case
208 214
             //             of the Report Chart dashlets.
209
-            elseif ( !empty($dashlets[$id]['module']) )
210
-                $module = $dashlets[$id]['module'];
215
+            elseif ( !empty($dashlets[$id]['module']) ) {
216
+                            $module = $dashlets[$id]['module'];
217
+            }
211 218
 
212 219
             $myDashlet = new MySugar($module);
213 220
 
@@ -257,14 +264,16 @@  discard block
 block discarded – undo
257 264
         if($i == 0){
258 265
             $pageTabs[$i]['pageTitle'] = $GLOBALS['app_strings']['LBL_SUITE_DASHBOARD'];
259 266
 //            $pageTabs[$i]['active'] = 'current';
260
-        }else{
267
+        } else{
261 268
             $pageTabs[$i]['pageTitle'] = $pages[$i]['pageTitle'];
262 269
             $divPages[] = $i;
263 270
         }
264 271
         $i++;
265 272
     }
266 273
 
267
-if(!empty($sugar_config['lock_homepage']) && $sugar_config['lock_homepage'] == true) $sugar_smarty->assign('lock_homepage', true);
274
+if(!empty($sugar_config['lock_homepage']) && $sugar_config['lock_homepage'] == true) {
275
+    $sugar_smarty->assign('lock_homepage', true);
276
+}
268 277
 
269 278
 $sugar_smarty->assign('sugarVersion', $sugar_version);
270 279
 $sugar_smarty->assign('sugarFlavor', $sugar_flavor);
@@ -307,17 +316,13 @@  discard block
 block discarded – undo
307 316
 
308 317
 if (file_exists("custom/themes/" . $theme ."/tpls/MySugar.tpl")) {
309 318
     echo $sugar_smarty->fetch("custom/themes/" . $theme ."/tpls/MySugar.tpl");
310
-}
311
-else if(file_exists('custom/include/MySugar/tpls/MySugar.tpl')) {
319
+} else if(file_exists('custom/include/MySugar/tpls/MySugar.tpl')) {
312 320
     echo $sugar_smarty->fetch('custom/include/MySugar/tpls/MySugar.tpl');
313
-}
314
-elseif (file_exists("themes/" . $theme ."/tpls/MySugar.tpl")) {
321
+} elseif (file_exists("themes/" . $theme ."/tpls/MySugar.tpl")) {
315 322
     echo $sugar_smarty->fetch("themes/" . $theme ."/tpls/MySugar.tpl");
316
-}
317
-else if(file_exists('include/MySugar/tpls/MySugar.tpl')) {
323
+} else if(file_exists('include/MySugar/tpls/MySugar.tpl')) {
318 324
     echo $sugar_smarty->fetch('include/MySugar/tpls/MySugar.tpl');
319
-}
320
-else {
325
+} else {
321 326
     $GLOBALS['log']->fatal('MySugar.tpl not found');
322 327
 }
323 328
 
Please login to merge, or discard this patch.
modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.php 1 patch
Braces   +27 added lines, -16 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.
@@ -92,10 +94,18 @@  discard block
 block discarded – undo
92 94
         }
93 95
 
94 96
 
95
-        if(empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'SugarFeed');
96
-		if(!empty($def['rows']))$this->displayRows = $def['rows'];
97
-		if(!empty($def['categories']))$this->selectedCategories = $def['categories'];
98
-		if(!empty($def['userfeed_created'])) $this->userfeed_created = $def['userfeed_created'];
97
+        if(empty($def['title'])) {
98
+            $this->title = translate('LBL_HOMEPAGE_TITLE', 'SugarFeed');
99
+        }
100
+		if(!empty($def['rows'])) {
101
+		    $this->displayRows = $def['rows'];
102
+		}
103
+		if(!empty($def['categories'])) {
104
+		    $this->selectedCategories = $def['categories'];
105
+		}
106
+		if(!empty($def['userfeed_created'])) {
107
+		    $this->userfeed_created = $def['userfeed_created'];
108
+		}
99 109
         $this->searchFields = $dashletData['SugarFeedDashlet']['searchFields'];
100 110
         $this->columns = $dashletData['SugarFeedDashlet']['columns'];
101 111
 
@@ -115,7 +125,7 @@  discard block
 block discarded – undo
115 125
 		if(count($this->categories) < $catCount){
116 126
 			if(!empty($this->selectedCategories)){
117 127
 				ACLController::filterModuleList($this->selectedCategories, true);
118
-			}else{
128
+			} else{
119 129
 				$this->selectedCategories = array_keys($this->categories);
120 130
 				unset($this->selectedCategories[0]);
121 131
 			}
@@ -219,8 +229,7 @@  discard block
 block discarded – undo
219 229
             {
220 230
                 $all_modules = array_merge($regular_modules, $owner_modules, $admin_modules);
221 231
                 $module_limiter = " sugarfeed.related_module in ('" . implode("','", $all_modules) . "')";
222
-            }
223
-            else if ( count($owner_modules) > 0
232
+            } else if ( count($owner_modules) > 0
224 233
 				) {
225 234
                 $module_limiter = " ((sugarfeed.related_module IN ('".implode("','", $regular_modules)."') "
226 235
 					.") ";
@@ -262,8 +271,9 @@  discard block
 block discarded – undo
262 271
                     {
263 272
                         $modKey = $modStringMatches[2];
264 273
                         $modString = translate($modKey, $modStringMatches[1]);
265
-                        if( strpos($modString, '{0}') === FALSE || !isset($GLOBALS['app_list_strings']['moduleListSingular'][$data['RELATED_MODULE']]) )
266
-                            continue;
274
+                        if( strpos($modString, '{0}') === FALSE || !isset($GLOBALS['app_list_strings']['moduleListSingular'][$data['RELATED_MODULE']]) ) {
275
+                                                    continue;
276
+                        }
267 277
 
268 278
                         $modStringSingular = $GLOBALS['app_list_strings']['moduleListSingular'][$data['RELATED_MODULE']];
269 279
                         $modString = string_format($modString, array($modStringSingular) );
@@ -279,8 +289,9 @@  discard block
 block discarded – undo
279 289
             foreach($this->lvs->data['pageData']['urls'] as $type => $url) {
280 290
             	// awu Replacing action=DisplayDashlet with action=DynamicAction&DynamicAction=DisplayDashlet
281 291
                 $this->lvs->data['pageData']['urls'][$type] = $url.'&action=DynamicAction&DynamicAction=displayDashlet';
282
-                if($type != 'orderBy')
283
-                    $this->lvs->data['pageData']['urls'][$type] = $url.'&action=DynamicAction&DynamicAction=displayDashlet&sugar_body_only=1&id=' . $this->id;
292
+                if($type != 'orderBy') {
293
+                                    $this->lvs->data['pageData']['urls'][$type] = $url.'&action=DynamicAction&DynamicAction=displayDashlet&sugar_body_only=1&id=' . $this->id;
294
+                }
284 295
             }
285 296
 
286 297
             $this->lvs->ss->assign('dashletId', $this->id);
@@ -424,8 +435,9 @@  discard block
 block discarded – undo
424 435
 		if($rows > 100){
425 436
 			$rows = 100;
426 437
 		}
427
-        if ( isset($req['autoRefresh']) )
428
-            $options['autoRefresh'] = $req['autoRefresh'];
438
+        if ( isset($req['autoRefresh']) ) {
439
+                    $options['autoRefresh'] = $req['autoRefresh'];
440
+        }
429 441
         $options['rows'] = $rows;
430 442
 		$options['categories'] = $req['categories'];
431 443
 		foreach($options['categories'] as $cat){
@@ -550,8 +562,7 @@  discard block
 block discarded – undo
550 562
 
551 563
         if($current_user->getPreference('use_real_names') == 'on'){
552 564
             $ss->assign('user_name', $current_user->full_name);
553
-        }
554
-        else {
565
+        } else {
555 566
             $ss->assign('user_name', $user_name);
556 567
         }
557 568
         $linkTypesIn = SugarFeed::getLinkTypes();
Please login to merge, or discard this patch.
modules/ProjectTask/updateDependencies.php 1 patch
Braces   +4 added lines, -3 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.
@@ -68,8 +70,7 @@  discard block
 block discarded – undo
68 70
                     $task->date_finish = $enddate;
69 71
                     $task->save();
70 72
 
71
-                }
72
-                else if($rel_type == 'SS'){//if its a start to start
73
+                } else if($rel_type == 'SS'){//if its a start to start
73 74
                     //check if the tasks duration has not been changed so that it does not update when the parent tasks duration is changed
74 75
                     if($bean->fetched_row['duration'] == $bean->duration){
75 76
 
Please login to merge, or discard this patch.
modules/ProjectTask/metadata/additionalDetails.php 1 patch
Braces   +24 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.
@@ -49,16 +51,30 @@  discard block
 block discarded – undo
49 51
 	}
50 52
 		
51 53
 	$overlib_string = '';
52
-	if(!empty($fields['PRIORITY'])) $overlib_string .= '<b>' . $mod_strings['LBL_PRIORITY'] . '</b> ' . $fields['PRIORITY'] . '<br>';
53
-	if(!empty($fields['PERCENT_COMPLETE'])) $overlib_string .= '<b>' . $mod_strings['LBL_PERCENT_COMPLETE'] . '</b> ' . $fields['PERCENT_COMPLETE'] . '%<br>';	
54
-	if(!empty($fields['ESTIMATED_EFFORT'])) $overlib_string .= '<b>' . $mod_strings['LBL_ESTIMATED_EFFORT'] . '</b> ' . $fields['ESTIMATED_EFFORT'] . '<br>';	
55
-	if(!empty($fields['ACTUAL_EFFORT'])) $overlib_string .= '<b>' . $mod_strings['LBL_ACTUAL_EFFORT'] . '</b> ' . $fields['ACTUAL_EFFORT'] . '<br>';
56
-	if(!empty($fields['TASK_NUMBER'])) $overlib_string .= '<b>' . $mod_strings['LBL_TASK_NUMBER'] . '</b> ' . $fields['TASK_NUMBER'] . '<br>';
57
-	if(!empty($fields['DATE_START'])) $overlib_string .= '<b>' . $mod_strings['LBL_DATE_START'] . '</b> ' . $fields['DATE_START'] . ' ' . $fields['TIME_START'] . '<br>';
54
+	if(!empty($fields['PRIORITY'])) {
55
+	    $overlib_string .= '<b>' . $mod_strings['LBL_PRIORITY'] . '</b> ' . $fields['PRIORITY'] . '<br>';
56
+	}
57
+	if(!empty($fields['PERCENT_COMPLETE'])) {
58
+	    $overlib_string .= '<b>' . $mod_strings['LBL_PERCENT_COMPLETE'] . '</b> ' . $fields['PERCENT_COMPLETE'] . '%<br>';
59
+	}
60
+	if(!empty($fields['ESTIMATED_EFFORT'])) {
61
+	    $overlib_string .= '<b>' . $mod_strings['LBL_ESTIMATED_EFFORT'] . '</b> ' . $fields['ESTIMATED_EFFORT'] . '<br>';
62
+	}
63
+	if(!empty($fields['ACTUAL_EFFORT'])) {
64
+	    $overlib_string .= '<b>' . $mod_strings['LBL_ACTUAL_EFFORT'] . '</b> ' . $fields['ACTUAL_EFFORT'] . '<br>';
65
+	}
66
+	if(!empty($fields['TASK_NUMBER'])) {
67
+	    $overlib_string .= '<b>' . $mod_strings['LBL_TASK_NUMBER'] . '</b> ' . $fields['TASK_NUMBER'] . '<br>';
68
+	}
69
+	if(!empty($fields['DATE_START'])) {
70
+	    $overlib_string .= '<b>' . $mod_strings['LBL_DATE_START'] . '</b> ' . $fields['DATE_START'] . ' ' . $fields['TIME_START'] . '<br>';
71
+	}
58 72
 		
59 73
 	if(!empty($fields['DESCRIPTION'])) {
60 74
 		$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
61
-		if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
75
+		if(strlen($fields['DESCRIPTION']) > 300) {
76
+		    $overlib_string .= '...';
77
+		}
62 78
 	}	
63 79
 
64 80
 	return array('fieldToAddTo' => 'NAME', 
Please login to merge, or discard this patch.
modules/Calls/SubPanelViewInvitees.php 1 patch
Braces   +13 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.
@@ -65,14 +67,19 @@  discard block
 block discarded – undo
65 67
 
66 68
 $button  = "<table cellspacing='0' cellpadding='1' border='0'><form border='0' action='index.php' method='post' name='form' id='form'>\n";
67 69
 $button .= "<input type='hidden' name='module' value='Contacts'>\n";
68
-if ($currentModule == 'Accounts') $button .= "<input type='hidden' name='account_id' value='$focus->id'>\n<input type='hidden' name='account_name' value='$focus->name'>\n";
70
+if ($currentModule == 'Accounts') {
71
+    $button .= "<input type='hidden' name='account_id' value='$focus->id'>\n<input type='hidden' name='account_name' value='$focus->name'>\n";
72
+}
69 73
 $button .= "<input type='hidden' name='return_module' value='".$currentModule."'>\n";
70 74
 $button .= "<input type='hidden' name='return_action' value='".$action."'>\n";
71 75
 $button .= "<input type='hidden' name='return_id' value='".$focus->id."'>\n";
72 76
 $button .= "<input type='hidden' name='action'>\n";
73 77
 $button .= "<tr><td>&nbsp;</td>";
74
-if ($focus->parent_type == "Accounts") $button .= "<td><input title='".$app_strings['LBL_SELECT_CONTACT_BUTTON_TITLE']."' type='button' class='button' value='".$app_strings['LBL_SELECT_CONTACT_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Contacts&action=Popup&html=Popup_picker&form=DetailView&form_submit=true&query=true&account_id=$focus->parent_id&account_name=".urlencode($focus->parent_name)."\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n";
75
-else $button .= "<td><input title='".$app_strings['LBL_SELECT_CONTACT_BUTTON_TITLE']."'  type='button' class='button' value='".$app_strings['LBL_SELECT_CONTACT_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Contacts&action=Popup&html=Popup_picker&form=DetailView&form_submit=true\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n";
78
+if ($focus->parent_type == "Accounts") {
79
+    $button .= "<td><input title='".$app_strings['LBL_SELECT_CONTACT_BUTTON_TITLE']."' type='button' class='button' value='".$app_strings['LBL_SELECT_CONTACT_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Contacts&action=Popup&html=Popup_picker&form=DetailView&form_submit=true&query=true&account_id=$focus->parent_id&account_name=".urlencode($focus->parent_name)."\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n";
80
+} else {
81
+    $button .= "<td><input title='".$app_strings['LBL_SELECT_CONTACT_BUTTON_TITLE']."'  type='button' class='button' value='".$app_strings['LBL_SELECT_CONTACT_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Contacts&action=Popup&html=Popup_picker&form=DetailView&form_submit=true\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n";
82
+}
76 83
 $button .= "<td><input title='".$app_strings['LBL_SELECT_USER_BUTTON_TITLE']."'  type='button' class='button' value='".$app_strings['LBL_SELECT_USER_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Users&action=Popup&html=Popup_picker&form=DetailView&form_submit=true\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n";
77 84
 $button .= "</tr></form></table>\n";
78 85
 
@@ -102,8 +109,7 @@  discard block
 block discarded – undo
102 109
     {
103 110
         //todo move to themes
104 111
 		$xtpl->assign("ROW_COLOR", 'oddListRow');
105
-    }
106
-    else
112
+    } else
107 113
     {
108 114
         //todo move to themes
109 115
 		$xtpl->assign("ROW_COLOR", 'evenListRow');
@@ -135,8 +141,7 @@  discard block
 block discarded – undo
135 141
     {
136 142
         //todo move to themes
137 143
 		$xtpl->assign("ROW_COLOR", 'oddListRow');
138
-    }
139
-    else
144
+    } else
140 145
     {
141 146
         //todo move to themes
142 147
 		$xtpl->assign("ROW_COLOR", 'evenListRow');
Please login to merge, or discard this patch.
modules/Calls/Call.php 1 patch
Braces   +49 added lines, -40 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.
@@ -134,8 +136,9 @@  discard block
 block discarded – undo
134 136
 
135 137
 
136 138
 
137
-         if(!empty($GLOBALS['app_list_strings']['duration_intervals']))
138
-        	$this->minutes_values = $GLOBALS['app_list_strings']['duration_intervals'];
139
+         if(!empty($GLOBALS['app_list_strings']['duration_intervals'])) {
140
+                 	$this->minutes_values = $GLOBALS['app_list_strings']['duration_intervals'];
141
+         }
139 142
 	}
140 143
 
141 144
 	/**
@@ -284,16 +287,17 @@  discard block
 block discarded – undo
284 287
 			$where_auto = '1=1';
285 288
        		 if($show_deleted == 0){
286 289
             	$where_auto = " $this->table_name.deleted=0  ";
287
-			}else if($show_deleted == 1){
290
+			} else if($show_deleted == 1){
288 291
 				$where_auto = " $this->table_name.deleted=1 ";
289 292
 			}
290 293
 
291 294
 			//$where_auto .= " GROUP BY calls.id";
292 295
 
293
-		if($where != "")
294
-			$query .= "where $where AND ".$where_auto;
295
-		else
296
-			$query .= "where ".$where_auto;
296
+		if($where != "") {
297
+					$query .= "where $where AND ".$where_auto;
298
+		} else {
299
+					$query .= "where ".$where_auto;
300
+		}
297 301
 
298 302
         $order_by = $this->process_order_by($order_by);
299 303
         if (empty($order_by)) {
@@ -315,8 +319,7 @@  discard block
 block discarded – undo
315 319
                     $query .= $custom_join['select'];
316 320
                     $query .= " FROM contacts, calls, calls_contacts ";
317 321
                     $where_auto = "calls_contacts.contact_id = contacts.id AND calls_contacts.call_id = calls.id AND calls.deleted=0 AND contacts.deleted=0";
318
-            }
319
-            else
322
+            } else
320 323
             {
321 324
                     $query = 'SELECT calls.*, users.user_name as assigned_user_name ';
322 325
                     $query .= $custom_join['select'];
@@ -329,10 +332,11 @@  discard block
 block discarded – undo
329 332
 
330 333
             $query .= $custom_join['join'];
331 334
 
332
-			if($where != "")
333
-                    $query .= "where $where AND ".$where_auto;
334
-            else
335
-                    $query .= "where ".$where_auto;
335
+			if($where != "") {
336
+			                    $query .= "where $where AND ".$where_auto;
337
+			} else {
338
+                                $query .= "where ".$where_auto;
339
+            }
336 340
 
337 341
         $order_by = $this->process_order_by($order_by);
338 342
         if (empty($order_by)) {
@@ -376,10 +380,12 @@  discard block
 block discarded – undo
376 380
 			$this->date_start = $timedate->now();
377 381
 		}
378 382
 
379
-		if (is_null($this->duration_hours))
380
-			$this->duration_hours = "0";
381
-		if (is_null($this->duration_minutes))
382
-			$this->duration_minutes = "1";
383
+		if (is_null($this->duration_hours)) {
384
+					$this->duration_hours = "0";
385
+		}
386
+		if (is_null($this->duration_minutes)) {
387
+					$this->duration_minutes = "1";
388
+		}
383 389
 
384 390
 		$this->fill_in_additional_parent_fields();
385 391
 
@@ -400,8 +406,9 @@  discard block
 block discarded – undo
400 406
 
401 407
 		if ( empty($this->id) ) {
402 408
 		    $reminder_t = $GLOBALS['current_user']->getPreference('reminder_time');
403
-		    if ( isset($reminder_t) )
404
-		        $this->reminder_time = $reminder_t;
409
+		    if ( isset($reminder_t) ) {
410
+		    		        $this->reminder_time = $reminder_t;
411
+		    }
405 412
 		}
406 413
 		$this->reminder_checked = $this->reminder_time == -1 ? false : true;
407 414
 
@@ -410,8 +417,9 @@  discard block
 block discarded – undo
410 417
 		}
411 418
 		if(empty($this->id)){
412 419
 			$reminder_t = $GLOBALS['current_user']->getPreference('email_reminder_time');
413
-			if(isset($reminder_t))
414
-		    		$this->email_reminder_time = $reminder_t;
420
+			if(isset($reminder_t)) {
421
+					    		$this->email_reminder_time = $reminder_t;
422
+			}
415 423
 		}
416 424
 		$this->email_reminder_checked = $this->email_reminder_time == -1 ? false : true;
417 425
 
@@ -426,16 +434,20 @@  discard block
 block discarded – undo
426 434
 	function get_list_view_data(){
427 435
 		$call_fields = $this->get_list_view_array();
428 436
 		global $app_list_strings, $focus, $action, $currentModule;
429
-		if (isset($focus->id)) $id = $focus->id;
430
-		else $id = '';
437
+		if (isset($focus->id)) {
438
+		    $id = $focus->id;
439
+		} else {
440
+		    $id = '';
441
+		}
431 442
 		if (isset($this->parent_type) && $this->parent_type != null)
432 443
 		{
433 444
 			$call_fields['PARENT_MODULE'] = $this->parent_type;
434 445
 		}
435 446
 		if ($this->status == "Planned") {
436 447
 			//cn: added this if() to deal with sequential Closes in Meetings.  this is a hack to a hack (formbase.php->handleRedirect)
437
-			if(empty($action))
438
-			    $action = "index";
448
+			if(empty($action)) {
449
+						    $action = "index";
450
+			}
439 451
 
440 452
             $setCompleteUrl = "<a id='{$this->id}' onclick='SUGAR.util.closeActivityPanel.show(\"{$this->module_dir}\",\"{$this->id}\",\"Held\",\"listview\",\"1\");'>";
441 453
 			if ($this->ACLAccess('edit')) {
@@ -451,9 +463,9 @@  discard block
 block discarded – undo
451 463
 		$date_db = $timedate->to_db($mergeTime);
452 464
 		if( $date_db	< $today){
453 465
 			$call_fields['DATE_START']= "<font class='overdueTask'>".$call_fields['DATE_START']."</font>";
454
-		}else if($date_db < $nextday){
466
+		} else if($date_db < $nextday){
455 467
 			$call_fields['DATE_START'] = "<font class='todaysTask'>".$call_fields['DATE_START']."</font>";
456
-		}else{
468
+		} else{
457 469
 			$call_fields['DATE_START'] = "<font class='futureTask'>".$call_fields['DATE_START']."</font>";
458 470
 		}
459 471
 		$this->fill_in_additional_detail_fields();
@@ -583,14 +595,12 @@  discard block
 block discarded – undo
583 595
       {
584 596
         vCal::cache_sugar_vcal($user);
585 597
       }
586
-    }
587
-    else if ( $user->object_name == 'Contact')
598
+    } else if ( $user->object_name == 'Contact')
588 599
     {
589 600
       $relate_values = array('contact_id'=>$user->id,'call_id'=>$this->id);
590 601
       $data_values = array('accept_status'=>$status);
591 602
       $this->set_relationship($this->rel_contacts_table, $relate_values, true, true,$data_values);
592
-    }
593
-    else if ( $user->object_name == 'Lead')
603
+    } else if ( $user->object_name == 'Lead')
594 604
     {
595 605
       $relate_values = array('lead_id'=>$user->id,'call_id'=>$this->id);
596 606
       $data_values = array('accept_status'=>$status);
@@ -645,8 +655,9 @@  discard block
 block discarded – undo
645 655
 		global $sugar_config;
646 656
 		if(isset($sugar_config['disable_notify_current_user']) && $sugar_config['disable_notify_current_user']) {
647 657
 			global $current_user;
648
-			if(isset($list[$current_user->id]))
649
-				unset($list[$current_user->id]);
658
+			if(isset($list[$current_user->id])) {
659
+							unset($list[$current_user->id]);
660
+			}
650 661
 		}
651 662
 //		$GLOBALS['log']->debug('Call.php->get_notification_recipients():'.print_r($list,true));
652 663
 		return $list;
@@ -690,7 +701,7 @@  discard block
 block discarded – undo
690 701
 			if(!ACLController::moduleSupportsACL($this->parent_type) || ACLController::checkAccess($this->parent_type, 'view', $is_owner, 'module', $in_group)){
691 702
         	/* END - SECURITY GROUPS */
692 703
 				$array_assign['PARENT'] = 'a';
693
-			}else{
704
+			} else{
694 705
 				$array_assign['PARENT'] = 'span';
695 706
 			}
696 707
 		$is_owner = false;
@@ -721,7 +732,7 @@  discard block
 block discarded – undo
721 732
 			if( ACLController::checkAccess('Contacts', 'view', $is_owner, 'module', $in_group)){
722 733
         	/* END - SECURITY GROUPS */
723 734
 				$array_assign['CONTACT'] = 'a';
724
-			}else{
735
+			} else{
725 736
 				$array_assign['CONTACT'] = 'span';
726 737
 			}
727 738
 
@@ -738,13 +749,11 @@  discard block
 block discarded – undo
738 749
                 if(!empty($GLOBALS['soap_server_object']))
739 750
                 {
740 751
            		    $exclude = array('lead_id', 'contact_id', 'user_id');
741
-           	    }
742
-                else
752
+           	    } else
743 753
                 {
744 754
 	                $exclude = array('lead_id', 'contact_id', 'user_id', 'assigned_user_id');
745 755
            	    }
746
-            }
747
-            else
756
+            } else
748 757
             {
749 758
                 $exclude = array('user_id');
750 759
             }
Please login to merge, or discard this patch.
modules/Calls/metadata/additionalDetails.php 1 patch
Braces   +6 added lines, -2 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.
@@ -91,7 +93,9 @@  discard block
 block discarded – undo
91 93
       }
92 94
 	if(!empty($fields['DESCRIPTION'])) {
93 95
 		$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
94
-		if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
96
+		if(strlen($fields['DESCRIPTION']) > 300) {
97
+		    $overlib_string .= '...';
98
+		}
95 99
 		$overlib_string .= '<br>';
96 100
 	}
97 101
     $overlib_string .= '<br>';
Please login to merge, or discard this patch.
modules/Emails/SubPanelViewRecipients.php 1 patch
Braces   +13 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.
@@ -63,14 +65,19 @@  discard block
 block discarded – undo
63 65
 
64 66
 $button  = "<table cellspacing='0' cellpadding='1' border='0'><form border='0' action='index.php' method='post' name='form' id='form'>\n";
65 67
 $button .= "<input type='hidden' name='module' value='Contacts'>\n";
66
-if ($currentModule == 'Accounts') $button .= "<input type='hidden' name='account_id' value='$focus->id'>\n<input type='hidden' name='account_name' value='$focus->name'>\n";
68
+if ($currentModule == 'Accounts') {
69
+    $button .= "<input type='hidden' name='account_id' value='$focus->id'>\n<input type='hidden' name='account_name' value='$focus->name'>\n";
70
+}
67 71
 $button .= "<input type='hidden' name='return_module' value='".$currentModule."'>\n";
68 72
 $button .= "<input type='hidden' name='return_action' value='".$action."'>\n";
69 73
 $button .= "<input type='hidden' name='return_id' value='".$focus->id."'>\n";
70 74
 $button .= "<input type='hidden' name='action'>\n";
71 75
 $button .= "<tr><td>&nbsp;</td>";
72
-if ($focus->parent_type == "Accounts") $button .= "<td><input title='".$app_strings['LBL_SELECT_CONTACT_BUTTON_TITLE']."' type='button' class='button' value='".$app_strings['LBL_SELECT_CONTACT_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Contacts&action=Popup&html=Popup_picker&form=DetailView&form_submit=true&query=true&account_id=$focus->parent_id&account_name=".urlencode($focus->parent_name)."\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n";
73
-else $button .= "<td><input title='".$app_strings['LBL_SELECT_CONTACT_BUTTON_TITLE']."' type='button' class='button' value='".$app_strings['LBL_SELECT_CONTACT_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Contacts&action=Popup&html=Popup_picker&form=DetailView&form_submit=true\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n";
76
+if ($focus->parent_type == "Accounts") {
77
+    $button .= "<td><input title='".$app_strings['LBL_SELECT_CONTACT_BUTTON_TITLE']."' type='button' class='button' value='".$app_strings['LBL_SELECT_CONTACT_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Contacts&action=Popup&html=Popup_picker&form=DetailView&form_submit=true&query=true&account_id=$focus->parent_id&account_name=".urlencode($focus->parent_name)."\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n";
78
+} else {
79
+    $button .= "<td><input title='".$app_strings['LBL_SELECT_CONTACT_BUTTON_TITLE']."' type='button' class='button' value='".$app_strings['LBL_SELECT_CONTACT_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Contacts&action=Popup&html=Popup_picker&form=DetailView&form_submit=true\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n";
80
+}
74 81
 $button .= "<td><input title='".$app_strings['LBL_SELECT_USER_BUTTON_TITLE']."' type='button' class='button' value='".$app_strings['LBL_SELECT_USER_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Users&action=Popup&html=Popup_picker&form=DetailView&form_submit=true\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n";
75 82
 $button .= "</tr></form></table>\n";
76 83
 
@@ -100,8 +107,7 @@  discard block
 block discarded – undo
100 107
     {
101 108
         //todo move to themes
102 109
 		$xtpl->assign("ROW_COLOR", 'oddListRow');
103
-    }
104
-    else
110
+    } else
105 111
     {
106 112
         //todo move to themes
107 113
 		$xtpl->assign("ROW_COLOR", 'evenListRow');
@@ -135,8 +141,7 @@  discard block
 block discarded – undo
135 141
     {
136 142
         //todo move to themes
137 143
 		$xtpl->assign("ROW_COLOR", 'oddListRow');
138
-    }
139
-    else
144
+    } else
140 145
     {
141 146
         //todo move to themes
142 147
 		$xtpl->assign("ROW_COLOR", 'evenListRow');
Please login to merge, or discard this patch.
modules/Activities/SetAcceptStatus.php 1 patch
Braces   +4 added lines, -3 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.
@@ -50,8 +52,7 @@  discard block
 block discarded – undo
50 52
         $focus = new Meeting();
51 53
         $focus->id = $_REQUEST['object_id'];
52 54
         $test = $focus->set_accept_status($current_user, $_REQUEST['accept_status']);
53
-    }
54
-    else if ($_REQUEST['object_type'] == "Call")
55
+    } else if ($_REQUEST['object_type'] == "Call")
55 56
     {
56 57
         $focus = new Call();
57 58
         $focus->id = $_REQUEST['object_id'];
Please login to merge, or discard this patch.