Test Failed
Push — CI ( 0f01dd...c95a04 )
by Adam
55:13
created
modules/Campaigns/CampaignDiagnostic.php 1 patch
Braces   +23 added lines, -15 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.
@@ -76,14 +78,20 @@  discard block
 block discarded – undo
76 78
     {
77 79
 
78 80
 }
79
-}else{
81
+} else{
80 82
     //use html if not inline
81 83
     $ss = new Sugar_Smarty();
82 84
     $ss->assign("MOD", $mod_strings);
83 85
     $ss->assign("APP", $app_strings);
84
-    if (isset($_REQUEST['return_module'])) $ss->assign("RETURN_MODULE", $_REQUEST['return_module']);
85
-    if (isset($_REQUEST['return_action'])) $ss->assign("RETURN_ACTION", $_REQUEST['return_action']);
86
-    if (isset($_REQUEST['return_id'])) $ss->assign("RETURN_ID", $_REQUEST['return_id']);
86
+    if (isset($_REQUEST['return_module'])) {
87
+        $ss->assign("RETURN_MODULE", $_REQUEST['return_module']);
88
+    }
89
+    if (isset($_REQUEST['return_action'])) {
90
+        $ss->assign("RETURN_ACTION", $_REQUEST['return_action']);
91
+    }
92
+    if (isset($_REQUEST['return_id'])) {
93
+        $ss->assign("RETURN_ID", $_REQUEST['return_id']);
94
+    }
87 95
     // handle Create $module then Cancel
88 96
     if (empty($_REQUEST['return_id'])) {
89 97
         $ss->assign("RETURN_ACTION", 'index');
@@ -123,7 +131,7 @@  discard block
 block discarded – undo
123 131
         $mboxTable .= "<td>".$details['status']."</td></tr>";
124 132
     }
125 133
 
126
-}else{
134
+} else{
127 135
     //if array is empty, then set "bad" message and increment health counter
128 136
     $mboxTable .=  "<tr><td colspan='5'><b class='error'>". $mod_strings['LBL_MAILBOX_CHECK1_BAD']."</b></td></tr>";
129 137
     $email_health =$email_health +1;
@@ -141,7 +149,7 @@  discard block
 block discarded – undo
141 149
     //if from address is the default, then set "bad" message and increment health counter
142 150
     $conf_msg .= "<tr><td colspan = '5'><b class='error'> ".$mod_strings['LBL_MAILBOX_CHECK2_BAD']." </b></td></td>";
143 151
     $email_health =$email_health +1;
144
-}else{
152
+} else{
145 153
     $conf_msg .= "<tr><td colspan = '5'><b> ".$mod_strings['LBL_MAILBOX_CHECK2_GOOD']."</b></td></tr>";
146 154
     $conf_msg .= "<tr><th scope='col' width='20%'><b>".$mod_strings['LBL_WIZ_FROM_NAME']."</b></th>"
147 155
                .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_WIZ_FROM_ADDRESS']."</b></th>"
@@ -150,7 +158,7 @@  discard block
 block discarded – undo
150 158
      $conf_msg .= " <th scope='col' width='20%'><b>".$mod_strings['LBL_MAIL_SMTPSERVER']."</b></th>"
151 159
                .  " <th scope='col' width='20%'><b>".$mod_strings['LBL_MAIL_SMTPUSER']."</b></th></tr>";
152 160
 
153
-    }else{$conf_msg .= "</tr>";}
161
+    } else{$conf_msg .= "</tr>";}
154 162
                    
155 163
     
156 164
 
@@ -161,7 +169,7 @@  discard block
 block discarded – undo
161 169
         $conf_msg .= "<td>".$focus->settings['mail_smtpserver']."</td>";
162 170
         $conf_msg .= "<td>".$focus->settings['mail_smtpuser']."</td></tr>";
163 171
 
164
-    }else{$conf_msg .= "</tr>";}       
172
+    } else{$conf_msg .= "</tr>";}       
165 173
 
166 174
 }
167 175
           
@@ -171,7 +179,7 @@  discard block
 block discarded – undo
