Completed
Push — console-installer ( 03fc02...67c42e )
by Adam
72:27 queued 53:14
created
modules/Administration/updater_utils.php 1 patch
Braces   +21 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.
@@ -94,10 +96,11 @@  discard block
 block discarded – undo
94 96
 
95 97
 		if(!$send_usage_info){
96 98
 			$info['latest_tracker_id'] = -1;
97
-		}else{
99
+		} else{
98 100
 			$id=$db->getOne("select id from tracker order by date_modified desc", false, 'fetching most recent tracker entry');
99
-			if ( $id !== false )
100
-			    $info['latest_tracker_id'] = $id;
101
+			if ( $id !== false ) {
102
+						    $info['latest_tracker_id'] = $id;
103
+			}
101 104
 		}
102 105
 
103 106
 		$info['db_type']=$sugar_config['dbconfig']['db_type'];
@@ -105,7 +108,9 @@  discard block
 block discarded – undo
105 108
 	}
106 109
 	if(file_exists('distro.php')){
107 110
 		include('distro.php');
108
-		if(!empty($distro_name))$info['distro_name'] = $distro_name;
111
+		if(!empty($distro_name)) {
112
+		    $info['distro_name'] = $distro_name;
113
+		}
109 114
 	}
110 115
 	$info['os'] = php_uname('s');
111 116
 	$info['os_version'] = php_uname('r');
@@ -143,14 +148,16 @@  discard block
 block discarded – undo
143 148
 
144 149
 
145 150
 	$return_array=array();
146
-    if(!$from_install && empty($license))loadLicense(true);
151
+    if(!$from_install && empty($license)) {
152
+        loadLicense(true);
153
+    }
147 154
 
148 155
 	if(!$response_data){
149 156
 
150 157
         if($from_install){
151 158
     		$info = getBaseSystemInfo(false);
152 159
 
153
-        }else{
160
+        } else{
154 161
             $info = getSystemInfo($send_usage_info);
155 162
         }
156 163
 
@@ -183,7 +190,7 @@  discard block
 block discarded – undo
183 190
 		}
184 191
 		$encodedResult = $sclient->call('sugarHome', array('key'=>$key, 'data'=>$encoded));
185 192
 
186
-	}else{
193
+	} else{
187 194
 		$encodedResult = 	$response_data['data'];
188 195
 		$key = $response_data['key'];
189 196
 
@@ -197,7 +204,7 @@  discard block
 block discarded – undo
197 204
 			$resultData = array();
198 205
 			$resultData['validation'] = 'invalid validation key';
199 206
 		}
200
-	}else
207
+	} else
201 208
 	{
202 209
 		$resultData = array();
203 210
 		$resultData['versions'] = array();
@@ -209,22 +216,21 @@  discard block
 block discarded – undo
209 216
 		if(!empty($resultData['msg'])){
210 217
 			if(!empty($resultData['msg']['admin'])){
211 218
 				$license->saveSetting('license', 'msg_admin', base64_encode($resultData['msg']['admin']));
212
-			}else{
219
+			} else{
213 220
 				$license->saveSetting('license', 'msg_admin','');
214 221
 			}
215 222
 			if(!empty($resultData['msg']['all'])){
216 223
 				$license->saveSetting('license', 'msg_all', base64_encode($resultData['msg']['all']));
217
-			}else{
224
+			} else{
218 225
 				$license->saveSetting('license', 'msg_all','');
219 226
 			}
220
-		}else{
227
+		} else{
221 228
 			$license->saveSetting('license', 'msg_admin','');
222 229
 			$license->saveSetting('license', 'msg_all','');
223 230
 		}
224 231
 		$license->saveSetting('license', 'last_validation', 'success');
225 232
 		unset($_SESSION['COULD_NOT_CONNECT']);
226
-	}
227
-	else
233
+	} else
228 234
 	{
229 235
 		$resultData = array();
230 236
 		$resultData['versions'] = array();
@@ -243,7 +249,7 @@  discard block
 block discarded – undo
243 249
 	if(!empty($resultData['versions'])){
244 250
 
245 251
 		$license->saveSetting('license', 'latest_versions',base64_encode(serialize($resultData['versions'])));
246
-	}else{
252
+	} else{
247 253
 		$resultData['versions'] = array();
248 254
 		$license->saveSetting('license', 'latest_versions','')	;
249 255
 	}
Please login to merge, or discard this patch.
modules/Administration/DiagnosticDownload.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.
@@ -42,7 +44,9 @@  discard block
 block discarded – undo
42 44
 global $current_user;
43 45
 
44 46
 
45
-if (!is_admin($current_user)) sugar_die("Unauthorized access to administration.");
47
+if (!is_admin($current_user)) {
48
+    sugar_die("Unauthorized access to administration.");
49
+}
46 50
 if (isset($GLOBALS['sugar_config']['hide_admin_diagnostics']) && $GLOBALS['sugar_config']['hide_admin_diagnostics'])
47 51
 {
48 52
     sugar_die("Unauthorized access to diagnostic tool.");
Please login to merge, or discard this patch.
modules/Administration/expandDatabase.php 1 patch
Braces   +4 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.
@@ -157,7 +159,7 @@  discard block
 block discarded – undo
157 159
 			    echo "<b>{$mod_strings['LBL_EXPAND_DATABASE_FINISHED_ERROR']}</b><br>";
158 160
 		} //if-else
159 161
 	} //if
