Completed
Push — develop ( 7c1bda...edae1e )
by Adam
18:38 queued 03:14
created
modules/UpgradeWizard/silentUpgrade_step1.php 1 patch
Braces   +12 added lines, -15 removed lines patch added patch discarded remove patch
@@ -65,8 +65,7 @@  discard block
 block discarded – undo
65 65
 			if ($children != "." && $children != "..") {
66 66
 				if (is_dir($thedir . "/" . $children)) {
67 67
 					clearCacheSU($thedir . "/" . $children, $extension);
68
-				}
69
-				elseif (is_file($thedir . "/" . $children) && substr_count($children, $extension)) {
68
+				} elseif (is_file($thedir . "/" . $children) && substr_count($children, $extension)) {
70 69
 					unlink($thedir . "/" . $children);
71 70
 				}
72 71
 			}
@@ -269,8 +268,7 @@  discard block
 block discarded – undo
269 268
 
270 269
     if( write_array_to_file( "sugar_config", $sugar_config, "config.php" ) ){
271 270
         return true;
272
-    }
273
-    else {
271
+    } else {
274 272
         return false;
275 273
     }
276 274
 }
@@ -386,7 +384,9 @@  discard block
 block discarded – undo
386 384
 
387 385
 ///////////////////////////////////////////////////////////////////////////////
388 386
 ////	STANDARD REQUIRED SUGAR INCLUDES AND PRESETS
389
-if(!defined('sugarEntry')) define('sugarEntry', true);
387
+if(!defined('sugarEntry')) {
388
+    define('sugarEntry', true);
389
+}
390 390
 
391 391
 $_SESSION = array();
392 392
 $_SESSION['schema_change'] = 'sugar'; // we force-run all SQL
@@ -500,13 +500,11 @@  discard block
 block discarded – undo
500 500
 	   if(isset($logged_user['id']) && $logged_user['id'] != null){
501 501
 		//do nothing
502 502
 	    $current_user->retrieve($logged_user['id']);
503
-	   }
504
-	   else{
503
+	   } else{
505 504
 	   	echo "FAILURE: Not an admin user in users table. Please provide an admin user\n";
506 505
 		exit(1);
507 506
 	   }
508
-	}
509
-	else {
507
+	} else {
510 508
 		echo "*******************************************************************************\n";
511 509
 		echo "*** ERROR: 4th parameter must be a valid admin user.\n";
512 510
 		echo $usage;
@@ -771,8 +769,9 @@  discard block
 block discarded – undo
771 769
 					include($file);
772 770
 					post_install();
773 771
 				// cn: only run conversion if admin selects "Sugar runs SQL"
774
-				if(!empty($_SESSION['allTables']) && $_SESSION['schema_change'] == 'sugar')
775
-					executeConvertTablesSql($_SESSION['allTables']);
772
+				if(!empty($_SESSION['allTables']) && $_SESSION['schema_change'] == 'sugar') {
773
+									executeConvertTablesSql($_SESSION['allTables']);
774
+				}
776 775
 				//set process to done
777 776
 				$progArray['post_install']='done';
778 777
 				//set_upgrade_progress('commit','in_progress','post_install','done');
@@ -878,8 +877,7 @@  discard block
 block discarded – undo
878 877
 
879 878
 			if($new_upgrade->description == null){
880 879
 				$new_upgrade->description = "Silent Upgrade was used to upgrade the instance";
881
-			}
882
-			else{
880
+			} else{
883 881
 				$new_upgrade->description = $new_upgrade->description." Silent Upgrade was used to upgrade the instance.";
884 882
 			}
885 883
 		   $new_upgrade->save();
@@ -929,8 +927,7 @@  discard block
 block discarded – undo
929 927
 	ob_start();
930 928
 	if(!isset($_REQUEST['silent'])){
931 929
 		$_REQUEST['silent'] = true;
932
-	}
933
-	else if(isset($_REQUEST['silent']) && $_REQUEST['silent'] != true){
930
+	} else if(isset($_REQUEST['silent']) && $_REQUEST['silent'] != true){
934 931
 		$_REQUEST['silent'] = true;
935 932
 	}
936 933
 
Please login to merge, or discard this patch.
modules/UpgradeWizard/systemCheckJson.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.
@@ -45,8 +47,9 @@  discard block
 block discarded – undo
45 47
  * Reserved. Contributor(s): ______________________________________..
46 48
  * *******************************************************************************/
47 49
 
48
-if(ob_get_level() < 1)
50
+if(ob_get_level() < 1) {
49 51
 	ob_start();
52
+}
50 53
 ob_implicit_flush(1);
51 54
 
52 55
 // load the generated persistence file if found
Please login to merge, or discard this patch.
modules/UpgradeWizard/silentUpgrade_step2.php 1 patch
Braces   +7 added lines, -8 removed lines patch added patch discarded remove patch
@@ -151,8 +151,7 @@  discard block
 block discarded – undo
151 151
             echo "FAILURE\n";
152 152
             exit(1);
153 153
         }