171 179
 if ($email_health>0){
172 180
     if (is_admin($current_user)){
173 181
         $email_setup_wiz_link="<a href='index.php?module=Campaigns&action=WizardEmailSetup'>".$mod_strings['LBL_EMAIL_SETUP_WIZ']."</a>";
174
-    }else{
182
+    } else{
175 183
         $email_setup_wiz_link=$mod_strings['LBL_NON_ADMIN_ERROR_MSG'];
176 184
     }    
177 185
 }
@@ -204,7 +212,7 @@  discard block
 block discarded – undo
204 212
         $sched_mes_body .= "<td style='text-align: left;'>".$funct['status']."</td></tr>";
205 213
         if($funct['job']==$check_sched1){
206 214
             $check_sched1 ="found";
207
-        }else{
215
+        } else{
208 216
             $check_sched2 ="found";
209 217
         }  
210 218
         
@@ -218,7 +226,7 @@  discard block
 block discarded – undo
218 226
     $sched_mes .= "<tr><th scope='col' width='40%'><b>".$mod_strings['LBL_SCHEDULER_NAME']."</b></tH>"
219 227
                .  " <th scope='col' width='60%'><b>".$mod_strings['LBL_SCHEDULER_STATUS']."</b></tH></tr>";
220 228
             
221
-}else{
229
+} else{
222 230
     $sched_mes = "<table class='other view' cellspacing='1'>";
223 231
     $sched_mes  .= "<tr><td colspan ='3'><font color='red'><b> ".$mod_strings['LBL_SCHEDULER_CHECK_BAD']."</b></font></td></tr>";
224 232
     $show_admin_link = true;
@@ -237,7 +245,7 @@  discard block
 block discarded – undo
237 245
 if ($sched_health>0){
238 246
     if (is_admin($current_user)){
239 247
         $admin_sched_link="<a href='index.php?module=Schedulers&action=index'>".$mod_strings['LBL_SCHEDULER_LINK']."</a>";
240
-    }else{
248
+    } else{
241 249
      $admin_sched_link=$mod_strings['LBL_NON_ADMIN_ERROR_MSG'];   
242 250
     }    
243 251
 }    
@@ -269,13 +277,13 @@  discard block
 block discarded – undo
269 277
         return SugarThemeRegistry::current()->getImage('red_camp', "align='absmiddle'", null, null, ".gif", $mod_strings['LBL_INVALID']);
270 278
 
271 279
 
272
-    }elseif($num == 0){
280
+    } elseif($num == 0){
273 281
         //if health number is zero, then all checks passed, set green image
274 282
         //green
275 283
        return SugarThemeRegistry::current()->getImage('green_camp', "align='absmiddle'", null, null, ".gif", $mod_strings['LBL_VALID']);
276 284
 
277 285
 
278
-    }else{
286
+    } else{
279 287
         //if health number is between total and num params, then some checks failed but not all, set yellow image
280 288
         //yellow
281 289
         return SugarThemeRegistry::current()->getImage('yellow_camp', "align='absmiddle'", null, null, ".gif", $mod_strings['LBL_ALERT']);
Please login to merge, or discard this patch.
modules/Campaigns/WizardMarketingSave.php 1 patch
Braces   +8 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.
@@ -56,15 +58,15 @@  discard block
 block discarded – undo
56 58
     if($_REQUEST['wiz_home_next_step']==3){
57 59
         //user has chosen to save and schedule this campaign for email
58 60
         $master = 'send';
59
-    }elseif($_REQUEST['wiz_home_next_step']==2){
61
+    } elseif($_REQUEST['wiz_home_next_step']==2){
60 62
         //user has chosen to save and send this campaign in test mode
61 63
         $master = 'test';
62
-    }else{
64
+    } else{
63 65
         //user has chosen to simply save
64 66
         $master  = 'save';        
65 67
     }
66 68
         
67
-}else{
69
+} else{
68 70
      //default to just saving and exiting wizard
69 71
      $master = 'save';   
70 72
 }
@@ -84,8 +86,7 @@  discard block
 block discarded – undo
84 86
 