160
-}else{
162
+} else{
161 163
 	sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']);
162 164
 }
163 165
 
Please login to merge, or discard this patch.
modules/Administration/upgrade_custom_relationships.php 1 patch
Braces   +12 added lines, -7 removed lines patch added patch discarded remove patch
@@ -45,13 +45,16 @@  discard block
 block discarded – undo
45 45
 function upgrade_custom_relationships($modules = array())
46 46
 {
47 47
 	global $current_user, $moduleList;
48
-	if (!is_admin($current_user)) sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']); 
48
+	if (!is_admin($current_user)) {
49
+	    sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']);
50
+	}
49 51
 	
50 52
 	require_once("modules/ModuleBuilder/parsers/relationships/DeployedRelationships.php");
51 53
 	require_once("modules/ModuleBuilder/parsers/relationships/OneToManyRelationship.php");
52 54
 	
53
-	if (empty($modules))
54
-		$modules = $moduleList;
55
+	if (empty($modules)) {
56
+			$modules = $moduleList;
57
+	}
55 58
 	
56 59
 	foreach($modules as $module)
57 60
 	{
@@ -65,8 +68,9 @@  discard block
 block discarded – undo
65 68
 			if ($def['lhs_module'] == $def['rhs_module'] && $def['is_custom'] && $def['relationship_type'] == "one-to-many")
66 69
 			{
67 70
 				$layout_defs = array();
68
-				if (!is_dir("custom/Extension/modules/$module/Ext/Layoutdefs") || !is_dir("custom/Extension/modules/$module/Ext/Vardefs"))
69
-					continue;
71
+				if (!is_dir("custom/Extension/modules/$module/Ext/Layoutdefs") || !is_dir("custom/Extension/modules/$module/Ext/Vardefs")) {
72
+									continue;
73
+				}
70 74
 				//Find the extension file containing the vardefs for this relationship
71 75
 				foreach(scandir("custom/Extension/modules/$module/Ext/Vardefs") as $file)
72 76
 				{
@@ -121,5 +125,6 @@  discard block
 block discarded – undo
121 125
 	}
122 126
 }
123 127
 
124
-if (isset($_REQUEST['execute']) && $_REQUEST['execute'])
125
-	upgrade_custom_relationships();
126 128
\ No newline at end of file
129
+if (isset($_REQUEST['execute']) && $_REQUEST['execute']) {
130
+	upgrade_custom_relationships();
131
+}
Please login to merge, or discard this patch.
modules/Administration/DiagnosticDelete.php 1 patch
Braces   +7 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.
@@ -60,8 +62,7 @@  discard block
 block discarded – undo
60 62
 if(empty($_REQUEST['file']) || empty($_REQUEST['guid']))
61 63
 {
62 64
 	echo $mod_strings['LBL_DIAGNOSTIC_DELETE_ERROR'];
63
-}
64
-else
65
+} else
65 66
 {
66 67
     // Make sure the guid and file are valid file names for security purposes
67 68
     clean_string($_REQUEST['guid'], "ALPHANUM");
@@ -79,10 +80,10 @@  discard block
 block discarded – undo
79 80
   	  unlink($cachedfile);
80 81
   	  rmdir(dirname($cachedfile));
81 82
 	  echo $mod_strings['LBL_DIAGNOSTIC_DELETED']."<br><br>";
83
+	} else {
84
+		  echo $mod_strings['LBL_DIAGNOSTIC_FILE'] . $_REQUEST['file'].$mod_strings['LBL_DIAGNOSTIC_ZIP'];
85
+	}
82 86
 	}
