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
Push — develop ( 594959...601687 )
by gyeong-won
08:31
created
classes/frontendfile/FrontEndFileHandler.class.php 4 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -394,7 +394,7 @@
 block discarded – undo
394 394
 	 * Arrage css index
395 395
 	 *
396 396
 	 * @param string $dirName First directory  name of css path
397
-	 * @param array $file file info.
397
+	 * @param stdClass $file file info.
398 398
 	 * @return void
399 399
 	 */
400 400
 	function _arrangeCssIndex($dirName, &$file)
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 	 * Check SSL
51 51
 	 *
52 52
 	 * @return bool If using ssl returns true, otherwise returns false.
53
-     * @deprecated
53
+	 * @deprecated
54 54
 	 */
55 55
 	function isSsl()
56 56
 	{
Please login to merge, or discard this patch.
Braces   +15 added lines, -20 removed lines patch added patch discarded remove patch
@@ -108,15 +108,13 @@  discard block
 block discarded – undo
108 108
 			$mapIndex = &$this->cssMapIndex;
109 109
 
110 110
 			$this->_arrangeCssIndex($pathInfo['dirname'], $file);
111
-		}
112
-		else if($file->fileExtension == 'js')
111
+		} else if($file->fileExtension == 'js')
113 112
 		{
114 113
 			if($args[1] == 'body')
115 114
 			{
116 115
 				$map = &$this->jsBodyMap;
117 116
 				$mapIndex = &$this->jsBodyMapIndex;
118
-			}
119
-			else
117
+			} else
120 118
 			{
121 119
 				$map = &$this->jsHeadMap;
122 120
 				$mapIndex = &$this->jsHeadMapIndex;
@@ -174,8 +172,7 @@  discard block
 block discarded – undo
174 172
 				{
175 173
 					$file->fileName = $minifiedFileName;
176 174
 				}
177
-			}
178
-			else
175
+			} else
179 176
 			{
180 177
 				// Remove .min
181 178
 				if(file_exists(implode('/', array($file->fileRealPath, $file->keyName))))
@@ -195,8 +192,7 @@  discard block
 block discarded – undo
195 192
 				$file->media = 'all';
196 193
 			}
197 194
 			$file->key = $file->filePath . $file->keyName . "\t" . $file->targetIe . "\t" . $file->media;
198
-		}
199
-		else if($file->fileExtension == 'js')
195
+		} else if($file->fileExtension == 'js')
200 196
 		{
201 197
 			$file->key = $file->filePath . $file->keyName . "\t" . $file->targetIe;
202 198
 		}
@@ -223,8 +219,7 @@  discard block
 block discarded – undo
223 219
 				$index = $this->cssMapIndex[$file->key];
224 220
 				unset($this->cssMap[$index][$file->key], $this->cssMapIndex[$file->key]);
225 221
 			}
226
-		}
227
-		else
222
+		} else
228 223
 		{
229 224
 			if(isset($this->jsHeadMapIndex[$file->key]))
230 225
 			{
@@ -286,7 +281,9 @@  discard block
 block discarded – undo
286 281
 				}
287 282
 				if($file->query)
288 283
 				{
289
-					if($query) $query .= '&';
284
+					if($query) {
285
+						$query .= '&';
286
+					}
290 287
 					$query .= $file->query;
291 288
 				}
292 289
 				$query = ($query) ? '?' . $query : '';
@@ -315,8 +312,7 @@  discard block
 block discarded – undo
315 312
 		{
316 313
 			$map = &$this->jsHeadMap;
317 314
 			$mapIndex = &$this->jsHeadMapIndex;
318
-		}
319
-		else
315
+		} else
320 316
 		{
321 317
 			$map = &$this->jsBodyMap;
322 318
 			$mapIndex = &$this->jsBodyMapIndex;
@@ -336,7 +332,9 @@  discard block
 block discarded – undo
336 332
 				}
337 333
 				if($file->query)
338 334
 				{
339
-					if($query) $query .= '&';
335
+					if($query) {
336
+						$query .= '&';
337
+					}
340 338
 					$query .= $file->query;
341 339
 				}
342 340
 				$query = ($query) ? '?' . $query : '';
@@ -375,8 +373,7 @@  discard block
 block discarded – undo
375 373
 		if(strpos($path, '://') === FALSE && $path{0} != '/' && $path{0} != '.')
376 374
 		{
377 375
 			$path = './' . $path;
378
-		}
379
-		elseif(!strncmp($path, '//', 2))
376
+		} elseif(!strncmp($path, '//', 2))
380 377
 		{
381 378
 			return preg_replace('#^//+#', '//', $path);
382 379
 		}
@@ -407,13 +404,11 @@  discard block
 block discarded – undo
407 404
 			if($script_path == '/' || $script_path == '\\')
408 405
 			{
409 406
 				$path = '/' . substr($path, 2);
410
-			}
411
-			else
407
+			} else
412 408
 			{
413 409
 				$path = $script_path . substr($path, 2);
414 410
 			}
415
-		}
416
-		else if(strpos($file, '../') === 0)
411
+		} else if(strpos($file, '../') === 0)
417 412
 		{
418 413
 			$path = $this->_normalizeFilePath($script_path . $path);
419 414
 		}
Please login to merge, or discard this patch.
Spacing   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	 */
55 55
 	function isSsl()
