Passed
Push — scrutinizer-code-quality ( eedb15...27193c )
by Adam
54:15 queued 15s
created
include/generic/SugarWidgets/SugarWidgetFielddatetime.php 1 patch
Braces   +11 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,7 +68,9 @@  discard block
 block discarded – undo
66 68
 
67 69
 		$report_def_str = $json_obj->decode($this->reporter->report_def_str);
68 70
 
69
-		if(empty($report_def_str['assigned_user_id'])) return null;
71
+		if(empty($report_def_str['assigned_user_id'])) {
72
+		    return null;
73
+		}
70 74
 
71 75
 		$this->assigned_user = new User();
72 76
 		$this->assigned_user->retrieve($report_def_str['assigned_user_id']);
@@ -213,8 +217,7 @@  discard block
 block discarded – undo
213 217
         if ($time=='start') {
214 218
             $begin_parts = explode(' ', $begin);
215 219
             $be = $begin_parts[0] . ' 00:00:00';
216
-        }
217
-        else if ($time=='end') {
220
+        } else if ($time=='end') {
218 221
             $begin_parts = explode(' ', $begin);
219 222
             $be = $begin_parts[0] . ' 23:59:59';
220 223
         } else {
@@ -514,12 +517,12 @@  discard block
 block discarded – undo
514 517
         if (count(explode('-',$content)) == 2){
515 518
             return $content;
516 519
         // if date field
517
-        }elseif(substr_count($layout_def['type'], 'date') > 0){
520
+        } elseif(substr_count($layout_def['type'], 'date') > 0){
518 521
             // if date time field
519 522
             if(substr_count($layout_def['type'], 'time') > 0 && $this->get_time_part($content)!= false){
520 523
                 $td = $timedate->to_display_date_time($content);
521 524
                 return $td;
522
-            }else{// if date only field
525
+            } else{// if date only field
523 526
                 $td = $timedate->to_display_date($content, false); // Avoid PHP notice of returning by reference.
524 527
                 return $td;
525 528
             }
@@ -635,8 +638,7 @@  discard block
 block discarded – undo
635 638
         if (empty($layout_def['sort_dir']) || $layout_def['sort_dir'] == 'a')
636 639
         {
637 640
             return $orderBy . " ASC\n";
638
-        }
639
-        else
641
+        } else
640 642
         {
641 643
             return $orderBy . " DESC\n";
642 644
         }
@@ -752,8 +754,7 @@  discard block
 block discarded – undo
752 754
         if (empty($layout_def['sort_dir']) || $layout_def['sort_dir'] == 'a')
753 755
         {
754 756
             return $orderBy . " ASC\n";
755
-        }
756
-        else
757
+        } else
757 758
         {
758 759
             return $orderBy . " DESC\n";
759 760
         }
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetSubPanelTopButton_c.php 1 patch
Braces   +33 added lines, -28 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
 
@@ -116,8 +125,7 @@  discard block
 block discarded – undo
116 125
                 if(!empty($defines['focus']->$value))
117 126
                 {
118 127
                     $additionalFormFields[$key] = $defines['focus']->$value;
119
-                }
120
-                else
128
+                } else
121 129
                 {
122 130
                     $additionalFormFields[$key] = '';
123 131
                 }
@@ -128,8 +136,7 @@  discard block
 block discarded – undo
128 136
 		if(!empty($this->module))
129 137
         {
130 138
             $defines['child_module_name'] = $this->module;
131
-        }
132
-        else
139
+        } else
133 140
         {
134 141
             $defines['child_module_name'] = $defines['module'];
135 142
         }
@@ -161,7 +168,7 @@  discard block
 block discarded – undo
161 168
 