83
-	else
84
-	  echo $mod_strings['LBL_DIAGNOSTIC_FILE'] . $_REQUEST['file'].$mod_strings['LBL_DIAGNOSTIC_ZIP'];
85
-}
86 87
 
87 88
 print "<a href=\"index.php?module=Administration&action=index\">" . $mod_strings['LBL_DIAGNOSTIC_DELETE_RETURN'] . "</a><br>";
88 89
 
Please login to merge, or discard this patch.
modules/Administration/RebuildRelationship.php 1 patch
Braces   +29 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@  discard block
 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.
@@ -67,11 +68,13 @@  discard block
 block discarded – undo
67 68
         if ( $focus instanceOf SugarBean ) {
68 69
             $table_name = $focus->table_name ;
69 70
             $empty = array() ;
70
-            if (empty ( $_REQUEST [ 'silent' ] ))
71
-                echo $mod_strings [ 'LBL_REBUILD_REL_PROC_META' ] . $focus->table_name . "..." ;
71
+            if (empty ( $_REQUEST [ 'silent' ] )) {
72
+                            echo $mod_strings [ 'LBL_REBUILD_REL_PROC_META' ] . $focus->table_name . "..." ;
73
+            }
72 74
             SugarBean::createRelationshipMeta ( $focus->getObjectName (), $db, $table_name, $empty, $focus->module_dir ) ;
73
-            if (empty ( $_REQUEST [ 'silent' ] ))
74
-                echo $mod_strings [ 'LBL_DONE' ] . '<br>' ;
75
+            if (empty ( $_REQUEST [ 'silent' ] )) {
76
+                            echo $mod_strings [ 'LBL_DONE' ] . '<br>' ;
77
+            }
75 78
         }
76 79
     }
77 80
 }
@@ -80,7 +83,9 @@  discard block
 block discarded – undo
80 83
 foreach ( $GLOBALS['beanFiles'] as $bean => $file )
