Test Failed
Push — CI ( 0f01dd...c95a04 )
by Adam
55:13
created
modules/Administration/RebuildDashlets.php 1 patch
Braces   +7 added lines, -4 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,9 +52,10 @@  discard block
 block discarded – undo
50 52
 
51 53
     $dc = new DashletCacheBuilder();
52 54
     $dc->buildCache();
53
-   if( !$silent ) echo '<br><br><br><br>' . $mod_strings['LBL_REBUILD_DASHLETS_DESC_SUCCESS'];
54
-}
55
-else{
55
+   if( !$silent ) {
56
+       echo '<br><br><br><br>' . $mod_strings['LBL_REBUILD_DASHLETS_DESC_SUCCESS'];
57
+   }
58
+   } else{
56 59
 	sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']);
57 60
 }
58 61
 ?>
59 62
\ No newline at end of file
Please login to merge, or discard this patch.
modules/Administration/UpgradeWizardCommon.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.
@@ -54,8 +56,7 @@  discard block
 block discarded – undo
54 56
     if( $view != "default" && $view != "module" ){
55 57
         die($mod_strings['ERR_UW_INVALID_VIEW']);
56 58
     }
57
-}
58
-else{
59
+} else{
59 60
     die($mod_strings['ERR_UW_NO_VIEW']);
60 61
 }
61 62
 $form_action = "index.php?module=Administration&view=" . $view . "&action=UpgradeWizard";
Please login to merge, or discard this patch.
modules/Administration/updateTimezonePrefs.php 1 patch
Braces   +15 added lines, -11 removed lines patch added patch discarded remove patch
@@ -44,7 +44,9 @@  discard block
 block discarded – undo
44 44
 
45 45
 <table>
46 46
 <?php
47
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
47
+if(!defined('sugarEntry') || !sugarEntry) {
48
+    die('Not A Valid Entry Point');
49
+}
48 50
 $prompt_users = 'checked';
49 51
 if(isset($_POST['preview']) && !isset($_POST['prompt_users'])){
50 52
 	$prompt_users = '';
@@ -66,7 +68,9 @@  discard block
 block discarded – undo
66 68
 	}
67 69
 	
68 70
 		$string = "Preview";
69
-		if($execute)$string = "Updating";
71
+		if($execute) {
72
+		    $string = "Updating";
73
+		}
70 74
         echo "<tr><td> $string timezone preferences for user <b>{$row['user_name']}</b>...</td><td>";
71 75
 		
72 76
         
@@ -93,20 +97,20 @@  discard block
 block discarded – undo
93 97
 	                   	 	$setTo = $selectedZone;
94 98
 	                   	 	if(empty($prompt_users)){
95 99
 	                   			$newprefs['ut']=1;
96
-	                   	 	}else{
100
+	                   	 	} else{
97 101
 	                   	 		$newprefs['ut']=0;
98 102
 	                   	 	}
99
-	                	}else{
103
+	                	} else{
100 104
 	                		$newprefs['timezone'] = $serverTimeZone;   
101 105
 	                   	 	$newprefs['timez']  = $val;
102 106
 	                   	 	$setTo = $serverTimeZone;
103 107
 	                   	 	if(empty($prompt_users)){
104 108
 	                   			$newprefs['ut']=1;
105
-	                   	 	}else{
109
+	                   	 	} else{
106 110
 	                   	 		$newprefs['ut']=0;
107 111
 	                   	 	}
108 112
 	                	}
109
-	                }else{
113
+	                } else{
110 114
 	                	$newprefs[$key] = $val;
111 115
 	                	if(!empty($prefs['timezone'])){
112 116
 	                		$alreadySet = 'Previously Set - '. $prefs['timezone'];	
@@ -114,7 +118,7 @@  discard block
 block discarded – undo
114 118
 	                }
115 119
 	                
116 120
 	         
117
-	                }else{
121
+	                } else{
118 122
 	                	$newprefs[$key] = $val;
119 123
 	                }
