Completed
Push — develop ( 7c1bda...edae1e )
by Adam
18:38 queued 03:14
created
include/generic/SugarWidgets/SugarWidgetFielddatetime.php 1 patch
Braces   +12 added lines, -12 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.
@@ -58,8 +60,7 @@  discard block
 block discarded – undo
58 60
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
59 61
         if(isset($GLOBALS['log'])) {
60 62
             $GLOBALS['log']->deprecated($deprecatedMessage);
61
-        }
62
-        else {
63
+        } else {
63 64
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
64 65
         }
65 66
         self::__construct($layout_manager);
@@ -81,7 +82,9 @@  discard block
 block discarded – undo
81 82
 
82 83
 		$report_def_str = $json_obj->decode($this->reporter->report_def_str);
83 84
 
84
-		if(empty($report_def_str['assigned_user_id'])) return null;
85
+		if(empty($report_def_str['assigned_user_id'])) {
86
+		    return null;
87
+		}
85 88
 
86 89
 		$this->assigned_user = new User();
87 90
 		$this->assigned_user->retrieve($report_def_str['assigned_user_id']);
@@ -228,8 +231,7 @@  discard block
 block discarded – undo
228 231
         if ($time=='start') {
229 232
             $begin_parts = explode(' ', $begin);
230 233
             $be = $begin_parts[0] . ' 00:00:00';
231
-        }
232
-        else if ($time=='end') {
234
+        } else if ($time=='end') {
233 235
             $begin_parts = explode(' ', $begin);
234 236
             $be = $begin_parts[0] . ' 23:59:59';
235 237
         } else {
@@ -529,12 +531,12 @@  discard block
 block discarded – undo
529 531
         if (count(explode('-',$content)) == 2){
530 532
             return $content;
531 533
         // if date field
532
-        }elseif(substr_count($layout_def['type'], 'date') > 0){
534
+        } elseif(substr_count($layout_def['type'], 'date') > 0){
533 535
             // if date time field
534 536
             if(substr_count($layout_def['type'], 'time') > 0 && $this->get_time_part($content)!= false){
535 537
                 $td = $timedate->to_display_date_time($content);
536 538
                 return $td;
537
-            }else{// if date only field
539
+            } else{// if date only field
538 540
                 $td = $timedate->to_display_date($content, false); // Avoid PHP notice of returning by reference.
539 541
                 return $td;
540 542
             }
@@ -650,8 +652,7 @@  discard block
 block discarded – undo
650 652
         if (empty($layout_def['sort_dir']) || $layout_def['sort_dir'] == 'a')
651 653
         {
652 654
             return $orderBy . " ASC\n";
653
-        }
654
-        else
655
+        } else
655 656
         {
656 657
             return $orderBy . " DESC\n";
657 658
         }
@@ -767,8 +768,7 @@  discard block
 block discarded – undo
767 768
         if (empty($layout_def['sort_dir']) || $layout_def['sort_dir'] == 'a')
768 769
         {
769 770
             return $orderBy . " ASC\n";
770
-        }
771
-        else
771
+        } else
772 772
         {
773 773
             return $orderBy . " DESC\n";
774 774
         }
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetReportField.php 1 patch
Braces   +12 added lines, -10 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.
@@ -66,8 +68,7 @@  discard block
 block discarded – undo
66 68
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
67 69
         if(isset($GLOBALS['log'])) {
68 70
             $GLOBALS['log']->deprecated($deprecatedMessage);
69
-        }
70
-        else {
71
+        } else {
71 72
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
72 73
         }
73 74
         self::__construct($layout_manager);
@@ -199,19 +200,20 @@  discard block
 block discarded – undo
199 200
  function queryOrderBy($layout_def)
