Completed
Push — master ( 58f496...a833c2 )
by Adam
18:52
created
modules/Administration/repairDatabase.php 1 patch
Braces   +9 added lines, -7 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.
@@ -70,8 +71,7 @@  discard block
 block discarded – undo
70 71
 		    $sql = str_replace('&#039;',"'", $_POST['sql']);
71 72
 		    //echo html_entity_decode($_POST['sql']);
72 73
 		    echo $sql;
73
-		}
74
-		elseif (isset ($_POST['raction']) && strtolower($_POST['raction']) == "execute") {
74
+		} elseif (isset ($_POST['raction']) && strtolower($_POST['raction']) == "execute") {
75 75
 			$sql = str_replace(
76 76
 				array(
77 77
 					"\n",
@@ -96,8 +96,9 @@  discard block
 block discarded – undo
96 96
 	} else {
97 97
 
98 98
 		if (!$export && empty ($_REQUEST['repair_silent'])) {
99
-			if ( empty($hideModuleMenu) )
100
-		        echo getClassicModuleTitle($mod_strings['LBL_REPAIR_DATABASE'], array($mod_strings['LBL_REPAIR_DATABASE']), true);
99
+			if ( empty($hideModuleMenu) ) {
100
+					        echo getClassicModuleTitle($mod_strings['LBL_REPAIR_DATABASE'], array($mod_strings['LBL_REPAIR_DATABASE']), true);
101
+			}
101 102
 			echo "<h1 id=\"rdloading\">{$mod_strings['LBL_REPAIR_DATABASE_PROCESSING']}</h1>";
102 103
 			ob_flush();
103 104
 		}
@@ -137,8 +138,9 @@  discard block
 block discarded – undo
137 138
 
138 139
 		foreach ($dictionary as $meta) {
139 140
 
140
-			if ( !isset($meta['table']) || isset($repairedTables[$meta['table']]))
141
-                continue;
141
+			if ( !isset($meta['table']) || isset($repairedTables[$meta['table']])) {
142
+			                continue;
143
+			}
142 144
             
143 145
             $tablename = $meta['table'];
144 146
 			$fielddefs = $meta['fields'];
Please login to merge, or discard this patch.
modules/Administration/UpgradeFields.php 1 patch
Braces   +5 added lines, -3 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.
@@ -120,8 +121,9 @@  discard block
 block discarded – undo
120 121
 	echo sizeof($fields)." field(s) missing from $mod->table_name"."_cstm<br>";
121 122
 	foreach ($fields as $field) {
122 123
 		echo "Adding Column $field to $mod->table_name"."_cstm<br>";
123
-		if (!$simulate)
124
-			$mod->custom_fields->add_existing_custom_field($field);
124
+		if (!$simulate) {
125
+					$mod->custom_fields->add_existing_custom_field($field);
126
+		}
125 127
 	}
126 128
 
127 129
 }
Please login to merge, or discard this patch.
modules/Administration/callJSRepair.php 1 patch
Braces   +6 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.
@@ -60,7 +62,7 @@  discard block
 block discarded – undo
60 62
             $_REQUEST['js_rebuild_concat'] = 'rebuild';
61 63
             require_once('jssource/minify.php');
62 64
          
63
-        }else{
65
+        } else{
64 66
             $_REQUEST['root_directory'] = getcwd();
65 67
             require_once('jssource/minify.php');
66 68
         
@@ -68,13 +70,13 @@  discard block
 block discarded – undo
68 70
                 //should replace compressed JS with source js
69 71
                 reverseScripts("$from/jssource/src_files","$from");    
70 72
     
71
-            }elseif($_REQUEST['js_admin_repair'] == 'mini'){
73
+            } elseif($_REQUEST['js_admin_repair'] == 'mini'){
72 74
                 //should replace compressed JS with minified version of source js
73 75
                 reverseScripts("$from/jssource/src_files","$from");
74 76
                 BackUpAndCompressScriptFiles("$from","",false);
75 77
                 ConcatenateFiles("$from");
76 78
     
77
-            }elseif($_REQUEST['js_admin_repair'] == 'repair'){
79
+            } elseif($_REQUEST['js_admin_repair'] == 'repair'){
78 80
              //should compress existing javascript (including changes done) without overwriting original source files
79 81
                 BackUpAndCompressScriptFiles("$from","",false);
80 82
                 ConcatenateFiles("$from");        
Please login to merge, or discard this patch.
modules/Administration/RebuildDashlets.php 1 patch
Braces   +7 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.
@@ -50,9 +52,10 @@  discard block
 block discarded – undo
50 52
 
51 53
     $dc = new DashletCacheBuilder();
52 54
     $dc->buildCache();
53
-   if( !$silent ) echo '<br><br><br><br>' . $mod_strings['LBL_REBUILD_DASHLETS_DESC_SUCCESS'];
54
-}
55
-else{
55
+   if( !$silent ) {
56
+       echo '<br><br><br><br>' . $mod_strings['LBL_REBUILD_DASHLETS_DESC_SUCCESS'];
57
+   }
58
+   } else{
56 59
 	sugar_die($GLOBALS['app_strings']['ERR_NOT_ADMIN']);
57 60
 }
58 61
 ?>
59 62
\ No newline at end of file
Please login to merge, or discard this patch.
modules/Administration/UpgradeWizardCommon.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.
@@ -54,8 +56,7 @@  discard block
 block discarded – undo
54 56
     if( $view != "default" && $view != "module" ){
55 57
         die($mod_strings['ERR_UW_INVALID_VIEW']);
56 58
     }
57
-}
58
-else{
59
+} else{
59 60
     die($mod_strings['ERR_UW_NO_VIEW']);
60 61
 }
61 62
 $form_action = "index.php?module=Administration&view=" . $view . "&action=UpgradeWizard";
Please login to merge, or discard this patch.
modules/Administration/updateTimezonePrefs.php 1 patch
Braces   +15 added lines, -11 removed lines patch added patch discarded remove patch
@@ -44,7 +44,9 @@  discard block
 block discarded – undo
44 44
 
45 45
 <table>
46 46
 <?php
47
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
47
+if(!defined('sugarEntry') || !sugarEntry) {
48
+    die('Not A Valid Entry Point');
49
+}
48 50
 $prompt_users = 'checked';
49 51
 if(isset($_POST['preview']) && !isset($_POST['prompt_users'])){
50 52
 	$prompt_users = '';
@@ -66,7 +68,9 @@  discard block
 block discarded – undo
66 68
 	}
67 69
 	
68 70
 		$string = "Preview";
69
-		if($execute)$string = "Updating";
71
+		if($execute) {
72
+		    $string = "Updating";
73
+		}
70 74
         echo "<tr><td> $string timezone preferences for user <b>{$row['user_name']}</b>...</td><td>";
71 75
 		
72 76
         
@@ -93,20 +97,20 @@  discard block
 block discarded – undo
93 97
 	                   	 	$setTo = $selectedZone;
94 98
 	                   	 	if(empty($prompt_users)){
95 99
 	                   			$newprefs['ut']=1;
96
-	                   	 	}else{
100
+	                   	 	} else{
97 101
 	                   	 		$newprefs['ut']=0;
98 102
 	                   	 	}
99
-	                	}else{
103
+	                	} else{
100 104
 	                		$newprefs['timezone'] = $serverTimeZone;   
101 105
 	                   	 	$newprefs['timez']  = $val;
102 106
 	                   	 	$setTo = $serverTimeZone;
103 107
 	                   	 	if(empty($prompt_users)){
104 108
 	                   			$newprefs['ut']=1;
105
-	                   	 	}else{
109
+	                   	 	} else{
106 110
 	                   	 		$newprefs['ut']=0;
107 111
 	                   	 	}
108 112
 	                	}
