Completed
Push — master ( a75ecc...97ae17 )
by Adam
71:21 queued 52:34
created
include/generic/SugarWidgets/SugarWidgetFieldname.php 3 patches
Indentation   +163 added lines, -163 removed lines patch added patch discarded remove patch
@@ -52,33 +52,33 @@  discard block
 block discarded – undo
52 52
         $this->reporter = $this->layout_manager->getAttribute('reporter');
53 53
     }
54 54
 
55
-	function displayList(&$layout_def)
56
-	{
57
-		if(empty($layout_def['column_key']))
58
-		{
59
-			return $this->displayListPlain($layout_def);
60
-		}
61
-
62
-		$module = $this->reporter->all_fields[$layout_def['column_key']]['module'];
63
-		$name = $layout_def['name'];
64
-		$layout_def['name'] = 'id';
65
-		$key = $this->_get_column_alias($layout_def);
66
-		$key = strtoupper($key);
67
-
68
-		if(empty($layout_def['fields'][$key]))
69
-		{
70
-		  $layout_def['name'] = $name;
71
-			return $this->displayListPlain($layout_def);
72
-		}
73
-
74
-		$record = $layout_def['fields'][$key];
75
-		$layout_def['name'] = $name;
76
-		global $current_user;
77
-		if ($module == 'Users' && !is_admin($current_user))
78
-        	$module = 'Employees';
79
-		$str = "<a target='_blank' href=\"index.php?action=DetailView&module=$module&record=$record\">";
80
-		$str .= $this->displayListPlain($layout_def);
81
-		$str .= "</a>";
55
+    function displayList(&$layout_def)
56
+    {
57
+        if(empty($layout_def['column_key']))
58
+        {
59
+            return $this->displayListPlain($layout_def);
60
+        }
61
+
62
+        $module = $this->reporter->all_fields[$layout_def['column_key']]['module'];
63
+        $name = $layout_def['name'];
64
+        $layout_def['name'] = 'id';
65
+        $key = $this->_get_column_alias($layout_def);
66
+        $key = strtoupper($key);
67
+
68
+        if(empty($layout_def['fields'][$key]))
69
+        {
70
+            $layout_def['name'] = $name;
71
+            return $this->displayListPlain($layout_def);
72
+        }
73
+
74
+        $record = $layout_def['fields'][$key];
75
+        $layout_def['name'] = $name;
76
+        global $current_user;
77
+        if ($module == 'Users' && !is_admin($current_user))
78
+            $module = 'Employees';
79
+        $str = "<a target='_blank' href=\"index.php?action=DetailView&module=$module&record=$record\">";
80
+        $str .= $this->displayListPlain($layout_def);
81
+        $str .= "</a>";
82 82
 
83 83
 
84 84
         global $sugar_config;
@@ -94,37 +94,37 @@  discard block
 block discarded – undo
94 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\");'");
95 95
             $str .= "</div>";
96 96
         }
97
-		return $str;
98
-	}
97
+        return $str;
98
+    }
99 99
 
100
-	function _get_normal_column_select($layout_def)
101
-	{
100
+    function _get_normal_column_select($layout_def)
101
+    {
102 102
         if ( isset($this->reporter->all_fields) ) {
103 103
             $field_def = $this->reporter->all_fields[$layout_def['column_key']];
104 104
         } else {
105 105
             $field_def = array();
106 106
         }
107 107
 
108
-		if (empty($field_def['fields']) || empty($field_def['fields'][0]) || empty($field_def['fields'][1]))
109
-		{
110
-			return parent::_get_column_select($layout_def);
111
-		}
108
+        if (empty($field_def['fields']) || empty($field_def['fields'][0]) || empty($field_def['fields'][1]))
109
+        {
110
+            return parent::_get_column_select($layout_def);
111
+        }
112 112
 
113
-		//	 'fields' are the two fields to concatenate to create the name.
114
-		if ( ! empty($layout_def['table_alias'])) {
115
-		    $alias = $this->reporter->db->concat($layout_def['table_alias'], $field_def['fields']);
116
-		} elseif (! empty($layout_def['name'])) {
117
-			$alias = $layout_def['name'];
118
-		} else {
119
-			$alias = "*";
120
-		}
113
+        //	 'fields' are the two fields to concatenate to create the name.
114
+        if ( ! empty($layout_def['table_alias'])) {
115
+            $alias = $this->reporter->db->concat($layout_def['table_alias'], $field_def['fields']);
116
+        } elseif (! empty($layout_def['name'])) {
117
+            $alias = $layout_def['name'];
118
+        } else {
119
+            $alias = "*";
120
+        }
121 121
 
122
-		return $alias;
123
-	}
122
+        return $alias;
123
+    }
124 124
 