200 201
  {
201 202
      $field_def = array();
202
-	if(!empty($this->reporter->all_fields[$layout_def['column_key']])) $field_def = $this->reporter->all_fields[$layout_def['column_key']];
203
+	if(!empty($this->reporter->all_fields[$layout_def['column_key']])) {
204
+	    $field_def = $this->reporter->all_fields[$layout_def['column_key']];
205
+	}
203 206
 
204 207
     if (!empty($layout_def['group_function']))
205 208
     {
206 209
         $order_by = $this->_get_column_alias($layout_def);
207
-    }
208
-    elseif (!empty($field_def['sort_on']))
210
+    } elseif (!empty($field_def['sort_on']))
209 211
 	{
210 212
 			$order_by = $layout_def['table_alias'].".".$field_def['sort_on'];
211
-            if(!empty($field_def['sort_on2']))
212
-                $order_by .= ', ' . $layout_def['table_alias'].".".$field_def['sort_on2'];
213
-    }
214
-	else {
213
+            if(!empty($field_def['sort_on2'])) {
214
+                            $order_by .= ', ' . $layout_def['table_alias'].".".$field_def['sort_on2'];
215
+            }
216
+    } else {
215 217
 		$order_by = $this->_get_column_alias($layout_def)." \n";
216 218
 	}
217 219
 
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetFieldenum.php 1 patch
Braces   +11 added lines, -13 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,8 +54,7 @@  discard block
 block discarded – undo
52 54
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
53 55
         if(isset($GLOBALS['log'])) {
54 56
             $GLOBALS['log']->deprecated($deprecatedMessage);
55
-        }
56
-        else {
57
+        } else {
57 58
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
58 59
         }
59 60
         self::__construct($layout_manager);
@@ -110,7 +111,7 @@  discard block
 block discarded – undo