56 56
 	{
57
-		if(!is_null(self::$isSSL))
57
+		if (!is_null(self::$isSSL))
58 58
 		{
59 59
 			return self::$isSSL;
60 60
 		}
@@ -88,30 +88,30 @@  discard block
 block discarded – undo
88 88
 	 * */
89 89
 	function loadFile($args)
90 90
 	{
91
-		if(!is_array($args))
91
+		if (!is_array($args))
92 92
 		{
93 93
 			$args = array($args);
94 94
 		}
95 95
 		$file = $this->getFileInfo($args[0], $args[2], $args[1]);
96 96
 
97 97
 		$availableExtension = array('css' => 1, 'js' => 1);
98
-		if(!isset($availableExtension[$file->fileExtension]))
98
+		if (!isset($availableExtension[$file->fileExtension]))
99 99
 		{
100 100
 			return;
101 101
 		}
102 102
 
103 103
 		$file->index = (int) $args[3];
104 104
 
105
-		if($file->fileExtension == 'css')
105
+		if ($file->fileExtension == 'css')
106 106
 		{
107 107
 			$map = &$this->cssMap;
108 108
 			$mapIndex = &$this->cssMapIndex;
109 109
 
110 110
 			$this->_arrangeCssIndex($pathInfo['dirname'], $file);
111 111
 		}
112
-		else if($file->fileExtension == 'js')
112
+		else if ($file->fileExtension == 'js')
113 113
 		{
114
-			if($args[1] == 'body')
114
+			if ($args[1] == 'body')
115 115
 			{
116 116
 				$map = &$this->jsBodyMap;
117 117
 				$mapIndex = &$this->jsBodyMapIndex;
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 		}
125 125
 
126 126
 		(is_null($file->index)) ? $file->index = 0 : $file->index = $file->index;
127
-		if(!isset($mapIndex[$file->key]) || $mapIndex[$file->key] > $file->index)
127
+		if (!isset($mapIndex[$file->key]) || $mapIndex[$file->key] > $file->index)
128 128
 		{
129 129
 			$this->unloadFile($args[0], $args[2], $args[1]);
130 130
 			$map[$file->index][$file->key] = $file;
@@ -144,14 +144,14 @@  discard block
 block discarded – undo
144 144
 	{
145 145
 		static $existsInfo = array();
146 146
 
147
-		if(isset($existsInfo[$existsKey]))
147
+		if (isset($existsInfo[$existsKey]))
148 148
 		{
149 149
 			return $existsInfo[$existsKey];
150 150
 		}
151 151
 
152 152
 		$fileName = preg_replace('/(?:[\/]{3,})(.*)/', '//$1', $fileName);
153 153
 		$url_info = parse_url($fileName);
154
-		$pathInfo = pathinfo(str_replace('?' . $url_info['query'], '', $fileName));
154
+		$pathInfo = pathinfo(str_replace('?'.$url_info['query'], '', $fileName));
155 155
 
156 156
 		$file = new stdClass();
157 157
 		$file->fileName = basename($url_info['path']);
@@ -164,14 +164,14 @@  discard block
 block discarded – undo
164 164
 		$file->keyName = implode('.', array($file->fileNameNoExt, $file->fileExtension));
165 165
 		$file->cdnPath = $this->_normalizeFilePath($pathInfo['dirname']);
166 166
 
167
-		if(!$file->external)
167
+		if (!$file->external)
168 168
 		{
169
-			if(!__DEBUG__ && __XE_VERSION_STABLE__)
169
+			if (!__DEBUG__ && __XE_VERSION_STABLE__)
170 170
 			{
171 171
 				// if no debug mode, load minifed file
172 172
 				$minifiedFileName = implode('.', array($file->fileNameNoExt, 'min', $file->fileExtension));
173 173
 				$minifiedRealPath = implode('/', array($file->fileRealPath, $minifiedFileName));
174
-				if(file_exists($minifiedRealPath))
174
+				if (file_exists($minifiedRealPath))
175 175
 				{
176 176
 					$file->fileName = $minifiedFileName;
177 177
 				}
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 			else
180 180
 			{
181 181
 				// Remove .min
182
-				if(file_exists(implode('/', array($file->fileRealPath, $file->keyName))))
182
+				if (file_exists(implode('/', array($file->fileRealPath, $file->keyName))))
183 183
 				{
184 184
 					$file->fileName = $file->keyName;
185 185
 				}
@@ -188,18 +188,18 @@  discard block
 block discarded – undo
188 188
 
189 189
 		$file->targetIe = $targetIe;
190 190
 
191
-		if($file->fileExtension == 'css')
191
+		if ($file->fileExtension == 'css')
192 192
 		{
193 193
 			$file->media = $media;
194
-			if(!$file->media)
194
+			if (!$file->media)
195 195
 			{
196 196
 				$file->media = 'all';
197 197
 			}
198
-			$file->key = $file->filePath . $file->keyName . "\t" . $file->targetIe . "\t" . $file->media;
198
+			$file->key = $file->filePath.$file->keyName."\t".$file->targetIe."\t".$file->media;
199 199
 		}
200
-		else if($file->fileExtension == 'js')
200
+		else if ($file->fileExtension == 'js')
201 201
 		{
202
-			$file->key = $file->filePath . $file->keyName . "\t" . $file->targetIe;
202
+			$file->key = $file->filePath.$file->keyName."\t".$file->targetIe;
203 203
 		}
204 204
 
205 205
 		return $file;
@@ -217,9 +217,9 @@  discard block
 block discarded – undo
217 217
 	{
218 218
 		$file = $this->getFileInfo($fileName, $targetIe, $media);
219 219
 
220
-		if($file->fileExtension == 'css')
220
+		if ($file->fileExtension == 'css')
221 221
 		{
222
-			if(isset($this->cssMapIndex[$file->key]))
222
+			if (isset($this->cssMapIndex[$file->key]))
223 223
 			{
224 224
 				$index = $this->cssMapIndex[$file->key];
225 225
 				unset($this->cssMap[$index][$file->key], $this->cssMapIndex[$file->key]);
@@ -227,12 +227,12 @@  discard block
 block discarded – undo
227 227
 		}
228 228
 		else
229 229
 		{
230
-			if(isset($this->jsHeadMapIndex[$file->key]))
230
+			if (isset($this->jsHeadMapIndex[$file->key]))
231 231
 			{
232 232
 				$index = $this->jsHeadMapIndex[$file->key];
233 233
 				unset($this->jsHeadMap[$index][$file->key], $this->jsHeadMapIndex[$file->key]);
234 234
 			}
235
-			if(isset($this->jsBodyMapIndex[$file->key]))
235
+			if (isset($this->jsBodyMapIndex[$file->key]))
236 236
 			{
237 237
 				$index = $this->jsBodyMapIndex[$file->key];
238 238
 				unset($this->jsBodyMap[$index][$file->key], $this->jsBodyMapIndex[$file->key]);
@@ -248,13 +248,13 @@  discard block
 block discarded – undo
248 248
 	 */
249 249
 	function unloadAllFiles($type = 'all')
250 250
 	{
251
-		if($type == 'css' || $type == 'all')
251
+		if ($type == 'css' || $type == 'all')
252 252
 		{
253 253
 			$this->cssMap = array();
254 254
 			$this->cssMapIndex = array();
255 255
 		}
256 256
 
257
-		if($type == 'js' || $type == 'all')
257
+		if ($type == 'js' || $type == 'all')
258 258
 		{
259 259
 			$this->jsHeadMap = array();
260 260
 			$this->jsBodyMap = array();
@@ -276,23 +276,23 @@  discard block
 block discarded – undo
276 276
 		$this->_sortMap($map, $mapIndex);
277 277
 
278 278
 		$result = array();
279
-		foreach($map as $indexedMap)
279
+		foreach ($map as $indexedMap)
280 280
 		{
281
-			foreach($indexedMap as $file)
281
+			foreach ($indexedMap as $file)
282 282
 			{
283 283
 				$query = '';
284
-				if(!$file->external && is_readable($file->cdnPath . '/' . $file->fileName))
284
+				if (!$file->external && is_readable($file->cdnPath.'/'.$file->fileName))
285 285
 				{
286
-					$query = date('YmdHis', filemtime($file->cdnPath . '/' . $file->fileName));
286
+					$query = date('YmdHis', filemtime($file->cdnPath.'/'.$file->fileName));
287 287
 				}
288
-				if($file->query)
288
+				if ($file->query)
289 289
 				{
290
-					if($query) $query .= '&';
290
+					if ($query) $query .= '&';
291 291
 					$query .= $file->query;
292 292
 				}
293
-				$query = ($query) ? '?' . $query : '';
293
+				$query = ($query) ? '?'.$query : '';
294 294
 
295
-				$fullFilePath = $file->filePath . '/' . $file->fileName . $query;
295
+				$fullFilePath = $file->filePath.'/'.$file->fileName.$query;
296 296
 				$result[] = array(
297 297
 					'file' => $fullFilePath,
298 298
 					'media' => $file->media,
@@ -313,9 +313,9 @@  discard block
 block discarded – undo
313 313
 	function getJsFileList($type = 'head')
314 314
 	{
315 315
 		$ignore = array('modernizr.js', 'common.js', 'js_app.js', 'xml2json.js', 'xml_handler.js', 'xml_js_filter.js');
316
-		$pathCommonJs = getScriptPath() . 'common/js';
316
+		$pathCommonJs = getScriptPath().'common/js';
317 317
 
318
-		if($type == 'head')
318
+		if ($type == 'head')
319 319
 		{
320 320
 			$map = &$this->jsHeadMap;
321 321
 			$mapIndex = &$this->jsHeadMapIndex;
@@ -329,31 +329,31 @@  discard block
 block discarded – undo
329 329
 		$this->_sortMap($map, $mapIndex);
330 330
 
331 331
 		$result = array();
332
-		foreach($map as $indexedMap)
332
+		foreach ($map as $indexedMap)
333 333
 		{
334
-			foreach($indexedMap as $file)
334
+			foreach ($indexedMap as $file)
335 335
 			{
336
-				if((!__DEBUG__ && __XE_VERSION_STABLE__) && $file->filePath === $pathCommonJs)
336
+				if ((!__DEBUG__ && __XE_VERSION_STABLE__) && $file->filePath === $pathCommonJs)
337 337
 				{
338
-					if(in_array($file->fileName, $ignore))
338
+					if (in_array($file->fileName, $ignore))
339 339
 					{
340 340
 						continue;
341 341
 					}
342 342
 				}
343 343
 
344 344
 				$query = '';
345
-				if(!$file->external && is_readable($file->cdnPath . '/' . $file->fileName))
345
+				if (!$file->external && is_readable($file->cdnPath.'/'.$file->fileName))
346 346
 				{
347
-					$query = date('YmdHis', filemtime($file->cdnPath . '/' . $file->fileName));
347
+					$query = date('YmdHis', filemtime($file->cdnPath.'/'.$file->fileName));
348 348
 				}
349
-				if($file->query)
349
+				if ($file->query)
350 350
 				{
351
-					if($query) $query .= '&';
351
+					if ($query) $query .= '&';
352 352
 					$query .= $file->query;
353 353
 				}
354
-				$query = ($query) ? '?' . $query : '';
354
+				$query = ($query) ? '?'.$query : '';
355 355
 
356
-				$fullFilePath = $file->filePath . '/' . $file->fileName . $query;
356
+				$fullFilePath = $file->filePath.'/'.$file->fileName.$query;
357 357
 				$result[] = array(
358 358
 					'file' => $fullFilePath,
359 359
 					'targetie' => $file->targetIe
@@ -384,18 +384,18 @@  discard block
 block discarded – undo
384 384
 	 */
385 385
 	function _normalizeFilePath($path)
386 386
 	{
387
-		if(strpos($path, '://') === FALSE && $path{0} != '/' && $path{0} != '.')
387
+		if (strpos($path, '://') === FALSE && $path{0} != '/' && $path{0} != '.')
388 388
 		{
389
-			$path = './' . $path;
389
+			$path = './'.$path;
390 390
 		}
391
-		elseif(!strncmp($path, '//', 2))
391
+		elseif (!strncmp($path, '//', 2))
392 392
 		{
393 393
 			return preg_replace('#^//+#', '//', $path);
394 394
 		}
395 395
 
396 396
 		$path = preg_replace('@/\./|(?<!:)\/\/@', '/', $path);
397 397
 
398
-		while(strpos($path, '/../'))
398
+		while (strpos($path, '/../'))
399 399
 		{
400 400
 			$path = preg_replace('/\/([^\/]+)\/\.\.\//s', '/', $path, 1);
401 401
 		}
@@ -414,20 +414,20 @@  discard block
 block discarded – undo
414 414
 		$path = $this->_normalizeFilePath($path);
415 415
 		$script_path = getScriptPath();
416 416
 
417
-		if(strpos($path, './') === 0)
417
+		if (strpos($path, './') === 0)
418 418
 		{
419
-			if($script_path == '/' || $script_path == '\\')
419
+			if ($script_path == '/' || $script_path == '\\')
420 420
 			{
421
-				$path = '/' . substr($path, 2);
421
+				$path = '/'.substr($path, 2);
422 422
 			}
423 423
 			else
424 424
 			{
425
-				$path = $script_path . substr($path, 2);
425
+				$path = $script_path.substr($path, 2);
426 426
 			}
427 427
 		}
428
-		else if(strpos($file, '../') === 0)
428
+		else if (strpos($file, '../') === 0)
429 429
 		{
430
-			$path = $this->_normalizeFilePath($script_path . $path);
430
+			$path = $this->_normalizeFilePath($script_path.$path);
431 431
 		}
432 432
 
433 433
 		return $path;
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
 	 */
443 443
 	function _arrangeCssIndex($dirName, &$file)
444 444
 	{
445
-		if($file->index !== 0)
445
+		if ($file->index !== 0)
446 446
 		{
447 447
 			return;
448 448
 		}
Please login to merge, or discard this patch.
modules/counter/counter.admin.view.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 	function init()
18 18
 	{
19 19
 		// set the template path
20
-		$this->setTemplatePath($this->module_path . 'tpl');
20
+		$this->setTemplatePath($this->module_path.'tpl');
21 21
 	}
22 22
 
23 23
 	/**
@@ -28,9 +28,9 @@  discard block
 block discarded – undo
28 28
 	function dispCounterAdminIndex()
29 29
 	{
30 30
 		// set today's if no date is given
31
-		$selected_date = (int)Context::get('selected_date');
31
+		$selected_date = (int) Context::get('selected_date');
32 32
 
33
-		if(!$selected_date)
33
+		if (!$selected_date)
34 34
 		{
35 35
 			$selected_date = date("Ymd");
36 36
 		}
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 		// get data by time, day, month, and year
51 51
 		$type = Context::get('type');
52 52
 
53
-		if(!$type)
53
+		if (!$type)
54 54
 		{
55 55
 			$type = 'day';
56 56
 			Context::set('type', $type);
Please login to merge, or discard this patch.
modules/comment/comment.admin.view.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 		// get a list by using comment->getCommentList. 
53 53
 		$oCommentModel = getModel('comment');
54 54
 		$secretNameList = $oCommentModel->getSecretNameList();
55
-		$columnList = array('comment_srl', 'document_srl','module_srl','is_secret', 'status', 'content', 'comments.member_srl', 'comments.nick_name', 'comments.regdate', 'ipaddress', 'voted_count', 'blamed_count');
55
+		$columnList = array('comment_srl', 'document_srl', 'module_srl', 'is_secret', 'status', 'content', 'comments.member_srl', 'comments.nick_name', 'comments.regdate', 'ipaddress', 'voted_count', 'blamed_count');
56 56
 		$output = $oCommentModel->getTotalCommentList($args, $columnList);
57 57
 
58 58
 		// $modules = $oCommentModel->getDistinctModules();
@@ -70,20 +70,20 @@  discard block
 block discarded – undo
70 70
 		$oModuleModel = getModel('module');
71 71
 		$module_list = array();
72 72
 		$mod_srls = array();
73
-		foreach($output->data as $val)
73
+		foreach ($output->data as $val)
74 74
 		{
75 75
 			$mod_srls[] = $val->module_srl;
76 76
 		}
77 77
 		$mod_srls = array_unique($mod_srls);
78 78
 		// Module List
79 79
 		$mod_srls_count = count($mod_srls);
80
-		if($mod_srls_count)
80
+		if ($mod_srls_count)
81 81
 		{
82 82
 			$columnList = array('module_srl', 'mid', 'browser_title');
83 83
 			$module_output = $oModuleModel->getModulesInfo($mod_srls, $columnList);
84
-			if($module_output && is_array($module_output))
84
+			if ($module_output && is_array($module_output))
85 85
 			{
86
-				foreach($module_output as $module)
86
+				foreach ($module_output as $module)
87 87
 				{
88 88
 					$module_list[$module->module_srl] = $module;
89 89
 				}
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 		$security->encodeHTML('search_target', 'search_keyword');
96 96
 
97 97
 		// set the template 
98
-		$this->setTemplatePath($this->module_path . 'tpl');
98
+		$this->setTemplatePath($this->module_path.'tpl');
99 99
 		$this->setTemplateFile('comment_list');
100 100
 	}
101 101
 
@@ -117,11 +117,11 @@  discard block
 block discarded – undo
117 117
 		$declared_output = executeQuery('comment.getDeclaredList', $args);
118 118
 		$oCommentModel = getModel('comment');
119 119
 
120
-		if($declared_output->data && count($declared_output->data))
120
+		if ($declared_output->data && count($declared_output->data))
121 121
 		{
122 122
 			$comment_list = array();
123 123
 
124
-			foreach($declared_output->data as $key => $comment)
124
+			foreach ($declared_output->data as $key => $comment)
125 125
 			{
126 126
 				$comment_list[$key] = new commentItem();
127 127
 				$comment_list[$key]->setAttribute($comment);
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 		Context::set('page_navigation', $declared_output->page_navigation);
140 140
 		Context::set('secret_name_list', $secretNameList);
141 141
 		// set the template
142
-		$this->setTemplatePath($this->module_path . 'tpl');
142
+		$this->setTemplatePath($this->module_path.'tpl');
143 143
 		$this->setTemplateFile('declared_list');
144 144
 	}
145 145
 
Please login to merge, or discard this patch.
libs/PEAR.1.9/HTTP/Request.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,28 +18,28 @@
 block discarded – undo
18 18
 	}
19 19
 
20 20
 	public function getResponseCode() {
21
-		if($this->response)
21
+		if ($this->response)
22 22
 		{
23 23
 			return $this->response->getStatus();
24 24
 		}
25 25
 	}
26 26
 
27 27
 	public function getResponseHeader() {
28
-		if($this->response)
28
+		if ($this->response)
29 29
 		{
30 30
 			return $this->response->getHeader();	
31 31
 		}
32 32
 	}
33 33
 
34 34
 	public function getResponseBody() {
35
-		if($this->response)
35
+		if ($this->response)
36 36
 		{
37 37
 			return $this->response->getBody();
38 38
 		}
39 39
 	}
40 40
 
41 41
 	public function getResponseCookies() {
42
-		if($this->response)
42
+		if ($this->response)
43 43
 		{
44 44
 			return $this->response->getCookies();
45 45
 		}
Please login to merge, or discard this patch.
modules/session/session.model.php 2 patches
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -21,14 +21,14 @@  discard block
 block discarded – undo
21 21
 
22 22
 	function read($session_key)
23 23
 	{
24
-		if(!$session_key || !$this->session_started) return;
24
+		if (!$session_key || !$this->session_started) return;
25 25
 
26 26
 		$args = new stdClass();
27 27
 		$args->session_key = $session_key;
28 28
 		$columnList = array('session_key', 'cur_mid', 'val');
29 29
 		$output = executeQuery('session.getSession', $args, $columnList);
30 30
 
31
-		if(!$output->data)
31
+		if (!$output->data)
32 32
 		{
33 33
 			return '';
34 34
 		}
@@ -46,47 +46,47 @@  discard block
 block discarded – undo
46 46
 	 */
47 47
 	function getLoggedMembers($args)
48 48
 	{
49
-		if(!$args->site_srl)
49
+		if (!$args->site_srl)
50 50
 		{
51 51
 			$site_module_info = Context::get('site_module_info');
52
-			$args->site_srl = (int)$site_module_info->site_srl;
52
+			$args->site_srl = (int) $site_module_info->site_srl;
53 53
 		}
54
-		if(!$args->list_count) $args->list_count = 20;
55
-		if(!$args->page) $args->page = 1;
56
-		if(!$args->period_time) $args->period_time = 3;
57
-		$args->last_update = date("YmdHis", $_SERVER['REQUEST_TIME'] - $args->period_time*60);
54
+		if (!$args->list_count) $args->list_count = 20;
55
+		if (!$args->page) $args->page = 1;
56
+		if (!$args->period_time) $args->period_time = 3;
57
+		$args->last_update = date("YmdHis", $_SERVER['REQUEST_TIME'] - $args->period_time * 60);
58 58
 
59 59
 		$output = executeQueryArray('session.getLoggedMembers', $args);
60
-		if(!$output->toBool()) return $output;
60
+		if (!$output->toBool()) return $output;
61 61
 
62 62
 		$member_srls = array();
63 63
 		$member_keys = array();
64
-		if(count($output->data))
64
+		if (count($output->data))
65 65
 		{
66
-			foreach($output->data as $key => $val)
66
+			foreach ($output->data as $key => $val)
67 67
 			{
68 68
 				$member_srls[$key] = $val->member_srl;
69 69
 				$member_keys[$val->member_srl] = $key;
70 70
 			}
71 71
 		}
72 72
 
73
-		if(Context::get('is_logged'))
73
+		if (Context::get('is_logged'))
74 74
 		{
75 75
 			$logged_info = Context::get('logged_info');
76
-			if(!in_array($logged_info->member_srl, $member_srls))
76
+			if (!in_array($logged_info->member_srl, $member_srls))
77 77
 			{
78 78
 				$member_srls[0] = $logged_info->member_srl;
79 79
 				$member_keys[$logged_info->member_srl] = 0;
80 80
 			}
81 81
 		}
82 82
 
83
-		if(!count($member_srls)) return $output;
83
+		if (!count($member_srls)) return $output;
84 84
 
85
-		$member_args->member_srl = implode(',',$member_srls);
85
+		$member_args->member_srl = implode(',', $member_srls);
86 86
 		$member_output = executeQueryArray('member.getMembers', $member_args);
87
-		if($member_output->data)
87
+		if ($member_output->data)
88 88
 		{
89
-			foreach($member_output->data as $key => $val)
89
+			foreach ($member_output->data as $key => $val)
90 90
 			{
91 91
 				$output->data[$member_keys[$val->member_srl]] = $val;
92 92
 			}
Please login to merge, or discard this patch.
Braces   +18 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@  discard block
 block discarded – undo
21 21
 
22 22
 	function read($session_key)
23 23
 	{
24
-		if(!$session_key || !$this->session_started) return;
24
+		if(!$session_key || !$this->session_started) {
25
+			return;
26
+		}
25 27
 
26 28
 		$args = new stdClass();
27 29
 		$args->session_key = $session_key;
@@ -51,13 +53,21 @@  discard block
 block discarded – undo
51 53
 			$site_module_info = Context::get('site_module_info');
52 54
 			$args->site_srl = (int)$site_module_info->site_srl;
53 55
 		}
54
-		if(!$args->list_count) $args->list_count = 20;
55
-		if(!$args->page) $args->page = 1;
56
-		if(!$args->period_time) $args->period_time = 3;
56
+		if(!$args->list_count) {
57
+			$args->list_count = 20;
58
+		}
59
+		if(!$args->page) {
60
+			$args->page = 1;
61
+		}
62
+		if(!$args->period_time) {
63
+			$args->period_time = 3;
64
+		}
57 65
 		$args->last_update = date("YmdHis", $_SERVER['REQUEST_TIME'] - $args->period_time*60);
58 66
 
59 67
 		$output = executeQueryArray('session.getLoggedMembers', $args);
60
-		if(!$output->toBool()) return $output;
68
+		if(!$output->toBool()) {
69
+			return $output;
70
+		}
61 71
 
62 72
 		$member_srls = array();
63 73
 		$member_keys = array();
@@ -80,7 +90,9 @@  discard block
 block discarded – undo
80 90
 			}
81 91
 		}
82 92
 
83
-		if(!count($member_srls)) return $output;
93
+		if(!count($member_srls)) {
94
+			return $output;
95
+		}
84 96
 
85 97
 		$member_args->member_srl = implode(',',$member_srls);
86 98
 		$member_output = executeQueryArray('member.getMembers', $member_args);
Please login to merge, or discard this patch.
modules/point/point.model.php 2 patches
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -24,28 +24,28 @@  discard block
 block discarded – undo
24 24
 		$member_srl = abs($member_srl);
25 25
 
26 26
 		// Get from instance memory
27
-		if($this->pointList[$member_srl]) return true;
27
+		if ($this->pointList[$member_srl]) return true;
28 28
 
29 29
 		// Get from file cache
30
-		$path = sprintf(_XE_PATH_ . 'files/member_extra_info/point/%s',getNumberingPath($member_srl));
30
+		$path = sprintf(_XE_PATH_.'files/member_extra_info/point/%s', getNumberingPath($member_srl));
31 31
 		$cache_filename = sprintf('%s%d.cache.txt', $path, $member_srl);
32
-		if(file_exists($cache_filename))
32
+		if (file_exists($cache_filename))
33 33
 		{
34
-			if(!$this->pointList[$member_srl])
34
+			if (!$this->pointList[$member_srl])
35 35
 				$this->pointList[$member_srl] = trim(FileHandler::readFile($cache_filename));
36 36
 			return true;
37 37
 		}
38 38
 
39
-		$args =new stdClass();
39
+		$args = new stdClass();
40 40
 		$args->member_srl = $member_srl;
41 41
 		$output = executeQuery('point.getPoint', $args);
42
-		if($output->data->member_srl == $member_srl)
42
+		if ($output->data->member_srl == $member_srl)
43 43
 		{
44
-			if(!$this->pointList[$member_srl])
44
+			if (!$this->pointList[$member_srl])
45 45
 			{
46
-				$this->pointList[$member_srl] = (int)$output->data->point;
46
+				$this->pointList[$member_srl] = (int) $output->data->point;
47 47
 				FileHandler::makeDir($path);
48
-				FileHandler::writeFile($cache_filename, (int)$output->data->point);
48
+				FileHandler::writeFile($cache_filename, (int) $output->data->point);
49 49
 			}
50 50
 			return true;
51 51
 		}
@@ -60,25 +60,25 @@  discard block
 block discarded – undo
60 60
 		$member_srl = abs($member_srl);
61 61
 
62 62
 		// Get from instance memory
63
-		if(!$from_db && $this->pointList[$member_srl]) return $this->pointList[$member_srl];
63
+		if (!$from_db && $this->pointList[$member_srl]) return $this->pointList[$member_srl];
64 64
 
65 65
 		// Get from file cache
66
-		$path = sprintf(_XE_PATH_ . 'files/member_extra_info/point/%s',getNumberingPath($member_srl));
66
+		$path = sprintf(_XE_PATH_.'files/member_extra_info/point/%s', getNumberingPath($member_srl));
67 67
 		$cache_filename = sprintf('%s%d.cache.txt', $path, $member_srl);
68 68
 
69
-		if(!$from_db && file_exists($cache_filename))
69
+		if (!$from_db && file_exists($cache_filename))
70 70
 			return $this->pointList[$member_srl] = trim(FileHandler::readFile($cache_filename));
71 71
 
72 72
 		// Get from the DB
73
-		$args =new stdClass();
73
+		$args = new stdClass();
74 74
 		$args->member_srl = $member_srl;
75 75
 		$output = executeQuery('point.getPoint', $args);
76 76
 
77
-		if(isset($output->data->member_srl))
77
+		if (isset($output->data->member_srl))
78 78
 		{
79
-			$point = (int)$output->data->point;
79
+			$point = (int) $output->data->point;
80 80
 			$this->pointList[$member_srl] = $point;
81
-			if(!is_dir($path)) FileHandler::makeDir($path);
81
+			if (!is_dir($path)) FileHandler::makeDir($path);
82 82
 			FileHandler::writeFile($cache_filename, $point);
83 83
 			return $point;
84 84
 		}
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
 	function getLevel($point, $level_step)
92 92
 	{
93 93
 		$level_count = count($level_step);
94
-		for($level=0;$level<=$level_count;$level++) if($point < $level_step[$level]) break;
95
-		$level --;
94
+		for ($level = 0; $level <= $level_count; $level++) if ($point < $level_step[$level]) break;
95
+		$level--;
96 96
 		return $level;
97 97
 	}
98 98
 
@@ -103,20 +103,20 @@  discard block
 block discarded – undo
103 103
 	{
104 104
 		$member_srls = Context::get('member_srls');
105 105
 		$member_srls = array_unique(explode(',', $member_srls));
106
-		if(!count($member_srls))
106
+		if (!count($member_srls))
107 107
 		{
108 108
 			return;
109 109
 		}
110 110
 
111 111
 		$logged_info = Context::get('logged_info');
112
-		if(!$logged_info->member_srl)
112
+		if (!$logged_info->member_srl)
113 113
 		{
114 114
 			return;
115 115
 		}
116 116
 
117
-		if(!getModel('module')->isSiteAdmin($logged_info))
117
+		if (!getModel('module')->isSiteAdmin($logged_info))
118 118
 		{
119
-			if(in_array($logged_info->member_srl, $member_srls))
119
+			if (in_array($logged_info->member_srl, $member_srls))
120 120
 			{
121 121
 				$member_srls = array($logged_info->member_srl);
122 122
 			}
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 		$config = $oModuleModel->getModuleConfig('point');
131 131
 
132 132
 		$info = array();
133
-		foreach($member_srls as $v)
133
+		foreach ($member_srls as $v)
134 134
 		{
135 135
 			$obj = new stdClass;
136 136
 			$obj->point = $this->getPoint($v);
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 			$info[] = $obj;
140 140
 		}
141 141
 
142
-		$this->add('point_info',$info);
142
+		$this->add('point_info', $info);
143 143
 	}
144 144
 
145 145
 
@@ -149,37 +149,37 @@  discard block
 block discarded – undo
149 149
 	function getMemberList($args = null, $columnList = array())
150 150
 	{
151 151
 		// Arrange the search options
152
-		$args->is_admin = Context::get('is_admin')=='Y'?'Y':'';
153
-		$args->is_denied = Context::get('is_denied')=='Y'?'Y':'';
152
+		$args->is_admin = Context::get('is_admin') == 'Y' ? 'Y' : '';
153
+		$args->is_denied = Context::get('is_denied') == 'Y' ? 'Y' : '';
154 154
 		$args->selected_group_srl = Context::get('selected_group_srl');
155 155
 
156 156
 		$search_target = trim(Context::get('search_target'));
157 157
 		$search_keyword = trim(Context::get('search_keyword'));
158 158
 
159 159
 		// if search keyword is emtpy, show all list
160
-		if(!$search_keyword)
160
+		if (!$search_keyword)
161 161
 		{
162 162
 			unset($args->is_admin, $args->is_denied, $args->selected_group_srl, $search_target);
163 163
 		}
164 164
 
165
-		if($search_target && $search_keyword)
165
+		if ($search_target && $search_keyword)
166 166
 		{
167
-			switch($search_target)
167
+			switch ($search_target)
168 168
 			{
169 169
 				case 'user_id' :
170
-					if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
170
+					if ($search_keyword) $search_keyword = str_replace(' ', '%', $search_keyword);
171 171
 					$args->s_user_id = $search_keyword;
172 172
 					break;
173 173
 				case 'user_name' :
174
-					if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
174
+					if ($search_keyword) $search_keyword = str_replace(' ', '%', $search_keyword);
175 175
 					$args->s_user_name = $search_keyword;
176 176
 					break;
177 177
 				case 'nick_name' :
178
-					if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
178
+					if ($search_keyword) $search_keyword = str_replace(' ', '%', $search_keyword);
179 179
 					$args->s_nick_name = $search_keyword;
180 180
 					break;
181 181
 				case 'email_address' :
182
-					if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
182
+					if ($search_keyword) $search_keyword = str_replace(' ', '%', $search_keyword);
183 183
 					$args->s_email_address = $search_keyword;
184 184
 					break;
185 185
 				case 'regdate' :
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 			}
195 195
 		}
196 196
 		// If there is a selected_group_srl, change the "query id" (for table join)
197
-		if($args->selected_group_srl)
197
+		if ($args->selected_group_srl)
198 198
 		{
199 199
 			$query_id = 'point.getMemberListWithinGroup';
200 200
 		}
@@ -205,12 +205,12 @@  discard block
 block discarded – undo
205 205
 
206 206
 		$output = executeQuery($query_id, $args, $columnList);
207 207
 
208
-		if($output->total_count)
208
+		if ($output->total_count)
209 209
 		{
210 210
 			$oModuleModel = getModel('module');
211 211
 			$config = $oModuleModel->getModuleConfig('point');
212 212
 
213
-			foreach($output->data as $key => $val)
213
+			foreach ($output->data as $key => $val)
214 214
 			{
215 215
 				$output->data[$key]->level = $this->getLevel($val->point, $config->level_step);
216 216
 			}
Please login to merge, or discard this patch.
Braces   +32 added lines, -16 removed lines patch added patch discarded remove patch
@@ -24,15 +24,18 @@  discard block
 block discarded – undo
24 24
 		$member_srl = abs($member_srl);
25 25
 
26 26
 		// Get from instance memory
27
-		if($this->pointList[$member_srl]) return true;
27
+		if($this->pointList[$member_srl]) {
28
+			return true;
29
+		}
28 30
 
29 31
 		// Get from file cache
30 32
 		$path = sprintf(_XE_PATH_ . 'files/member_extra_info/point/%s',getNumberingPath($member_srl));
31 33
 		$cache_filename = sprintf('%s%d.cache.txt', $path, $member_srl);
32 34
 		if(file_exists($cache_filename))
33 35
 		{
34
-			if(!$this->pointList[$member_srl])
35
-				$this->pointList[$member_srl] = trim(FileHandler::readFile($cache_filename));
36
+			if(!$this->pointList[$member_srl]) {
37
+							$this->pointList[$member_srl] = trim(FileHandler::readFile($cache_filename));
38
+			}
36 39
 			return true;
37 40
 		}
38 41
 
@@ -60,14 +63,17 @@  discard block
 block discarded – undo
60 63
 		$member_srl = abs($member_srl);
61 64
 
62 65
 		// Get from instance memory
63
-		if(!$from_db && $this->pointList[$member_srl]) return $this->pointList[$member_srl];
66
+		if(!$from_db && $this->pointList[$member_srl]) {
67
+			return $this->pointList[$member_srl];
68
+		}
64 69
 
65 70
 		// Get from file cache
66 71
 		$path = sprintf(_XE_PATH_ . 'files/member_extra_info/point/%s',getNumberingPath($member_srl));
67 72
 		$cache_filename = sprintf('%s%d.cache.txt', $path, $member_srl);
68 73
 
69
-		if(!$from_db && file_exists($cache_filename))
70
-			return $this->pointList[$member_srl] = trim(FileHandler::readFile($cache_filename));
74
+		if(!$from_db && file_exists($cache_filename)) {
75
+					return $this->pointList[$member_srl] = trim(FileHandler::readFile($cache_filename));
76
+		}
71 77
 
72 78
 		// Get from the DB
73 79
 		$args =new stdClass();
@@ -78,7 +84,9 @@  discard block
 block discarded – undo
78 84
 		{
79 85
 			$point = (int)$output->data->point;
80 86
 			$this->pointList[$member_srl] = $point;
81
-			if(!is_dir($path)) FileHandler::makeDir($path);
87
+			if(!is_dir($path)) {
88
+				FileHandler::makeDir($path);
89
+			}
82 90
 			FileHandler::writeFile($cache_filename, $point);
83 91
 			return $point;
84 92
 		}
@@ -91,7 +99,9 @@  discard block
 block discarded – undo
91 99
 	function getLevel($point, $level_step)
92 100
 	{
93 101
 		$level_count = count($level_step);
94
-		for($level=0;$level<=$level_count;$level++) if($point < $level_step[$level]) break;
102
+		for($level=0;$level<=$level_count;$level++) {
103
+			if($point < $level_step[$level]) break;
104
+		}
95 105
 		$level --;
96 106
 		return $level;
97 107
 	}
@@ -119,8 +129,7 @@  discard block
 block discarded – undo
119 129
 			if(in_array($logged_info->member_srl, $member_srls))
120 130
 			{
121 131
 				$member_srls = array($logged_info->member_srl);
122
-			}
123
-			else
132
+			} else
124 133
 			{
125 134
 				return;
126 135
 			}
@@ -167,19 +176,27 @@  discard block
 block discarded – undo
167 176
 			switch($search_target)
168 177
 			{
169 178
 				case 'user_id' :
170
-					if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
179
+					if($search_keyword) {
180
+						$search_keyword = str_replace(' ','%',$search_keyword);
181
+					}
171 182
 					$args->s_user_id = $search_keyword;
172 183
 					break;
173 184
 				case 'user_name' :
174
-					if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
185
+					if($search_keyword) {
186
+						$search_keyword = str_replace(' ','%',$search_keyword);
187
+					}
175 188
 					$args->s_user_name = $search_keyword;
176 189
 					break;
177 190
 				case 'nick_name' :
178
-					if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
191
+					if($search_keyword) {
192
+						$search_keyword = str_replace(' ','%',$search_keyword);
193
+					}
179 194
 					$args->s_nick_name = $search_keyword;
180 195
 					break;
181 196
 				case 'email_address' :
182
-					if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
197
+					if($search_keyword) {
198
+						$search_keyword = str_replace(' ','%',$search_keyword);
199
+					}
183 200
 					$args->s_email_address = $search_keyword;
184 201
 					break;
185 202
 				case 'regdate' :
@@ -197,8 +214,7 @@  discard block
 block discarded – undo
197 214
 		if($args->selected_group_srl)
198 215
 		{
199 216
 			$query_id = 'point.getMemberListWithinGroup';
200
-		}
201
-		else
217
+		} else
202 218
 		{
203 219
 			$query_id = 'point.getMemberList';
204 220
 		}
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>%s</%s>%s', $key, htmlspecialchars($val, ENT_COMPAT, 'UTF-8', true), $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>%s</%s>%s', $key, htmlspecialchars($val, ENT_COMPAT, 'UTF-8', true), $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/display/VirtualXMLDisplayHandler.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -17,35 +17,35 @@
 block discarded – undo
17 17
 		$request_url = Context::getRequestUri();
18 18
 		$output = new stdClass();
19 19
 
20
-		if(substr_compare($request_url, '/', -1) !== 0)
20
+		if (substr_compare($request_url, '/', -1) !== 0)
21 21
 		{
22 22
 			$request_url .= '/';
23 23
 		}
24 24
 
25
-		if($error === 0)
25
+		if ($error === 0)
26 26
 		{
27
-			if($message != 'success') $output->message = $message;
27
+			if ($message != 'success') $output->message = $message;
28 28
 
29 29
 			$output->url = ($redirect_url) ? $redirect_url : $request_uri;
30 30
 		}
31 31
 		else
32 32
 		{
33
-			if($message != 'fail') $output->message = $message;
33
+			if ($message != 'fail') $output->message = $message;
34 34
 		}
35 35
 
36 36
 		$html = array();
37 37
 		$html[] = '<!DOCTYPE html><html><head><title>Moved...</title><meta charset="utf-8" /><script>';
38 38
 
39
-		if($output->message)
39
+		if ($output->message)
40 40
 		{
41
-			$html[] = 'alert(' . json_encode($output->message, JSON_UNESCAPED_SLASHES) . ');';
41
+			$html[] = 'alert('.json_encode($output->message, JSON_UNESCAPED_SLASHES).');';
42 42
 		}
43 43
 
44
-		if($output->url)
44
+		if ($output->url)
45 45
 		{
46 46
 			$url = json_encode(preg_replace('/#(.+)$/i', '', $output->url), JSON_UNESCAPED_SLASHES);
47 47
 			$html[] = 'var win = (window.opener) ? window.opener : window.parent;';
48
-			$html[] = 'win.location.href = ' . $url;
48
+			$html[] = 'win.location.href = '.$url;
49 49
 			$html[] = 'if(window.opener) self.close();';
50 50
 		}
51 51
 
Please login to merge, or discard this patch.
Braces   +7 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,13 +24,16 @@
 block discarded – undo
24 24
 
25 25
 		if($error === 0)
26 26
 		{
27
-			if($message != 'success') $output->message = $message;
27
+			if($message != 'success') {
28
+				$output->message = $message;
29
+			}
28 30
 
29 31
 			$output->url = ($redirect_url) ? $redirect_url : $request_uri;
30
-		}
31
-		else
32
+		} else
32 33
 		{
33
-			if($message != 'fail') $output->message = $message;
34
+			if($message != 'fail') {
35
+				$output->message = $message;
36
+			}
34 37
 		}
35 38
 
36 39
 		$html = array();
Please login to merge, or discard this patch.
classes/mobile/Mobile.class.php 2 patches
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	function &getInstance()
24 24
 	{
25 25
 		static $theInstance;
26
-		if(!isset($theInstance))
26
+		if (!isset($theInstance))
27 27
 		{
28 28
 			$theInstance = new Mobile();
29 29
 		}
@@ -48,11 +48,11 @@  discard block
 block discarded – undo
48 48
 	 */
49 49
 	function _isFromMobilePhone()
50 50
 	{
51
-		if($this->ismobile !== NULL)
51
+		if ($this->ismobile !== NULL)
52 52
 		{
53 53
 			return $this->ismobile;
54 54
 		}
55
-		if(Mobile::isMobileEnabled() === false || Context::get('full_browse') || $_COOKIE["FullBrowse"])
55
+		if (Mobile::isMobileEnabled() === false || Context::get('full_browse') || $_COOKIE["FullBrowse"])
56 56
 		{
57 57
 			return ($this->ismobile = false);
58 58
 		}
@@ -63,22 +63,22 @@  discard block
 block discarded – undo
63 63
 		$this->ismobile = FALSE;
64 64
 
65 65
 		$m = Context::get('m');
66
-		if(strlen($m) == 1)
66
+		if (strlen($m) == 1)
67 67
 		{
68
-			if($m == "1")
68
+			if ($m == "1")
69 69
 			{
70 70
 				$this->ismobile = TRUE;
71 71
 			}
72
-			elseif($m == "0")
72
+			elseif ($m == "0")
73 73
 			{
74 74
 				$this->ismobile = FALSE;
75 75
 			}
76 76
 		}
77
-		elseif(isset($_COOKIE['mobile']))
77
+		elseif (isset($_COOKIE['mobile']))
78 78
 		{
79
-			if($_COOKIE['user-agent'] == md5($_SERVER['HTTP_USER_AGENT']))
79
+			if ($_COOKIE['user-agent'] == md5($_SERVER['HTTP_USER_AGENT']))
80 80
 			{
81
-				if($_COOKIE['mobile'] == 'true')
81
+				if ($_COOKIE['mobile'] == 'true')
82 82
 				{
83 83
 					$this->ismobile = TRUE;
84 84
 				}
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 				$this->ismobile = FALSE;
93 93
 				setcookie("mobile", FALSE);
94 94
 				setcookie("user-agent", FALSE);
95
-				if(!$this->isMobilePadCheckByAgent() && $this->isMobileCheckByAgent())
95
+				if (!$this->isMobilePadCheckByAgent() && $this->isMobileCheckByAgent())
96 96
 				{
97 97
 					$this->ismobile = TRUE;
98 98
 				}
@@ -100,36 +100,36 @@  discard block
 block discarded – undo
100 100
 		}
101 101
 		else
102 102
 		{
103
-			if($this->isMobilePadCheckByAgent())
103
+			if ($this->isMobilePadCheckByAgent())
104 104
 			{
105 105
 				$this->ismobile = FALSE;
106 106
 			}
107 107
 			else
108 108
 			{
109
-				if($this->isMobileCheckByAgent())
109
+				if ($this->isMobileCheckByAgent())
110 110
 				{
111 111
 					$this->ismobile = TRUE;
112 112
 				}
113 113
 			}
114 114
 		}
115 115
 
116
-		if($this->ismobile !== NULL)
116
+		if ($this->ismobile !== NULL)
117 117
 		{
118
-			if($this->ismobile == TRUE)
118
+			if ($this->ismobile == TRUE)
119 119
 			{
120
-				if($_COOKIE['mobile'] != 'true')
120
+				if ($_COOKIE['mobile'] != 'true')
121 121
 				{
122 122
 					$_COOKIE['mobile'] = 'true';
123 123
 					setcookie("mobile", 'true');
124 124
 				}
125 125
 			}
126
-			elseif($_COOKIE['mobile'] != 'false')
126
+			elseif ($_COOKIE['mobile'] != 'false')
127 127
 			{
128 128
 				$_COOKIE['mobile'] = 'false';
129 129
 				setcookie("mobile", 'false');
130 130
 			}
131 131
 
132
-			if($_COOKIE['user-agent'] != md5($_SERVER['HTTP_USER_AGENT']))
132
+			if ($_COOKIE['user-agent'] != md5($_SERVER['HTTP_USER_AGENT']))
133 133
 			{
134 134
 				setcookie("user-agent", md5($_SERVER['HTTP_USER_AGENT']));
135 135
 			}
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 	function isMobileCheckByAgent()
147 147
 	{
148 148
 		static $UACheck;
149
-		if(isset($UACheck))
149
+		if (isset($UACheck))
150 150
 		{
151 151
 			return $UACheck;
152 152
 		}
@@ -154,15 +154,15 @@  discard block
 block discarded – undo
154 154
 		$oMobile = Mobile::getInstance();
155 155
 		$mobileAgent = array('iPod', 'iPhone', 'Android', 'BlackBerry', 'SymbianOS', 'Bada', 'Tizen', 'Kindle', 'Wii', 'SCH-', 'SPH-', 'CANU-', 'Windows Phone', 'Windows CE', 'POLARIS', 'Palm', 'Dorothy Browser', 'Mobile', 'Opera Mobi', 'Opera Mini', 'Minimo', 'AvantGo', 'NetFront', 'Nokia', 'LGPlayer', 'SonyEricsson', 'HTC');
156 156
 
157
-		if($oMobile->isMobilePadCheckByAgent())
157
+		if ($oMobile->isMobilePadCheckByAgent())
158 158
 		{
159 159
 			$UACheck = TRUE;
160 160
 			return TRUE;
161 161
 		}
162 162
 
163
-		foreach($mobileAgent as $agent)
163
+		foreach ($mobileAgent as $agent)
164 164
 		{
165
-			if(stripos($_SERVER['HTTP_USER_AGENT'], $agent) !== FALSE)
165
+			if (stripos($_SERVER['HTTP_USER_AGENT'], $agent) !== FALSE)
166 166
 			{
167 167
 				$UACheck = TRUE;
168 168
 				return TRUE;
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 	function isMobilePadCheckByAgent()
181 181
 	{
182 182
 		static $UACheck;
183
-		if(isset($UACheck))
183
+		if (isset($UACheck))
184 184
 		{
185 185
 			return $UACheck;
186 186
 		}
@@ -190,21 +190,21 @@  discard block
 block discarded – undo
190 190
 		// $exceptionAgent[0] contains exception agents for all exceptions.
191 191
 		$exceptionAgent = array(0 => array('Opera Mini', 'Opera Mobi'), 'Android' => 'Mobile');
192 192
 
193
-		foreach($padAgent as $agent)
193
+		foreach ($padAgent as $agent)
194 194
 		{
195
-			if(strpos($_SERVER['HTTP_USER_AGENT'], $agent) !== FALSE)
195
+			if (strpos($_SERVER['HTTP_USER_AGENT'], $agent) !== FALSE)
196 196
 			{
197
-				if(!isset($exceptionAgent[$agent]))
197
+				if (!isset($exceptionAgent[$agent]))
198 198
 				{
199 199
 					$UACheck = TRUE;
200 200
 					return TRUE;
201 201
 				}
202
-				elseif(strpos($_SERVER['HTTP_USER_AGENT'], $exceptionAgent[$agent]) === FALSE)
202
+				elseif (strpos($_SERVER['HTTP_USER_AGENT'], $exceptionAgent[$agent]) === FALSE)
203 203
 				{
204 204
 					// If the agent is the Android, that can be either tablet and mobile phone.
205
-					foreach($exceptionAgent[0] as $val)
205
+					foreach ($exceptionAgent[0] as $val)
206 206
 					{
207
-						if(strpos($_SERVER['HTTP_USER_AGENT'], $val) !== FALSE)
207
+						if (strpos($_SERVER['HTTP_USER_AGENT'], $val) !== FALSE)
208 208
 						{
209 209
 							$UACheck = FALSE;
210 210
 							return FALSE;
Please login to merge, or discard this patch.
Braces   +8 added lines, -16 removed lines patch added patch discarded remove patch
@@ -68,26 +68,22 @@  discard block
 block discarded – undo
68 68
 			if($m == "1")
69 69
 			{
70 70
 				$this->ismobile = TRUE;
71
-			}
72
-			elseif($m == "0")
71
+			} elseif($m == "0")
73 72
 			{
74 73
 				$this->ismobile = FALSE;
75 74
 			}
76
-		}
77
-		elseif(isset($_COOKIE['mobile']))
75
+		} elseif(isset($_COOKIE['mobile']))
78 76
 		{
79 77
 			if($_COOKIE['user-agent'] == md5($_SERVER['HTTP_USER_AGENT']))
80 78
 			{
81 79
 				if($_COOKIE['mobile'] == 'true')
82 80
 				{
83 81
 					$this->ismobile = TRUE;
84
-				}
85
-				else
82
+				} else
86 83
 				{
87 84
 					$this->ismobile = FALSE;
88 85
 				}
89
-			}
90
-			else
86
+			} else
91 87
 			{
92 88
 				$this->ismobile = FALSE;
93 89
 				setcookie("mobile", FALSE);
@@ -97,14 +93,12 @@  discard block
 block discarded – undo
97 93
 					$this->ismobile = TRUE;
98 94
 				}
99 95
 			}
100
-		}
101
-		else
96
+		} else
102 97
 		{
103 98
 			if($this->isMobilePadCheckByAgent())
104 99
 			{
105 100
 				$this->ismobile = FALSE;
106
-			}
107
-			else
101
+			} else
108 102
 			{
109 103
 				if($this->isMobileCheckByAgent())
110 104
 				{
@@ -122,8 +116,7 @@  discard block
 block discarded – undo
122 116
 					$_COOKIE['mobile'] = 'true';
123 117
 					setcookie("mobile", 'true');
124 118
 				}
125
-			}
126
-			elseif($_COOKIE['mobile'] != 'false')
119
+			} elseif($_COOKIE['mobile'] != 'false')
127 120
 			{
128 121
 				$_COOKIE['mobile'] = 'false';
129 122
 				setcookie("mobile", 'false');
@@ -198,8 +191,7 @@  discard block
 block discarded – undo
198 191
 				{
199 192
 					$UACheck = TRUE;
200 193
 					return TRUE;
201
-				}
202
-				elseif(strpos($_SERVER['HTTP_USER_AGENT'], $exceptionAgent[$agent]) === FALSE)
194
+				} elseif(strpos($_SERVER['HTTP_USER_AGENT'], $exceptionAgent[$agent]) === FALSE)
203 195
 				{
204 196
 					// If the agent is the Android, that can be either tablet and mobile phone.
205 197
 					foreach($exceptionAgent[0] as $val)
Please login to merge, or discard this patch.