81 84
 {
82 85
 	//skip this file if it does not exist
83
-	if(!file_exists($file)) continue;
86
+	if(!file_exists($file)) {
87
+	    continue;
88
+	}
84 89
 
85 90
 	if (! class_exists ( $bean ))
86 91
     {
@@ -90,11 +95,13 @@  discard block
 block discarded – undo
90 95
     if ( $focus instanceOf SugarBean ) {
91 96
         $table_name = $focus->table_name ;
92 97
         $empty = array() ;
93
-        if (empty ( $_REQUEST [ 'silent' ] ))
94
-            echo $mod_strings [ 'LBL_REBUILD_REL_PROC_C_META' ] . $focus->table_name . "..." ;
98
+        if (empty ( $_REQUEST [ 'silent' ] )) {
99
+                    echo $mod_strings [ 'LBL_REBUILD_REL_PROC_C_META' ] . $focus->table_name . "..." ;
100
+        }
95 101
         SugarBean::createRelationshipMeta ( $focus->getObjectName (), $db, $table_name, $empty, $focus->module_dir, true ) ;
96
-        if (empty ( $_REQUEST [ 'silent' ] ))
97
-            echo $mod_strings [ 'LBL_DONE' ] . '<br>' ;
102
+        if (empty ( $_REQUEST [ 'silent' ] )) {
103
+                    echo $mod_strings [ 'LBL_DONE' ] . '<br>' ;
104
+        }
98 105
     }
99 106
 }
100 107
 
@@ -111,24 +118,28 @@  discard block
 block discarded – undo
111 118
     {
112 119
         $table = isset($rel_data [ 'table' ]) ? $rel_data [ 'table' ] : "" ;
113 120
 
114
-        if (empty ( $_REQUEST [ 'silent' ] ))
115
-            echo $mod_strings [ 'LBL_REBUILD_REL_PROC_C_META' ] . $rel_name . "..." ;
121
+        if (empty ( $_REQUEST [ 'silent' ] )) {
122
+                    echo $mod_strings [ 'LBL_REBUILD_REL_PROC_C_META' ] . $rel_name . "..." ;
123
+        }
116 124
         SugarBean::createRelationshipMeta ( $rel_name, $db, $table, $rel_dictionary, '' ) ;
117
-        if (empty ( $_REQUEST [ 'silent' ] ))
118
-            echo $mod_strings [ 'LBL_DONE' ] . '<br>' ;
125
+        if (empty ( $_REQUEST [ 'silent' ] )) {
126
+                    echo $mod_strings [ 'LBL_DONE' ] . '<br>' ;
127
+        }
119 128
     }
120 129
 
121 130
 //clean relationship cache..will be rebuilt upon first access.
122
-if (empty ( $_REQUEST [ 'silent' ] ))
131
+if (empty ( $_REQUEST [ 'silent' ] )) {
123 132
     echo $mod_strings [ 'LBL_REBUILD_REL_DEL_CACHE' ] ;
133
+}
124 134
 Relationship::delete_cache () ;
125 135
 
126 136
 //////////////////////////////////////////////////////////////////////////////
127 137
 // Remove the "Rebuild Relationships" red text message on admin logins
128 138
 
129 139
 
130
-if (empty ( $_REQUEST [ 'silent' ] ))
140
+if (empty ( $_REQUEST [ 'silent' ] )) {
131 141
     echo $mod_strings [ 'LBL_REBUILD_REL_UPD_WARNING' ] ;
142
+}
132 143
 
133 144
 // clear the database row if it exists (just to be sure)
134 145
 $query = "DELETE FROM versions WHERE name='Rebuild Relationships'" ;
@@ -153,6 +164,7 @@  discard block
 block discarded – undo
153 164
     unset ( $_SESSION [ 'rebuild_relationships' ] ) ;
154 165
 }
155 166
 
156
-if (empty ( $_REQUEST [ 'silent' ] ))
167
+if (empty ( $_REQUEST [ 'silent' ] )) {
157 168
     echo $mod_strings [ 'LBL_DONE' ] ;
169
+}
158 170
 ?>
Please login to merge, or discard this patch.
modules/Administration/RepairFieldCasing.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.
@@ -98,8 +100,7 @@  discard block
 block discarded – undo
98 100
 	       foreach($views as $view) {
99 101
                 try{
100 102
                     $parser = ParserFactory::getParser($view, $module);
101
-                }
102
-                catch(Exception $e){
103
+                } catch(Exception $e){
103 104
                     $GLOBALS['log']->fatal("Caught exception in RepairFieldCasing script: ".$e->getMessage());
104 105
                     continue;
105 106
                 }
Please login to merge, or discard this patch.
modules/Administration/UpgradeAccess.php 1 patch
Braces   +15 added lines, -5 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.
@@ -48,7 +50,9 @@  discard block
 block discarded – undo
48 50
 $htaccess_file   = getcwd() . "/.htaccess";
49 51
 $contents = '';
50 52
 $basePath = parse_url($sugar_config['site_url'], PHP_URL_PATH);
51
-if(empty($basePath)) $basePath = '/';
53
+if(empty($basePath)) {
54
+    $basePath = '/';
55
+}
52 56
 
53 57
 $restrict_str = <<<EOQ
54 58
 # BEGIN SUGARCRM RESTRICTIONS
@@ -74,9 +78,15 @@  discard block
 block discarded – undo
74 78
     $skip = false;
75 79
     while($line = fgets($fp)){
76 80
 
77
-    	if(preg_match('/\s*#\s*BEGIN\s*SUGARCRM\s*RESTRICTIONS/i', $line))$skip = true;
78
-        if(!$skip)$contents .= $line;
79
-        if(preg_match('/\s*#\s*END\s*SUGARCRM\s*RESTRICTIONS/i', $line))$skip = false;
81
+    	if(preg_match('/\s*#\s*BEGIN\s*SUGARCRM\s*RESTRICTIONS/i', $line)) {
82
+    	    $skip = true;
83
+    	}
84
+        if(!$skip) {
85
+            $contents .= $line;
86
+        }
87
+        if(preg_match('/\s*#\s*END\s*SUGARCRM\s*RESTRICTIONS/i', $line)) {
88
+            $skip = false;
89
+        }
80 90
     }
81 91
 }