85 87
 if (!empty($_REQUEST['assigned_user_id']) && ($marketing->assigned_user_id != $_REQUEST['assigned_user_id']) && ($_POST['assigned_user_id'] != $current_user->id)) {
86 88
     $check_notify = TRUE;
87
-}
88
-else {
89
+} else {
89 90
     $check_notify = FALSE;
90 91
 }
91 92
 
@@ -122,7 +123,7 @@  discard block
 block discarded – undo
122 123
         } else {
123 124
             $marketing->$field = 0;         
124 125
         }
125
-    }else {
126
+    } else {
126 127
         if(isset($_REQUEST[$field]))
127 128
         {
128 129
             $value = $_REQUEST[$field];
Please login to merge, or discard this patch.
modules/AOR_Conditions/AOR_Condition.php 1 patch
Braces   +5 added lines, -7 removed lines patch added patch discarded remove patch
@@ -80,9 +80,9 @@  discard block
 block discarded – undo
80 80
                                 }
81 81
                         } else if($field_def['name'] == 'value' && $post_data[$key.'value_type'][$i] === 'Value') {
82 82
                             $post_data[$key.$field_def['name']][$i] = fixUpFormatting($_REQUEST['report_module'], $condition->field, $post_data[$key.$field_def['name']][$i]);
83
-                        }else if($field_def['name'] == 'parameter'){
83
+                        } else if($field_def['name'] == 'parameter'){
84 84
                             $post_data[$key.$field_def['name']][$i] = isset($post_data[$key.$field_def['name']][$i]);
85
-                        }else if($field_def['name'] == 'module_path'){
85
+                        } else if($field_def['name'] == 'module_path'){
86 86
                             $post_data[$key.$field_def['name']][$i] = base64_encode(serialize(explode(":",$post_data[$key.$field_def['name']][$i])));
87 87
                         }
88 88
                         if($field_def['name'] == 'parenthesis' && $post_data[$key.$field_def['name']][$i] == 'END') {
@@ -90,11 +90,10 @@  discard block
 block discarded – undo
90 90
                                 throw new Exception('a closure parenthesis has no starter pair');
91 91
                             }
92 92
                             $condition->parenthesis = $lastParenthesisStartConditionId;
93
-                        }
94
-                        else {
93
+                        } else {
95 94
                             $condition->$field_def['name'] = $post_data[$key . $field_def['name']][$i];
96 95
                         }
97
-                    }else if($field_def['name'] == 'parameter'){
96
+                    } else if($field_def['name'] == 'parameter'){
98 97
                         $condition->$field_def['name'] = 0;
99 98
                     }
100 99
 
@@ -108,8 +107,7 @@  discard block
 block discarded – undo
108 107
                 if(trim($condition->field) != '' || $condition->parenthesis){
109 108
                     if(isset($_POST['aor_conditions_order'][$i])) {
110 109
                         $condition->condition_order = (int) $_POST['aor_conditions_order'][$i];
111
-                    }
112
-                    else {
110
+                    } else {
113 111
                         $condition->condition_order = ++$j;
114 112
                     }
115 113
                     $condition->aor_report_id = $parent->id;
Please login to merge, or discard this patch.
modules/AOR_Conditions/conditionLines.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,8 +70,7 @@
 block discarded – undo
70 70
             $html .= "</script>";
71 71
         }
72 72
 
73
-    }
74
-    else if($view == 'DetailView'){
73
+    } else if($view == 'DetailView'){
75 74
         $html .= '<script src="modules/AOR_Conditions/conditionLines.js"></script>';
76 75
         $html .= "<table border='0' cellspacing='0' width='100%' id='conditionLines'></table>";
77 76
 
Please login to merge, or discard this patch.
modules/EmailTemplates/PopupDocumentsCampaignTemplate.php 1 patch
Braces   +8 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.
@@ -94,8 +96,11 @@  discard block
 block discarded – undo
94 96
 $form->assign('MODULE_NAME', $currentModule);
95 97
 $form->assign('NAME', $name);
96 98
 $form->assign('DOCUMENT_NAME', $document_name);
97
-if(isset($_REQUEST['target'])) $form->assign('DOCUMENT_TARGET', $_REQUEST['target']);
98
-else $form->assign('DOCUMENT_TARGET', '');
99
+if(isset($_REQUEST['target'])) {
100
+    $form->assign('DOCUMENT_TARGET', $_REQUEST['target']);
101
+} else {
102
+    $form->assign('DOCUMENT_TARGET', '');
103
+}
99 104
 
100 105
 $form->assign('DOCUMENT_REVISION_ID', $document_revision_id);
101 106
 
Please login to merge, or discard this patch.
modules/EmailTemplates/EmailTemplateFormBase.php 1 patch
Braces   +23 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.
@@ -106,7 +108,9 @@  discard block
 block discarded – undo
106 108
 		if(!empty($mod)) {
107 109
 		global $current_language;
108 110
 		$mod_strings = return_module_language($current_language, $mod);
109
-	}else global $mod_strings;
111
+	} else {
112
+	    global $mod_strings;
113
+	}
110 114
 		global $app_strings;