110 111
     function & displayList($layout_def) {
111 112
         if(!empty($layout_def['column_key'])){
112 113
             $field_def = $this->reporter->all_fields[$layout_def['column_key']];
113
-        }else if(!empty($layout_def['fields'])){
114
+        } else if(!empty($layout_def['fields'])){
114 115
             $field_def = $layout_def['fields'];
115 116
         }
116 117
         $cell = $this->displayListPlain($layout_def);
@@ -144,13 +145,13 @@  discard block
 block discarded – undo
144 145
 	function & displayListPlain($layout_def) {
145 146
 		if(!empty($layout_def['column_key'])){
146 147
 			$field_def = $this->reporter->all_fields[$layout_def['column_key']];
147
-		}else if(!empty($layout_def['fields'])){
148
+		} else if(!empty($layout_def['fields'])){
148 149
 			$field_def = $layout_def['fields'];
149 150
 		}
150 151
 
151 152
 		if (!empty($layout_def['table_key'] ) &&( empty ($field_def['fields']) || empty ($field_def['fields'][0]) || empty ($field_def['fields'][1]))){
152 153
 			$value = $this->_get_list_value($layout_def);
153
-		}else if(!empty($layout_def['name']) && !empty($layout_def['fields'])){
154
+		} else if(!empty($layout_def['name']) && !empty($layout_def['fields'])){
154 155
 			$key = strtoupper($layout_def['name']);
155 156
 			$value = $layout_def['fields'][$key];
156 157
 		}
@@ -158,7 +159,7 @@  discard block
 block discarded – undo
158 159
 
159 160
 			if(isset($field_def['options'])){
160 161
 				$cell = translate($field_def['options'], $field_def['module'], $value);
161
-			}else if(isset($field_def['type']) && $field_def['type'] == 'enum' && isset($field_def['function'])){
162
+			} else if(isset($field_def['type']) && $field_def['type'] == 'enum' && isset($field_def['function'])){
162 163
 	            global $beanFiles;
163 164
 	            if(empty($beanFiles)) {
164 165
 	                include('include/modules.php');
@@ -217,18 +218,15 @@  discard block
 block discarded – undo
217 218
         if(!empty($layout_def['remove_blank']) && $layout_def['remove_blank']) {
218 219
             if ( isset($layout_def['options']) &&  is_array($layout_def['options']) ) {
219 220
                 $ops = $layout_def['options'];
220
-            }
221
-            elseif (isset($layout_def['options']) && isset($app_list_strings[$layout_def['options']])){
221
+            } elseif (isset($layout_def['options']) && isset($app_list_strings[$layout_def['options']])){
222 222
             	$ops = $app_list_strings[$layout_def['options']];
223 223
                 if(array_key_exists('', $app_list_strings[$layout_def['options']])) {
224 224
              	   unset($ops['']);
225 225
 	            }
226
-            }
227
-            else{
226
+            } else{
228 227
             	$ops = array();
229 228
             }
230
-        }
231
-        else {
229
+        } else {
232 230
             $ops = $app_list_strings[$layout_def['options']];
233 231
         }
234 232
 
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetFieldcurrency.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.
@@ -57,8 +59,7 @@  discard block
 block discarded – undo
57 59
         if($current_user->getPreference('currency') )
58 60
         {
59 61
                 $global_currency_obj->retrieve($current_user->getPreference('currency'));
60
-        }
61
-        else
62
+        } else
62 63
         {
63 64
                 $global_currency_obj->retrieve('-99');
64 65
         }
@@ -81,8 +82,7 @@  discard block
 block discarded – undo
81 82
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
82 83
         if(isset($GLOBALS['log'])) {
83 84
             $GLOBALS['log']->deprecated($deprecatedMessage);
84
-        }
85
-        else {
85
+        } else {
86 86
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
87 87
         }
88 88
         self::__construct($layout_manager);
@@ -111,13 +111,13 @@  discard block
 block discarded – undo
111 111
 
112 112
         if(!empty($layout_def['column_key'])){
113 113
             $field_def = $this->reporter->all_fields[$layout_def['column_key']];
114
-        }else if(!empty($layout_def['fields'])){
114
+        } else if(!empty($layout_def['fields'])){
115 115
             $field_def = $layout_def['fields'];
116 116
         }
117 117
         $record = '';
118
-        if ($layout_def['table_key'] == 'self' && isset($layout_def['fields']['PRIMARYID']))
119
-            $record = $layout_def['fields']['PRIMARYID'];
120
-        else if (isset($layout_def['fields'][strtoupper($layout_def['table_alias']."_id")])){
118
+        if ($layout_def['table_key'] == 'self' && isset($layout_def['fields']['PRIMARYID'])) {
119
+                    $record = $layout_def['fields']['PRIMARYID'];
120
+        } else if (isset($layout_def['fields'][strtoupper($layout_def['table_alias']."_id")])){
121 121
             $record = $layout_def['fields'][strtoupper($layout_def['table_alias']."_id")];
122 122
         }
123 123
         if (!empty($record)) {
@@ -133,9 +133,9 @@  discard block
 block discarded – undo
133 133
             }
134 134
 	        $str .= "</div>";
135 135
 	        return $str;
136
+        } else {
137
+                    return $display;
136 138
         }
137
-        else
138
-            return $display;
139 139
     }
140 140
 
141 141
     function displayListPlain($layout_def) {
@@ -215,8 +215,9 @@  discard block
 block discarded – undo
215 215
         }
216 216
 
217 217
         $real_table = '';
218
-        if (!empty($this->reporter->all_fields[$layout_def['column_key']]['real_table']))
219
-            $real_table = $this->reporter->all_fields[$layout_def['column_key']]['real_table'];
218
+        if (!empty($this->reporter->all_fields[$layout_def['column_key']]['real_table'])) {
219
+                    $real_table = $this->reporter->all_fields[$layout_def['column_key']]['real_table'];
220
+        }
220 221
 
221 222
         $add_currency_id = false;
222 223
         if(!empty($table)) {
@@ -249,19 +250,16 @@  discard block
 block discarded – undo
249 250
         {
250 251
             $currency_symbol = $layout_def['currency_symbol'];
251 252
             $currency_id = $layout_def['currency_id'];
252
-        }
253
-        else
253
+        } else
254 254
         {
255 255
             $key = strtoupper(isset($layout_def['varname']) ? $layout_def['varname'] : $this->_get_column_alias($layout_def));
256 256
             if ( $this->isSystemCurrency($layout_def) )
257 257
             {
258 258
                 $currency_id = '-99';
259
-            }
260
-            elseif (isset($layout_def['fields'][$key.'_CURRENCY']))
259
+            } elseif (isset($layout_def['fields'][$key.'_CURRENCY']))
261 260
             {
262 261
                 $currency_id = $layout_def['fields'][$key.'_CURRENCY'];
263
-            }
264
-            elseif(isset($layout_def['fields'][$this->getTruncatedColumnAlias($this->_get_column_alias($layout_def)."_currency")]))
262
+            } elseif(isset($layout_def['fields'][$this->getTruncatedColumnAlias($this->_get_column_alias($layout_def)."_currency")]))
265 263
             {
266 264
                 $currency_id = $layout_def['fields'][$this->getTruncatedColumnAlias($this->_get_column_alias($layout_def)."_currency")];
267 265
             }
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetField.php 1 patch
Braces   +4 added lines, -5 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.
@@ -57,8 +58,7 @@  discard block
 block discarded – undo
57 58
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
58 59
         if(isset($GLOBALS['log'])) {
59 60
             $GLOBALS['log']->deprecated($deprecatedMessage);
60
-        }
61
-        else {
61
+        } else {
62 62
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
63 63
         }
64 64
         self::__construct($layout_manager);
@@ -186,8 +186,7 @@  discard block
 block discarded – undo
186 186
 		$key = '';
187 187
 		if ( isset($layout_def['varname']) ) {
188 188
 		    $key = strtoupper($layout_def['varname']);
189
-		}
190
-		else {
189
+		} else {
191 190
 			$key = strtoupper($this->_get_column_alias($layout_def));
192 191
 		}
193 192
 
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetFieldname.php 1 patch
Braces   +14 added lines, -11 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.
@@ -59,8 +61,7 @@  discard block
 block discarded – undo
59 61
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
60 62
         if(isset($GLOBALS['log'])) {
61 63
             $GLOBALS['log']->deprecated($deprecatedMessage);
62
-        }
63
-        else {
64
+        } else {
64 65
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
65 66
         }
66 67
         self::__construct($layout_manager);
@@ -89,8 +90,9 @@  discard block
 block discarded – undo
89 90
 		$record = $layout_def['fields'][$key];
90 91
 		$layout_def['name'] = $name;
91 92
 		global $current_user;
92
-		if ($module == 'Users' && !is_admin($current_user))
93
-        	$module = 'Employees';
93
+		if ($module == 'Users' && !is_admin($current_user)) {
94
+		        	$module = 'Employees';
95
+		}
94 96
 		$str = "<a target='_blank' href=\"index.php?action=DetailView&module=$module&record=$record\">";
95 97
 		$str .= $this->displayListPlain($layout_def);
96 98
 		$str .= "</a>";
@@ -105,8 +107,9 @@  discard block
 block discarded – undo
105 107
             $field_name = $layout_def['name'];
106 108
             $field_type = $field_def['type'];
107 109
             $str .= "</a>";
108
-            if ($field_name == 'name')
109
-                $str .= "&nbsp;" .SugarThemeRegistry::current()->getImage("edit_inline","border='0' alt='Edit Layout' align='bottom' onClick='SUGAR.reportsInlineEdit.inlineEdit(\"$div_id\",\"$value\",\"$module\",\"$record\",\"$field_name\",\"$field_type\");'");
110
+            if ($field_name == 'name') {
111
+                            $str .= "&nbsp;" .SugarThemeRegistry::current()->getImage("edit_inline","border='0' alt='Edit Layout' align='bottom' onClick='SUGAR.reportsInlineEdit.inlineEdit(\"$div_id\",\"$value\",\"$module\",\"$record\",\"$field_name\",\"$field_type\");'");
112
+            }
110 113
             $str .= "</div>";
111 114
         }
