Completed
Push — develop ( 7c1bda...edae1e )
by Adam
18:38 queued 03:14
created
modules/Documents/DocumentExternalApiDropDown.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry)
2
+if(!defined('sugarEntry') || !sugarEntry) {
3 3
 	die('Not A Valid Entry Point');
4
+}
4 5
 /*********************************************************************************
5 6
  * SugarCRM Community Edition is a customer relationship management program developed by
6 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
Please login to merge, or discard this patch.
modules/Documents/metadata/popupdefs.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 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
 $popupMeta = array (
4 6
     'moduleMain' => 'Documents',
5 7
     'varName' => 'DOCUMENTS',
Please login to merge, or discard this patch.
modules/Campaigns/PopupCampaignRoi.php 1 patch
Braces   +8 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.
@@ -108,8 +110,10 @@  discard block
 block discarded – undo
108 110
 	$currency->retrieve($focus->currency_id);
109 111
 	if( $currency->deleted != 1){
110 112
 		$xtpl->assign("CURRENCY", $currency->iso4217 .' '.$currency->symbol );
111
-	}else $xtpl->assign("CURRENCY", $currency->getDefaultISO4217() .' '.$currency->getDefaultCurrencySymbol() );
112
-}else{
113
+	} else {
114
+	    $xtpl->assign("CURRENCY", $currency->getDefaultISO4217() .' '.$currency->getDefaultCurrencySymbol() );
115
+	}
116
+	} else{
113 117
 
114 118
 	$xtpl->assign("CURRENCY", $currency->getDefaultISO4217() .' '.$currency->getDefaultCurrencySymbol() );
115 119
 
@@ -185,7 +189,7 @@  discard block
 block discarded – undo
185 189
     if(!empty($selected_marketing_id)){$latest_marketing_id = $selected_marketing_id;}
186 190
     if(empty($latest_marketing_id) ||  $latest_marketing_id === 'all'){
187 191
         $xtpl->assign("MY_CHART_ROI", $chart->campaign_response_roi_popup($app_list_strings['roi_type_dom'],$app_list_strings['roi_type_dom'],$campaign_id,sugar_cached("xml/") . $cache_file_name_roi,true));
188
-    }else{
192
+    } else{
189 193
 
190 194
     $xtpl->assign("MY_CHART_ROI", $chart->campaign_response_roi_popup($app_list_strings['roi_type_dom'],$app_list_strings['roi_type_dom'],$campaign_id,sugar_cached("xml/") .$cache_file_name_roi,true));
191 195
     }
Please login to merge, or discard this patch.
modules/Campaigns/WizardEmailSetup.php 1 patch
Braces   +17 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.
@@ -55,7 +57,9 @@  discard block
 block discarded – undo
55 57
 global $mod_strings,$app_list_strings,$app_strings,$current_user;
56 58
 
57 59
 
58
-if (!is_admin($current_user)&& !is_admin_for_module($GLOBALS['current_user'],'Campaigns')) sugar_die("Unauthorized access to administration.");
60
+if (!is_admin($current_user)&& !is_admin_for_module($GLOBALS['current_user'],'Campaigns')) {
61
+    sugar_die("Unauthorized access to administration.");
62
+}
59 63
 
60 64
 $params = array();
61 65
 $params[] = "<a href='index.php?module=Campaigns&action=index'>{$mod_strings['LBL_MODULE_NAME']}</a>";
@@ -78,9 +82,15 @@  discard block
 block discarded – undo
78 82
 $ss = new Sugar_Smarty();
79 83
 $ss->assign("MOD", $mod_strings);
80 84
 $ss->assign("APP", $app_strings);
81
-if (isset($_REQUEST['return_module'])) $ss->assign("RETURN_MODULE", $_REQUEST['return_module']);
82
-if (isset($_REQUEST['return_action'])) $ss->assign("RETURN_ACTION", $_REQUEST['return_action']);
83
-if (isset($_REQUEST['return_id'])) $ss->assign("RETURN_ID", $_REQUEST['return_id']);
85
+if (isset($_REQUEST['return_module'])) {
86
+    $ss->assign("RETURN_MODULE", $_REQUEST['return_module']);
87
+}
88
+if (isset($_REQUEST['return_action'])) {
89
+    $ss->assign("RETURN_ACTION", $_REQUEST['return_action']);
90
+}
91
+if (isset($_REQUEST['return_id'])) {
92
+    $ss->assign("RETURN_ID", $_REQUEST['return_id']);
93
+}
84 94
 
85 95
 
86 96
 
@@ -146,7 +156,7 @@  discard block
 block discarded – undo
146 156
                 
147 157
      if( $colorclass == "class='evenListRowS1'"){
148 158
             $colorclass= "class='oddListRowS1'";
149
-        }else{ 
159
+        } else{ 
150 160
             $colorclass= "class='evenListRowS1'";
151 161
         }           
152 162
         
@@ -159,7 +169,7 @@  discard block
 block discarded – undo
159 169
     }
160 170
 
161 171
 
162
-}else{
172
+} else{
163 173
 $need_mbox = 'checked';
164 174
 $mboxTable .= "<tr><td colspan='5'><b>".$mod_strings['LBL_MAILBOX_CHECK_WIZ_BAD']." </b>.</td></tr>";
165 175
 }        
Please login to merge, or discard this patch.
modules/Campaigns/ProcessBouncedEmails.php 1 patch
Braces   +17 added lines, -19 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,9 @@  discard block
 block discarded – undo
55 57
     $contents = "";
56 58
     $query = "SELECT description FROM notes WHERE file_mime_type = 'messsage/rfc822' AND parent_type='Emails' AND parent_id = '".$email->id."' AND deleted=0";
57 59
     $rs = $GLOBALS['db']->query($query);
58
-    while ($row = $GLOBALS['db']->fetchByAssoc($rs)) 
59
-		$contents .= $row['description'];
60
+    while ($row = $GLOBALS['db']->fetchByAssoc($rs)) {
61
+    		$contents .= $row['description'];
62
+    }
60 63
 
61 64
     return $contents;
62 65
 }
@@ -89,9 +92,9 @@  discard block
 block discarded – undo
89 92
     {
90 93
         $bounce->activity_type='invalid email';
91 94
         markEmailAddressInvalid($email);
95
+    } else {
96
+            $bounce->activity_type='send error';
92 97
     }
93
-    else 
94
-        $bounce->activity_type='send error';
95 98
         
96 99
     $return_id=$bounce->save();
97 100
     return $return_id;
@@ -104,8 +107,9 @@  discard block
 block discarded – undo
104 107
  */