111 115
 		global $app_list_strings;
112 116
 
@@ -153,14 +157,16 @@  discard block
 block discarded – undo
153 157
         //process the text only flag
154 158
         if(isset($_POST['text_only']) && ($_POST['text_only'] == '1')){
155 159
             $focus->text_only = 1;
156
-        }else{
160
+        } else{
157 161
             $focus->text_only = 0;
158 162
         }
159 163
 		if(!$focus->ACLAccess('Save')) {
160 164
 			ACLController::displayNoAccess(true);
161 165
 			sugar_cleanup(true);
162 166
 		}
163
-		if(!isset($_REQUEST['published'])) $focus->published = 'off';
167
+		if(!isset($_REQUEST['published'])) {
168
+		    $focus->published = 'off';
169
+		}
164 170
 
165 171
 		$preProcessedImages = array();
166 172
 		$emailTemplateBodyHtml = from_html($focus->body_html);
@@ -193,8 +199,7 @@  discard block
 block discarded – undo
193 199
 		} // if
194 200
 		if (isset($GLOBALS['check_notify'])) {
195 201
             $check_notify = $GLOBALS['check_notify'];
196
-        }
197
-        else {
202
+        } else {
198 203
             $check_notify = FALSE;
199 204
         }
200 205
         $focus->body_html = $emailTemplateBodyHtml;
@@ -252,8 +257,7 @@  discard block
 block discarded – undo
252 257
 				if(isset($_REQUEST['embedded'.$i]) && !empty($_REQUEST['embedded'.$i])){
253 258
                   if($_REQUEST['embedded'.$i]=='true'){
254 259
 				  	$note->embed_flag =true;
255
-                  }
256
-                  else{
260
+                  } else{
257 261
                   	$note->embed_flag =false;
258 262
                   }
259 263
 				}
@@ -267,8 +271,10 @@  discard block
 block discarded – undo
