GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#1993)
by
unknown
12:46
created
classes/db/queryparts/expression/InsertExpression.class.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
 	function getValue($with_values = true)
33 33
 	{
34
-		if($with_values)
34
+		if ($with_values)
35 35
 		{
36 36
 			return $this->argument->getValue();
37 37
 		}
@@ -40,12 +40,12 @@  discard block
 block discarded – undo
40 40
 
41 41
 	function show()
42 42
 	{
43
-		if(!$this->argument)
43
+		if (!$this->argument)
44 44
 		{
45 45
 			return false;
46 46
 		}
47 47
 		$value = $this->argument->getValue();
48
-		if(!isset($value))
48
+		if (!isset($value))
49 49
 		{
50 50
 			return false;
51 51
 		}
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
 	function getArguments()
61 61
 	{
62
-		if($this->argument)
62
+		if ($this->argument)
63 63
 		{
64 64
 			return array($this->argument);
65 65
 		}
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -111,8 +111,7 @@
 block discarded – undo
111 111
 		if($this->limit)
112 112
 		{
113 113
 			return $this->limit->toString();
114
-		}
115
-		else
114
+		} else
116 115
 		{
117 116
 			return "";
118 117
 		}
Please login to merge, or discard this patch.
classes/db/queryparts/order/OrderByColumn.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,11 +59,11 @@
 block discarded – undo
59 59
 	function getArguments()
60 60
 	{
61 61
 		$args = array();
62
-		if(is_a($this->column_name, 'Argument'))
62
+		if (is_a($this->column_name, 'Argument'))
63 63
 		{
64 64
 			$args[] = $this->column_name;
65 65
 		}
66
-		if(is_a($this->sort_order, 'Argument'))
66
+		if (is_a($this->sort_order, 'Argument'))
67 67
 		{
68 68
 			$args[] = $this->sort_order;
69 69
 		}
Please login to merge, or discard this patch.
classes/db/queryparts/table/MysqlTableWithHint.class.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,12 +53,10 @@
 block discarded – undo
53 53
 			if($index_hint_type == 'USE')
54 54
 			{
55 55
 				$use_index_hint .= $index_hint->getIndexName() . ', ';
56
-			}
57
-			else if($index_hint_type == 'FORCE')
56
+			} else if($index_hint_type == 'FORCE')
58 57
 			{
59 58
 				$force_index_hint .= $index_hint->getIndexName() . ', ';
60
-			}
61
-			else if($index_hint_type == 'IGNORE')
59
+			} else if($index_hint_type == 'IGNORE')
62 60
 			{
63 61
 				$ignore_index_hint .= $index_hint->getIndexName() . ', ';
64 62
 			}
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -47,33 +47,33 @@
 block discarded – undo
47 47
 		$use_index_hint = '';
48 48
 		$force_index_hint = '';
49 49
 		$ignore_index_hint = '';
50
-		foreach($this->index_hints_list as $index_hint)
50
+		foreach ($this->index_hints_list as $index_hint)
51 51
 		{
52 52
 			$index_hint_type = $index_hint->getIndexHintType();
53
-			if($index_hint_type == 'USE')
53
+			if ($index_hint_type == 'USE')
54 54
 			{
55
-				$use_index_hint .= $index_hint->getIndexName() . ', ';
55
+				$use_index_hint .= $index_hint->getIndexName().', ';
56 56
 			}
57
-			else if($index_hint_type == 'FORCE')
57
+			else if ($index_hint_type == 'FORCE')
58 58
 			{
59
-				$force_index_hint .= $index_hint->getIndexName() . ', ';
59
+				$force_index_hint .= $index_hint->getIndexName().', ';
60 60
 			}
61
-			else if($index_hint_type == 'IGNORE')
61
+			else if ($index_hint_type == 'IGNORE')
62 62
 			{
63
-				$ignore_index_hint .= $index_hint->getIndexName() . ', ';
63
+				$ignore_index_hint .= $index_hint->getIndexName().', ';
64 64
 			}
65 65
 		}
66
-		if($use_index_hint != '')
66
+		if ($use_index_hint != '')
67 67
 		{
68
-			$result .= ' USE INDEX (' . substr($use_index_hint, 0, -2) . ') ';
68
+			$result .= ' USE INDEX ('.substr($use_index_hint, 0, -2).') ';
69 69
 		}
70
-		if($force_index_hint != '')
70
+		if ($force_index_hint != '')
71 71
 		{
72
-			$result .= ' FORCE INDEX (' . substr($force_index_hint, 0, -2) . ') ';
72
+			$result .= ' FORCE INDEX ('.substr($force_index_hint, 0, -2).') ';
73 73
 		}
74
-		if($ignore_index_hint != '')
74
+		if ($ignore_index_hint != '')
75 75
 		{
76
-			$result .= ' IGNORE INDEX (' . substr($ignore_index_hint, 0, -2) . ') ';
76
+			$result .= ' IGNORE INDEX ('.substr($ignore_index_hint, 0, -2).') ';
77 77
 		}
78 78
 		return $result;
79 79
 	}
Please login to merge, or discard this patch.
classes/display/HTMLDisplayHandler.php 3 patches
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@  discard block
 block discarded – undo
23 23
 			if($oModule->module_info->module == $oModule->module)
24 24
 			{
25 25
 				$skin = $oModule->origin_module_info->skin;
26
-			}
27
-			else
26
+			} else
28 27
 			{
29 28
 				$skin = $oModule->module_config->skin;
30 29
 			}
@@ -44,13 +43,11 @@  discard block
 block discarded – undo
44 43
 							$template_path = sprintf('%s/modules/%s/', $theme_path, $theme_skin[1]);
45 44
 						}
46 45
 					}
47
-				}
48
-				else
46
+				} else
49 47
 				{
50 48
 					$template_path = $oModule->getTemplatePath();
51 49
 				}
52
-			}
53
-			else
50
+			} else
54 51
 			{
55 52
 				$template_path = $oModule->getTemplatePath();
56 53
 			}
@@ -228,8 +225,7 @@  discard block
 block discarded – undo
