Completed
Push — develop ( 7c1bda...edae1e )
by Adam
18:38 queued 03:14
created
modules/AOS_Products/metadata/dashletviewdefs.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
 /**
4 6
  * Products, Quotations & Invoices modules.
5 7
  * Extensions to SugarCRM
Please login to merge, or discard this patch.
modules/AOS_Products_Quotes/Line_Items.php 1 patch
Braces   +9 added lines, -8 removed lines patch added patch discarded remove patch
@@ -84,8 +84,7 @@  discard block
 block discarded – undo
84 84
             $html .= '<script>insertGroup();</script>';
85 85
         }
86 86
 
87
-    }
88
-    else if($view == 'DetailView'){
87
+    } else if($view == 'DetailView'){
89 88
         $params = array('currency_id' => $focus->currency_id);
90 89
 
91 90
         $sql = "SELECT pg.id, pg.group_id FROM aos_products_quotes pg LEFT JOIN aos_line_item_groups lig ON pg.group_id = lig.id WHERE pg.parent_type = '".$focus->object_name."' AND pg.parent_id = '".$focus->id."' AND pg.deleted = 0 ORDER BY lig.number ASC, pg.number ASC";
@@ -111,7 +110,9 @@  discard block
 block discarded – undo
111 110
 
112 111
             if($enable_groups && ($group_id != $row['group_id'] || $i == 0)){
113 112
                 $html .= $groupStart.$product.$service.$groupEnd;
114
-                if($i != 0)$html .= "<tr><td colspan='9' nowrap='nowrap'><br></td></tr>";
113
+                if($i != 0) {
114
+                    $html .= "<tr><td colspan='9' nowrap='nowrap'><br></td></tr>";
115
+                }
115 116
                 $groupStart = '';
116 117
                 $groupEnd = '';
117 118
                 $product = '';
@@ -229,15 +230,13 @@  discard block
 block discarded – undo
229 230
         if($type == 'Amount')
230 231
         {
231 232
             return currency_format_number($amount,$params )."</td>";
232
-        }
233
-        else if($locale->getPrecision())
233
+        } else if($locale->getPrecision())
234 234
         {
235 235
             return rtrim(rtrim(format_number($amount), '0'),$sep[1])."%";
236 236
         } else{
237 237
             return format_number($amount)."%";
238 238
         }
239
-    }
240
-    else
239
+    } else
241 240
     {
242 241
         return "-";
243 242
     }
@@ -248,7 +247,9 @@  discard block
 block discarded – undo
248 247
     if($view == 'EditView'){
249 248
         global $app_list_strings;
250 249
 
251
-        if($value != '') $value = format_number($value);
250
+        if($value != '') {
251
+            $value = format_number($value);
252
+        }
252 253
 
253 254
         $html = "<input id='shipping_tax_amt' type='text' tabindex='0' title='' value='".$value."' maxlength='26,6' size='22' name='shipping_tax_amt' onblur='calculateTotal(\"lineItems\");'>";
254 255
         $html .= "<select name='shipping_tax' id='shipping_tax' onchange='calculateTotal(\"lineItems\");' >".get_select_options_with_id($app_list_strings['vat_list'], (isset($focus->shipping_tax) ? $focus->shipping_tax : ''))."</select>";
Please login to merge, or discard this patch.
modules/Project/delete_project_tasks.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
 /**
4 6
  * This program is free software; you can redistribute it and/or modify
5 7
  * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
Please login to merge, or discard this patch.
modules/Project/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.
@@ -52,7 +54,9 @@  discard block
 block discarded – undo
52 54
 	
53 55
 	if(!empty($fields['DESCRIPTION'])) {
54 56
 		$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
55
-		if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
57
+		if(strlen($fields['DESCRIPTION']) > 300) {
58
+		    $overlib_string .= '...';
59
+		}
56 60
 	}	
57 61
 
58 62
 	return array('fieldToAddTo' => 'NAME', 
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/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.
modules/Leads/metadata/additionalDetails.php 1 patch
Braces   +42 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.
@@ -56,31 +58,54 @@  discard block
 block discarded – undo
56 58
 
57 59
     if(!empty($fields['PRIMARY_ADDRESS_STREET']) || !empty($fields['PRIMARY_ADDRESS_CITY']) ||
58 60
 		!empty($fields['PRIMARY_ADDRESS_STATE']) || !empty($fields['PRIMARY_ADDRESS_POSTALCODE']) ||
59
-		!empty($fields['PRIMARY_ADDRESS_COUNTRY']))
60
-			$overlib_string .= '<b>' . $mod_strings['LBL_PRIMARY_ADDRESS'] . '</b><br>';
61
-	if(!empty($fields['PRIMARY_ADDRESS_STREET'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'] . '<br>';
62
-	if(!empty($fields['PRIMARY_ADDRESS_CITY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'] . ', ';
63
-	if(!empty($fields['PRIMARY_ADDRESS_STATE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'] . ' ';
64
-	if(!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'] . ' ';
65
-	if(!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '<br>';
66
-	if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) 
67
-		$overlib_string .= '<br>';  
68
-		if(!empty($fields['PHONE_MOBILE'])) $overlib_string .= '<b>'. $mod_strings['LBL_MOBILE_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_MOBILE'] . '</span><br>';
69
-	if(!empty($fields['PHONE_HOME'])) $overlib_string .= '<b>'. $mod_strings['LBL_HOME_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_HOME'] . '</span><br>';
70
-	if(!empty($fields['PHONE_OTHER'])) $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_OTHER'] . '</span><br>';
71
-	if(!empty($fields['LEAD_SOURCE'])) $overlib_string .= '<b>'. $mod_strings['LBL_LEAD_SOURCE'] . '</b> ' . $fields['LEAD_SOURCE'] . '<br>';
61
+		!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) {
62
+    			$overlib_string .= '<b>' . $mod_strings['LBL_PRIMARY_ADDRESS'] . '</b><br>';
63
+    }
64
+	if(!empty($fields['PRIMARY_ADDRESS_STREET'])) {
65
+	    $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'] . '<br>';
66
+	}
67
+	if(!empty($fields['PRIMARY_ADDRESS_CITY'])) {
68
+	    $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'] . ', ';
69
+	}
70
+	if(!empty($fields['PRIMARY_ADDRESS_STATE'])) {
71
+	    $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'] . ' ';
72
+	}
73
+	if(!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) {
74
+	    $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'] . ' ';
75
+	}
76
+	if(!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) {
77
+	    $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '<br>';
78
+	}
79
+	if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) {
80
+			$overlib_string .= '<br>';
81
+	}
82
+		if(!empty($fields['PHONE_MOBILE'])) {
83
+		    $overlib_string .= '<b>'. $mod_strings['LBL_MOBILE_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_MOBILE'] . '</span><br>';
84
+		}
85
+	if(!empty($fields['PHONE_HOME'])) {
86
+	    $overlib_string .= '<b>'. $mod_strings['LBL_HOME_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_HOME'] . '</span><br>';
87
+	}
88
+	if(!empty($fields['PHONE_OTHER'])) {
89
+	    $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_OTHER'] . '</span><br>';
90
+	}
91
+	if(!empty($fields['LEAD_SOURCE'])) {
92
+	    $overlib_string .= '<b>'. $mod_strings['LBL_LEAD_SOURCE'] . '</b> ' . $fields['LEAD_SOURCE'] . '<br>';
93
+	}
72 94
 
73
-	if(!empty($fields['EMAIL2'])) 
74
-		$overlib_string .= '<b>'. $mod_strings['LBL_OTHER_EMAIL_ADDRESS'] . '</b> ' . 
95
+	if(!empty($fields['EMAIL2'])) {
96
+			$overlib_string .= '<b>'. $mod_strings['LBL_OTHER_EMAIL_ADDRESS'] . '</b> ' . 
75 97
 								 "<a href=index.php?module=Emails&action=Compose&contact_id={$fields['ID']}&" .
76 98
 								 "parent_type=Contacts&parent_id={$fields['ID']}&to_addrs_ids={$fields['ID']}&to_addrs_names" .
77 99
 								 "={$fields['FIRST_NAME']}&nbsp;{$fields['LAST_NAME']}&to_addrs_emails={$fields['EMAIL2']}&" .
78 100
 								 "to_email_addrs=" . urlencode("{$fields['FIRST_NAME']} {$fields['LAST_NAME']} <{$fields['EMAIL2']}>") .
79 101
 								 "&return_module=Contacts&return_action=ListView'>{$fields['EMAIL2']}</a><br>";
102
+	}
80 103
 	
81 104
 	if(!empty($fields['DESCRIPTION'])) { 
82 105
 		$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
83
-		if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
106
+		if(strlen($fields['DESCRIPTION']) > 300) {
107
+		    $overlib_string .= '...';
108
+		}
84 109
 	}	
85 110
 	
86 111
 	return array('fieldToAddTo' => 'NAME', 
Please login to merge, or discard this patch.
modules/Leads/views/view.showduplicates.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.
@@ -85,7 +87,9 @@  discard block
 block discarded – undo
85 87
             $first = true;
86 88
             foreach ($duplicates as $duplicate_id)
87 89
             {
88
-                if (!$first) $query .= ' OR ';
90
+                if (!$first) {
91
+                    $query .= ' OR ';
92
+                }
89 93
                 $first = false;
90 94
                 $query .= "id='$duplicate_id' ";
91 95
             }
Please login to merge, or discard this patch.
modules/UpgradeWizard/silentUpgrade_dce_step2.php 1 patch
Braces   +9 added lines, -11 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@  discard block
 block discarded – undo
52 52
 			if ($children != "." && $children != "..") {
53 53
 				if (is_dir($thedir . "/" . $children)) {
54 54
 					clearCacheSU($thedir . "/" . $children, $extension);
55
-				}
56
-				elseif (is_file($thedir . "/" . $children) && substr_count($children, $extension)) {
55
+				} elseif (is_file($thedir . "/" . $children) && substr_count($children, $extension)) {
57 56
 					unlink($thedir . "/" . $children);
58 57
 				}
59 58
 			}
@@ -205,8 +204,7 @@  discard block
 block discarded – undo
205 204
 
206 205
     if( write_array_to_file( "sugar_config", $sugar_config, "config.php" ) ){
207 206
         return true;
208
-    }
209
-    else {
207
+    } else {
210 208
         return false;
211 209
     }
212 210
 }
@@ -265,8 +263,7 @@  discard block
 block discarded – undo
265 263
             echo "FAILURE\n";
266 264
             exit(1);
267 265
         }
268
-    }
269
-    else if(is_file("{$cwd}/include/entryPoint.php")) {
266
+    } else if(is_file("{$cwd}/include/entryPoint.php")) {
270 267
         //this should be a regular sugar install
271 268
         $upgradeType = constant('SUGARCRM_INSTALL');
272 269
         //check if this is a valid zip file
@@ -284,8 +281,7 @@  discard block
 block discarded – undo
284 281
             echo "FAILURE\n";
285 282
             exit(1);
286 283
         }
287
-    }
288
-    else {
284
+    } else {
289 285
         //this should be a regular sugar install
290 286
         echo "*******************************************************************************\n";
291 287
         echo "*** ERROR: Tried to execute in a non-SugarCRM root directory.\n";
@@ -314,7 +310,7 @@  discard block
 block discarded – undo
314 310
 			$_GET['CONVERT_FILE_ONLY'] = true;
315 311
 			if(!class_exists('TemplateConverter')){
316 312
 				include($argv[7].'templateConverter.php');
317
-			}else{
313
+			} else{
318 314
 				TemplateConverter::convertFile($_GET['TEMPLATE_PATH']);
319 315
 			}
320 316
 
@@ -392,7 +388,9 @@  discard block
 block discarded – undo
392 388
 
393 389
 ///////////////////////////////////////////////////////////////////////////////
394 390
 ////	STANDARD REQUIRED SUGAR INCLUDES AND PRESETS
395
-if(!defined('sugarEntry')) define('sugarEntry', true);
391
+if(!defined('sugarEntry')) {
392
+    define('sugarEntry', true);
393
+}
396 394
 
397 395
 $_SESSION = array();
398 396
 $_SESSION['schema_change'] = 'sugar'; // we force-run all SQL
@@ -704,7 +702,7 @@  discard block
 block discarded – undo
704 702
 			   echo 'Global '.$mod_strings['LBL_UPGRADE_TEAM_EXISTS'].'<br>';
705 703
 			   logThis(" Finish Building private teams", $path);
706 704
 
707
-			}else{
705
+			} else{
708 706
 			   $globalteam->create_team("Global", $mod_strings['LBL_GLOBAL_TEAM_DESC'], $globalteam->global_team);
709 707
 			}
710 708
 
Please login to merge, or discard this patch.