267 271
 		{
268 272
 			if( !empty($note->id) && $note->new_with_id === FALSE)
269 273
 			{
270
-				if(empty($_REQUEST['old_id']))
271
-					array_push($focus->saved_attachments, $note); // to support duplication of email templates
274
+				if(empty($_REQUEST['old_id'])) {
275
+									array_push($focus->saved_attachments, $note);
276
+				}
277
+				// to support duplication of email templates
272 278
 				else
273 279
 				{
274 280
 					// we're duplicating a template with attachments
@@ -303,10 +309,11 @@  discard block
 block discarded – undo
303 309
 			array_push($focus->saved_attachments, $note);
304 310
 			$note->id = $note_id;
305 311
 
306
-			if($note->new_with_id === FALSE)
307
-    			$note->file->final_move($note->id);
308
-    	    else
309
-    	       $GLOBALS['log']->debug("Not performing final move for note id {$note->id} as it has already been processed");
312
+			if($note->new_with_id === FALSE) {
313
+			    			$note->file->final_move($note->id);
314
+			} else {
315
+    	        	       $GLOBALS['log']->debug("Not performing final move for note id {$note->id} as it has already been processed");
316
+    	    }
310 317
 		}
311 318
 
312 319
 		////	END NEW ATTACHMENTS
@@ -319,8 +326,7 @@  discard block
 block discarded – undo
319 326
 	//_ppd(count($_REQUEST['document']));
320 327
 	if(!empty($_REQUEST['document'])){
321 328
       $count = count($_REQUEST['document']);
322
-    }
323
-    else{
329
+    } else{
324 330
     	$count=10;
325 331
     }
326 332
 
@@ -372,7 +378,7 @@  discard block
 block discarded – undo
372 378
 		if($redirect) {
373 379
 		$GLOBALS['log']->debug("Saved record with id of ".$return_id);
374 380
 			handleRedirect($return_id, "EmailTemplates");
375
-		}else{
381
+		} else{
376 382
 			return $focus;
377 383
 		}
378 384
 	}
Please login to merge, or discard this patch.
modules/EmailTemplates/AttachFiles.php 1 patch
Braces   +5 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.
@@ -47,8 +49,9 @@  discard block
 block discarded – undo
47 49
 require_once('include/JSON.php');
48 50
 require_once('include/upload_file.php');
49 51
 
50
-if (!is_dir($cachedir = sugar_cached('images/')))
52
+if (!is_dir($cachedir = sugar_cached('images/'))) {
51 53
     mkdir_recursive($cachedir);
54
+}
52 55
 
53 56
 // cn: bug 11012 - fixed some MIME types not getting picked up.  Also changed array iterator.
54 57
 $imgType = array('image/gif', 'image/png', 'image/x-png', 'image/bmp', 'image/jpeg', 'image/jpg', 'image/pjpeg');
Please login to merge, or discard this patch.
modules/EmailTemplates/EditView.php 1 patch
Braces   +45 added lines, -13 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
 require_once('modules/Campaigns/utils.php');
5 7
 
@@ -26,7 +28,9 @@  discard block
 block discarded – undo
26 28
 
27 29
 
28 30
 //setting default flag value so due date and time not required
29
-if (!isset($focus->id)) $focus->date_due_flag = 1;
31
+if (!isset($focus->id)) {
32
+    $focus->date_due_flag = 1;
33
+}
30 34
 
31 35
 //needed when creating a new case with default values passed in
32 36
 if (isset($_REQUEST['contact_name']) && is_null($focus->contact_name)) {
@@ -85,12 +89,16 @@  discard block
 block discarded – undo
85 89
 $xtpl->parse("main.variable_option");
86 90
 
87 91
 $returnAction = 'index';
88
-if (isset($_REQUEST['return_module'])) $xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']);
92
+if (isset($_REQUEST['return_module'])) {
93
+    $xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']);
94
+}
89 95
 if (isset($_REQUEST['return_action'])) {
90 96
     $xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']);
91 97
     $returnAction = $_REQUEST['return_action'];
92 98
 }
93
-if (isset($_REQUEST['return_id'])) $xtpl->assign("RETURN_ID", $_REQUEST['return_id']);
99
+if (isset($_REQUEST['return_id'])) {
100
+    $xtpl->assign("RETURN_ID", $_REQUEST['return_id']);
101
+}
94 102
 // handle Create $module then Cancel
95 103
 if (empty($_REQUEST['return_id'])) {
96 104
     $xtpl->assign("RETURN_ACTION", 'index');
@@ -119,8 +127,9 @@  discard block
 block discarded – undo
119 127
 );
120 128
 $json = getJSONobj();
121 129
 $xtpl->assign('encoded_assigned_users_popup_request_data', $json->encode($popup_request_data));
122
-if (!empty($focus->assigned_user_name))
130
+if (!empty($focus->assigned_user_name)) {
123 131
     $xtpl->assign("ASSIGNED_USER_NAME", $focus->assigned_user_name);
132
+}
124 133
 
125 134
 $xtpl->assign("assign_user_select", SugarThemeRegistry::current()->getImage('id-ff-select', '', null, null, '.png', $mod_strings['LBL_SELECT']));
126 135
 $xtpl->assign("assign_user_clear", SugarThemeRegistry::current()->getImage('id-ff-clear', '', null, null, '.gif', $mod_strings['LBL_ID_FF_CLEAR']));
@@ -142,24 +151,39 @@  discard block
 block discarded – undo
142 151
 $xtpl->assign("JSLANG", $jsLang);
143 152
 
144 153
 $xtpl->assign("ID", $focus->id);
145
-if (isset($focus->name)) $xtpl->assign("NAME", $focus->name); else $xtpl->assign("NAME", "");
154
+if (isset($focus->name)) {
155
+    $xtpl->assign("NAME", $focus->name);
156
+} else {
157
+    $xtpl->assign("NAME", "");
158
+}
146 159
 
147 160
 //Bug45632
148 161
 /* BEGIN - SECURITY GROUPS */
149 162
 /**
150 163
  * if(isset($focus->assigned_user_id)) $xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id); else $xtpl->assign("ASSIGNED_USER_ID", "");
151 164
  */
152
-if (isset($focus->assigned_user_id)) $xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id);
153
-else if (empty($focus->id) && empty($focus->assigned_user_id)) {
165
+if (isset($focus->assigned_user_id)) {
166
+    $xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id);
167
+} else if (empty($focus->id) && empty($focus->assigned_user_id)) {
154 168
     global $current_user;
155 169
     $xtpl->assign("ASSIGNED_USER_ID", $current_user->id);
156 170
     $xtpl->assign("ASSIGNED_USER_NAME", get_assigned_user_name($current_user->id));
157
-} else $xtpl->assign("ASSIGNED_USER_ID", "");
171
+} else {
172
+    $xtpl->assign("ASSIGNED_USER_ID", "");
173
+}
158 174
 /* END - SECURITY GROUPS */