120 124
 	        }
@@ -125,10 +129,10 @@  discard block
 block discarded – undo
125 129
 	        }
126 130
 		if(!empty($setTo)){
127 131
 			echo $setTo;
128
-		}else{
132
+		} else{
129 133
 			if(!empty($alreadySet)){
130 134
 				echo $alreadySet;
131
-			}else{
135
+			} else{
132 136
 				echo $serverTimeZone;
133 137
 				$prefs['timezone'] = $serverTimeZone;
134 138
 			}
@@ -140,7 +144,7 @@  discard block
 block discarded – undo
140 144
 			if(isset($_POST[$row['id'].'adjust'])){
141 145
 				echo  $adjustment;
142 146
 			}
143
-		}else{
147
+		} else{
144 148
 			echo "<select name='{$row['id']}adjust'>";
145 149
 			
146 150
 			echo get_select_options_with_id(array('-1'=>'-1', 'none'=>'0', '1'=>'+1'), $adjustment.'');
@@ -165,7 +169,7 @@  discard block
 block discarded – undo
165 169
 if($execute){
166 170
 	echo "<br>All timezone preferences updated!<br><br>";
167 171
 	
168
-}else{
172
+} else{
169 173
 	echo "Prompt users on login to confirm:<input type='checkbox' name='prompt_users' value='1' $prompt_users><br>";
170 174
 	echo "<input class='button' type='submit' name='execute' value='Execute'>&nbsp; <input class='button' type='submit' name='preview' value='Preview'>";
171 175
 	
Please login to merge, or discard this patch.
modules/InboundEmail/AOPInboundEmail.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
             }
74 74
             if($email->description_html) {
75 75
                 $c->description = $this->processImageLinks(SugarCleaner::cleanHtml($email->description_html),$noteIds);
76
-            }else{
76
+            } else{
77 77
                 $c->description = $email->description;
78 78
             }
79 79
             $c->assigned_user_id = $userId;
Please login to merge, or discard this patch.
modules/AM_ProjectTemplates/controller.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,9 @@  discard block
 block discarded – undo
19 19
  * @author Andrew Mclaughlan <[email protected]>
20 20
  */
21 21
 
22
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
22
+if(!defined('sugarEntry') || !sugarEntry) {
23
+    die('Not A Valid Entry Point');
24
+}
23 25
 
24 26
 class AM_ProjectTemplatesController extends SugarController {
25 27
 
@@ -100,8 +102,7 @@  discard block
 block discarded – undo
100 102
                 $project_task->date_finish = $end;
101 103
                 $enddate_array[$count] = $end;
102 104
                 $GLOBALS['log']->fatal("DATE:". $end);
103
-            }
104
-            else {
105
+            } else {
105 106
                 $start_date = $count - 1;
106 107
                 $startdate = DateTime::createFromFormat('Y-m-d', $enddate_array[$start_date]);
107 108
                 $GLOBALS['log']->fatal("DATE:". $enddate_array[$start_date]);
Please login to merge, or discard this patch.
modules/Tasks/metadata/additionalDetails.php 1 patch
Braces   +18 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.
@@ -53,10 +55,16 @@  discard block
 block discarded – undo
53 55
            	$overlib_string .= '<br>';
54 56
        }
55 57
 
56
-    if(!empty($fields['DATE_START'])) $overlib_string .= '<b>'. $mod_strings['LBL_START_DATE_AND_TIME'] . '</b> ' . $fields['DATE_START'] .  '<br>';
57
-	if(!empty($fields['DATE_DUE'])) $overlib_string .= '<b>'. $mod_strings['LBL_DUE_DATE_AND_TIME'] . '</b> ' . $fields['DATE_DUE'] .  '<br>';
58
-	if(!empty($fields['PRIORITY'])) $overlib_string .= '<b>'. $mod_strings['LBL_PRIORITY'] . '</b> ' . 
58
+    if(!empty($fields['DATE_START'])) {
59
+        $overlib_string .= '<b>'. $mod_strings['LBL_START_DATE_AND_TIME'] . '</b> ' . $fields['DATE_START'] .  '<br>';
60
+    }
61
+	if(!empty($fields['DATE_DUE'])) {
62
+	    $overlib_string .= '<b>'. $mod_strings['LBL_DUE_DATE_AND_TIME'] . '</b> ' . $fields['DATE_DUE'] .  '<br>';
63
+	}
64
+	if(!empty($fields['PRIORITY'])) {
65
+	    $overlib_string .= '<b>'. $mod_strings['LBL_PRIORITY'] . '</b> ' . 
59 66
 $app_list_strings['task_priority_dom'][$fields['PRIORITY']] . '<br>';
67
+	}
60 68
     if (!empty($fields['PARENT_ID']))
61 69
     {
62 70
             $overlib_string .= "<b>". $mod_strings['LBL_RELATED_TO'] . "</b> ".
@@ -64,11 +72,15 @@  discard block
 block discarded – undo
64 72
                     $fields['PARENT_NAME'] . "</a>";
65 73
             $overlib_string .= '<br>';
66 74
     }
67
-    if(!empty($fields['STATUS'])) $overlib_string .= '<b>'. $mod_strings['LBL_STATUS'] . '</b> ' . $app_list_strings['task_status_dom'][$fields['STATUS']] . '<br>';
75
+    if(!empty($fields['STATUS'])) {
76
+        $overlib_string .= '<b>'. $mod_strings['LBL_STATUS'] . '</b> ' . $app_list_strings['task_status_dom'][$fields['STATUS']] . '<br>';
77
+    }
68 78
 		
69 79
 	if(!empty($fields['DESCRIPTION'])) { 
70 80
 		$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
71
-		if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
81
+		if(strlen($fields['DESCRIPTION']) > 300) {
82
+		    $overlib_string .= '...';
83
+		}
72 84
 	}	
73 85
 	
74 86
 		$editLink = "index.php?action=EditView&module=Tasks&record={$fields['ID']}"; 
Please login to merge, or discard this patch.
modules/ACLRoles/EditRole.php 1 patch
Braces   +16 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.
@@ -67,12 +69,12 @@  discard block
 block discarded – undo
67 69
 	if(!empty($_REQUEST['isDuplicate'])){
68 70
 		//role id is stripped here in duplicate so anything using role id after this will not have it
69 71
 		$role->id = '';
70
-	}else{
72
+	} else{
71 73
 		$return['record']= $role->id;
72 74
 		$return['action']='DetailView';
73 75
 	}
74 76
 	
75
-}else{
77
+} else{
76 78
 	$categories = ACLRole::getRoleActions('');
77 79
 }