154
-    }
155
-    else {
154
+    } else {
156 155
         //this should be a regular sugar install
157 156
         echo "*******************************************************************************\n";
158 157
         echo "*** ERROR: Tried to execute in a non-SugarCRM root directory.\n";
@@ -217,7 +216,9 @@  discard block
 block discarded – undo
217 216
 
218 217
 ///////////////////////////////////////////////////////////////////////////////
219 218
 ////	STANDARD REQUIRED SUGAR INCLUDES AND PRESETS
220
-if(!defined('sugarEntry')) define('sugarEntry', true);
219
+if(!defined('sugarEntry')) {
220
+    define('sugarEntry', true);
221
+}
221 222
 
222 223
 $_SESSION = array();
223 224
 $_SESSION['schema_change'] = 'sugar'; // we force-run all SQL
@@ -289,13 +290,11 @@  discard block
 block discarded – undo
289 290
 	   if(isset($logged_user['id']) && $logged_user['id'] != null){
290 291
 		//do nothing
291 292
 	    $current_user->retrieve($logged_user['id']);
292
-	   }
293
-	   else{
293
+	   } else{
294 294
 	   	echo "Not an admin user in users table. Please provide an admin user\n";
295 295
 		exit(1);
296 296
 	   }
297
-	}
298
-	else {
297
+	} else {
299 298
 		echo "*******************************************************************************\n";
300 299
 		echo "*** ERROR: 4th parameter must be a valid admin user.\n";
301 300
 		echo $usage;
@@ -489,7 +488,7 @@  discard block
 block discarded – undo
489 488
 	if(isset($globalteam->name)){
490 489
 		echo 'Global '.$mod_strings['LBL_UPGRADE_TEAM_EXISTS'].'<br>';
491 490
 		logThis(" Finish Building Global Team", $path);
492
-	}else{
491
+	} else{
493 492
 		$globalteam->create_team("Global", $mod_strings['LBL_GLOBAL_TEAM_DESC'], $globalteam->global_team);
494 493
 	}
495 494
 
Please login to merge, or discard this patch.
modules/AOR_Reports/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
 /**
4 6
  * Advanced OpenReports, SugarCRM Reporting.
5 7
  * @package Advanced OpenReports for SugarCRM
Please login to merge, or discard this patch.
modules/AOR_Reports/views/view.edit.php 1 patch
Braces   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -94,8 +94,7 @@  discard block
 block discarded – undo
94 94
             }
95 95
             if(isset($conditions[$condition_item['condition_order']])) {
96 96
                 $conditions[] = $condition_item;
97
-            }
98
-            else {
97
+            } else {
99 98
                 $conditions[$condition_item['condition_order']] = $condition_item;
100 99
             }
101 100
         }
@@ -144,7 +143,7 @@  discard block
 block discarded – undo
144 143
         $modulePathDisplay[] = $currentBean->module_name;
145 144
         if(is_array($modulePath)) {
146 145
             $split = $modulePath;
147
-        }else{
146
+        } else{
148 147
             $split = explode(':', $modulePath);
149 148
         }
150 149
         if ($split && $split[0] == $currentBean->module_dir) {
@@ -162,7 +161,7 @@  discard block
 block discarded – undo
162 161
 
163 162
             if(!empty($moduleLabel)){
164 163
                 $modulePathDisplay[] = $moduleLabel;
165
-            }else {
164
+            } else {
166 165
                 $modulePathDisplay[] = $currentBean->module_name;
167 166
             }
168 167
         }
Please login to merge, or discard this patch.
modules/AOR_Reports/views/view.detail.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@
 block discarded – undo
55 55
             }
56 56
             if(isset($parameters[$condition_item['condition_order']])) {
57 57
                 $parameters[] = $condition_item;
58
-            }
59
-            else {
58
+            } else {
60 59
                 $parameters[$condition_item['condition_order']] = $condition_item;
61 60
             }
62 61
         }
Please login to merge, or discard this patch.
modules/AOR_Reports/Dashlets/AORReportsDashlet/AORReportsDashlet.meta.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
 global $app_strings;
4 6
 
5 7
 $dashletMeta['AORReportsDashlet'] = array('module'		=> 'AOR_Reports',
Please login to merge, or discard this patch.
modules/DynamicFields/UpgradeFields.php 1 patch
Braces   +10 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.
@@ -89,15 +91,19 @@  discard block
 block discarded – undo
89 91
 			$the_field->set($fieldDef);
90 92
 				
91 93
 				if(!isset($fields[$col]) && $col != 'id_c'){
92
-					if(!$simulate)$db->query("ALTER TABLE $mod->table_name" . "_cstm DROP COLUMN $col");
94
+					if(!$simulate) {
95
+					    $db->query("ALTER TABLE $mod->table_name" . "_cstm DROP COLUMN $col");
96
+					}
93 97
 					unset($fields[$col]);
94 98
 					echo "Dropping Column $col from $mod->table_name" . "_cstm for module $the_module<br>";
95
-				}	else{
99
+				} else{
96 100
 					if($col != 'id_c'){
97 101
 					if(trim($the_field->get_db_type()) != trim($type)){
98 102
 						
99 103
 					echo "Fixing Column Type for $col changing $type to ". $the_field->get_db_type() . "<br>";
100
-					if(!$simulate)$db->query($the_field->get_db_modify_alter_table($mod->table_name . '_cstm'));		
104
+					if(!$simulate) {
105
+					    $db->query($the_field->get_db_modify_alter_table($mod->table_name . '_cstm'));
106
+					}
101 107
 					}
102 108
 					}
103 109
 					
Please login to merge, or discard this patch.
modules/jjwg_Maps/jjwg_Maps_Router.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
 require_once('include/utils.php');
5 7
 require_once('include/export_utils.php');
Please login to merge, or discard this patch.