105 108
 function markEmailAddressInvalid($email_address)
106 109
 {
107
-    if(empty($email_address))
108
-        return;
110
+    if(empty($email_address)) {
111
+            return;
112
+    }
109 113
     $sea = new SugarEmailAddress();
110 114
     $rs = $sea->retrieve_by_string_fields( array('email_address_caps' => trim(strtoupper($email_address))) );
111 115
     if($rs != null)
@@ -149,8 +153,7 @@  discard block
 block discarded – undo
149 153
         $identifiers = preg_split('/X-CampTrackID: /',$matches[0],-1,PREG_SPLIT_NO_EMPTY);
150 154
         $found = TRUE;
151 155
         $GLOBALS['log']->debug("Found campaign identifier in header of email");  
152
-    }
153
-    else if( preg_match('/index.php\?entryPoint=removeme&identifier=[a-z0-9\-]*/',$email_description, $matches) )
156
+    } else if( preg_match('/index.php\?entryPoint=removeme&identifier=[a-z0-9\-]*/',$email_description, $matches) )
154 157
     {
155 158
         $identifiers = preg_split('/index.php\?entryPoint=removeme&identifier=/',$matches[0],-1,PREG_SPLIT_NO_EMPTY);
156 159
         $found = TRUE;
@@ -207,32 +210,27 @@  discard block
 block discarded – undo
207 210
 					{
208 211
 						$return_id = createBouncedCampaignLogEntry($row, $email, $email_description);	
209 212
 						return TRUE;
210
-					}				
211
-					else 
213
+					} else 
212 214
 					{
213 215
 					    $GLOBALS['log']->debug("Warning: campaign log entry already exists for identifier $identifier");
214 216
 					    return FALSE;
215 217
 					}
216
-				} 
217
-				else 
218
+				} else 
218 219
 				{
219 220
 				    $GLOBALS['log']->info("Warning: skipping bounced email with this tracker_key(identifier) in the message body: ".$identifier);
220 221
 					return FALSE;
221 222
 				}			
222
-    		} 
223
-    		else 
223
+    		} else 
224 224
     		{
225 225
     			$GLOBALS['log']->info("Warning: Empty identifier for campaign log.");
226 226
     			return FALSE;
227 227
     		}
228
-    	}  
229
-    	else 
228
+    	} else 
230 229
     	{
231 230
     	    $GLOBALS['log']->info("Warning: skipping bounced email because it does not have the removeme link.");	
232 231
     		return FALSE;	
233 232
       	}
234
-  } 
235
-  else 
233
+  } else 
236 234
   {
237 235
 	$GLOBALS['log']->info("Warning: skipping bounced email because the sender is not MAILER-DAEMON.");
238 236
 	return FALSE;
Please login to merge, or discard this patch.
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/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/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.