78 80
 $sugar_smarty->assign('ROLE', $role->toArray());
@@ -80,13 +82,19 @@  discard block
 block discarded – undo
80 82
 
81 83
 if(isset($_REQUEST['return_module'])){
82 84
 	$return['module']=$_REQUEST['return_module'];
83
-	if(isset($_REQUEST['return_action']))$return['action']=$_REQUEST['return_action'];
84
-	if(isset($_REQUEST['return_record']))$return['record']=$_REQUEST['return_record'];
85
-}
85
+	if(isset($_REQUEST['return_action'])) {
86
+	    $return['action']=$_REQUEST['return_action'];
87
+	}
88
+	if(isset($_REQUEST['return_record'])) {
89
+	    $return['record']=$_REQUEST['return_record'];
90
+	}
91
+	}
86 92
 
87 93
 $sugar_smarty->assign('RETURN', $return);
88 94
 $names = ACLAction::setupCategoriesMatrix($categories);
89
-if(!empty($names))$tdwidth = 100 / sizeof($names);
95
+if(!empty($names)) {
96
+    $tdwidth = 100 / sizeof($names);
97
+}
90 98
 $sugar_smarty->assign('CATEGORIES', $categories);
91 99
 $sugar_smarty->assign('CATEGORY_NAME', $_REQUEST['category_name']);