162 169
         if($currentModule == 'Campaigns'){
163 170
             $formValues['return_action'] = "DetailView";
164
-        }else{
171
+        } else{
165 172
             $formValues['return_action'] = $defines['action'];
166 173
             if ( $formValues['return_action'] == 'SubPanelViewer' ) {
167 174
                 $formValues['return_action'] = 'DetailView';
@@ -195,8 +202,7 @@  discard block
 block discarded – undo
195 202
         {
196 203
             if($defines['focus']->object_name=='Contact') {
197 204
                 $additionalFormFields['parent_type'] = 'Accounts';
198
-            }
199
-            else {
205
+            } else {
200 206
                 $additionalFormFields['parent_type'] = $defines['focus']->module_dir;
201 207
             }
202 208
         }
@@ -205,8 +211,7 @@  discard block
 block discarded – undo
205 211
             if($defines['focus']->object_name=='Contact') {
206 212
                 $additionalFormFields['parent_name'] = $defines['focus']->account_name;
207 213
                 $additionalFormFields['account_name'] = $defines['focus']->account_name;
208
-            }
209
-            else {
214
+            } else {
210 215
                 $additionalFormFields['parent_name'] = $defines['focus']->name;
211 216
             }
212 217
         }
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetSubPanelTopComposeEmailButton.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.
@@ -83,8 +85,7 @@  discard block
 block discarded – undo
83 85
 			if (isset($bean->emailAddress)){
84 86
 				$to_addrs = $bean->emailAddress->getPrimaryAddress($bean);
85 87
 				$button = "<input class='button' type='button'  value='$value'  id='". $this->getWidgetId() . "'  name='".preg_replace('[ ]', '', $value)."'   title='$title' onclick=\"location.href='mailto:$to_addrs';return false;\" />";
86
-			}
87
-			else{
88
+			} else{
88 89
 				$button = "<input class='button' type='button'  value='$value'  id='". $this->getWidgetId() ."'  name='".preg_replace('[ ]', '', $value)."'  title='$title' onclick=\"location.href='mailto:';return false;\" />";
89 90
 			}
90 91
 		} else {
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetSubPanelTopButtonQuickCreate.php 1 patch
Braces   +31 added lines, -21 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($defines['focus']->$value))
61 63
 				{
62 64
 					$additionalFormFields[$key] = $defines['focus']->$value;
63
-				}
64
-				else
65
+				} else
65 66
 				{
66 67
 					$additionalFormFields[$key] = '';
67 68
 				}
@@ -71,8 +72,7 @@  discard block
 block discarded – undo
71 72
 		if(!empty($this->module))
72 73
 		{
73 74
 			$defines['child_module_name'] = $this->module;
74
-		}
75
-		else
75
+		} else
76 76
 		{
77 77
 			$defines['child_module_name'] = $defines['module'];
78 78
 		}
@@ -104,8 +104,9 @@  discard block
 block discarded – undo
104 104
             $additionalFormFields['return_name'] = $defines['focus']->name;
105 105
 		}
106 106
 		
107
-		if(!empty($defines['view']))
108
-		$button .= '<input type="hidden" name="target_view" value="'. $defines['view'] . '" />';
107
+		if(!empty($defines['view'])) {
108
+				$button .= '<input type="hidden" name="target_view" value="'. $defines['view'] . '" />';
109
+		}
109 110
 		$button .= '<input type="hidden" name="to_pdf" value="true" />';
110 111
         $button .= '<input type="hidden" name="tpl" value="QuickCreate.tpl" />';
111 112
 		$button .= '<input type="hidden" name="return_module" value="' . $currentModule . "\" />\n";
@@ -119,8 +120,7 @@  discard block
 block discarded – undo
119 120
 		{
120 121
 			if($defines['focus']->object_name=='Contact') {
121 122
 				$additionalFormFields['parent_type'] = 'Accounts';
122
-			}
123
-			else {
123
+			} else {
124 124
 				$additionalFormFields['parent_type'] = $defines['focus']->module_dir;
125 125
 			}
126 126
 		}
@@ -129,8 +129,7 @@  discard block
 block discarded – undo
129 129
 			if($defines['focus']->object_name=='Contact') {
130 130
 				$additionalFormFields['parent_name'] = $defines['focus']->account_name;
131 131
 				$additionalFormFields['account_name'] = $defines['focus']->account_name;
132
-			}
133
-			else {
132
+			} else {
134 133
 				$additionalFormFields['parent_name'] = $defines['focus']->name;
135 134
 			}
136 135
 		}
@@ -139,8 +138,7 @@  discard block
 block discarded – undo
139 138
 			if($defines['focus']->object_name=='Contact') {
140 139
 				$additionalFormFields['parent_id'] = $defines['focus']->account_id;
141 140
 				$additionalFormFields['account_id'] = $defines['focus']->account_id;
142
-			}
143
-			else {
141
+			} else {
144 142
 				$additionalFormFields['parent_id'] = $defines['focus']->id;
145 143
 			}
146 144
 		}
@@ -149,15 +147,27 @@  discard block
 block discarded – undo
149 147
             //set variables to account name, or parent account name