112 115
 		return $str;
@@ -238,9 +241,9 @@  discard block
 block discarded – undo
238 241
 			if ($value == 'Current User') {
239 242
 				global $current_user;
240 243
 				array_push($arr,$this->reporter->db->quoted($current_user->id));
244
+			} else {
245
+							array_push($arr,$this->reporter->db->quoted($value));
241 246
 			}
242
-			else
243
-				array_push($arr,$this->reporter->db->quoted($value));
244 247
 		}
245 248
 
246 249
 		$str = implode(",",$arr);
@@ -262,9 +265,9 @@  discard block
 block discarded – undo
262 265
 			if ($value == 'Current User') {
263 266
 				global $current_user;
264 267
 				array_push($arr,$this->reporter->db->quoted($current_user->id));
268
+			} else {
269
+							array_push($arr,$this->reporter->db->quoted($value));
265 270
 			}
266
-			else
267
-				array_push($arr,$this->reporter->db->quoted($value));
268 271
 		}
269 272
 
270 273
 		$str = implode(",",$arr);
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetSubPanelTopButton.php 1 patch
Braces   +34 added lines, -30 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.
@@ -66,31 +68,38 @@  discard block
 block discarded – undo
66 68
 			$class_details = $module;
67 69
 
68 70
 			// If keys were passed into the constructor, translate them from keys to values.