92 100
 $sugar_smarty->assign('TDWIDTH', $tdwidth);
@@ -97,7 +105,7 @@  discard block
 block discarded – undo
97 105
 
98 106
 if($_REQUEST['category_name'] == 'All'){
99 107
 	echo $sugar_smarty->fetch('modules/ACLRoles/EditAllBody.tpl');	
100
-}else{
108
+} else{
101 109
 //WDong Bug 23195: Strings not localized in Role Management.
102 110
 echo getClassicModuleTitle($_REQUEST['category_name'],array($app_list_strings['moduleList'][$_REQUEST['category_name']]), false);
103 111
 echo $sugar_smarty->fetch('modules/ACLRoles/EditRole.tpl');
Please login to merge, or discard this patch.
modules/ACLRoles/DetailUserRole.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.
@@ -72,7 +74,9 @@  discard block
 block discarded – undo
72 74
     
73 75
     $names = array();
74 76
     $names = ACLAction::setupCategoriesMatrix($categories);
75
-    if(!empty($names))$tdwidth = 100 / sizeof($names);
77
+    if(!empty($names)) {
78
+        $tdwidth = 100 / sizeof($names);
79
+    }
76 80
     $sugar_smarty->assign('APP', $app_list_strings);
77 81
     $sugar_smarty->assign('CATEGORIES', $categories);
78 82
     $sugar_smarty->assign('TDWIDTH', $tdwidth);
Please login to merge, or discard this patch.
modules/ACLRoles/ACLRole.php 1 patch
Braces   +14 added lines, -10 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.
@@ -102,10 +104,11 @@  discard block
 block discarded – undo
102 104
         while($row = $GLOBALS['db']->fetchByAssoc($result) ){
103 105
             $role = new ACLRole();
104 106
             $role->populateFromRow($row);
105
-            if($getAsNameArray)
106
-                $user_roles[] = $role->name;
107
-            else
108
-                $user_roles[] = $role;
107
+            if($getAsNameArray) {
108
+                            $user_roles[] = $role->name;
109
+            } else {
110
+                            $user_roles[] = $role;
111
+            }
109 112
         }
110 113
 
111 114
         return $user_roles;
@@ -164,7 +167,7 @@  discard block
 block discarded – undo
164 167
             $role->populateFromRow($row);
165 168
             if($returnAsArray){
166 169
                 $roles[] = $role->toArray();
167
-            }else{
170
+            } else{
168 171
                 $roles[] = $role;
169 172
             }
170 173
 
@@ -206,7 +209,7 @@  discard block
 block discarded – undo
206 209
             $action->populateFromRow($row);
207 210
             if(!empty($row['access_override'])){
208 211
                 $action->aclaccess = $row['access_override'];
209
-            }else{
212
+            } else{
210 213
                 $action->aclaccess = ACL_ALLOW_DEFAULT;
211 214
 
212 215
             }
@@ -237,8 +240,9 @@  discard block
 block discarded – undo
237 240
         // Fallback to array key if translation is empty
238 241
         $a = empty($app_list_strings['moduleList'][$a]) ? $a : $app_list_strings['moduleList'][$a];
239 242
         $b = empty($app_list_strings['moduleList'][$b]) ? $b : $app_list_strings['moduleList'][$b];
240
-        if ($a == $b)
241
-            return 0;
243
+        if ($a == $b) {
244
+                    return 0;
245
+        }
242 246
         return ($a < $b) ? -1 : 1;
243 247
     }
244 248
 /**
@@ -268,7 +272,7 @@  discard block
 block discarded – undo
268 272
         foreach($array_fields as $field){
269 273
             if(isset($this->$field)){
270 274
                 $arr[$field] = $this->$field;
271
-            }else{
275
+            } else{
272 276
                 $arr[$field] = '';
273 277
             }
274 278
         }
Please login to merge, or discard this patch.