150 148
             if(strtolower($defines['parent_bean_name']) == 'account' ){
151 149
                 //if account is parent bean, then get focus id/focus name
152
-                if(isset($defines['focus']->id))$additionalFormFields['account_id'] = $defines['focus']->id;
153
-                if(isset($defines['focus']->name))$additionalFormFields['account_name'] = $defines['focus']->name;
154
-            }elseif(strtolower($defines['parent_bean_name']) == 'quote' ){
150
+                if(isset($defines['focus']->id)) {
151
+                    $additionalFormFields['account_id'] = $defines['focus']->id;
152
+                }
153
+                if(isset($defines['focus']->name)) {
154
+                    $additionalFormFields['account_name'] = $defines['focus']->name;
155
+                }
156
+            } elseif(strtolower($defines['parent_bean_name']) == 'quote' ){
155 157
                 //if quote is parent bean, then get billing_account_id/billing_account_name
156
-                if(isset($defines['focus']->billing_account_id))$additionalFormFields['account_id'] = $defines['focus']->billing_account_id;
157
-                if(isset($defines['focus']->billing_account_name))$additionalFormFields['account_name'] = $defines['focus']->billing_account_name;
158
-            }else{
159
-                if(isset($defines['focus']->account_id))$additionalFormFields['account_id'] = $defines['focus']->account_id;
160
-                if(isset($defines['focus']->account_name))$additionalFormFields['account_name'] = $defines['focus']->account_name;
158
+                if(isset($defines['focus']->billing_account_id)) {
159
+                    $additionalFormFields['account_id'] = $defines['focus']->billing_account_id;
160
+                }
161
+                if(isset($defines['focus']->billing_account_name)) {
162
+                    $additionalFormFields['account_name'] = $defines['focus']->billing_account_name;
163
+                }
164
+            } else{
165
+                if(isset($defines['focus']->account_id)) {
166
+                    $additionalFormFields['account_id'] = $defines['focus']->account_id;
167
+                }
168
+                if(isset($defines['focus']->account_name)) {
169
+                    $additionalFormFields['account_name'] = $defines['focus']->account_name;
170
+                }
161 171
             }
162 172
         }
163 173
 
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetSubPanelEmailLink.php 1 patch
Braces   +18 added lines, -7 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.
@@ -62,14 +64,23 @@  discard block
 block discarded – undo
62 64
 
63 65
 
64 66
 
65
-			if(isset($_REQUEST['action'])) $action = $_REQUEST['action'];
66
-			else $action = '';
67
+			if(isset($_REQUEST['action'])) {
68
+			    $action = $_REQUEST['action'];
69
+			} else {
70
+			    $action = '';
71
+			}
67 72
 
68
-			if(isset($_REQUEST['module'])) $module = $_REQUEST['module'];
69
-			else $module = '';
73
+			if(isset($_REQUEST['module'])) {
74
+			    $module = $_REQUEST['module'];
75
+			} else {
76
+			    $module = '';
77
+			}
70 78
 
71
-			if(isset($_REQUEST['record'])) $record = $_REQUEST['record'];
72
-			else $record = '';
79
+			if(isset($_REQUEST['record'])) {
80
+			    $record = $_REQUEST['record'];
81
+			} else {
82
+			    $record = '';
83
+			}
73 84
 
74 85
 			if (!empty($focus->name)) {
75 86
 				$name = $focus->name;
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetFieldtime.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.
@@ -64,8 +66,7 @@  discard block
 block discarded – undo
64 66
                 if(!empty($date)) { // able to get the date context of the time            	
65 67
                 	$td = explode(' ', $timedate->to_display_date_time($date . ' ' . $content));
66 68
 	                return $td[1];
67
-                }
68
-                else { // assume there is no time context
69
+                } else { // assume there is no time context
69 70
                  	return $timedate->to_display_time($content);
70 71
                 }
71 72
         }
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetSubPanelActivitiesStatusField.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.
@@ -56,8 +58,7 @@  discard block
 block discarded – undo
56 58
 		if(isset($layout_def['varname']))