228 225
 		{
229 226
 			$this->_loadMobileJSCSS();
230 227
 			$output = $oTemplate->compile('./common/tpl', 'mobile_layout');
231
-		}
232
-		else
228
+		} else
233 229
 		{
234 230
 			$this->_loadJSCSS();
235 231
 			$output = $oTemplate->compile('./common/tpl', 'common_layout');
@@ -402,8 +398,7 @@  discard block
 block discarded – undo
402 398
 			$oContext->loadFile(array('./common/js/xml_handler.js', 'head', '', -100000), true);
403 399
 			$oContext->loadFile(array('./common/js/xml_js_filter.js', 'head', '', -100000), true);
404 400
 			$oContext->loadFile(array('./common/css/xe.css', '', '', -1000000), true);
405
-		}
406
-		else
401
+		} else
407 402
 		{
408 403
 			$oContext->loadFile(array('./common/js/jquery-1.x.min.js', 'head', 'lt IE 9', -111000), true);
409 404
 			$oContext->loadFile(array('./common/js/jquery.min.js', 'head', 'gte IE 9', -110000), true);
@@ -424,8 +419,7 @@  discard block
 block discarded – undo
424 419
 				$oContext->loadFile(array('./modules/admin/tpl/css/admin.bootstrap.css', '', '', 1), true);
425 420
 				$oContext->loadFile(array('./modules/admin/tpl/js/jquery.tmpl.js', '', '', 1), true);
426 421
 				$oContext->loadFile(array('./modules/admin/tpl/js/jquery.jstree.js', '', '', 1), true);
427
-			}
428
-			else
422
+			} else
429 423
 			{
430 424
 				$oContext->loadFile(array('./modules/admin/tpl/css/admin.min.css', '', '', 10), true);
431 425
 				$oContext->loadFile(array("./modules/admin/tpl/css/admin_{$lang_type}.css", '', '', 10), true);
@@ -458,8 +452,7 @@  discard block
 block discarded – undo
458 452
 			$oContext->loadFile(array('./common/js/xml_js_filter.js', 'head', '', -100000), true);
459 453
 			$oContext->loadFile(array('./common/css/xe.css', '', '', -1000000), true);
460 454
 			$oContext->loadFile(array('./common/css/mobile.css', '', '', -1000000), true);
461
-		}
462
-		else
455
+		} else
463 456
 		{
464 457
 			$oContext->loadFile(array('./common/js/jquery.min.js', 'head', '', -110000), true);
465 458
 			$oContext->loadFile(array('./common/js/x.min.js', 'head', '', -100000), true);
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 
17 17
 	/**
18 18
 	 * get layout setting view.
19
-	 * @return void
19
+	 * @return string|null
20 20
 	 */
21 21
 	public function getLayoutAdminSetInfoView()
22 22
 	{
Please login to merge, or discard this patch.
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
 
19 19
 		$template_path = $oModule->getTemplatePath();
20 20
 
21
-		if(!is_dir($template_path))
21
+		if (!is_dir($template_path))
22 22
 		{
23
-			if($oModule->module_info->module == $oModule->module)
23
+			if ($oModule->module_info->module == $oModule->module)
24 24
 			{
25 25
 				$skin = $oModule->origin_module_info->skin;
26 26
 			}
@@ -29,17 +29,17 @@  discard block
 block discarded – undo
29 29
 				$skin = $oModule->module_config->skin;
30 30
 			}
31 31
 
32
-			if(Context::get('module') != 'admin' && strpos(Context::get('act'), 'Admin') === false)
32
+			if (Context::get('module') != 'admin' && strpos(Context::get('act'), 'Admin') === false)
33 33
 			{
34
-				if($skin && is_string($skin))
34
+				if ($skin && is_string($skin))
35 35
 				{
36 36
 					$theme_skin = explode('|@|', $skin);
37 37
 					$template_path = $oModule->getTemplatePath();
38
-					if(count($theme_skin) == 2)
38
+					if (count($theme_skin) == 2)
39 39
 					{
40 40
 						$theme_path = sprintf('./themes/%s', $theme_skin[0]);
41 41
 						// FIXME $theme_path $theme_path $theme_path ??
42
-						if(substr($theme_path, 0, strlen($theme_path)) != $theme_path)
42
+						if (substr($theme_path, 0, strlen($theme_path)) != $theme_path)
43 43
 						{
44 44
 							$template_path = sprintf('%s/modules/%s/', $theme_path, $theme_skin[1]);
45 45
 						}
@@ -65,16 +65,16 @@  discard block
 block discarded – undo
65 65
 		$oSecurity->encodeHTML('is_keyword');
66 66
 
67 67
 		// add .x div for adminitration pages
68
-		if(Context::getResponseMethod() == 'HTML')
68
+		if (Context::getResponseMethod() == 'HTML')
69 69
 		{
70
-			if(Context::get('module') != 'admin' && strpos(Context::get('act'), 'Admin') > 0 && Context::get('act') != 'dispPageAdminContentModify' && Context::get('act') != 'dispPageAdminMobileContentModify')
70
+			if (Context::get('module') != 'admin' && strpos(Context::get('act'), 'Admin') > 0 && Context::get('act') != 'dispPageAdminContentModify' && Context::get('act') != 'dispPageAdminMobileContentModify')
71 71
 			{
72
-				$output = '<div class="x">' . $output . '</div>';
72
+				$output = '<div class="x">'.$output.'</div>';
73 73
 			}
74 74
 
75
-			if(Context::get('layout') != 'none')
75
+			if (Context::get('layout') != 'none')
76 76
 			{
77
-				if(__DEBUG__ == 3)
77
+				if (__DEBUG__ == 3)
78 78
 				{
79 79
 					$start = getMicroTime();
80 80
 				}
@@ -92,11 +92,11 @@  discard block
 block discarded – undo
92 92
 				$layout_srl = $layout_info->layout_srl;
93 93
 
94 94
 				// compile if connected to the layout
95
-				if($layout_srl > 0)
95
+				if ($layout_srl > 0)
96 96
 				{
97 97
 
98 98
 					// handle separately if the layout is faceoff
99
-					if($layout_info && $layout_info->type == 'faceoff')
99
+					if ($layout_info && $layout_info->type == 'faceoff')
100 100
 					{
101 101
 						$oLayoutModel->doActivateFaceOff($layout_info);
102 102
 						Context::set('layout_info', $layout_info);
@@ -105,16 +105,16 @@  discard block
 block discarded – undo
105 105
 					// search if the changes CSS exists in the admin layout edit window
106 106
 					$edited_layout_css = $oLayoutModel->getUserLayoutCss($layout_srl);
107 107
 
108
-					if(FileHandler::exists($edited_layout_css))
108
+					if (FileHandler::exists($edited_layout_css))
109 109
 					{
110 110
 						Context::loadFile(array($edited_layout_css, 'all', '', 100));
111 111
 					}
112 112
 				}
113
-				if(!$layout_path)
113
+				if (!$layout_path)
114 114
 				{
115 115
 					$layout_path = './common/tpl';
116 116
 				}
117
-				if(!$layout_file)
117
+				if (!$layout_file)
118 118
 				{
119 119
 					$layout_file = 'default_layout';
120 120
 				}
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 
123 123
 				// if popup_layout, remove admin bar.
124 124
 				$realLayoutPath = FileHandler::getRealPath($layout_path);
125
-				if(substr_compare($realLayoutPath, '/', -1) !== 0)
125
+				if (substr_compare($realLayoutPath, '/', -1) !== 0)
126 126
 				{
127 127
 					$realLayoutPath .= '/';
128 128
 				}
@@ -130,12 +130,12 @@  discard block
 block discarded – undo
130 130
 				$pathInfo = pathinfo($layout_file);
131 131
 				$onlyLayoutFile = $pathInfo['filename'];
132 132
 
133
-				if(__DEBUG__ == 3)
133
+				if (__DEBUG__ == 3)
134 134
 				{
135 135
 					$GLOBALS['__layout_compile_elapsed__'] = getMicroTime() - $start;
136 136
 				}
137 137
 
138
-				if(stripos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE && (Context::get('_use_ssl') == 'optional' || Context::get('_use_ssl') == 'always'))
138
+				if (stripos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE && (Context::get('_use_ssl') == 'optional' || Context::get('_use_ssl') == 'always'))
139 139
 				{
140 140
 					Context::addHtmlFooter('<iframe id="xeTmpIframe" name="xeTmpIframe" style="width:1px;height:1px;position:absolute;top:-2px;left:-2px;"></iframe>');
141 141
 				}
@@ -151,12 +151,12 @@  discard block
 block discarded – undo
151 151
 	 */
152 152
 	function prepareToPrint(&$output)
153 153
 	{
154
-		if(Context::getResponseMethod() != 'HTML')
154
+		if (Context::getResponseMethod() != 'HTML')
155 155
 		{
156 156
 			return;
157 157
 		}
158 158
 
159
-		if(__DEBUG__ == 3)
159
+		if (__DEBUG__ == 3)
160 160
 		{
161 161
 			$start = getMicroTime();
162 162
 		}
@@ -174,20 +174,20 @@  discard block
 block discarded – undo
174 174
 		$output = preg_replace_callback('/<!--(#)?Meta:([a-z0-9\_\-\/\.\@\:]+)-->/is', array($this, '_transMeta'), $output);
175 175
 
176 176
 		// handles a relative path generated by using the rewrite module
177
-		if(Context::isAllowRewrite())
177
+		if (Context::isAllowRewrite())
178 178
 		{
179 179
 			$url = parse_url(Context::getRequestUri());
180 180
 			$real_path = $url['path'];
181 181
 
182 182
 			$pattern = '/src=("|\'){1}(\.\/)?(files\/attach|files\/cache|files\/faceOff|files\/member_extra_info|modules|common|widgets|widgetstyle|layouts|addons)\/([^"\']+)\.(jpg|jpeg|png|gif)("|\'){1}/s';
183
-			$output = preg_replace($pattern, 'src=$1' . $real_path . '$3/$4.$5$6', $output);
183
+			$output = preg_replace($pattern, 'src=$1'.$real_path.'$3/$4.$5$6', $output);
184 184
 
185 185
 			$pattern = '/href=("|\'){1}(\?[^"\']+)/s';
186
-			$output = preg_replace($pattern, 'href=$1' . $real_path . '$2', $output);
186
+			$output = preg_replace($pattern, 'href=$1'.$real_path.'$2', $output);
187 187
 
188
-			if(Context::get('vid'))
188
+			if (Context::get('vid'))
189 189
 			{
190
-				$pattern = '/\/' . Context::get('vid') . '\?([^=]+)=/is';
190
+				$pattern = '/\/'.Context::get('vid').'\?([^=]+)=/is';
191 191
 				$output = preg_replace($pattern, '/?$1=', $output);
192 192
 			}
193 193
 		}
@@ -195,18 +195,18 @@  discard block
 block discarded – undo
195 195
 		// prevent the 2nd request due to url(none) of the background-image
196 196
 		$output = preg_replace('/url\((["\']?)none(["\']?)\)/is', 'none', $output);
197 197
 
198
-		if(is_array(Context::get('INPUT_ERROR')))
198
+		if (is_array(Context::get('INPUT_ERROR')))
199 199
 		{
200 200
 			$INPUT_ERROR = Context::get('INPUT_ERROR');
201 201
 			$keys = array_keys($INPUT_ERROR);
202
-			$keys = '(' . implode('|', $keys) . ')';
202
+			$keys = '('.implode('|', $keys).')';
203 203
 
204
-			$output = preg_replace_callback('@(<input)([^>]*?)\sname="' . $keys . '"([^>]*?)/?>@is', array(&$this, '_preserveValue'), $output);
205
-			$output = preg_replace_callback('@<select[^>]*\sname="' . $keys . '".+</select>@isU', array(&$this, '_preserveSelectValue'), $output);
206
-			$output = preg_replace_callback('@<textarea[^>]*\sname="' . $keys . '".+</textarea>@isU', array(&$this, '_preserveTextAreaValue'), $output);
204
+			$output = preg_replace_callback('@(<input)([^>]*?)\sname="'.$keys.'"([^>]*?)/?>@is', array(&$this, '_preserveValue'), $output);
205
+			$output = preg_replace_callback('@<select[^>]*\sname="'.$keys.'".+</select>@isU', array(&$this, '_preserveSelectValue'), $output);
206
+			$output = preg_replace_callback('@<textarea[^>]*\sname="'.$keys.'".+</textarea>@isU', array(&$this, '_preserveTextAreaValue'), $output);
207 207
 		}
208 208
 
209
-		if(__DEBUG__ == 3)
209
+		if (__DEBUG__ == 3)
210 210
 		{
211 211
 			$GLOBALS['__trans_content_elapsed__'] = getMicroTime() - $start;
212 212
 		}
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 		// convert the final layout
225 225
 		Context::set('content', $output);
226 226
 		$oTemplate = TemplateHandler::getInstance();
227
-		if(Mobile::isFromMobilePhone())
227
+		if (Mobile::isFromMobilePhone())
228 228
 		{
229 229
 			$this->_loadMobileJSCSS();
230 230
 			$output = $oTemplate->compile('./common/tpl', 'mobile_layout');
@@ -249,16 +249,16 @@  discard block
 block discarded – undo
249 249
 	{
250 250
 		$INPUT_ERROR = Context::get('INPUT_ERROR');
251 251
 
252
-		$str = $match[1] . $match[2] . ' name="' . $match[3] . '"' . $match[4];
252
+		$str = $match[1].$match[2].' name="'.$match[3].'"'.$match[4];
253 253
 
254 254
 		// get type
255 255
 		$type = 'text';
256
-		if(preg_match('/\stype="([a-z]+)"/i', $str, $m))
256
+		if (preg_match('/\stype="([a-z]+)"/i', $str, $m))
257 257
 		{
258 258
 			$type = strtolower($m[1]);
259 259
 		}
260 260
 
261
-		switch($type)
261
+		switch ($type)
262 262
 		{
263 263
 			case 'text':
264 264
 			case 'hidden':
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
 			case 'number':
277 277
 			case 'range':
278 278
 			case 'color':
279
-				$str = preg_replace('@\svalue="[^"]*?"@', ' ', $str) . ' value="' . htmlspecialchars($INPUT_ERROR[$match[3]], ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '"';
279
+				$str = preg_replace('@\svalue="[^"]*?"@', ' ', $str).' value="'.htmlspecialchars($INPUT_ERROR[$match[3]], ENT_COMPAT | ENT_HTML401, 'UTF-8', false).'"';
280 280
 				break;
281 281
 			case 'password':
282 282
 				$str = preg_replace('@\svalue="[^"]*?"@', ' ', $str);
@@ -284,14 +284,14 @@  discard block
 block discarded – undo
284 284
 			case 'radio':
285 285
 			case 'checkbox':
286 286
 				$str = preg_replace('@\schecked(="[^"]*?")?@', ' ', $str);
287
-				if(@preg_match('@\s(?i:value)="' . $INPUT_ERROR[$match[3]] . '"@', $str))
287
+				if (@preg_match('@\s(?i:value)="'.$INPUT_ERROR[$match[3]].'"@', $str))
288 288
 				{
289 289
 					$str .= ' checked="checked"';
290 290
 				}
291 291
 				break;
292 292
 		}
293 293
 
294
-		return $str . ' />';
294
+		return $str.' />';
295 295
 	}
296 296
 
297 297
 	/**
@@ -308,14 +308,14 @@  discard block
 block discarded – undo
308 308
 		preg_match_all('@<option[^>]*\svalue="([^"]*)".+</option>@isU', $matches[0], $m);
309 309
 
310 310
 		$key = array_search($INPUT_ERROR[$matches[1]], $m[1]);
311
-		if($key === FALSE)
311
+		if ($key === FALSE)
312 312
 		{
313 313
 			return $matches[0];
314 314
 		}
315 315
 
316 316
 		$m[0][$key] = preg_replace('@(\svalue=".*?")@is', '$1 selected="selected"', $m[0][$key]);
317 317
 
318
-		return $mm[0] . implode('', $m[0]) . '</select>';
318
+		return $mm[0].implode('', $m[0]).'</select>';
319 319
 	}
320 320
 
321 321
 	/**
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 	{
328 328
 		$INPUT_ERROR = Context::get('INPUT_ERROR');
329 329
 		preg_match('@<textarea.*?>@is', $matches[0], $mm);
330
-		return $mm[0] . $INPUT_ERROR[$matches[1]] . '</textarea>';
330
+		return $mm[0].$INPUT_ERROR[$matches[1]].'</textarea>';
331 331
 	}
332 332
 
333 333
 	/**
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
 	 */
339 339
 	function _moveStyleToHeader($matches)
340 340
 	{
341
-		if(isset($matches[1]) && stristr($matches[1], 'scoped'))
341
+		if (isset($matches[1]) && stristr($matches[1], 'scoped'))
342 342
 		{
343 343
 			return $matches[0];
344 344
 		}
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
 	 */
375 375
 	function _transMeta($matches)
376 376
 	{
377
-		if($matches[1])
377
+		if ($matches[1])
378 378
 		{
379 379
 			return '';
380 380
 		}
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
 		$lang_type = Context::getLangType();
392 392
 
393 393
 		// add common JS/CSS files
394
-		if(__DEBUG__ || !__XE_VERSION_STABLE__)
394
+		if (__DEBUG__ || !__XE_VERSION_STABLE__)
395 395
 		{
396 396
 			$oContext->loadFile(array('./common/js/jquery-1.x.js', 'head', 'lt IE 9', -111000), true);
397 397
 			$oContext->loadFile(array('./common/js/jquery.js', 'head', 'gte IE 9', -110000), true);
@@ -413,9 +413,9 @@  discard block
 block discarded – undo
413 413
 		}
414 414
 
415 415
 		// for admin page, add admin css
416
-		if(Context::get('module') == 'admin' || strpos(Context::get('act'), 'Admin') > 0)
416
+		if (Context::get('module') == 'admin' || strpos(Context::get('act'), 'Admin') > 0)
417 417
 		{
418
-			if(__DEBUG__ || !__XE_VERSION_STABLE__)
418
+			if (__DEBUG__ || !__XE_VERSION_STABLE__)
419 419
 			{
420 420
 				$oContext->loadFile(array('./modules/admin/tpl/css/admin.css', '', '', 10), true);
421 421
 				$oContext->loadFile(array("./modules/admin/tpl/css/admin_{$lang_type}.css", '', '', 10), true);
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
 		$lang_type = Context::getLangType();
448 448
 
449 449
 		// add common JS/CSS files
450
-		if(__DEBUG__ || !__XE_VERSION_STABLE__)
450
+		if (__DEBUG__ || !__XE_VERSION_STABLE__)
451 451
 		{
452 452
 			$oContext->loadFile(array('./common/js/jquery.js', 'head', '', -110000), true);
453 453
 			$oContext->loadFile(array('./common/js/modernizr.js', 'head', '', -100000), true);
Please login to merge, or discard this patch.
classes/display/XMLDisplayHandler.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,25 +31,25 @@
 block discarded – undo
31 31
 	 */
32 32
 	function _makeXmlDoc($obj)
33 33
 	{
34
-		if(!count($obj))
34
+		if (!count($obj))
35 35
 		{
36 36
 			return;
37 37
 		}
38 38
 
39 39
 		$xmlDoc = '';
40 40
 
41
-		foreach($obj as $key => $val)
41
+		foreach ($obj as $key => $val)
42 42
 		{
43
-			if(is_numeric($key))
43
+			if (is_numeric($key))
44 44
 			{
45 45
 				$key = 'item';
46 46
 			}
47 47
 
48
-			if(is_string($val))
48
+			if (is_string($val))
49 49
 			{
50 50
 				$xmlDoc .= sprintf('<%s><![CDATA[%s]]></%s>%s', $key, $val, $key, "\n");
51 51
 			}
52
-			else if(!is_array($val) && !is_object($val))
52
+			else if (!is_array($val) && !is_object($val))
53 53
 			{
54 54
 				$xmlDoc .= sprintf('<%s>%s</%s>%s', $key, $val, $key, "\n");
55 55
 			}
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,12 +48,10 @@
 block discarded – undo
48 48
 			if(is_string($val))
49 49
 			{
50 50
 				$xmlDoc .= sprintf('<%s><![CDATA[%s]]></%s>%s', $key, $val, $key, "\n");
51
-			}
52
-			else if(!is_array($val) && !is_object($val))
51
+			} else if(!is_array($val) && !is_object($val))
53 52
 			{
54 53
 				$xmlDoc .= sprintf('<%s>%s</%s>%s', $key, $val, $key, "\n");
55
-			}
56
-			else
54
+			} else
57 55
 			{
58 56
 				$xmlDoc .= sprintf('<%s>%s%s</%s>%s', $key, "\n", $this->_makeXmlDoc($val), $key, "\n");
59 57
 			}
Please login to merge, or discard this patch.
classes/editor/EditorHandler.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,12 +20,12 @@
 block discarded – undo
20 20
 	{
21 21
 		Context::set('component_info', $info);
22 22
 
23
-		if(!$info->extra_vars)
23
+		if (!$info->extra_vars)
24 24
 		{
25 25
 			return;
26 26
 		}
27 27
 
28
-		foreach($info->extra_vars as $key => $val)
28
+		foreach ($info->extra_vars as $key => $val)
29 29
 		{
30 30
 			$this->{$key} = trim($val->value);
31 31
 		}
Please login to merge, or discard this patch.
classes/extravar/Extravar.class.php 2 patches
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -215,12 +215,10 @@  discard block
 block discarded – undo
215 215
 				if(is_array($value))
216 216
 				{
217 217
 					$values = $value;
218
-				}
219
-				elseif(strpos($value, '|@|') !== FALSE)
218
+				} elseif(strpos($value, '|@|') !== FALSE)
220 219
 				{
221 220
 					$values = explode('|@|', $value);
222
-				}
223
-				elseif(strpos($value, ',') !== FALSE)
221
+				} elseif(strpos($value, ',') !== FALSE)
224 222
 				{
225 223
 					$values = explode(',', $value);
226 224
 				}
@@ -238,16 +236,13 @@  discard block
 block discarded – undo
238 236
 				if(is_array($value))
239 237
 				{
240 238
 					$values = $value;
241
-				}
242
-				elseif(strpos($value, '|@|') !== FALSE)
239
+				} elseif(strpos($value, '|@|') !== FALSE)
243 240
 				{
244 241
 					$values = explode('|@|', $value);
245
-				}
246
-				elseif(strpos($value, ',') !== FALSE)
242
+				} elseif(strpos($value, ',') !== FALSE)
247 243
 				{
248 244
 					$values = explode(',', $value);
249
-				}
250
-				else
245
+				} else
251 246
 				{
252 247
 					$values = array($value);
253 248
 				}
@@ -263,12 +258,10 @@  discard block
 block discarded – undo
263 258
 				if(is_array($value))
264 259
 				{
265 260
 					$values = $value;
266
-				}
267
-				elseif(strpos($value, '|@|') !== false)
261
+				} elseif(strpos($value, '|@|') !== false)
268 262
 				{
269 263
 					$values = explode('|@|', $value);
270
-				}
271
-				else
264
+				} else
272 265
 				{
273 266
 					$values = array($value);
274 267
 				}
Please login to merge, or discard this patch.
Spacing   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -51,12 +51,12 @@  discard block
 block discarded – undo
51 51
 	 */
52 52
 	function setExtraVarKeys($extra_keys)
53 53
 	{
54
-		if(!is_array($extra_keys) || count($extra_keys) < 1)
54
+		if (!is_array($extra_keys) || count($extra_keys) < 1)
55 55
 		{
56 56
 			return;
57 57
 		}
58 58
 
59
-		foreach($extra_keys as $val)
59
+		foreach ($extra_keys as $val)
60 60
 		{
61 61
 			$obj = new ExtraItem($val->module_srl, $val->idx, $val->name, $val->type, $val->default, $val->desc, $val->is_required, $val->search, $val->value, $val->eid);
62 62
 			$this->keys[$val->idx] = $obj;
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 	 */
160 160
 	function ExtraItem($module_srl, $idx, $name, $type = 'text', $default = null, $desc = '', $is_required = 'N', $search = 'N', $value = null, $eid = '')
161 161
 	{
162
-		if(!$idx)
162
+		if (!$idx)
163 163
 		{
164 164
 			return;
165 165
 		}
@@ -197,36 +197,36 @@  discard block
 block discarded – undo
197 197
 	function _getTypeValue($type, $value)
198 198
 	{
199 199
 		$value = trim($value);
200
-		if(!isset($value))
200
+		if (!isset($value))
201 201
 		{
202 202
 			return;
203 203
 		}
204 204
 
205
-		switch($type)
205
+		switch ($type)
206 206
 		{
207 207
 			case 'homepage' :
208
-				if($value && !preg_match('/^([a-z]+):\/\//i', $value))
208
+				if ($value && !preg_match('/^([a-z]+):\/\//i', $value))
209 209
 				{
210
-					$value = 'http://' . $value;
210
+					$value = 'http://'.$value;
211 211
 				}
212 212
 				return htmlspecialchars($value, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
213 213
 
214 214
 			case 'tel' :
215
-				if(is_array($value))
215
+				if (is_array($value))
216 216
 				{
217 217
 					$values = $value;
218 218
 				}
219
-				elseif(strpos($value, '|@|') !== FALSE)
219
+				elseif (strpos($value, '|@|') !== FALSE)
220 220
 				{
221 221
 					$values = explode('|@|', $value);
222 222
 				}
223
-				elseif(strpos($value, ',') !== FALSE)
223
+				elseif (strpos($value, ',') !== FALSE)
224 224
 				{
225 225
 					$values = explode(',', $value);
226 226
 				}
227 227
 
228 228
 				$values = array_values($values);
229
-				for($i = 0, $c = count($values); $i < $c; $i++)
229
+				for ($i = 0, $c = count($values); $i < $c; $i++)
230 230
 				{
231 231
 					$values[$i] = trim(htmlspecialchars($values[$i], ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
232 232
 				}
@@ -235,15 +235,15 @@  discard block
 block discarded – undo
235 235
 			case 'checkbox' :
236 236
 			case 'radio' :
237 237
 			case 'select' :
238
-				if(is_array($value))
238
+				if (is_array($value))
239 239
 				{
240 240
 					$values = $value;
241 241
 				}
242
-				elseif(strpos($value, '|@|') !== FALSE)
242
+				elseif (strpos($value, '|@|') !== FALSE)
243 243
 				{
244 244
 					$values = explode('|@|', $value);
245 245
 				}
246
-				elseif(strpos($value, ',') !== FALSE)
246
+				elseif (strpos($value, ',') !== FALSE)
247 247
 				{
248 248
 					$values = explode(',', $value);
249 249
 				}
@@ -253,18 +253,18 @@  discard block
 block discarded – undo
253 253
 				}
254 254
 
255 255
 				$values = array_values($values);
256
-				for($i = 0, $c = count($values); $i < $c; $i++)
256
+				for ($i = 0, $c = count($values); $i < $c; $i++)
257 257
 				{
258 258
 					$values[$i] = trim(htmlspecialchars($values[$i], ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
259 259
 				}
260 260
 				return $values;
261 261
 
262 262
 			case 'kr_zip' :
263
-				if(is_array($value))
263
+				if (is_array($value))
264 264
 				{
265 265
 					$values = $value;
266 266
 				}
267
-				elseif(strpos($value, '|@|') !== false)
267
+				elseif (strpos($value, '|@|') !== false)
268 268
 				{
269 269
 					$values = explode('|@|', $value);
270 270
 				}
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 				}
275 275
 
276 276
 				$values = array_values($values);
277
-				for($i = 0, $c = count($values); $i < $c; $i++)
277
+				for ($i = 0, $c = count($values); $i < $c; $i++)
278 278
 				{
279 279
 					$values[$i] = trim(htmlspecialchars($values[$i], ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
280 280
 				}
@@ -308,10 +308,10 @@  discard block
 block discarded – undo
308 308
 	{
309 309
 		$value = $this->_getTypeValue($this->type, $this->value);
310 310
 
311
-		switch($this->type)
311
+		switch ($this->type)
312 312
 		{
313 313
 			case 'homepage' :
314
-				return ($value) ? (sprintf('<a href="%s" target="_blank">%s</a>', $value, strlen($value) > 60 ? substr($value, 0, 40) . '...' . substr($value, -10) : $value)) : "";
314
+				return ($value) ? (sprintf('<a href="%s" target="_blank">%s</a>', $value, strlen($value) > 60 ? substr($value, 0, 40).'...'.substr($value, -10) : $value)) : "";
315 315
 
316 316
 			case 'email_address' :
317 317
 				return ($value) ? sprintf('<a href="mailto:%s">%s</a>', $value, $value) : "";
@@ -328,14 +328,14 @@  discard block
 block discarded – undo
328 328
 			case 'checkbox' :
329 329
 			case 'select' :
330 330
 			case 'radio' :
331
-				if(is_array($value))
331
+				if (is_array($value))
332 332
 				{
333 333
 					return implode(',', $value);
334 334
 				}
335 335
 				return $value;
336 336
 
337 337
 			case 'kr_zip' :
338
-				if(is_array($value))
338
+				if (is_array($value))
339 339
 				{
340 340
 					return implode(' ', $value);
341 341
 				}
@@ -360,77 +360,77 @@  discard block
 block discarded – undo
360 360
 		$name = $this->name;
361 361
 		$value = $this->_getTypeValue($this->type, $this->value);
362 362
 		$default = $this->_getTypeValue($this->type, $this->default);
363
-		$column_name = 'extra_vars' . $this->idx;
364
-		$tmp_id = $column_name . '-' . $id_num++;
363
+		$column_name = 'extra_vars'.$this->idx;
364
+		$tmp_id = $column_name.'-'.$id_num++;
365 365
 
366 366
 		$buff = array();
367
-		switch($type)
367
+		switch ($type)
368 368
 		{
369 369
 			// Homepage
370 370
 			case 'homepage' :
371
-				$buff[] = '<input type="text" name="' . $column_name . '" value="' . $value . '" class="homepage" />';
371
+				$buff[] = '<input type="text" name="'.$column_name.'" value="'.$value.'" class="homepage" />';
372 372
 				break;
373 373
 			// Email Address
374 374
 			case 'email_address' :
375
-				$buff[] = '<input type="text" name="' . $column_name . '" value="' . $value . '" class="email_address" />';
375
+				$buff[] = '<input type="text" name="'.$column_name.'" value="'.$value.'" class="email_address" />';
376 376
 				break;
377 377
 			// Phone Number
378 378
 			case 'tel' :
379
-				$buff[] = '<input type="text" name="' . $column_name . '[]" value="' . $value[0] . '" size="4" maxlength="4" class="tel" />';
380
-				$buff[] = '<input type="text" name="' . $column_name . '[]" value="' . $value[1] . '" size="4" maxlength="4" class="tel" />';
381
-				$buff[] = '<input type="text" name="' . $column_name . '[]" value="' . $value[2] . '" size="4" maxlength="4" class="tel" />';
379
+				$buff[] = '<input type="text" name="'.$column_name.'[]" value="'.$value[0].'" size="4" maxlength="4" class="tel" />';
380
+				$buff[] = '<input type="text" name="'.$column_name.'[]" value="'.$value[1].'" size="4" maxlength="4" class="tel" />';
381
+				$buff[] = '<input type="text" name="'.$column_name.'[]" value="'.$value[2].'" size="4" maxlength="4" class="tel" />';
382 382
 				break;
383 383
 			// textarea
384 384
 			case 'textarea' :
385
-				$buff[] = '<textarea name="' . $column_name . '" rows="8" cols="42">' . $value . '</textarea>';
385
+				$buff[] = '<textarea name="'.$column_name.'" rows="8" cols="42">'.$value.'</textarea>';
386 386
 				break;
387 387
 			// multiple choice
388 388
 			case 'checkbox' :
389 389
 				$buff[] = '<ul>';
390
-				foreach($default as $v)
390
+				foreach ($default as $v)
391 391
 				{
392 392
 					$checked = '';
393
-					if($value && in_array(trim($v), $value))
393
+					if ($value && in_array(trim($v), $value))
394 394
 					{
395 395
 						$checked = ' checked="checked"';
396 396
 					}
397 397
 
398 398
 					// Temporary ID for labeling
399
-					$tmp_id = $column_name . '-' . $id_num++;
399
+					$tmp_id = $column_name.'-'.$id_num++;
400 400
 
401
-					$buff[] ='  <li><input type="checkbox" name="' . $column_name . '[]" id="' . $tmp_id . '" value="' . htmlspecialchars($v, ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '" ' . $checked . ' /><label for="' . $tmp_id . '">' . $v . '</label></li>';
401
+					$buff[] = '  <li><input type="checkbox" name="'.$column_name.'[]" id="'.$tmp_id.'" value="'.htmlspecialchars($v, ENT_COMPAT | ENT_HTML401, 'UTF-8', false).'" '.$checked.' /><label for="'.$tmp_id.'">'.$v.'</label></li>';
402 402
 				}
403 403
 				$buff[] = '</ul>';
404 404
 				break;
405 405
 			// single choice
406 406
 			case 'select' :
407
-				$buff[] = '<select name="' . $column_name . '" class="select">';
408
-				foreach($default as $v)
407
+				$buff[] = '<select name="'.$column_name.'" class="select">';
408
+				foreach ($default as $v)
409 409
 				{
410 410
 					$selected = '';
411
-					if($value && in_array(trim($v), $value))
411
+					if ($value && in_array(trim($v), $value))
412 412
 					{
413 413
 						$selected = ' selected="selected"';
414 414
 					}
415
-					$buff[] = '  <option value="' . $v . '" ' . $selected . '>' . $v . '</option>';
415
+					$buff[] = '  <option value="'.$v.'" '.$selected.'>'.$v.'</option>';
416 416
 				}
417 417
 				$buff[] = '</select>';
418 418
 				break;
419 419
 			// radio
420 420
 			case 'radio' :
421 421
 				$buff[] = '<ul>';
422
-				foreach($default as $v)
422
+				foreach ($default as $v)
423 423
 				{
424 424
 					$checked = '';
425
-					if($value && in_array(trim($v), $value))
425
+					if ($value && in_array(trim($v), $value))
426 426
 					{
427 427
 						$checked = ' checked="checked"';
428 428
 					}
429 429
 
430 430
 					// Temporary ID for labeling
431
-					$tmp_id = $column_name . '-' . $id_num++;
431
+					$tmp_id = $column_name.'-'.$id_num++;
432 432
 
433
-					$buff[] = '<li><input type="radio" name="' . $column_name . '" id="' . $tmp_id . '" ' . $checked . ' value="' . $v . '"  class="radio" /><label for="' . $tmp_id . '">' . $v . '</label></li>';
433
+					$buff[] = '<li><input type="radio" name="'.$column_name.'" id="'.$tmp_id.'" '.$checked.' value="'.$v.'"  class="radio" /><label for="'.$tmp_id.'">'.$v.'</label></li>';
434 434
 				}
435 435
 				$buff[] = '</ul>';
436 436
 				break;
@@ -439,43 +439,43 @@  discard block
 block discarded – undo
439 439
 				// datepicker javascript plugin load
440 440
 				Context::loadJavascriptPlugin('ui.datepicker');
441 441
 
442
-				$buff[] = '<input type="hidden" name="' . $column_name . '" value="' . $value . '" />'; 
443
-				$buff[] =	'<input type="text" id="date_' . $column_name . '" value="' . zdate($value, 'Y-m-d') . '" class="date" />';
444
-				$buff[] =	'<input type="button" value="' . Context::getLang('cmd_delete') . '" class="btn" id="dateRemover_' . $column_name . '" />';
445
-				$buff[] =	'<script type="text/javascript">';
442
+				$buff[] = '<input type="hidden" name="'.$column_name.'" value="'.$value.'" />'; 
443
+				$buff[] = '<input type="text" id="date_'.$column_name.'" value="'.zdate($value, 'Y-m-d').'" class="date" />';
444
+				$buff[] = '<input type="button" value="'.Context::getLang('cmd_delete').'" class="btn" id="dateRemover_'.$column_name.'" />';
445
+				$buff[] = '<script type="text/javascript">';
446 446
 				$buff[] = '//<![CDATA[';
447
-				$buff[] =	'(function($){';
448
-				$buff[] =	'$(function(){';
449
-				$buff[] =	'  var option = { dateFormat: "yy-mm-dd", changeMonth:true, changeYear:true, gotoCurrent:false, yearRange:\'-100:+10\', onSelect:function(){';
450
-				$buff[] =	'    $(this).prev(\'input[type="hidden"]\').val(this.value.replace(/-/g,""))}';
451
-				$buff[] =	'  };';
452
-				$buff[] =	'  $.extend(option,$.datepicker.regional[\'' . Context::getLangType() . '\']);';
453
-				$buff[] =	'  $("#date_' . $column_name . '").datepicker(option);';
454
-				$buff[] =	'  $("#dateRemover_' . $column_name . '").click(function(){';
455
-				$buff[] =	'    $(this).siblings("input").val("");';
456
-				$buff[] =	'    return false;';
457
-				$buff[] =	'  })';
458
-				$buff[] =	'});';
459
-				$buff[] =	'})(jQuery);';
447
+				$buff[] = '(function($){';
448
+				$buff[] = '$(function(){';
449
+				$buff[] = '  var option = { dateFormat: "yy-mm-dd", changeMonth:true, changeYear:true, gotoCurrent:false, yearRange:\'-100:+10\', onSelect:function(){';
450
+				$buff[] = '    $(this).prev(\'input[type="hidden"]\').val(this.value.replace(/-/g,""))}';
451
+				$buff[] = '  };';
452
+				$buff[] = '  $.extend(option,$.datepicker.regional[\''.Context::getLangType().'\']);';
453
+				$buff[] = '  $("#date_'.$column_name.'").datepicker(option);';
454
+				$buff[] = '  $("#dateRemover_'.$column_name.'").click(function(){';
455
+				$buff[] = '    $(this).siblings("input").val("");';
456
+				$buff[] = '    return false;';
457
+				$buff[] = '  })';
458
+				$buff[] = '});';
459
+				$buff[] = '})(jQuery);';
460 460
 				$buff[] = '//]]>';
461 461
 				$buff[] = '</script>';
462 462
 				break;
463 463
 			// address
464 464
 			case "kr_zip" :
465
-				if(($oKrzipModel = getModel('krzip')) && method_exists($oKrzipModel , 'getKrzipCodeSearchHtml' ))
465
+				if (($oKrzipModel = getModel('krzip')) && method_exists($oKrzipModel, 'getKrzipCodeSearchHtml'))
466 466
 				{
467
-					$buff[] =  $oKrzipModel->getKrzipCodeSearchHtml($column_name, $value);
467
+					$buff[] = $oKrzipModel->getKrzipCodeSearchHtml($column_name, $value);
468 468
 				}
469 469
 				break;
470 470
 			// General text
471 471
 			default :
472
-				$buff[] =' <input type="text" name="' . $column_name . '" value="' . ($value ? $value : $default) . '" class="text" />';
472
+				$buff[] = ' <input type="text" name="'.$column_name.'" value="'.($value ? $value : $default).'" class="text" />';
473 473
 		}
474
-		if($this->desc)
474
+		if ($this->desc)
475 475
 		{
476 476
 			$oModuleController = getController('module');
477 477
 			$oModuleController->replaceDefinedLangCode($this->desc);
478
-			$buff[] = '<p>' . htmlspecialchars($this->desc, ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '</p>';
478
+			$buff[] = '<p>'.htmlspecialchars($this->desc, ENT_COMPAT | ENT_HTML401, 'UTF-8', false).'</p>';
479 479
 		}
480 480
 		
481 481
 		return join(PHP_EOL, $buff);
Please login to merge, or discard this patch.
classes/file/FileObject.class.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	 */
37 37
 	function FileObject($path, $mode)
38 38
 	{
39
-		if($path != NULL)
39
+		if ($path != NULL)
40 40
 		{
41 41
 			$this->Open($path, $mode);
42 42
 		}
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	function append($file_name)
52 52
 	{
53 53
 		$target = new FileObject($file_name, "r");
54
-		while(!$target->feof())
54
+		while (!$target->feof())
55 55
 		{
56 56
 			$readstr = $target->read();
57 57
 			$this->write($readstr);
@@ -89,11 +89,11 @@  discard block
 block discarded – undo
89 89
 	function write($str)
90 90
 	{
91 91
 		$len = strlen($str);
92
-		if(!$str || $len <= 0)
92
+		if (!$str || $len <= 0)
93 93
 		{
94 94
 			return FALSE;
95 95
 		}
96
-		if(!$this->fp)
96
+		if (!$this->fp)
97 97
 		{
98 98
 			return FALSE;
99 99
 		}
@@ -112,12 +112,12 @@  discard block
 block discarded – undo
112 112
 	 */
113 113
 	function open($path, $mode)
114 114
 	{
115
-		if($this->fp != NULL)
115
+		if ($this->fp != NULL)
116 116
 		{
117 117
 			$this->close();
118 118
 		}
119 119
 		$this->fp = fopen($path, $mode);
120
-		if(!is_resource($this->fp))
120
+		if (!is_resource($this->fp))
121 121
 		{
122 122
 			$this->fp = NULL;
123 123
 			return FALSE;
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 */
134 134
 	function getPath()
135 135
 	{
136
-		if($this->fp != NULL)
136
+		if ($this->fp != NULL)
137 137
 		{
138 138
 			return $this->path;
139 139
 		}
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 	 */
151 151
 	function close()
152 152
 	{
153
-		if($this->fp != NULL)
153
+		if ($this->fp != NULL)
154 154
 		{
155 155
 			fclose($this->fp);
156 156
 			$this->fp = NULL;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,7 @@
 block discarded – undo
21 21
 		if($absolute_url)
22 22
 		{
23 23
 			return getFullUrl('','vid',$vid, 'mid',$mid, 'act',$format);
24
-		}
25
-		else
24
+		} else
26 25
 		{
27 26
 			return getUrl('','vid',$vid, 'mid',$mid, 'act',$format);
28 27
 		}
Please login to merge, or discard this patch.
classes/mail/Mail.class.php 3 patches
Braces   +12 added lines, -24 removed lines patch added patch discarded remove patch
@@ -151,8 +151,7 @@  discard block
 block discarded – undo
151 151
 		if($this->isVaildMailAddress($account_name))
152 152
 		{
153 153
 			$this->Username = $account_name;
154
-		}
155
-		else
154
+		} else
156 155
 		{
157 156
 			$this->Username = $account_name . '@gmail.com';
158 157
 		}
@@ -190,8 +189,7 @@  discard block
 block discarded – undo
190 189
 			$this->IsSMTP();
191 190
 			$this->AltBody = "To view the message, please use an HTML compatible email viewer!";
192 191
 			return TRUE;
193
-		}
194
-		else
192
+		} else
195 193
 		{
196 194
 			$this->IsMail();
197 195
 			return FALSE;
@@ -246,8 +244,7 @@  discard block
 block discarded – undo
246 244
 		{
247 245
 			$this->sender_name = $name;
248 246
 			$this->sender_email = $email;
249
-		}
250
-		else
247
+		} else
251 248
 		{
252 249
 			$this->SetFrom($email, $name);
253 250
 		}
@@ -280,8 +277,7 @@  discard block
 block discarded – undo
280 277
 		{
281 278
 			$this->receiptor_name = $name;
282 279
 			$this->receiptor_email = $email;
283
-		}
284
-		else
280
+		} else
285 281
 		{
286 282
 			$this->AddAddress($email, $name);
287 283
 		}
@@ -312,8 +308,7 @@  discard block
 block discarded – undo
312 308
 		if($this->Mailer == "mail")
313 309
 		{
314 310
 			$this->title = $title;
315
-		}
316
-		else
311
+		} else
317 312
 		{
318 313
 			$this->Subject = $title;
319 314
 		}
@@ -340,8 +335,7 @@  discard block
 block discarded – undo
340 335
 		if($this->Mailer == "mail")
341 336
 		{
342 337
 			$this->bcc = $bcc;
343
-		}
344
-		else
338
+		} else
345 339
 		{
346 340
 			$this->AddBCC($bcc);
347 341
 		}
@@ -380,8 +374,7 @@  discard block
 block discarded – undo
380 374
 		if($this->Mailer == "mail")
381 375
 		{
382 376
 			$this->replyTo = $replyTo;
383
-		}
384
-		else
377
+		} else
385 378
 		{
386 379
 			$this->AddReplyTo($replyTo);
387 380
 		}
@@ -399,8 +392,7 @@  discard block
 block discarded – undo
399 392
 		if($this->Mailer == "mail")
400 393
 		{
401 394
 			$this->content = $content;
402
-		}
403
-		else
395
+		} else
404 396
 		{
405 397
 			$this->MsgHTML($content);
406 398
 		}
@@ -486,8 +478,7 @@  discard block
 block discarded – undo
486 478
 				$this->body = implode("", $res);
487 479
 				$this->body .= "--" . $boundary . "--";
488 480
 			}
489
-		}
490
-		else
481
+		} else
491 482
 		{
492 483
 			if(count($this->attachments) > 0)
493 484
 			{
@@ -578,8 +569,7 @@  discard block
 block discarded – undo
578 569
 				return mail($this->getReceiptor(), $this->getTitle(), $this->body, $headers, $this->additional_params);
579 570
 			}
580 571
 			return mail($this->getReceiptor(), $this->getTitle(), $this->body, $headers);
581
-		}
582
-		else
572
+		} else
583 573
 		{
584 574
 			$this->procAttachments();
585 575
 			return parent::Send();
@@ -604,8 +594,7 @@  discard block
 block discarded – undo
604 594
 			if(checkdnsrr($host, "MX") || checkdnsrr($host, "A"))
605 595
 			{
606 596
 				return TRUE;
607
-			}
608
-			else
597
+			} else
609 598
 			{
610 599
 				return FALSE;
611 600
 			}
@@ -624,8 +613,7 @@  discard block
 block discarded – undo
624 613
 		if(preg_match("/([a-z0-9\_\-\.]+)@([a-z0-9\_\-\.]+)/i", $email_address))
625 614
 		{
626 615
 			return $email_address;
627
-		}
628
-		else
616
+		} else
629 617
 		{
630 618
 			return '';
631 619
 		}
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 
26 26
 	/**
27 27
 	 * constructor
28
-	 * @return void
28
+	 * @return string
29 29
 	 */
30 30
 	public function __construct()
31 31
 	{
Please login to merge, or discard this patch.
Spacing   +79 added lines, -79 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /* Copyright (C) NAVER <http://www.navercorp.com> */
3 3
 
4
-require_once _XE_PATH_ . "libs/phpmailer/phpmailer.php";
4
+require_once _XE_PATH_."libs/phpmailer/phpmailer.php";
5 5
 
6 6
 /**
7 7
  * Mailing class for XpressEngine
@@ -148,13 +148,13 @@  discard block
 block discarded – undo
148 148
 		$this->SMTPSecure = "tls";
149 149
 		$this->Host = 'smtp.gmail.com';
150 150
 		$this->Port = '587';
151
-		if($this->isVaildMailAddress($account_name))
151
+		if ($this->isVaildMailAddress($account_name))
152 152
 		{
153 153
 			$this->Username = $account_name;
154 154
 		}
155 155
 		else
156 156
 		{
157
-			$this->Username = $account_name . '@gmail.com';
157
+			$this->Username = $account_name.'@gmail.com';
158 158
 		}
159 159
 		$this->Password = $account_passwd;
160 160
 		$this->IsSMTP();
@@ -180,12 +180,12 @@  discard block
 block discarded – undo
180 180
 		$this->Password = $pass;
181 181
 		$this->Port = $port;
182 182
 
183
-		if($secure == 'ssl' || $secure == 'tls')
183
+		if ($secure == 'ssl' || $secure == 'tls')
184 184
 		{
185 185
 			$this->SMTPSecure = $secure;
186 186
 		}
187 187
 
188
-		if(($this->SMTPAuth !== NULL && $this->Host !== NULL && $this->Username !== NULL && $this->Password !== NULL) || ($this->SMTPAuth === NULL && $this->Host !== NULL))
188
+		if (($this->SMTPAuth !== NULL && $this->Host !== NULL && $this->Username !== NULL && $this->Password !== NULL) || ($this->SMTPAuth === NULL && $this->Host !== NULL))
189 189
 		{
190 190
 			$this->IsSMTP();
191 191
 			$this->AltBody = "To view the message, please use an HTML compatible email viewer!";
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
 	 */
243 243
 	function setSender($name, $email)
244 244
 	{
245
-		if($this->Mailer == "mail")
245
+		if ($this->Mailer == "mail")
246 246
 		{
247 247
 			$this->sender_name = $name;
248 248
 			$this->sender_email = $email;
@@ -260,9 +260,9 @@  discard block
 block discarded – undo
260 260
 	 */
261 261
 	function getSender()
262 262
 	{
263
-		if(!stristr(PHP_OS, 'win') && $this->sender_name)
263
+		if (!stristr(PHP_OS, 'win') && $this->sender_name)
264 264
 		{
265
-			return sprintf("%s <%s>", '=?utf-8?b?' . base64_encode($this->sender_name) . '?=', $this->sender_email);
265
+			return sprintf("%s <%s>", '=?utf-8?b?'.base64_encode($this->sender_name).'?=', $this->sender_email);
266 266
 		}
267 267
 		return $this->sender_email;
268 268
 	}
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
 	 */
277 277
 	function setReceiptor($name, $email)
278 278
 	{
279
-		if($this->Mailer == "mail")
279
+		if ($this->Mailer == "mail")
280 280
 		{
281 281
 			$this->receiptor_name = $name;
282 282
 			$this->receiptor_email = $email;
@@ -294,9 +294,9 @@  discard block
 block discarded – undo
294 294
 	 */
295 295
 	function getReceiptor()
296 296
 	{
297
-		if(!stristr(PHP_OS, 'win') && $this->receiptor_name && $this->receiptor_name != $this->receiptor_email)
297
+		if (!stristr(PHP_OS, 'win') && $this->receiptor_name && $this->receiptor_name != $this->receiptor_email)
298 298
 		{
299
-			return sprintf("%s <%s>", '=?utf-8?b?' . base64_encode($this->receiptor_name) . '?=', $this->receiptor_email);
299
+			return sprintf("%s <%s>", '=?utf-8?b?'.base64_encode($this->receiptor_name).'?=', $this->receiptor_email);
300 300
 		}
301 301
 		return $this->receiptor_email;
302 302
 	}
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
 	 */
310 310
 	function setTitle($title)
311 311
 	{
312
-		if($this->Mailer == "mail")
312
+		if ($this->Mailer == "mail")
313 313
 		{
314 314
 			$this->title = $title;
315 315
 		}
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
 	 */
327 327
 	function getTitle()
328 328
 	{
329
-		return '=?utf-8?b?' . base64_encode($this->title) . '?=';
329
+		return '=?utf-8?b?'.base64_encode($this->title).'?=';
330 330
 	}
331 331
 
332 332
 	/**
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
 	 */
338 338
 	function setBCC($bcc)
339 339
 	{
340
-		if($this->Mailer == "mail")
340
+		if ($this->Mailer == "mail")
341 341
 		{
342 342
 			$this->bcc = $bcc;
343 343
 		}
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 	 */
378 378
 	function setReplyTo($replyTo)
379 379
 	{
380
-		if($this->Mailer == "mail")
380
+		if ($this->Mailer == "mail")
381 381
 		{
382 382
 			$this->replyTo = $replyTo;
383 383
 		}
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
 	function setContent($content)
397 397
 	{
398 398
 		$content = preg_replace_callback('/<img([^>]+)>/i', array($this, 'replaceResourceRealPath'), $content);
399
-		if($this->Mailer == "mail")
399
+		if ($this->Mailer == "mail")
400 400
 		{
401 401
 			$this->content = $content;
402 402
 		}
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
 	 */
416 416
 	function replaceResourceRealPath($matches)
417 417
 	{
418
-		return preg_replace('/src=(["\']?)files/i', 'src=$1' . Context::getRequestUri() . 'files', $matches[0]);
418
+		return preg_replace('/src=(["\']?)files/i', 'src=$1'.Context::getRequestUri().'files', $matches[0]);
419 419
 	}
420 420
 
421 421
 	/**
@@ -456,42 +456,42 @@  discard block
 block discarded – undo
456 456
 	 */
457 457
 	function procAttachments()
458 458
 	{
459
-		if($this->Mailer == "mail")
459
+		if ($this->Mailer == "mail")
460 460
 		{
461
-			if(count($this->attachments) > 0)
461
+			if (count($this->attachments) > 0)
462 462
 			{
463
-				$this->body = $this->header . $this->body;
464
-				$boundary = '----==' . uniqid(rand(), TRUE);
465
-				$this->header = "Content-Type: multipart/mixed;" . $this->eol . "\tboundary=\"" . $boundary . "\"" . $this->eol . $this->eol;
466
-				$this->body = "--" . $boundary . $this->eol . $this->body . $this->eol . $this->eol;
463
+				$this->body = $this->header.$this->body;
464
+				$boundary = '----=='.uniqid(rand(), TRUE);
465
+				$this->header = "Content-Type: multipart/mixed;".$this->eol."\tboundary=\"".$boundary."\"".$this->eol.$this->eol;
466
+				$this->body = "--".$boundary.$this->eol.$this->body.$this->eol.$this->eol;
467 467
 				$res = array();
468 468
 				$res[] = $this->body;
469
-				foreach($this->attachments as $filename => $attachment)
469
+				foreach ($this->attachments as $filename => $attachment)
470 470
 				{
471 471
 					$type = $this->returnMIMEType($filename);
472 472
 					$file_handler = new FileHandler();
473 473
 					$file_str = $file_handler->readFile($attachment);
474 474
 					$chunks = chunk_split(base64_encode($file_str));
475 475
 					$tempBody = sprintf(
476
-							"--" . $boundary . $this->eol .
477
-							"Content-Type: %s;" . $this->eol .
478
-							"\tname=\"%s\"" . $this->eol .
479
-							"Content-Transfer-Encoding: base64" . $this->eol .
480
-							"Content-Description: %s" . $this->eol .
481
-							"Content-Disposition: attachment;" . $this->eol .
482
-							"\tfilename=\"%s\"" . $this->eol . $this->eol .
483
-							"%s" . $this->eol . $this->eol, $type, $filename, $filename, $filename, $chunks);
476
+							"--".$boundary.$this->eol.
477
+							"Content-Type: %s;".$this->eol.
478
+							"\tname=\"%s\"".$this->eol.
479
+							"Content-Transfer-Encoding: base64".$this->eol.
480
+							"Content-Description: %s".$this->eol.
481
+							"Content-Disposition: attachment;".$this->eol.
482
+							"\tfilename=\"%s\"".$this->eol.$this->eol.
483
+							"%s".$this->eol.$this->eol, $type, $filename, $filename, $filename, $chunks);
484 484
 					$res[] = $tempBody;
485 485
 				}
486 486
 				$this->body = implode("", $res);
487
-				$this->body .= "--" . $boundary . "--";
487
+				$this->body .= "--".$boundary."--";
488 488
 			}
489 489
 		}
490 490
 		else
491 491
 		{
492
-			if(count($this->attachments) > 0)
492
+			if (count($this->attachments) > 0)
493 493
 			{
494
-				foreach($this->attachments as $filename => $attachment)
494
+				foreach ($this->attachments as $filename => $attachment)
495 495
 				{
496 496
 					parent::AddAttachment($attachment);
497 497
 				}
@@ -506,33 +506,33 @@  discard block
 block discarded – undo
506 506
 	 */
507 507
 	function procCidAttachments()
508 508
 	{
509
-		if(count($this->cidAttachments) > 0)
509
+		if (count($this->cidAttachments) > 0)
510 510
 		{
511
-			$this->body = $this->header . $this->body;
512
-			$boundary = '----==' . uniqid(rand(), TRUE);
513
-			$this->header = "Content-Type: multipart/relative;" . $this->eol . "\ttype=\"multipart/alternative\";" . $this->eol . "\tboundary=\"" . $boundary . "\"" . $this->eol . $this->eol;
514
-			$this->body = "--" . $boundary . $this->eol . $this->body . $this->eol . $this->eol;
511
+			$this->body = $this->header.$this->body;
512
+			$boundary = '----=='.uniqid(rand(), TRUE);
513
+			$this->header = "Content-Type: multipart/relative;".$this->eol."\ttype=\"multipart/alternative\";".$this->eol."\tboundary=\"".$boundary."\"".$this->eol.$this->eol;
514
+			$this->body = "--".$boundary.$this->eol.$this->body.$this->eol.$this->eol;
515 515
 			$res = array();
516 516
 			$res[] = $this->body;
517
-			foreach($this->cidAttachments as $cid => $attachment)
517
+			foreach ($this->cidAttachments as $cid => $attachment)
518 518
 			{
519 519
 				$filename = basename($attachment);
520 520
 				$type = $this->returnMIMEType(FileHandler::getRealPath($attachment));
521 521
 				$file_str = FileHandler::readFile($attachment);
522 522
 				$chunks = chunk_split(base64_encode($file_str));
523 523
 				$tempBody = sprintf(
524
-						"--" . $boundary . $this->eol .
525
-						"Content-Type: %s;" . $this->eol .
526
-						"\tname=\"%s\"" . $this->eol .
527
-						"Content-Transfer-Encoding: base64" . $this->eol .
528
-						"Content-ID: <%s>" . $this->eol .
529
-						"Content-Description: %s" . $this->eol .
530
-						"Content-Location: %s" . $this->eol . $this->eol .
531
-						"%s" . $this->eol . $this->eol, $type, $filename, $cid, $filename, $filename, $chunks);
524
+						"--".$boundary.$this->eol.
525
+						"Content-Type: %s;".$this->eol.
526
+						"\tname=\"%s\"".$this->eol.
527
+						"Content-Transfer-Encoding: base64".$this->eol.
528
+						"Content-ID: <%s>".$this->eol.
529
+						"Content-Description: %s".$this->eol.
530
+						"Content-Location: %s".$this->eol.$this->eol.
531
+						"%s".$this->eol.$this->eol, $type, $filename, $cid, $filename, $filename, $chunks);
532 532
 				$res[] = $tempBody;
533 533
 			}
534 534
 			$this->body = implode("", $res);
535
-			$this->body .= "--" . $boundary . "--";
535
+			$this->body .= "--".$boundary."--";
536 536
 		}
537 537
 	}
538 538
 
@@ -543,37 +543,37 @@  discard block
 block discarded – undo
543 543
 	 */
544 544
 	function send()
545 545
 	{
546
-		if($this->Mailer == "mail")
546
+		if ($this->Mailer == "mail")
547 547
 		{
548
-			$boundary = '----==' . uniqid(rand(), TRUE);
548
+			$boundary = '----=='.uniqid(rand(), TRUE);
549 549
 			$this->eol = $GLOBALS['_qmail_compatibility'] == "Y" ? "\n" : "\r\n";
550
-			$this->header = "Content-Type: multipart/alternative;" . $this->eol . "\tboundary=\"" . $boundary . "\"" . $this->eol . $this->eol;
550
+			$this->header = "Content-Type: multipart/alternative;".$this->eol."\tboundary=\"".$boundary."\"".$this->eol.$this->eol;
551 551
 			$this->body = sprintf(
552
-					"--%s" . $this->eol .
553
-					"Content-Type: text/plain; charset=utf-8; format=flowed" . $this->eol .
554
-					"Content-Transfer-Encoding: base64" . $this->eol .
555
-					"Content-Disposition: inline" . $this->eol . $this->eol .
556
-					"%s" .
557
-					"--%s" . $this->eol .
558
-					"Content-Type: text/html; charset=utf-8" . $this->eol .
559
-					"Content-Transfer-Encoding: base64" . $this->eol .
560
-					"Content-Disposition: inline" . $this->eol . $this->eol .
561
-					"%s" .
562
-					"--%s--" .
552
+					"--%s".$this->eol.
553
+					"Content-Type: text/plain; charset=utf-8; format=flowed".$this->eol.
554
+					"Content-Transfer-Encoding: base64".$this->eol.
555
+					"Content-Disposition: inline".$this->eol.$this->eol.
556
+					"%s".
557
+					"--%s".$this->eol.
558
+					"Content-Type: text/html; charset=utf-8".$this->eol.
559
+					"Content-Transfer-Encoding: base64".$this->eol.
560
+					"Content-Disposition: inline".$this->eol.$this->eol.
561
+					"%s".
562
+					"--%s--".
563 563
 					"", $boundary, $this->getPlainContent(), $boundary, $this->getHTMLContent(), $boundary
564 564
 			);
565 565
 			$this->procCidAttachments();
566 566
 			$this->procAttachments();
567 567
 			$headers = sprintf(
568
-					"From: %s" . $this->eol .
569
-					"%s" .
570
-					"%s" .
571
-					"%s" .
572
-					"%s" .
573
-					"MIME-Version: 1.0" . $this->eol . "", $this->getSender(), $this->messageId ? ("Message-ID: <" . $this->messageId . ">" . $this->eol) : "", $this->replyTo ? ("Reply-To: <" . $this->replyTo . ">" . $this->eol) : "", $this->bcc ? ("Bcc: " . $this->bcc . $this->eol) : "", $this->references ? ("References: <" . $this->references . ">" . $this->eol . "In-Reply-To: <" . $this->references . ">" . $this->eol) : ""
568
+					"From: %s".$this->eol.
569
+					"%s".
570
+					"%s".
571
+					"%s".
572
+					"%s".
573
+					"MIME-Version: 1.0".$this->eol."", $this->getSender(), $this->messageId ? ("Message-ID: <".$this->messageId.">".$this->eol) : "", $this->replyTo ? ("Reply-To: <".$this->replyTo.">".$this->eol) : "", $this->bcc ? ("Bcc: ".$this->bcc.$this->eol) : "", $this->references ? ("References: <".$this->references.">".$this->eol."In-Reply-To: <".$this->references.">".$this->eol) : ""
574 574
 			);
575 575
 			$headers .= $this->header;
576
-			if($this->additional_params)
576
+			if ($this->additional_params)
577 577
 			{
578 578
 				return mail($this->getReceiptor(), $this->getTitle(), $this->body, $headers, $this->additional_params);
579 579
 			}
@@ -594,14 +594,14 @@  discard block
 block discarded – undo
594 594
 	 */
595 595
 	function checkMailMX($email_address)
596 596
 	{
597
-		if(!Mail::isVaildMailAddress($email_address))
597
+		if (!Mail::isVaildMailAddress($email_address))
598 598
 		{
599 599
 			return FALSE;
600 600
 		}
601 601
 		list($user, $host) = explode("@", $email_address);
602
-		if(function_exists('checkdnsrr'))
602
+		if (function_exists('checkdnsrr'))
603 603
 		{
604
-			if(checkdnsrr($host, "MX") || checkdnsrr($host, "A"))
604
+			if (checkdnsrr($host, "MX") || checkdnsrr($host, "A"))
605 605
 			{
606 606
 				return TRUE;
607 607
 			}
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
 	 */
622 622
 	function isVaildMailAddress($email_address)
623 623
 	{
624
-		if(preg_match("/([a-z0-9\_\-\.]+)@([a-z0-9\_\-\.]+)/i", $email_address))
624
+		if (preg_match("/([a-z0-9\_\-\.]+)@([a-z0-9\_\-\.]+)/i", $email_address))
625 625
 		{
626 626
 			return $email_address;
627 627
 		}
@@ -640,7 +640,7 @@  discard block
 block discarded – undo
640 640
 	function returnMIMEType($filename)
641 641
 	{
642 642
 		preg_match("|\.([a-z0-9]{2,4})$|i", $filename, $fileSuffix);
643
-		switch(strtolower($fileSuffix[1]))
643
+		switch (strtolower($fileSuffix[1]))
644 644
 		{
645 645
 			case "js" :
646 646
 				return "application/x-javascript";
@@ -654,7 +654,7 @@  discard block
 block discarded – undo
654 654
 			case "gif" :
655 655
 			case "bmp" :
656 656
 			case "tiff" :
657
-				return "image/" . strtolower($fileSuffix[1]);
657
+				return "image/".strtolower($fileSuffix[1]);
658 658
 			case "css" :
659 659
 				return "text/css";
660 660
 			case "xml" :
@@ -708,11 +708,11 @@  discard block
 block discarded – undo
708 708
 			case "swf" :
709 709
 				return "application/x-shockwave-flash";
710 710
 			default :
711
-				if(function_exists("mime_content_type"))
711
+				if (function_exists("mime_content_type"))
712 712
 				{
713 713
 					$fileSuffix = mime_content_type($filename);
714 714
 				}
715
-				return "unknown/" . trim($fileSuffix[0], ".");
715
+				return "unknown/".trim($fileSuffix[0], ".");
716 716
 		}
717 717
 	}
718 718
 
Please login to merge, or discard this patch.