159 175
 //Bug45632
160 176
 
161
-if (isset($focus->description)) $xtpl->assign("DESCRIPTION", $focus->description); else $xtpl->assign("DESCRIPTION", "");
162
-if (isset($focus->subject)) $xtpl->assign("SUBJECT", $focus->subject); else $xtpl->assign("SUBJECT", "");
177
+if (isset($focus->description)) {
178
+    $xtpl->assign("DESCRIPTION", $focus->description);
179
+} else {
180
+    $xtpl->assign("DESCRIPTION", "");
181
+}
182
+if (isset($focus->subject)) {
183
+    $xtpl->assign("SUBJECT", $focus->subject);
184
+} else {
185
+    $xtpl->assign("SUBJECT", "");
186
+}
163 187
 if ($focus->published == 'on') {
164 188
     $xtpl->assign("PUBLISHED", "CHECKED");
165 189
 }
@@ -201,8 +225,16 @@  discard block
 block discarded – undo
201 225
 $xtpl->assign("TYPE_OPTIONS", get_select_options_with_id($app_list_strings['record_type_display'], $focus->parent_type));
202 226
 //$xtpl->assign("DEFAULT_MODULE","Accounts");
203 227
 
204
-if (isset($focus->body)) $xtpl->assign("BODY", $focus->body); else $xtpl->assign("BODY", "");
205
-if (isset($focus->body_html)) $xtpl->assign("BODY_HTML", $focus->body_html); else $xtpl->assign("BODY_HTML", "");
228
+if (isset($focus->body)) {
229
+    $xtpl->assign("BODY", $focus->body);
230
+} else {
231
+    $xtpl->assign("BODY", "");
232
+}
233
+if (isset($focus->body_html)) {
234
+    $xtpl->assign("BODY_HTML", $focus->body_html);
235
+} else {
236
+    $xtpl->assign("BODY_HTML", "");
237
+}
206 238
 
207 239
 
208 240
 if (true) {
Please login to merge, or discard this patch.
modules/EmailTemplates/CheckDeletable.php 1 patch
Braces   +6 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,9 @@  discard block
 block discarded – undo
50 52
 
51 53
 $focus = new EmailTemplate();
52 54
 if($_REQUEST['from'] == 'DetailView') {
53
-	if(!isset($_REQUEST['record']))
54
-		sugar_die("A record number must be specified to delete the template.");
55
+	if(!isset($_REQUEST['record'])) {
56
+			sugar_die("A record number must be specified to delete the template.");
57
+	}
55 58
 	$focus->retrieve($_REQUEST['record']);
56 59
 	if(check_email_template_in_use($focus)) {
57 60
 		echo 'true';
Please login to merge, or discard this patch.