57 59
 		{
58 60
 			$key = strtoupper($layout_def['varname']);
59
-		}
60
-		else
61
+		} else
61 62
 		{
62 63
 			$key = $this->_get_column_alias($layout_def);
63 64
 			$key = strtoupper($key);
Please login to merge, or discard this patch.
generic/SugarWidgets/SugarWidgetSubPanelTopScheduleMeetingButton.php 1 patch
Braces   +8 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.
@@ -61,8 +63,7 @@  discard block
 block discarded – undo
61 63
 				if(!empty($defines['focus']->$value))
62 64
 				{
63 65
 					$additionalFormFields[$key] = $defines['focus']->$value;
64
-				}
65
-				else
66
+				} else
66 67
 				{
67 68
 					$additionalFormFields[$key] = '';
68 69
 				}
@@ -72,8 +73,7 @@  discard block
 block discarded – undo
72 73
 		if(!empty($this->module))
73 74
 		{
74 75
 			$defines['child_module_name'] = $this->module;
75
-		}
76
-		else
76
+		} else
77 77
 		{
78 78
 			$defines['child_module_name'] = $defines['module'];
79 79
 		}
@@ -109,8 +109,7 @@  discard block
 block discarded – undo
109 109
 		{
110 110
 			if($defines['focus']->object_name=='Contact') {
111 111
 				$additionalFormFields['parent_type'] = 'Accounts';
112
-			}
113
-			else {
112
+			} else {
114 113
 				$additionalFormFields['parent_type'] = $defines['focus']->module_dir;
115 114
 			}
116 115
 		}
@@ -119,8 +118,7 @@  discard block
 block discarded – undo
119 118
 			if($defines['focus']->object_name=='Contact') {
120 119
 				$additionalFormFields['parent_name'] = $defines['focus']->account_name;
121 120
 				$additionalFormFields['account_name'] = $defines['focus']->account_name;
122
-			}
123
-			else {
121
+			} else {
124 122
 				$additionalFormFields['parent_name'] = $defines['focus']->name;
125 123
 			}
126 124
 		}
@@ -129,8 +127,7 @@  discard block
 block discarded – undo
129 127
 			if($defines['focus']->object_name=='Contact') {
130 128
 				$additionalFormFields['parent_id'] = $defines['focus']->account_id;
131 129
 				$additionalFormFields['account_id'] = $defines['focus']->account_id;
132
-			}
133
-			else {
130
+			} else {
134 131
 				$additionalFormFields['parent_id'] = $defines['focus']->id;
135 132
 			}
136 133
 		}
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetFieldname.php 1 patch
Braces   +13 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
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -74,8 +76,9 @@  discard block
 block discarded – undo
74 76
 		$record = $layout_def['fields'][$key];
75 77
 		$layout_def['name'] = $name;
76 78
 		global $current_user;
77
-		if ($module == 'Users' && !is_admin($current_user))
78
-        	$module = 'Employees';
79
+		if ($module == 'Users' && !is_admin($current_user)) {
80
+		        	$module = 'Employees';
81
+		}
79 82
 		$str = "<a target='_blank' href=\"index.php?action=DetailView&module=$module&record=$record\">";
80 83
 		$str .= $this->displayListPlain($layout_def);
81 84
 		$str .= "</a>";
@@ -90,8 +93,9 @@  discard block
 block discarded – undo
90 93
             $field_name = $layout_def['name'];
91 94
             $field_type = $field_def['type'];
92 95
             $str .= "</a>";
93
-            if ($field_name == 'name')
94
-                $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\");'");
96
+            if ($field_name == 'name') {
97
+                            $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\");'");
98
+            }
95 99
             $str .= "</div>";
96 100
         }
97 101
 		return $str;
@@ -223,9 +227,9 @@  discard block
 block discarded – undo
223 227
 			if ($value == 'Current User') {
224 228
 				global $current_user;
225 229
 				array_push($arr,$this->reporter->db->quoted($current_user->id));
230
+			} else {
231
+							array_push($arr,$this->reporter->db->quoted($value));
226 232
 			}
227
-			else
228
-				array_push($arr,$this->reporter->db->quoted($value));
229 233
 		}
230 234
 
231 235
 		$str = implode(",",$arr);
@@ -247,9 +251,9 @@  discard block
 block discarded – undo
247 251
 			if ($value == 'Current User') {
248 252
 				global $current_user;
249 253
 				array_push($arr,$this->reporter->db->quoted($current_user->id));
254
+			} else {
255
+							array_push($arr,$this->reporter->db->quoted($value));
250 256
 			}
251
-			else
252
-				array_push($arr,$this->reporter->db->quoted($value));
253 257
 		}
254 258
 
255 259
 		$str = implode(",",$arr);
Please login to merge, or discard this patch.