125
-	function _get_column_select($layout_def)
126
-	{
127
-		global $locale, $current_user;
125
+    function _get_column_select($layout_def)
126
+    {
127
+        global $locale, $current_user;
128 128
 
129 129
         if ( isset($this->reporter->all_fields) ) {
130 130
             $field_def = $this->reporter->all_fields[$layout_def['column_key']];
@@ -135,141 +135,141 @@  discard block
 block discarded – undo
135 135
         //	 'fields' are the two fields to concatenate to create the name
136 136
         if(!isset($field_def['fields']))
137 137
         {
138
-			return $this->_get_normal_column_select($layout_def);
138
+            return $this->_get_normal_column_select($layout_def);
139
+        }
140
+        $localeNameFormat = $locale->getLocaleFormatMacro($current_user);
141
+        $localeNameFormat = trim(preg_replace('/s/i', '', $localeNameFormat));
142
+
143
+        if (empty($field_def['fields']) || empty($field_def['fields'][0]) || empty($field_def['fields'][1])) {
144
+            return parent::_get_column_select($layout_def);
145
+        }
146
+
147
+        if ( ! empty($layout_def['table_alias'])) {
148
+            $comps = preg_split("/([fl])/", $localeNameFormat, null, PREG_SPLIT_DELIM_CAPTURE);
149
+            $name = array();
150
+            foreach($comps as $val) {
151
+                if($val == 'f') {
152
+                    $name[] = $this->reporter->db->convert($layout_def['table_alias'].".".$field_def['fields'][0], 'IFNULL', array("''"));
153
+                } elseif($val == 'l') {
154
+                    $name[] = $this->reporter->db->convert($layout_def['table_alias'].".".$field_def['fields'][1], 'IFNULL', array("''"));
155
+                } else {
156
+                    if(!empty($val)) {
157
+                        $name[] = $this->reporter->db->quoted($val);
158
+                    }
159
+                }
160
+            }
161
+            $alias = $this->reporter->db->convert($name, "CONCAT");
162
+        } elseif (! empty($layout_def['name']))	{
163
+            $alias = $layout_def['name'];
164
+        } else {
165
+            $alias = "*";
166
+        }
167
+
168
+        return $alias;
169
+    }
170
+
171
+    function queryFilterIs($layout_def)
172
+    {
173
+
174
+        $layout_def['name'] = 'id';
175
+        $layout_def['type'] = 'id';
176
+        $input_name0 = $layout_def['input_name0'];
177
+
178
+        if ( is_array($layout_def['input_name0']))
179
+        {
180
+            $input_name0 = $layout_def['input_name0'][0];
181
+        }
182
+        if ($input_name0 == 'Current User') {
183
+            global $current_user;
184
+            $input_name0 = $current_user->id;
185
+        }
186
+
187
+        return SugarWidgetFieldid::_get_column_select($layout_def)."="
188
+            .$this->reporter->db->quoted($input_name0)."\n";
189
+    }
190
+
191
+    function queryFilteris_not($layout_def)
192
+    {
193
+
194
+        $layout_def['name'] = 'id';
195
+        $layout_def['type'] = 'id';
196
+        $input_name0 = $layout_def['input_name0'];
197
+
198
+        if ( is_array($layout_def['input_name0']))
199
+        {
200
+            $input_name0 = $layout_def['input_name0'][0];
201
+        }
202
+        if ($input_name0 == 'Current User') {
203
+            global $current_user;
204
+            $input_name0 = $current_user->id;
139 205
         }
140
-		$localeNameFormat = $locale->getLocaleFormatMacro($current_user);
141
-		$localeNameFormat = trim(preg_replace('/s/i', '', $localeNameFormat));
142
-
143
-		if (empty($field_def['fields']) || empty($field_def['fields'][0]) || empty($field_def['fields'][1])) {
144
-			return parent::_get_column_select($layout_def);
145
-		}
146
-
147
-		if ( ! empty($layout_def['table_alias'])) {
148
-		    $comps = preg_split("/([fl])/", $localeNameFormat, null, PREG_SPLIT_DELIM_CAPTURE);
149
-		    $name = array();
150
-		    foreach($comps as $val) {
151
-		        if($val == 'f') {
152
-		            $name[] = $this->reporter->db->convert($layout_def['table_alias'].".".$field_def['fields'][0], 'IFNULL', array("''"));
153
-		        } elseif($val == 'l') {
154
-		            $name[] = $this->reporter->db->convert($layout_def['table_alias'].".".$field_def['fields'][1], 'IFNULL', array("''"));
155
-		        } else {
156
-		            if(!empty($val)) {
157
-		                $name[] = $this->reporter->db->quoted($val);
158
-		            }
159
-		        }
160
-		    }
161
-		    $alias = $this->reporter->db->convert($name, "CONCAT");
162
-		} elseif (! empty($layout_def['name']))	{
163
-			$alias = $layout_def['name'];
164
-		} else {
165
-			$alias = "*";
166
-		}
167
-
168
-		return $alias;
169
-	}
170
-
171
-	function queryFilterIs($layout_def)
172
-	{
173
-
174
-		$layout_def['name'] = 'id';
175
-		$layout_def['type'] = 'id';
176
-		$input_name0 = $layout_def['input_name0'];
177
-
178
-		if ( is_array($layout_def['input_name0']))
179
-		{
180
-			$input_name0 = $layout_def['input_name0'][0];
181
-		}
182
-		if ($input_name0 == 'Current User') {
183
-			global $current_user;
184
-			$input_name0 = $current_user->id;
185
-		}
186
-
187
-		return SugarWidgetFieldid::_get_column_select($layout_def)."="
188
-			.$this->reporter->db->quoted($input_name0)."\n";
189
-	}
190
-
191
-	function queryFilteris_not($layout_def)
192
-	{
193
-
194
-		$layout_def['name'] = 'id';
195
-		$layout_def['type'] = 'id';
196
-		$input_name0 = $layout_def['input_name0'];
197
-
198
-		if ( is_array($layout_def['input_name0']))
199
-		{
200
-			$input_name0 = $layout_def['input_name0'][0];
201
-		}
202
-		if ($input_name0 == 'Current User') {
203
-			global $current_user;
204
-			$input_name0 = $current_user->id;
205
-		}
206
-
207
-		return SugarWidgetFieldid::_get_column_select($layout_def)."<>"
208
-			.$this->reporter->db->quoted($input_name0)."\n";
209
-	}
206
+
207
+        return SugarWidgetFieldid::_get_column_select($layout_def)."<>"
208
+            .$this->reporter->db->quoted($input_name0)."\n";
209
+    }
210 210
 
211 211
     // $rename_columns, if true then you're coming from reports
212
-	function queryFilterone_of($layout_def, $rename_columns = true)
213
-	{
212
+    function queryFilterone_of($layout_def, $rename_columns = true)
213
+    {
214 214
 
215 215
         if($rename_columns) { // this was a hack to get reports working, sugarwidgets should not be renaming $name!
216
-    		$layout_def['name'] = 'id';
217
-    		$layout_def['type'] = 'id';
216
+            $layout_def['name'] = 'id';
217
+            $layout_def['type'] = 'id';
218
+        }
219
+        $arr = array();
220
+
221
+        foreach($layout_def['input_name0'] as $value)
222
+        {
223
+            if ($value == 'Current User') {
224
+                global $current_user;
225
+                array_push($arr,$this->reporter->db->quoted($current_user->id));
226
+            }
227
+            else
228
+                array_push($arr,$this->reporter->db->quoted($value));
218 229
         }
219
-		$arr = array();
220
-
221
-		foreach($layout_def['input_name0'] as $value)
222
-		{
223
-			if ($value == 'Current User') {
224
-				global $current_user;
225
-				array_push($arr,$this->reporter->db->quoted($current_user->id));
226
-			}
227
-			else
228
-				array_push($arr,$this->reporter->db->quoted($value));
229
-		}
230
-
231
-		$str = implode(",",$arr);
232
-
233
-		return SugarWidgetFieldid::_get_column_select($layout_def)." IN (".$str.")\n";
234
-	}
230
+
231
+        $str = implode(",",$arr);
232
+
233
+        return SugarWidgetFieldid::_get_column_select($layout_def)." IN (".$str.")\n";
234
+    }
235 235
     // $rename_columns, if true then you're coming from reports
236
-	function queryFilternot_one_of($layout_def, $rename_columns = true)
237
-	{
236
+    function queryFilternot_one_of($layout_def, $rename_columns = true)
237
+    {
238 238
 
239 239
         if($rename_columns) { // this was a hack to get reports working, sugarwidgets should not be renaming $name!
240
-    		$layout_def['name'] = 'id';
241
-    		$layout_def['type'] = 'id';
240
+            $layout_def['name'] = 'id';
241
+            $layout_def['type'] = 'id';
242 242
         }
243
-		$arr = array();
243
+        $arr = array();
244 244
 
245
-		foreach($layout_def['input_name0'] as $value)
246
-		{
247
-			if ($value == 'Current User') {
248
-				global $current_user;
249
-				array_push($arr,$this->reporter->db->quoted($current_user->id));
250
-			}
251
-			else
252
-				array_push($arr,$this->reporter->db->quoted($value));
253
-		}
245
+        foreach($layout_def['input_name0'] as $value)
246
+        {
247
+            if ($value == 'Current User') {
248
+                global $current_user;
249
+                array_push($arr,$this->reporter->db->quoted($current_user->id));
250
+            }
251
+            else
252
+                array_push($arr,$this->reporter->db->quoted($value));
253
+        }
254 254
 
255
-		$str = implode(",",$arr);
255
+        $str = implode(",",$arr);
256 256
 
257
-		return SugarWidgetFieldid::_get_column_select($layout_def)." NOT IN (".$str.")\n";
258
-	}
257
+        return SugarWidgetFieldid::_get_column_select($layout_def)." NOT IN (".$str.")\n";
258
+    }
259 259
 
260
-	function &queryGroupBy($layout_def)
261
-	{
260
+    function &queryGroupBy($layout_def)
261
+    {
262 262
         if($layout_def['name'] == 'full_name') {
263
-             $layout_def['name'] = 'id';
264
-             $layout_def['type'] = 'id';
263
+                $layout_def['name'] = 'id';
264
+                $layout_def['type'] = 'id';
265 265
 
266
-             $group_by =  SugarWidgetFieldid::_get_column_select($layout_def)."\n";
266
+                $group_by =  SugarWidgetFieldid::_get_column_select($layout_def)."\n";
267 267
         } else {
268 268
             // group by clause for user name passes through here.
269
-             $group_by = $this->_get_column_select($layout_def)."\n";
269
+                $group_by = $this->_get_column_select($layout_def)."\n";
270 270
         }
271 271
         return $group_by;
272
-	}
272
+    }
273 273
 }