82 92
 if(substr($contents, -1) != "\n") {
Please login to merge, or discard this patch.
modules/Administration/UpgradeWizard_commit.php 1 patch
Braces   +37 added lines, -33 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.
@@ -169,14 +171,12 @@  discard block
 block discarded – undo
169 171
 if( $install_type != "module" ){
170 172
     if( !isset($_REQUEST['zip_from_dir']) || ($_REQUEST['zip_from_dir'] == "") ){
171 173
         $zip_from_dir     = ".";
172
-    }
173
-    else{
174
+    } else{
174 175
         $zip_from_dir   = $_REQUEST['zip_from_dir'];
175 176
     }
176 177
     if( !isset($_REQUEST['zip_to_dir']) || ($_REQUEST['zip_to_dir'] == "") ){
177 178
         $zip_to_dir     = ".";
178
-    }
179
-    else{
179
+    } else{
180 180
         $zip_to_dir     = $_REQUEST['zip_to_dir'];
181 181
     }
182 182
 }
@@ -262,10 +262,11 @@  discard block
 block discarded – undo
262 262
 
263 263
         $sugar_home_dir = getCwd();
264 264
         $dest_file  = clean_path( "$sugar_home_dir/$zip_to_dir/$file_to_copy" );
265
-        if($zip_to_dir != '.')
266
-        	$rest_file  = clean_path("$rest_dir/$zip_to_dir/$file_to_copy");
267
-        else
268
-        	$rest_file  = clean_path("$rest_dir/$file_to_copy");
265
+        if($zip_to_dir != '.') {
266
+                	$rest_file  = clean_path("$rest_dir/$zip_to_dir/$file_to_copy");
267
+        } else {
268
+                	$rest_file  = clean_path("$rest_dir/$file_to_copy");
269
+        }
269 270
 
270 271
         switch( $mode ){
271 272
             case "Install":
@@ -273,8 +274,9 @@  discard block
 block discarded – undo
273 274
 
274 275
                 if($install_type=="patch" && is_file($dest_file))
275 276
                 {
276
-	                if(!is_dir(dirname( $rest_file )))
277
-                		mkdir_recursive( dirname( $rest_file ) );
277
+	                if(!is_dir(dirname( $rest_file ))) {
278
+	                                		mkdir_recursive( dirname( $rest_file ) );
279
+	                }
278 280
 
279 281
 	                copy( $dest_file, $rest_file);
280 282
 	                sugar_touch( $rest_file, filemtime($dest_file) );
@@ -290,8 +292,7 @@  discard block
 block discarded – undo
290 292
                 {
291 293
 	                copy( $rest_file, $dest_file);
292 294
 	                sugar_touch( $dest_file, filemtime($rest_file) );
293
-                }
294
-                elseif(file_exists($dest_file) && !unlink($dest_file))
295
+                } elseif(file_exists($dest_file) && !unlink($dest_file))
295 296
                 {
296 297
                     die($mod_strings['ERR_UW_REMOVE_FAILED'].$dest_file);
297 298
                 }
@@ -315,8 +316,7 @@  discard block
 block discarded – undo
315 316
 
316 317
         if( $mode == "Install" || $mode=="Enable" ){
317 318
             $sugar_config['languages'] = $sugar_config['languages'] + array( $_REQUEST['new_lang_name'] => $_REQUEST['new_lang_desc'] );
318
-        }
319
-        else if( $mode == "Uninstall" || $mode=="Disable" ){
319
+        } else if( $mode == "Uninstall" || $mode=="Disable" ){
320 320
             $new_langs = array();
321 321
             $old_langs = $sugar_config['languages'];
322 322
             foreach( $old_langs as $key => $value ){
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
             //here we can determine if this is an upgrade or a new version
354 354
             	if(!empty($previous_version)){
355 355
             		$mi->install( "$unzip_dir", true, $previous_version);
356
-            	}else{
356
+            	} else{
357 357
                 	$mi->install( "$unzip_dir" );
358 358
             	}
359 359
 
@@ -366,24 +366,27 @@  discard block
 block discarded – undo
366 366
 				}
367 367
             	break;
368 368
             case "Uninstall":
369
-                if($remove_tables == 'false')
370
-                	$GLOBALS['mi_remove_tables'] = false;
371
-                else
372
-                	$GLOBALS['mi_remove_tables'] = true;
369
+                if($remove_tables == 'false') {
370
+                                	$GLOBALS['mi_remove_tables'] = false;
371
+                } else {
372
+                                	$GLOBALS['mi_remove_tables'] = true;
373
+                }
373 374
                 $mi->uninstall( "$unzip_dir" );
374 375
                 break;
375 376
              case "Disable":
376
-                if(!$overwrite_files)
377
-                	$GLOBALS['mi_overwrite_files'] = false;
378
-                else
379
-                	$GLOBALS['mi_overwrite_files'] = true;
377
+                if(!$overwrite_files) {
378
+                                	$GLOBALS['mi_overwrite_files'] = false;
379
+                } else {
380
+                                	$GLOBALS['mi_overwrite_files'] = true;
381
+                }
380 382
                 $mi->disable( "$unzip_dir" );
381 383
                 break;
382 384
              case "Enable":
383
-                if(!$overwrite_files)
384
-                	$GLOBALS['mi_overwrite_files'] = false;
385
-                else
386
-                	$GLOBALS['mi_overwrite_files'] = true;
385
+                if(!$overwrite_files) {
386
+                                	$GLOBALS['mi_overwrite_files'] = false;
387
+                } else {
388
+                                	$GLOBALS['mi_overwrite_files'] = true;
389
+                }
387 390
                 $mi->enable( "$unzip_dir" );
388 391
                 break;
389 392
             default:
@@ -473,8 +476,9 @@  discard block
 block discarded – undo
473 476
         	if (!empty($manifest['post_install_url']))
474 477
         	{
475 478
         		$url_conf = $manifest['post_install_url'];
476
-        		if (is_string($url_conf))
477
-        			$url_conf = array('url' => $url_conf);
479
+        		if (is_string($url_conf)) {
480
+        		        			$url_conf = array('url' => $url_conf);
481
+        		}
478 482
         		if (isset($url_conf['type']) && $url_conf['type'] == 'popup')
479 483
         		{
480 484
         			echo '<script type="text/javascript">window.open("' . $url_conf['url']
@@ -543,8 +547,9 @@  discard block
 block discarded – undo
543 547
 print( "<input type=submit value=\"{$mod_strings['LBL_UW_BTN_BACK_TO_MOD_LOADER']}\" /><br>" );
544 548
 echo "</div>";
545 549
 echo "<br>";
546
-if(isset($lang_changed_string))
550
+if(isset($lang_changed_string)) {
547 551
 	print($lang_changed_string);
552
+}
548 553
 if ($install_type != "module" && $install_type != "langpack"){
549 554
     if( sizeof( $files_to_handle ) > 0 ){
550 555
         echo '<div style="text-align: left; cursor: hand; cursor: pointer; text-decoration: underline;" onclick=\'this.style.display="none"; toggleDisplay("more");\' id="all_text">' . SugarThemeRegistry::current()->getImage('advanced_search', '', null, null, ".gif", $mod_strings['LBL_ADVANCED_SEARCH']) . ' Show Details</div><div id=\'more\' style=\'display: none\'>
@@ -556,8 +561,7 @@  discard block
 block discarded – undo
556 561
         }
557 562
         print( "</ul>\n" );
558 563
         echo '</div>';
559
-    }
560
-    else if( $mode != 'Disable' && $mode !='Enable' ){
564
+    } else if( $mode != 'Disable' && $mode !='Enable' ){
561 565
         print( "{$mod_strings['LBL_UW_NO_FILES_SELECTED']} $file_action.<br>\n" );
562 566
     }
563 567
 
Please login to merge, or discard this patch.