69
-			if(!empty($class_details['module']))
70
-				$this->module = $class_details['module'];
71
-			if(!empty($class_details['title']))
72
-				$this->title = $app_strings[$class_details['title']];
73
-			if(!empty($class_details['access_key']))
74
-				$this->access_key = $app_strings[$class_details['access_key']];
75
-			if(!empty($class_details['form_value']))
76
-				$this->form_value = translate($class_details['form_value'], $this->module);
77
-			if(!empty($class_details['additional_form_fields']))
78
-				$this->additional_form_fields = $class_details['additional_form_fields'];
71
+			if(!empty($class_details['module'])) {
72
+							$this->module = $class_details['module'];
73
+			}
74
+			if(!empty($class_details['title'])) {
75
+							$this->title = $app_strings[$class_details['title']];
76
+			}
77
+			if(!empty($class_details['access_key'])) {
78
+							$this->access_key = $app_strings[$class_details['access_key']];
79
+			}
80
+			if(!empty($class_details['form_value'])) {
81
+							$this->form_value = translate($class_details['form_value'], $this->module);
82
+			}
83
+			if(!empty($class_details['additional_form_fields'])) {
84
+							$this->additional_form_fields = $class_details['additional_form_fields'];
85
+			}
79 86
 			if(!empty($class_details['ACL'])){
80 87
 				$this->acl = $class_details['ACL'];
81 88
 			}
82
-		}
83
-		else
89
+		} else
84 90
 		{
85 91
 			$this->module = $module;
86 92
 
87 93
 			// If keys were passed into the constructor, translate them from keys to values.
88
-			if(!empty($title))
89
-				$this->title = $app_strings[$title];
90
-			if(!empty($access_key))
91
-				$this->access_key = $app_strings[$access_key];
92
-			if(!empty($form_value))
93
-				$this->form_value = translate($form_value, $module);
94
+			if(!empty($title)) {
95
+							$this->title = $app_strings[$title];
96
+			}
97
+			if(!empty($access_key)) {
98
+							$this->access_key = $app_strings[$access_key];
99
+			}
100
+			if(!empty($form_value)) {
101
+							$this->form_value = translate($form_value, $module);
102
+			}
94 103
 		}
95 104
 	}
96 105
 
@@ -101,8 +110,7 @@  discard block
 block discarded – undo
101 110
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
102 111
         if(isset($GLOBALS['log'])) {
103 112
             $GLOBALS['log']->deprecated($deprecatedMessage);
104
-        }
105
-        else {
113
+        } else {
106 114
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
107 115
         }
108 116
         self::__construct($module, $title, $access_key, $form_value);
@@ -130,8 +138,7 @@  discard block
 block discarded – undo
130 138
                 if(!empty($defines['focus']->$value))
131 139
                 {
132 140
                     $additionalFormFields[$key] = $defines['focus']->$value;
133
-                }
134
-                else
141
+                } else
135 142
                 {
136 143
                     $additionalFormFields[$key] = '';
137 144
                 }
@@ -142,8 +149,7 @@  discard block
 block discarded – undo
142 149
 		if(!empty($this->module))
143 150
         {
144 151
             $defines['child_module_name'] = $this->module;
145
-        }
146
-        else
152
+        } else
147 153
         {
148 154
             $defines['child_module_name'] = $defines['module'];
149 155
         }
@@ -175,7 +181,7 @@  discard block
 block discarded – undo
175 181
 