109
-	                }else{
113
+	                } else{
110 114
 	                	$newprefs[$key] = $val;
111 115
 	                	if(!empty($prefs['timezone'])){
112 116
 	                		$alreadySet = 'Previously Set - '. $prefs['timezone'];	
@@ -114,7 +118,7 @@  discard block
 block discarded – undo
114 118
 	                }
115 119
 	                
116 120
 	         
117
-	                }else{
121
+	                } else{
118 122
 	                	$newprefs[$key] = $val;
119 123
 	                }
120 124
 	        }
@@ -125,10 +129,10 @@  discard block
 block discarded – undo
125 129
 	        }
126 130
 		if(!empty($setTo)){
127 131
 			echo $setTo;
128
-		}else{
132
+		} else{
129 133
 			if(!empty($alreadySet)){
130 134
 				echo $alreadySet;
131
-			}else{
135
+			} else{
132 136
 				echo $serverTimeZone;
133 137
 				$prefs['timezone'] = $serverTimeZone;
134 138
 			}
@@ -140,7 +144,7 @@  discard block
 block discarded – undo
140 144
 			if(isset($_POST[$row['id'].'adjust'])){
141 145
 				echo  $adjustment;
142 146
 			}
143
-		}else{
147
+		} else{
144 148
 			echo "<select name='{$row['id']}adjust'>";
145 149
 			
146 150
 			echo get_select_options_with_id(array('-1'=>'-1', 'none'=>'0', '1'=>'+1'), $adjustment.'');
@@ -165,7 +169,7 @@  discard block
 block discarded – undo
165 169
 if($execute){
166 170
 	echo "<br>All timezone preferences updated!<br><br>";
167 171
 	
168
-}else{
172
+} else{
169 173
 	echo "Prompt users on login to confirm:<input type='checkbox' name='prompt_users' value='1' $prompt_users><br>";
170 174
 	echo "<input class='button' type='submit' name='execute' value='Execute'>&nbsp; <input class='button' type='submit' name='preview' value='Preview'>";
171 175
 	
Please login to merge, or discard this patch.
modules/InboundEmail/AOPInboundEmail.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
             }
74 74
             if($email->description_html) {
75 75
                 $c->description = $this->processImageLinks(SugarCleaner::cleanHtml($email->description_html),$noteIds);
76
-            }else{
76
+            } else{
77 77
                 $c->description = $email->description;
78 78
             }
79 79
             $c->assigned_user_id = $userId;
Please login to merge, or discard this patch.
modules/AM_ProjectTemplates/controller.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,9 @@  discard block
 block discarded – undo
19 19
  * @author Andrew Mclaughlan <[email protected]>
20 20
  */
21 21
 
22
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
22
+if(!defined('sugarEntry') || !sugarEntry) {
23
+    die('Not A Valid Entry Point');
24
+}
23 25
 
24 26
 class AM_ProjectTemplatesController extends SugarController {
25 27
 
@@ -100,8 +102,7 @@  discard block
 block discarded – undo
100 102
                 $project_task->date_finish = $end;
101 103
                 $enddate_array[$count] = $end;
102 104
                 $GLOBALS['log']->fatal("DATE:". $end);
103
-            }
104
-            else {
105
+            } else {
105 106
                 $start_date = $count - 1;
106 107
                 $startdate = DateTime::createFromFormat('Y-m-d', $enddate_array[$start_date]);
107 108
                 $GLOBALS['log']->fatal("DATE:". $enddate_array[$start_date]);
Please login to merge, or discard this patch.
modules/Tasks/metadata/additionalDetails.php 1 patch
Braces   +18 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.
@@ -53,10 +55,16 @@  discard block
 block discarded – undo
53 55
            	$overlib_string .= '<br>';
54 56
        }
55 57
 
56
-    if(!empty($fields['DATE_START'])) $overlib_string .= '<b>'. $mod_strings['LBL_START_DATE_AND_TIME'] . '</b> ' . $fields['DATE_START'] .  '<br>';
57
-	if(!empty($fields['DATE_DUE'])) $overlib_string .= '<b>'. $mod_strings['LBL_DUE_DATE_AND_TIME'] . '</b> ' . $fields['DATE_DUE'] .  '<br>';
58
-	if(!empty($fields['PRIORITY'])) $overlib_string .= '<b>'. $mod_strings['LBL_PRIORITY'] . '</b> ' . 
58
+    if(!empty($fields['DATE_START'])) {
59
+        $overlib_string .= '<b>'. $mod_strings['LBL_START_DATE_AND_TIME'] . '</b> ' . $fields['DATE_START'] .  '<br>';
60
+    }
61
+	if(!empty($fields['DATE_DUE'])) {
62
+	    $overlib_string .= '<b>'. $mod_strings['LBL_DUE_DATE_AND_TIME'] . '</b> ' . $fields['DATE_DUE'] .  '<br>';
63
+	}
64
+	if(!empty($fields['PRIORITY'])) {
65
+	    $overlib_string .= '<b>'. $mod_strings['LBL_PRIORITY'] . '</b> ' . 
59 66
 $app_list_strings['task_priority_dom'][$fields['PRIORITY']] . '<br>';
67
+	}
60 68
     if (!empty($fields['PARENT_ID']))
61 69
     {
62 70
             $overlib_string .= "<b>". $mod_strings['LBL_RELATED_TO'] . "</b> ".
@@ -64,11 +72,15 @@  discard block
 block discarded – undo
64 72
                     $fields['PARENT_NAME'] . "</a>";
65 73
             $overlib_string .= '<br>';
66 74
     }
67
-    if(!empty($fields['STATUS'])) $overlib_string .= '<b>'. $mod_strings['LBL_STATUS'] . '</b> ' . $app_list_strings['task_status_dom'][$fields['STATUS']] . '<br>';
75
+    if(!empty($fields['STATUS'])) {
76
+        $overlib_string .= '<b>'. $mod_strings['LBL_STATUS'] . '</b> ' . $app_list_strings['task_status_dom'][$fields['STATUS']] . '<br>';
77
+    }
68 78
 		
69 79
 	if(!empty($fields['DESCRIPTION'])) { 
70 80
 		$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
71
-		if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
81
+		if(strlen($fields['DESCRIPTION']) > 300) {
82
+		    $overlib_string .= '...';
83
+		}
72 84
 	}	
73 85
 	
74 86
 		$editLink = "index.php?action=EditView&module=Tasks&record={$fields['ID']}"; 
Please login to merge, or discard this patch.