274 274
 
275 275
 ?>
Please login to merge, or discard this patch.
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
 	function displayList(&$layout_def)
56 56
 	{
57
-		if(empty($layout_def['column_key']))
57
+		if (empty($layout_def['column_key']))
58 58
 		{
59 59
 			return $this->displayListPlain($layout_def);
60 60
 		}
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 		$key = $this->_get_column_alias($layout_def);
66 66
 		$key = strtoupper($key);
67 67
 
68
-		if(empty($layout_def['fields'][$key]))
68
+		if (empty($layout_def['fields'][$key]))
69 69
 		{
70 70
 		  $layout_def['name'] = $name;
71 71
 			return $this->displayListPlain($layout_def);
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             $field_type = $field_def['type'];
92 92
             $str .= "</a>";
93 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\");'");
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\");'");
95 95
             $str .= "</div>";
96 96
         }
97 97
 		return $str;
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
 	function _get_normal_column_select($layout_def)
101 101
 	{
102
-        if ( isset($this->reporter->all_fields) ) {
102
+        if (isset($this->reporter->all_fields)) {
103 103
             $field_def = $this->reporter->all_fields[$layout_def['column_key']];
104 104
         } else {
105 105
             $field_def = array();
@@ -111,9 +111,9 @@  discard block
 block discarded – undo
111 111
 		}
112 112
 
113 113
 		//	 'fields' are the two fields to concatenate to create the name.
114
-		if ( ! empty($layout_def['table_alias'])) {
114
+		if (!empty($layout_def['table_alias'])) {
115 115
 		    $alias = $this->reporter->db->concat($layout_def['table_alias'], $field_def['fields']);
116
-		} elseif (! empty($layout_def['name'])) {
116
+		} elseif (!empty($layout_def['name'])) {
117 117
 			$alias = $layout_def['name'];
118 118
 		} else {
119 119
 			$alias = "*";
@@ -126,14 +126,14 @@  discard block
 block discarded – undo
126 126
 	{
127 127
 		global $locale, $current_user;
128 128
 
129
-        if ( isset($this->reporter->all_fields) ) {
129
+        if (isset($this->reporter->all_fields)) {
130 130
             $field_def = $this->reporter->all_fields[$layout_def['column_key']];
131 131
         } else {
132 132
             $field_def = array();
133 133
         }
134 134
 
135 135
         //	 'fields' are the two fields to concatenate to create the name
136
-        if(!isset($field_def['fields']))
136
+        if (!isset($field_def['fields']))
137 137
         {
138 138
 			return $this->_get_normal_column_select($layout_def);
139 139
         }
@@ -144,22 +144,22 @@  discard block
 block discarded – undo
144 144
 			return parent::_get_column_select($layout_def);
145 145
 		}
146 146
 
147
-		if ( ! empty($layout_def['table_alias'])) {
147
+		if (!empty($layout_def['table_alias'])) {
148 148
 		    $comps = preg_split("/([fl])/", $localeNameFormat, null, PREG_SPLIT_DELIM_CAPTURE);
149 149
 		    $name = array();
150
-		    foreach($comps as $val) {
151
-		        if($val == 'f') {
150
+		    foreach ($comps as $val) {
151
+		        if ($val == 'f') {
152 152
 		            $name[] = $this->reporter->db->convert($layout_def['table_alias'].".".$field_def['fields'][0], 'IFNULL', array("''"));
153
-		        } elseif($val == 'l') {
153
+		        } elseif ($val == 'l') {
154 154
 		            $name[] = $this->reporter->db->convert($layout_def['table_alias'].".".$field_def['fields'][1], 'IFNULL', array("''"));
155 155
 		        } else {
156
-		            if(!empty($val)) {
156
+		            if (!empty($val)) {
157 157
 		                $name[] = $this->reporter->db->quoted($val);
158 158
 		            }
159 159
 		        }
160 160
 		    }
161 161
 		    $alias = $this->reporter->db->convert($name, "CONCAT");
162
-		} elseif (! empty($layout_def['name']))	{
162
+		} elseif (!empty($layout_def['name'])) {
163 163
 			$alias = $layout_def['name'];
164 164
 		} else {
165 165
 			$alias = "*";
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 		$layout_def['type'] = 'id';
176 176
 		$input_name0 = $layout_def['input_name0'];
177 177
 
178
-		if ( is_array($layout_def['input_name0']))
178
+		if (is_array($layout_def['input_name0']))
179 179
 		{
180 180
 			$input_name0 = $layout_def['input_name0'][0];
181 181
 		}
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 		$layout_def['type'] = 'id';
196 196
 		$input_name0 = $layout_def['input_name0'];
197 197
 
198
-		if ( is_array($layout_def['input_name0']))
198
+		if (is_array($layout_def['input_name0']))
199 199
 		{
200 200
 			$input_name0 = $layout_def['input_name0'][0];
201 201
 		}
@@ -212,23 +212,23 @@  discard block
 block discarded – undo
212 212
 	function queryFilterone_of($layout_def, $rename_columns = true)
213 213
 	{
214 214
 
215
-        if($rename_columns) { // this was a hack to get reports working, sugarwidgets should not be renaming $name!
215
+        if ($rename_columns) { // this was a hack to get reports working, sugarwidgets should not be renaming $name!
216 216
     		$layout_def['name'] = 'id';
217 217
     		$layout_def['type'] = 'id';
218 218
         }
219 219
 		$arr = array();
220 220
 
221
-		foreach($layout_def['input_name0'] as $value)
221
+		foreach ($layout_def['input_name0'] as $value)
222 222
 		{
223 223
 			if ($value == 'Current User') {
224 224
 				global $current_user;
225
-				array_push($arr,$this->reporter->db->quoted($current_user->id));
225
+				array_push($arr, $this->reporter->db->quoted($current_user->id));
226 226
 			}
227 227
 			else
228
-				array_push($arr,$this->reporter->db->quoted($value));
228
+				array_push($arr, $this->reporter->db->quoted($value));
229 229
 		}
230 230
 
231
-		$str = implode(",",$arr);
231
+		$str = implode(",", $arr);
232 232
 
233 233
 		return SugarWidgetFieldid::_get_column_select($layout_def)." IN (".$str.")\n";
234 234
 	}
@@ -236,34 +236,34 @@  discard block
 block discarded – undo
236 236
 	function queryFilternot_one_of($layout_def, $rename_columns = true)
237 237
 	{
238 238
 
239
-        if($rename_columns) { // this was a hack to get reports working, sugarwidgets should not be renaming $name!
239
+        if ($rename_columns) { // this was a hack to get reports working, sugarwidgets should not be renaming $name!
240 240
     		$layout_def['name'] = 'id';
241 241
     		$layout_def['type'] = 'id';
242 242
         }
243 243
 		$arr = array();
244 244
 
245
-		foreach($layout_def['input_name0'] as $value)
245
+		foreach ($layout_def['input_name0'] as $value)
246 246
 		{
247 247
 			if ($value == 'Current User') {
248 248
 				global $current_user;
249
-				array_push($arr,$this->reporter->db->quoted($current_user->id));
249
+				array_push($arr, $this->reporter->db->quoted($current_user->id));
250 250
 			}
251 251
 			else
252
-				array_push($arr,$this->reporter->db->quoted($value));
252
+				array_push($arr, $this->reporter->db->quoted($value));
253 253
 		}
254 254
 
255
-		$str = implode(",",$arr);
255
+		$str = implode(",", $arr);
256 256
 
257 257
 		return SugarWidgetFieldid::_get_column_select($layout_def)." NOT IN (".$str.")\n";
258 258
 	}
259 259
 
260 260
 	function &queryGroupBy($layout_def)
261 261
 	{
262
-        if($layout_def['name'] == 'full_name') {
262
+        if ($layout_def['name'] == 'full_name') {
263 263
              $layout_def['name'] = 'id';
264 264
              $layout_def['type'] = 'id';
265 265
 
266
-             $group_by =  SugarWidgetFieldid::_get_column_select($layout_def)."\n";
266
+             $group_by = SugarWidgetFieldid::_get_column_select($layout_def)."\n";
267 267
         } else {
268 268
             // group by clause for user name passes through here.
269 269
              $group_by = $this->_get_column_select($layout_def)."\n";
Please login to merge, or discard this 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.
include/generic/SugarWidgets/SugarWidgetFieldurl.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 
42 42
 class SugarWidgetFieldURL extends SugarWidgetFieldVarchar
43 43
 {
44
- 	/* Display item as link
44
+        /* Display item as link
45 45
      * @param array $layout_def definition of field which we want to display as link
46 46
      * @return string html code
47 47
      */
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     function displayList($layout_def) 
49 49
     {
50 50
         $urlValue = trim($this->_get_list_value($layout_def));
51
-        return '<a target="_blank" href="' . $urlValue . '">' . $urlValue . "</a>";
51
+        return '<a target="_blank" href="'.$urlValue.'">'.$urlValue."</a>";
52 52
     }
53 53
     
54 54
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetFieldimage.php 3 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -42,9 +42,9 @@
 block discarded – undo
42 42
 class SugarWidgetFieldImage extends SugarWidgetFieldVarchar
43 43
 {
44 44
 
45
-	function displayListPlain($layout_def) {
46
-		$value = $this->_get_list_value($layout_def);
47
-		return "<a href=\"javascript:SUGAR.image.lightbox('index.php?entryPoint=download&id=$value&type=SugarFieldImage&isTempFile=1')\">"
48
-		       . translate("LBL_VIEW_IMAGE") . '</a>';
49
-	}
45
+    function displayListPlain($layout_def) {
46
+        $value = $this->_get_list_value($layout_def);
47
+        return "<a href=\"javascript:SUGAR.image.lightbox('index.php?entryPoint=download&id=$value&type=SugarFieldImage&isTempFile=1')\">"
48
+                . translate("LBL_VIEW_IMAGE") . '</a>';
49
+    }
50 50
 }
51 51
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -45,6 +45,6 @@  discard block
 block discarded – undo
45 45
 	function displayListPlain($layout_def) {
46 46
 		$value = $this->_get_list_value($layout_def);
47 47
 		return "<a href=\"javascript:SUGAR.image.lightbox('index.php?entryPoint=download&id=$value&type=SugarFieldImage&isTempFile=1')\">"
48
-		       . translate("LBL_VIEW_IMAGE") . '</a>';
48
+		       . translate("LBL_VIEW_IMAGE").'</a>';
49 49
 	}
50 50
 }
51 51
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetFieldcurrency_id.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         {
82 82
             $currency = new Currency();
83 83
             $currency->retrieve($value);
84
-            $currencies[$value] = $currency->symbol . ' ' . $currency->iso4217;
84
+            $currencies[$value] = $currency->symbol.' '.$currency->iso4217;
85 85
         }
86 86
         return $currencies[$value];
87 87
     }
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $list = array();
99 99
         foreach ($tmpList as $bean)
100 100
         {
101
-            $list[$bean->id] = $bean->symbol . ' ' . $bean->iso4217;
101
+            $list[$bean->id] = $bean->symbol.' '.$bean->iso4217;
102 102
         }
103 103
 
104 104
         $field_def = $this->reporter->all_fields[$layout_def['column_key']];
Please login to merge, or discard this patch.
Braces   +6 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.
@@ -58,8 +60,7 @@  discard block
 block discarded – undo
58 60
             if (is_array($list))
59 61
             {
60 62
                 $list = array_merge(array($currency), $list);
61
-            }
62
-            else
63
+            } else
63 64
             {
64 65
                 $list = array($currency);
65 66
             }
@@ -105,8 +106,7 @@  discard block
 block discarded – undo
105 106
         if (!empty ($field_def['sort_on']))
106 107
         {
107 108
             $order_by = $layout_def['table_alias'].".".$field_def['sort_on'];
108
-        }
109
-        else
109
+        } else
110 110
         {
111 111
             $order_by = $this->_get_column_select($layout_def);
112 112
         }
@@ -114,8 +114,7 @@  discard block
 block discarded – undo
114 114
         if (empty ($layout_def['sort_dir']) || $layout_def['sort_dir'] == 'a')
115 115
         {
116 116
             $order_dir = "ASC";
117
-        }
118
-        else
117
+        } else
119 118
         {
120 119
             $order_dir = "DESC";
121 120
         }
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetSubPanelLoadSignedButton.php 3 patches
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -45,38 +45,38 @@
 block discarded – undo
45 45
 //this widget is used only by the document subpanel under contracts.
46 46
 class SugarWidgetSubPanelLoadSignedButton extends SugarWidgetField
47 47
 {
48
-	function displayHeaderCell($layout_def)
49
-	{
50
-		return '&nbsp;';
51
-	}
48
+    function displayHeaderCell($layout_def)
49
+    {
50
+        return '&nbsp;';
51
+    }
52 52
 
53
-	function displayList($layout_def)
54
-	{
55
-		global $app_strings;
53
+    function displayList($layout_def)
54
+    {
55
+        global $app_strings;
56 56
 		
57 57
 
58
-		$href = 'index.php?module=' . 'Documents'
59
-			. '&action=' . 'EditView'
60
-			. '&record=' . $layout_def['fields']['ID']
61
-			. '&return_module=' . $_REQUEST['module']
62
-			. '&return_action=' . 'DetailView'
63
-			. '&return_id=' . $_REQUEST['record']
64
-			. '&load_signed_id=' . $layout_def['fields']['LINKED_ID']
65
-			. '&parent_id=' . $_REQUEST['record']			
66
-			. '&parent_name=' . $layout_def['fields']['CONTRACT_NAME']			
67
-			. '&parent_type=' . $_REQUEST['module']			
68
-			. '&selected_revision_id=' . $layout_def['fields']['SELECTED_REVISION_ID']	
69
-			;
58
+        $href = 'index.php?module=' . 'Documents'
59
+            . '&action=' . 'EditView'
60
+            . '&record=' . $layout_def['fields']['ID']
61
+            . '&return_module=' . $_REQUEST['module']
62
+            . '&return_action=' . 'DetailView'
63
+            . '&return_id=' . $_REQUEST['record']
64
+            . '&load_signed_id=' . $layout_def['fields']['LINKED_ID']
65
+            . '&parent_id=' . $_REQUEST['record']			
66
+            . '&parent_name=' . $layout_def['fields']['CONTRACT_NAME']			
67
+            . '&parent_type=' . $_REQUEST['module']			
68
+            . '&selected_revision_id=' . $layout_def['fields']['SELECTED_REVISION_ID']	
69
+            ;
70 70
 
71
-		$edit_icon_html = SugarThemeRegistry::current()->getImage( 'loadSignedDocument','align="absmiddle" border="0"',null,null,'.gif',$app_strings['LNK_LOAD_SIGNED']);
72
-		//if the contract state is executed or document is not a template hide this action.
73
-		if ((!empty($layout_def['fields']['CONTRACT_STATUS']) && $layout_def['fields']['CONTRACT_STATUS']=='executed') or
74
-			empty($layout_def['fields']['IS_TEMPLATE']) or $layout_def['fields']['IS_TEMPLATE']==0) {
75
-			return "";
76
-		}
77
-		return '<a href="' . $href . '"' . "title ='". $app_strings['LNK_LOAD_SIGNED_TOOLTIP']."'"
78
-			. 'class="listViewTdToolsS1">' . $edit_icon_html . '&nbsp;' . $app_strings['LNK_LOAD_SIGNED'] .'</a>&nbsp;';
79
-	}
71
+        $edit_icon_html = SugarThemeRegistry::current()->getImage( 'loadSignedDocument','align="absmiddle" border="0"',null,null,'.gif',$app_strings['LNK_LOAD_SIGNED']);
72
+        //if the contract state is executed or document is not a template hide this action.
73
+        if ((!empty($layout_def['fields']['CONTRACT_STATUS']) && $layout_def['fields']['CONTRACT_STATUS']=='executed') or
74
+            empty($layout_def['fields']['IS_TEMPLATE']) or $layout_def['fields']['IS_TEMPLATE']==0) {
75
+            return "";
76
+        }
77
+        return '<a href="' . $href . '"' . "title ='". $app_strings['LNK_LOAD_SIGNED_TOOLTIP']."'"
78
+            . 'class="listViewTdToolsS1">' . $edit_icon_html . '&nbsp;' . $app_strings['LNK_LOAD_SIGNED'] .'</a>&nbsp;';
79
+    }
80 80
 		
81 81
 }
82 82
 ?>
83 83
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -55,27 +55,27 @@  discard block
 block discarded – undo
55 55
 		global $app_strings;
56 56
 		
57 57
 
58
-		$href = 'index.php?module=' . 'Documents'
59
-			. '&action=' . 'EditView'
60
-			. '&record=' . $layout_def['fields']['ID']
61
-			. '&return_module=' . $_REQUEST['module']
62
-			. '&return_action=' . 'DetailView'
63
-			. '&return_id=' . $_REQUEST['record']
64
-			. '&load_signed_id=' . $layout_def['fields']['LINKED_ID']
65
-			. '&parent_id=' . $_REQUEST['record']			
66
-			. '&parent_name=' . $layout_def['fields']['CONTRACT_NAME']			
67
-			. '&parent_type=' . $_REQUEST['module']			
68
-			. '&selected_revision_id=' . $layout_def['fields']['SELECTED_REVISION_ID']	
58
+		$href = 'index.php?module='.'Documents'
59
+			. '&action='.'EditView'
60
+			. '&record='.$layout_def['fields']['ID']
61
+			. '&return_module='.$_REQUEST['module']
62
+			. '&return_action='.'DetailView'
63
+			. '&return_id='.$_REQUEST['record']
64
+			. '&load_signed_id='.$layout_def['fields']['LINKED_ID']
65
+			. '&parent_id='.$_REQUEST['record']			
66
+			. '&parent_name='.$layout_def['fields']['CONTRACT_NAME']			
67
+			. '&parent_type='.$_REQUEST['module']			
68
+			. '&selected_revision_id='.$layout_def['fields']['SELECTED_REVISION_ID']	
69 69
 			;
70 70
 
71
-		$edit_icon_html = SugarThemeRegistry::current()->getImage( 'loadSignedDocument','align="absmiddle" border="0"',null,null,'.gif',$app_strings['LNK_LOAD_SIGNED']);
71
+		$edit_icon_html = SugarThemeRegistry::current()->getImage('loadSignedDocument', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_LOAD_SIGNED']);
72 72
 		//if the contract state is executed or document is not a template hide this action.
73
-		if ((!empty($layout_def['fields']['CONTRACT_STATUS']) && $layout_def['fields']['CONTRACT_STATUS']=='executed') or
74
-			empty($layout_def['fields']['IS_TEMPLATE']) or $layout_def['fields']['IS_TEMPLATE']==0) {
73
+		if ((!empty($layout_def['fields']['CONTRACT_STATUS']) && $layout_def['fields']['CONTRACT_STATUS'] == 'executed') or
74
+			empty($layout_def['fields']['IS_TEMPLATE']) or $layout_def['fields']['IS_TEMPLATE'] == 0) {
75 75
 			return "";
76 76
 		}
77
-		return '<a href="' . $href . '"' . "title ='". $app_strings['LNK_LOAD_SIGNED_TOOLTIP']."'"
78
-			. 'class="listViewTdToolsS1">' . $edit_icon_html . '&nbsp;' . $app_strings['LNK_LOAD_SIGNED'] .'</a>&nbsp;';
77
+		return '<a href="'.$href.'"'."title ='".$app_strings['LNK_LOAD_SIGNED_TOOLTIP']."'"
78
+			. 'class="listViewTdToolsS1">'.$edit_icon_html.'&nbsp;'.$app_strings['LNK_LOAD_SIGNED'].'</a>&nbsp;';
79 79
 	}
80 80
 		
81 81
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetFieldbool.php 3 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -42,18 +42,18 @@  discard block
 block discarded – undo
42 42
 class SugarWidgetFieldBool extends SugarWidgetReportField
43 43
 {
44 44
 
45
- function queryFilterEquals(&$layout_def)
46
- {
45
+    function queryFilterEquals(&$layout_def)
46
+    {
47 47
 
48
-		$bool_val = $layout_def['input_name0'][0];
49
-		if ($bool_val == 'yes' || $bool_val == '1')
50
-		{
51
-			return "(".$this->_get_column_select($layout_def)." LIKE 'on' OR ".$this->_get_column_select($layout_def)."='1')\n";
52
-		} else {
53
-			//return "(".$this->_get_column_select($layout_def)." is null OR ".$this->_get_column_select($layout_def)."='0' OR ".$this->_get_column_select($layout_def)."='off')\n";
48
+        $bool_val = $layout_def['input_name0'][0];
49
+        if ($bool_val == 'yes' || $bool_val == '1')
50
+        {
51
+            return "(".$this->_get_column_select($layout_def)." LIKE 'on' OR ".$this->_get_column_select($layout_def)."='1')\n";
52
+        } else {
53
+            //return "(".$this->_get_column_select($layout_def)." is null OR ".$this->_get_column_select($layout_def)."='0' OR ".$this->_get_column_select($layout_def)."='off')\n";
54 54
             return "(".$this->_get_column_select($layout_def)." is null OR ". $this->_get_column_select($layout_def)."='0')\n";            
55
-		}
56
- }
55
+        }
56
+    }
57 57
 
58 58
     function displayListPlain($layout_def)
59 59
     {
@@ -85,10 +85,10 @@  discard block
 block discarded – undo
85 85
         return  $cell;
86 86
     }
87 87
     
88
- function queryFilterStarts_With(&$layout_def)
89
- {
88
+    function queryFilterStarts_With(&$layout_def)
89
+    {
90 90
     return $this->queryFilterEquals($layout_def);
91
- }    
91
+    }    
92 92
  
93 93
     function displayInput(&$layout_def) 
94 94
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 			return "(".$this->_get_column_select($layout_def)." LIKE 'on' OR ".$this->_get_column_select($layout_def)."='1')\n";
52 52
 		} else {
53 53
 			//return "(".$this->_get_column_select($layout_def)." is null OR ".$this->_get_column_select($layout_def)."='0' OR ".$this->_get_column_select($layout_def)."='off')\n";
54
-            return "(".$this->_get_column_select($layout_def)." is null OR ". $this->_get_column_select($layout_def)."='0')\n";            
54
+            return "(".$this->_get_column_select($layout_def)." is null OR ".$this->_get_column_select($layout_def)."='0')\n";            
55 55
 		}
56 56
  }
57 57
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $key = $this->_get_column_alias($layout_def);
64 64
         $key = strtoupper($key);
65 65
         
66
-        if(empty($layout_def['fields'][$key]))
66
+        if (empty($layout_def['fields'][$key]))
67 67
         {
68 68
             $layout_def['name'] = $name;
69 69
             global $app_list_strings;
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         }
78 78
 
79 79
         $on_or_off = 'CHECKED';
80
-        if ( empty($value) ||  $value == 'off')
80
+        if (empty($value) || $value == 'off')
81 81
         {
82 82
             $on_or_off = '';
83 83
         }
Please login to merge, or discard this patch.
Braces   +6 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.
@@ -69,8 +71,7 @@  discard block
 block discarded – undo
69 71
             global $app_list_strings;
70 72
             if (empty($value)) {
71 73
                 $value = $app_list_strings['dom_switch_bool']['off'];
72
-            }   
73
-            else {
74
+            } else {
74 75
                 $value = $app_list_strings['dom_switch_bool']['on'];
75 76
             } 
76 77
             return $value;
@@ -97,11 +98,9 @@  discard block
 block discarded – undo
97 98
         $yes = $no = $default = '';
98 99
         if (isset($layout_def['input_name0']) && $layout_def['input_name0'] == 1) {
99 100
             $yes = ' selected="selected"';
100
-        }
101
-        elseif (isset($layout_def['input_name0']) && $layout_def['input_name0'] == 'off') {
101
+        } elseif (isset($layout_def['input_name0']) && $layout_def['input_name0'] == 'off') {
102 102
             $no = ' selected="selected"';
103
-        }
104
-        else {
103
+        } else {
105 104
             $default = ' selected="selected"';
106 105
         }
107 106
         
Please login to merge, or discard this patch.
generic/SugarWidgets/SugarWidgetSubPanelTopCreateAccountNameButton.php 3 patches
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -50,39 +50,39 @@
 block discarded – undo
50 50
         return parent::getWidgetId();
51 51
     }
52 52
 
53
-	function display($defines, $additionalFormFields = NULL, $nonbutton = false)
54
-	{
55
-		global $app_strings;
56
-		global $currentModule;
53
+    function display($defines, $additionalFormFields = NULL, $nonbutton = false)
54
+    {
55
+        global $app_strings;
56
+        global $currentModule;
57 57
 
58
-		$title = $app_strings['LBL_NEW_BUTTON_TITLE'];
59
-		//$accesskey = $app_strings['LBL_NEW_BUTTON_KEY'];
60
-		$value = $app_strings['LBL_NEW_BUTTON_LABEL'];
61
-		$this->module = 'Contacts';
62
-		if( ACLController::moduleSupportsACL($defines['module'])  && !ACLController::checkAccess($defines['module'], 'edit', true)){
63
-			$button = "<input title='$title'class='button' type='button' name='button' value='  $value  ' disabled/>\n";
64
-			return $button;
65
-		}
58
+        $title = $app_strings['LBL_NEW_BUTTON_TITLE'];
59
+        //$accesskey = $app_strings['LBL_NEW_BUTTON_KEY'];
60
+        $value = $app_strings['LBL_NEW_BUTTON_LABEL'];
61
+        $this->module = 'Contacts';
62
+        if( ACLController::moduleSupportsACL($defines['module'])  && !ACLController::checkAccess($defines['module'], 'edit', true)){
63
+            $button = "<input title='$title'class='button' type='button' name='button' value='  $value  ' disabled/>\n";
64
+            return $button;
65
+        }
66 66
 		
67
-		$additionalFormFields = array();
68
-		if(isset($defines['focus']->billing_address_street)) 
69
-			$additionalFormFields['primary_address_street'] = $defines['focus']->billing_address_street;
70
-		if(isset($defines['focus']->billing_address_city)) 
71
-			$additionalFormFields['primary_address_city'] = $defines['focus']->billing_address_city;						  		
72
-		if(isset($defines['focus']->billing_address_state)) 
73
-			$additionalFormFields['primary_address_state'] = $defines['focus']->billing_address_state;
74
-		if(isset($defines['focus']->billing_address_country)) 
75
-			$additionalFormFields['primary_address_country'] = $defines['focus']->billing_address_country;
76
-		if(isset($defines['focus']->billing_address_postalcode)) 
77
-			$additionalFormFields['primary_address_postalcode'] = $defines['focus']->billing_address_postalcode;
78
-		if(isset($defines['focus']->phone_office)) 
79
-			$additionalFormFields['phone_work'] = $defines['focus']->phone_office;
67
+        $additionalFormFields = array();
68
+        if(isset($defines['focus']->billing_address_street)) 
69
+            $additionalFormFields['primary_address_street'] = $defines['focus']->billing_address_street;
70
+        if(isset($defines['focus']->billing_address_city)) 
71
+            $additionalFormFields['primary_address_city'] = $defines['focus']->billing_address_city;						  		
72
+        if(isset($defines['focus']->billing_address_state)) 
73
+            $additionalFormFields['primary_address_state'] = $defines['focus']->billing_address_state;
74
+        if(isset($defines['focus']->billing_address_country)) 
75
+            $additionalFormFields['primary_address_country'] = $defines['focus']->billing_address_country;
76
+        if(isset($defines['focus']->billing_address_postalcode)) 
77
+            $additionalFormFields['primary_address_postalcode'] = $defines['focus']->billing_address_postalcode;
78
+        if(isset($defines['focus']->phone_office)) 
79
+            $additionalFormFields['phone_work'] = $defines['focus']->phone_office;
80 80
 		
81 81
 		
82
-		$button = $this->_get_form($defines, $additionalFormFields);
83
-		$button .= "<input title='$title' class='button' type='submit' name='{$this->getWidgetId()}' id='{$this->getWidgetId()}' value='  $value  '/>\n";
84
-		$button .= "</form>";
85
-		return $button;
86
-	}
82
+        $button = $this->_get_form($defines, $additionalFormFields);
83
+        $button .= "<input title='$title' class='button' type='submit' name='{$this->getWidgetId()}' id='{$this->getWidgetId()}' value='  $value  '/>\n";
84
+        $button .= "</form>";
85
+        return $button;
86
+    }
87 87
 }
88 88
 ?>
89 89
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -59,23 +59,23 @@  discard block
 block discarded – undo
59 59
 		//$accesskey = $app_strings['LBL_NEW_BUTTON_KEY'];
60 60
 		$value = $app_strings['LBL_NEW_BUTTON_LABEL'];
61 61
 		$this->module = 'Contacts';
62
-		if( ACLController::moduleSupportsACL($defines['module'])  && !ACLController::checkAccess($defines['module'], 'edit', true)){
62
+		if (ACLController::moduleSupportsACL($defines['module']) && !ACLController::checkAccess($defines['module'], 'edit', true)) {
63 63
 			$button = "<input title='$title'class='button' type='button' name='button' value='  $value  ' disabled/>\n";
64 64
 			return $button;
65 65
 		}
66 66
 		
67 67
 		$additionalFormFields = array();
68
-		if(isset($defines['focus']->billing_address_street)) 
68
+		if (isset($defines['focus']->billing_address_street)) 
69 69
 			$additionalFormFields['primary_address_street'] = $defines['focus']->billing_address_street;
70
-		if(isset($defines['focus']->billing_address_city)) 
70
+		if (isset($defines['focus']->billing_address_city)) 
71 71
 			$additionalFormFields['primary_address_city'] = $defines['focus']->billing_address_city;						  		
72
-		if(isset($defines['focus']->billing_address_state)) 
72
+		if (isset($defines['focus']->billing_address_state)) 
73 73
 			$additionalFormFields['primary_address_state'] = $defines['focus']->billing_address_state;
74
-		if(isset($defines['focus']->billing_address_country)) 
74
+		if (isset($defines['focus']->billing_address_country)) 
75 75
 			$additionalFormFields['primary_address_country'] = $defines['focus']->billing_address_country;
76
-		if(isset($defines['focus']->billing_address_postalcode)) 
76
+		if (isset($defines['focus']->billing_address_postalcode)) 
77 77
 			$additionalFormFields['primary_address_postalcode'] = $defines['focus']->billing_address_postalcode;
78
-		if(isset($defines['focus']->phone_office)) 
78
+		if (isset($defines['focus']->phone_office)) 
79 79
 			$additionalFormFields['phone_work'] = $defines['focus']->phone_office;
80 80
 		
81 81
 		
Please login to merge, or discard this patch.
Braces   +21 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.
@@ -65,18 +67,24 @@  discard block
 block discarded – undo
65 67
 		}
66 68
 		
67 69
 		$additionalFormFields = array();
68
-		if(isset($defines['focus']->billing_address_street)) 
69
-			$additionalFormFields['primary_address_street'] = $defines['focus']->billing_address_street;
70
-		if(isset($defines['focus']->billing_address_city)) 
71
-			$additionalFormFields['primary_address_city'] = $defines['focus']->billing_address_city;						  		
72
-		if(isset($defines['focus']->billing_address_state)) 
73
-			$additionalFormFields['primary_address_state'] = $defines['focus']->billing_address_state;
74
-		if(isset($defines['focus']->billing_address_country)) 
75
-			$additionalFormFields['primary_address_country'] = $defines['focus']->billing_address_country;
76
-		if(isset($defines['focus']->billing_address_postalcode)) 
77
-			$additionalFormFields['primary_address_postalcode'] = $defines['focus']->billing_address_postalcode;
78
-		if(isset($defines['focus']->phone_office)) 
79
-			$additionalFormFields['phone_work'] = $defines['focus']->phone_office;
70
+		if(isset($defines['focus']->billing_address_street)) {
71
+					$additionalFormFields['primary_address_street'] = $defines['focus']->billing_address_street;
72
+		}
73
+		if(isset($defines['focus']->billing_address_city)) {
74
+					$additionalFormFields['primary_address_city'] = $defines['focus']->billing_address_city;
75
+		}
76
+		if(isset($defines['focus']->billing_address_state)) {
77
+					$additionalFormFields['primary_address_state'] = $defines['focus']->billing_address_state;
78
+		}
79
+		if(isset($defines['focus']->billing_address_country)) {
80
+					$additionalFormFields['primary_address_country'] = $defines['focus']->billing_address_country;
81
+		}
82
+		if(isset($defines['focus']->billing_address_postalcode)) {
83
+					$additionalFormFields['primary_address_postalcode'] = $defines['focus']->billing_address_postalcode;
84
+		}
85
+		if(isset($defines['focus']->phone_office)) {
86
+					$additionalFormFields['phone_work'] = $defines['focus']->phone_office;
87
+		}
80 88
 		
81 89
 		
82 90
 		$button = $this->_get_form($defines, $additionalFormFields);
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetSubPanelRemoveButtonMeetings.php 3 patches
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -45,35 +45,35 @@  discard block
 block discarded – undo
45 45
 
46 46
 class SugarWidgetSubPanelRemoveButtonMeetings extends SugarWidgetField
47 47
 {
48
-	function displayHeaderCell($layout_def)
49
-	{
50
-		return '&nbsp;';
51
-	}
48
+    function displayHeaderCell($layout_def)
49
+    {
50
+        return '&nbsp;';
51
+    }
52 52
 
53
-	function displayList($layout_def)
54
-	{
55
-		global $app_strings;
53
+    function displayList($layout_def)
54
+    {
55
+        global $app_strings;
56 56
 		
57 57
 				
58
-		$parent_record_id = $_REQUEST['record'];
59
-		$parent_module = $_REQUEST['module'];
58
+        $parent_record_id = $_REQUEST['record'];
59
+        $parent_module = $_REQUEST['module'];
60 60
 
61
-		$action = 'DeleteRelationship';
62
-		$record = $layout_def['fields']['ID'];
61
+        $action = 'DeleteRelationship';
62
+        $record = $layout_def['fields']['ID'];
63 63
 
64
-		$return_module = $_REQUEST['module'];
65
-		$return_action = 'SubPanelViewer';
66
-		$subpanel = $layout_def['subpanel_id'];
67
-		$return_id = $_REQUEST['record'];
64
+        $return_module = $_REQUEST['module'];
65
+        $return_action = 'SubPanelViewer';
66
+        $subpanel = $layout_def['subpanel_id'];
67
+        $return_id = $_REQUEST['record'];
68 68
 		
69 69
 		
70
-		if(isset($GLOBALS['FOCUS'])) {	
71
-			$focus = $GLOBALS['FOCUS'];
72
-		}
70
+        if(isset($GLOBALS['FOCUS'])) {	
71
+            $focus = $GLOBALS['FOCUS'];
72
+        }
73 73
 		
74 74
         /* Handle case where we generate subpanels from MySettings/LoadTabSubpanels.php */
75 75
         else if($return_module == 'MySettings') {
76
-        	global $beanList, $beanFiles;
76
+            global $beanList, $beanFiles;
77 77
             $return_module = $_REQUEST['loadModule'];
78 78
             
79 79
             $class = $beanList[$return_module];
@@ -83,37 +83,37 @@  discard block
 block discarded – undo
83 83
         }
84 84
 		
85 85
         //CCL - Comment out restriction to not remove assigned user
86
-		//if($focus->assigned_user_id == $record) return '';
86
+        //if($focus->assigned_user_id == $record) return '';
87 87
 		
88
-		if (isset($layout_def['linked_field_set']) && !empty($layout_def['linked_field_set'])) {
89
-			$linked_field= $layout_def['linked_field_set'] ;
90
-		} else {
91
-			$linked_field = $layout_def['linked_field'];
92
-		}
93
-		$refresh_page = 0;
94
-		if(!empty($layout_def['refresh_page'])){
95
-			$refresh_page = 1;
96
-		}
97
-		$return_url = "index.php?module=$return_module&action=$return_action&subpanel=$subpanel&record=$return_id&sugar_body_only=1";
88
+        if (isset($layout_def['linked_field_set']) && !empty($layout_def['linked_field_set'])) {
89
+            $linked_field= $layout_def['linked_field_set'] ;
90
+        } else {
91
+            $linked_field = $layout_def['linked_field'];
92
+        }
93
+        $refresh_page = 0;
94
+        if(!empty($layout_def['refresh_page'])){
95
+            $refresh_page = 1;
96
+        }
97
+        $return_url = "index.php?module=$return_module&action=$return_action&subpanel=$subpanel&record=$return_id&sugar_body_only=1";
98 98
 
99
-		$icon_remove_text = strtolower($app_strings['LBL_ID_FF_REMOVE']);
100
-		$remove_url = $layout_def['start_link_wrapper']
101
-			. "index.php?module=$parent_module"
102
-			. "&action=$action"
103
-			. "&record=$parent_record_id"
104
-			. "&linked_field=$linked_field"
105
-			. "&linked_id=$record"
106
-			. "&return_url=" . urlencode(urlencode($return_url))
107
-			. "&refresh_page=$refresh_page"
108
-			. $layout_def['end_link_wrapper'];
109
-		$remove_confirmation_text = $app_strings['NTC_REMOVE_CONFIRMATION'];
110
-		//based on listview since that lets you select records
111
-		if($layout_def['ListView']) {
99
+        $icon_remove_text = strtolower($app_strings['LBL_ID_FF_REMOVE']);
100
+        $remove_url = $layout_def['start_link_wrapper']
101
+            . "index.php?module=$parent_module"
102
+            . "&action=$action"
103
+            . "&record=$parent_record_id"
104
+            . "&linked_field=$linked_field"
105
+            . "&linked_id=$record"
106
+            . "&return_url=" . urlencode(urlencode($return_url))
107
+            . "&refresh_page=$refresh_page"
108
+            . $layout_def['end_link_wrapper'];
109
+        $remove_confirmation_text = $app_strings['NTC_REMOVE_CONFIRMATION'];
110
+        //based on listview since that lets you select records
111
+        if($layout_def['ListView']) {
112 112
             return "<a href=\"javascript:sub_p_rem('$subpanel', '$linked_field'" .", '$record', $refresh_page);\""
113
-			        . ' class="listViewTdToolsS1"' . " onclick=\"return sp_rem_conf();\"" . ">$icon_remove_text</a>";
114
-		}else{
115
-			return '';
116
-		}
117
-	}
113
+                    . ' class="listViewTdToolsS1"' . " onclick=\"return sp_rem_conf();\"" . ">$icon_remove_text</a>";
114
+        }else{
115
+            return '';
116
+        }
117
+    }
118 118
 }
119 119
 ?>
120 120
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -67,12 +67,12 @@  discard block
 block discarded – undo
67 67
 		$return_id = $_REQUEST['record'];
68 68
 		
69 69
 		
70
-		if(isset($GLOBALS['FOCUS'])) {	
70
+		if (isset($GLOBALS['FOCUS'])) {	
71 71
 			$focus = $GLOBALS['FOCUS'];
72 72
 		}
73 73
 		
74 74
         /* Handle case where we generate subpanels from MySettings/LoadTabSubpanels.php */
75
-        else if($return_module == 'MySettings') {
75
+        else if ($return_module == 'MySettings') {
76 76
         	global $beanList, $beanFiles;
77 77
             $return_module = $_REQUEST['loadModule'];
78 78
             
@@ -86,12 +86,12 @@  discard block
 block discarded – undo
86 86
 		//if($focus->assigned_user_id == $record) return '';
87 87
 		
88 88
 		if (isset($layout_def['linked_field_set']) && !empty($layout_def['linked_field_set'])) {
89
-			$linked_field= $layout_def['linked_field_set'] ;
89
+			$linked_field = $layout_def['linked_field_set'];
90 90
 		} else {
91 91
 			$linked_field = $layout_def['linked_field'];
92 92
 		}
93 93
 		$refresh_page = 0;
94
-		if(!empty($layout_def['refresh_page'])){
94
+		if (!empty($layout_def['refresh_page'])) {
95 95
 			$refresh_page = 1;
96 96
 		}
97 97
 		$return_url = "index.php?module=$return_module&action=$return_action&subpanel=$subpanel&record=$return_id&sugar_body_only=1";
@@ -103,15 +103,15 @@  discard block
 block discarded – undo
103 103
 			. "&record=$parent_record_id"
104 104
 			. "&linked_field=$linked_field"
105 105
 			. "&linked_id=$record"
106
-			. "&return_url=" . urlencode(urlencode($return_url))
106
+			. "&return_url=".urlencode(urlencode($return_url))
107 107
 			. "&refresh_page=$refresh_page"
108 108
 			. $layout_def['end_link_wrapper'];
109 109
 		$remove_confirmation_text = $app_strings['NTC_REMOVE_CONFIRMATION'];
110 110
 		//based on listview since that lets you select records
111
-		if($layout_def['ListView']) {
112
-            return "<a href=\"javascript:sub_p_rem('$subpanel', '$linked_field'" .", '$record', $refresh_page);\""
113
-			        . ' class="listViewTdToolsS1"' . " onclick=\"return sp_rem_conf();\"" . ">$icon_remove_text</a>";
114
-		}else{
111
+		if ($layout_def['ListView']) {
112
+            return "<a href=\"javascript:sub_p_rem('$subpanel', '$linked_field'".", '$record', $refresh_page);\""
113
+			        . ' class="listViewTdToolsS1"'." onclick=\"return sp_rem_conf();\"".">$icon_remove_text</a>";
114
+		} else {
115 115
 			return '';
116 116
 		}
117 117
 	}
Please login to merge, or discard this 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.
@@ -111,7 +113,7 @@  discard block
 block discarded – undo
111 113
 		if($layout_def['ListView']) {
112 114
             return "<a href=\"javascript:sub_p_rem('$subpanel', '$linked_field'" .", '$record', $refresh_page);\""
113 115
 			        . ' class="listViewTdToolsS1"' . " onclick=\"return sp_rem_conf();\"" . ">$icon_remove_text</a>";
114
-		}else{
116
+		} else{
115 117
 			return '';
116 118
 		}
117 119
 	}
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetFielduser_name.php 3 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -43,12 +43,12 @@
 block discarded – undo
43 43
 
44 44
 class SugarWidgetFielduser_name extends SugarWidgetFieldname
45 45
 {
46
- function displayInput(&$layout_def) 
47
- {
46
+    function displayInput(&$layout_def) 
47
+    {
48 48
         $selected_users = empty($layout_def['input_name0']) ? '' : $layout_def['input_name0'];
49
- 		$str = '<select multiple="true" size="3" name="' . $layout_def['name'] . '[]">' . get_select_options_with_id(get_user_array(false), $selected_users) . '</select>';
50
- 		return $str;
51
- }
49
+            $str = '<select multiple="true" size="3" name="' . $layout_def['name'] . '[]">' . get_select_options_with_id(get_user_array(false), $selected_users) . '</select>';
50
+            return $str;
51
+    }
52 52
 }
53 53
 
54 54
 ?>
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
  function displayInput(&$layout_def) 
47 47
  {
48 48
         $selected_users = empty($layout_def['input_name0']) ? '' : $layout_def['input_name0'];
49
- 		$str = '<select multiple="true" size="3" name="' . $layout_def['name'] . '[]">' . get_select_options_with_id(get_user_array(false), $selected_users) . '</select>';
49
+ 		$str = '<select multiple="true" size="3" name="'.$layout_def['name'].'[]">'.get_select_options_with_id(get_user_array(false), $selected_users).'</select>';
50 50
  		return $str;
51 51
  }
52 52
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
Please login to merge, or discard this patch.