176 182
         if($currentModule == 'Campaigns'){
177 183
             $formValues['return_action'] = "DetailView";
178
-        }else{
184
+        } else{
179 185
             $formValues['return_action'] = $defines['action'];
180 186
             if ( $formValues['return_action'] == 'SubPanelViewer' ) {
181 187
                 $formValues['return_action'] = 'DetailView';
@@ -209,8 +215,7 @@  discard block
 block discarded – undo
209 215
         {
210 216
             if($defines['focus']->object_name=='Contact') {
211 217
                 $additionalFormFields['parent_type'] = 'Accounts';
212
-            }
213
-            else {
218
+            } else {
214 219
                 $additionalFormFields['parent_type'] = $defines['focus']->module_dir;
215 220
             }
216 221
         }
@@ -219,8 +224,7 @@  discard block
 block discarded – undo
219 224
             if($defines['focus']->object_name=='Contact') {
220 225
                 $additionalFormFields['parent_name'] = $defines['focus']->account_name;
221 226
                 $additionalFormFields['account_name'] = $defines['focus']->account_name;
222
-            }
223
-            else {
227
+            } else {
224 228
                 $additionalFormFields['parent_name'] = $defines['focus']->name;
225 229
             }
226 230
         }
Please login to merge, or discard this patch.
modules/Campaigns/WizardNewsletterSave.php 1 patch
Braces   +6 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.
@@ -53,8 +55,7 @@  discard block
 block discarded – undo
53 55
     $campaign_focus = new Campaign();
54 56
     if(isset($_REQUEST['record']) && $_REQUEST['record'] && !(isset($_REQUEST['campaign_id']) && $_REQUEST['campaign_id'])) {
55 57
         $campaign_focus->retrieve($_REQUEST['record']);
56
-    }
57
-    else if(isset($_REQUEST['campaign_id']) && $_REQUEST['campaign_id']) {
58
+    } else if(isset($_REQUEST['campaign_id']) && $_REQUEST['campaign_id']) {
58 59
         $campaign_focus->retrieve($_REQUEST['campaign_id']);
59 60
     }
60 61
 
@@ -230,7 +231,7 @@  discard block
 block discarded – undo
230 231
                          $action = 'WizardMarketing';
231 232
                         break;
232 233
                 }
233
-            }else{
234
+            } else{
234 235
                 $action = 'WizardHome&record='.$campaign_focus->id;
235 236
             }
236 237
             //require_once('modules/Campaigns/WizardMarketing.php');
@@ -395,7 +396,7 @@  discard block
 block discarded – undo
395 396
                         $action = 'WizardHome';
396 397
                         break;
397 398
                 }
398
-            }else{
399
+            } else{
399 400
                 $action = 'WizardHome&record='.$campaign_focus->id;
400 401
             }
401 402
             //require_once('modules/Campaigns/WizardMarketing.php');
Please login to merge, or discard this patch.
modules/EmailTemplates/EmailTemplateData.php 1 patch
Braces   +7 added lines, -9 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
 function handleAttachmentForRemove() {
5 7
     if(!empty($_REQUEST['attachmentsRemove'])) {
@@ -60,8 +62,7 @@  discard block
 block discarded – undo
60 62
                     $marketing = BeanFactory::getBean('EmailMarketing', $marketingId);
61 63
                     $marketing->template_id = $emailTemplateId;
62 64
                     $marketing->save();
63
-                }
64
-                else {
65
+                } else {
65 66
                     // TODO something is not OK, the selected campaign isn't related to this marketing!!
66 67
                     $GLOBALS['log']->debug('Selected marketing not found!');
67 68
                 }
@@ -75,8 +76,7 @@  discard block
 block discarded – undo
75 76
             foreach($bean as $key => $value) {
76 77
                 if(in_array($key, $fields)) {
77 78
                     $newBean->$key = $_POST[$key];
78
-                }
79
-                else if(in_array($key, $fieldsForCopy)) {
79
+                } else if(in_array($key, $fieldsForCopy)) {
80 80
                     $newBean->$key = $bean->$key;
81 81
                 }
82 82
             }
@@ -125,16 +125,14 @@  discard block
 block discarded – undo
125 125
                     }
126 126
                     $data['attachments'] = $attachments;
127 127
                 }
128
-            }
129
-            else {
128
+            } else {
130 129
                 $error = 'Email Template not found.';
131 130
             }
132 131
             break;
133 132
     }
134 133
 
135 134
 
136
-}
137
-else {
135
+} else {
138 136
     $error = 'Illegal GUID format.';
139 137
 }
140 138
 
Please login to merge, or discard this patch.