Completed
Push — v3.0 ( 23635d...e28df5 )
by Samir
23s
created
web_interface/astpp/index.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
  * NOTE: If you change these, also change the error_reporting() code below
19 19
  *
20 20
  */
21
-        ini_set("date.timezone", "UTC");
21
+		ini_set("date.timezone", "UTC");
22 22
 	define('ENVIRONMENT', 'development');
23 23
 /*
24 24
  *---------------------------------------------------------------
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
  * as this file.
69 69
  *
70 70
  */
71
-       $assets_path='assets';
71
+	   $assets_path='assets';
72 72
 /*
73 73
  *---------------------------------------------------------------
74 74
  * APPLICATION FOLDER NAME
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -193,8 +193,7 @@
 block discarded – undo
193 193
 	if (is_dir($application_folder))
194 194
 	{
195 195
 		define('APPPATH', $application_folder.'/');
196
-	}
197
-	else
196
+	} else
198 197
 	{
199 198
 		if ( ! is_dir(BASEPATH.$application_folder.'/'))
200 199
 		{
Please login to merge, or discard this patch.
web_interface/astpp/system/core/Output.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
 		// Get mime types for later
97 97
 		if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'))
98 98
 		{
99
-		    include APPPATH.'config/'.ENVIRONMENT.'/mimes.php';
99
+			include APPPATH.'config/'.ENVIRONMENT.'/mimes.php';
100 100
 		}
101 101
 		else
102 102
 		{
Please login to merge, or discard this patch.
Braces   +8 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
1
+<?php  if ( ! defined('BASEPATH')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * CodeIgniter
4 6
  *
@@ -97,8 +99,7 @@  discard block
 block discarded – undo
97 99
 		if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'))
98 100
 		{
99 101
 		    include APPPATH.'config/'.ENVIRONMENT.'/mimes.php';
100
-		}
101
-		else
102
+		} else
102 103
 		{
103 104
 			include APPPATH.'config/mimes.php';
104 105
 		}
@@ -158,8 +159,7 @@  discard block
 block discarded – undo
158 159
 		if ($this->final_output == '')
159 160
 		{
160 161
 			$this->final_output = $output;
161
-		}
162
-		else
162
+		} else
163 163
 		{
164 164
 			$this->final_output .= $output;
165 165
 		}
@@ -425,8 +425,7 @@  discard block
 block discarded – undo
425 425
 				$output  = preg_replace("|</body>.*?</html>|is", '', $output);
426 426
 				$output .= $CI->profiler->run();
427 427
 				$output .= '</body></html>';
428
-			}
429
-			else
428
+			} else
430 429
 			{
431 430
 				$output .= $CI->profiler->run();
432 431
 			}
@@ -439,8 +438,7 @@  discard block
 block discarded – undo
439 438
 		if (method_exists($CI, '_output'))
440 439
 		{
441 440
 			$CI->_output($output);
442
-		}
443
-		else
441
+		} else
444 442
 		{
445 443
 			echo $output;  // Send it to the browser!
446 444
 		}
@@ -489,8 +487,7 @@  discard block
 block discarded – undo
489 487
 		{
490 488
 			fwrite($fp, $expire.'TS--->'.$output);
491 489
 			flock($fp, LOCK_UN);
492
-		}
493
-		else
490
+		} else
494 491
 		{
495 492
 			log_message('error', "Unable to secure a file lock for file at: ".$cache_path);
496 493
 			return;
Please login to merge, or discard this patch.
web_interface/astpp/system/core/Config.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -316,7 +316,7 @@
 block discarded – undo
316 316
 				$uri = $str;
317 317
 			}
318 318
 		}
319
-	    return $uri;
319
+		return $uri;
320 320
 	}
321 321
 
322 322
 	// --------------------------------------------------------------------
Please login to merge, or discard this patch.
Braces   +9 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
1
+<?php  if ( ! defined('BASEPATH')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * CodeIgniter
4 6
  *
@@ -71,9 +73,7 @@  discard block
 block discarded – undo
71 73
 				$base_url = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off' ? 'https' : 'http';
72 74
 				$base_url .= '://'. $_SERVER['HTTP_HOST'];
73 75
 				$base_url .= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']);
74
-			}
75
-
76
-			else
76
+			} else
77 77
 			{
78 78
 				$base_url = 'http://localhost/';
79 79
 			}
@@ -143,13 +143,11 @@  discard block
 block discarded – undo
143 143
 				if (isset($this->config[$file]))
144 144
 				{
145 145
 					$this->config[$file] = array_merge($this->config[$file], $config);
146
-				}
147
-				else
146
+				} else
148 147
 				{
149 148
 					$this->config[$file] = $config;
150 149
 				}
151
-			}
152
-			else
150
+			} else
153 151
 			{
154 152
 				$this->config = array_merge($this->config, $config);
155 153
 			}
@@ -196,8 +194,7 @@  discard block
 block discarded – undo
196 194
 			}
197 195
 
198 196
 			$pref = $this->config[$item];
199
-		}
200
-		else
197
+		} else
201 198
 		{
202 199
 			if ( ! isset($this->config[$index]))
203 200
 			{
@@ -260,8 +257,7 @@  discard block
 block discarded – undo
260 257
 		{
261 258
 			$suffix = ($this->item('url_suffix') == FALSE) ? '' : $this->item('url_suffix');
262 259
 			return $this->slash_item('base_url').$this->slash_item('index_page').$this->_uri_string($uri).$suffix;
263
-		}
264
-		else
260
+		} else
265 261
 		{
266 262
 			return $this->slash_item('base_url').$this->item('index_page').'?'.$this->_uri_string($uri);
267 263
 		}
@@ -300,8 +296,7 @@  discard block
 block discarded – undo
300 296
 				$uri = implode('/', $uri);
301 297
 			}
302 298
 			$uri = trim($uri, '/');
303
-		}
304
-		else
299
+		} else
305 300
 		{
306 301
 			if (is_array($uri))
307 302
 			{
Please login to merge, or discard this patch.
web_interface/astpp/system/core/CodeIgniter.php 1 patch
Braces   +7 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
1
+<?php  if ( ! defined('BASEPATH')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * CodeIgniter
4 6
  *
@@ -58,8 +60,7 @@  discard block
 block discarded – undo
58 60
 	if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/constants.php'))
59 61
 	{
60 62
 		require(APPPATH.'config/'.ENVIRONMENT.'/constants.php');
61
-	}
62
-	else
63
+	} else
63 64
 	{
64 65
 		require(APPPATH.'config/constants.php');
65 66
 	}
@@ -283,8 +284,7 @@  discard block
 block discarded – undo
283 284
 
284 285
 				include_once(APPPATH.'controllers/'.$class.'.php');
285 286
 			}
286
-		}
287
-		else
287
+		} else
288 288
 		{
289 289
 			show_404("{$class}/{$method}");
290 290
 		}
@@ -323,8 +323,7 @@  discard block
 block discarded – undo
323 323
 	if (method_exists($CI, '_remap'))
324 324
 	{
325 325
 		$CI->_remap($method, array_slice($URI->rsegments, 2));
326
-	}
327
-	else
326
+	} else
328 327
 	{
329 328
 		// is_callable() returns TRUE on some versions of PHP 5 for private and protected
330 329
 		// methods, so we'll use this workaround for consistent behavior
@@ -347,8 +346,7 @@  discard block
 block discarded – undo
347 346
 					unset($CI);
348 347
 					$CI = new $class();
349 348
 				}
350
-			}
351
-			else
349
+			} else
352 350
 			{
353 351
 				show_404("{$class}/{$method}");
354 352
 			}
Please login to merge, or discard this patch.
web_interface/astpp/system/core/Common.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -254,7 +254,7 @@
 block discarded – undo
254 254
 			}
255 255
 		}
256 256
 		$_config[0] =& $config;
257
-                return $_config[0];
257
+				return $_config[0];
258 258
 
259 259
 	}
260 260
 }
Please login to merge, or discard this patch.
Braces   +7 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
1
+<?php  if ( ! defined('BASEPATH')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * CodeIgniter
4 6
  *
@@ -92,8 +94,7 @@  discard block
 block discarded – undo
92 94
 			@chmod($file, DIR_WRITE_MODE);
93 95
 			@unlink($file);
94 96
 			return TRUE;
95
-		}
96
-		elseif ( ! is_file($file) OR ($fp = @fopen($file, FOPEN_WRITE_CREATE)) === FALSE)
97
+		} elseif ( ! is_file($file) OR ($fp = @fopen($file, FOPEN_WRITE_CREATE)) === FALSE)
97 98
 		{
98 99
 			return FALSE;
99 100
 		}
@@ -437,12 +438,10 @@  discard block
 block discarded – undo
437 438
 		if (substr(php_sapi_name(), 0, 3) == 'cgi')
438 439
 		{
439 440
 			header("Status: {$code} {$text}", TRUE);
440
-		}
441
-		elseif ($server_protocol == 'HTTP/1.1' OR $server_protocol == 'HTTP/1.0')
441
+		} elseif ($server_protocol == 'HTTP/1.1' OR $server_protocol == 'HTTP/1.0')
442 442
 		{
443 443
 			header($server_protocol." {$code} {$text}", TRUE, $code);
444
-		}
445
-		else
444
+		} else
446 445
 		{
447 446
 			header("HTTP/1.1 {$code} {$text}", TRUE, $code);
448 447
 		}
@@ -553,8 +552,7 @@  discard block
 block discarded – undo
553 552
 		if (is_array($var))
554 553
 		{
555 554
 			return array_map('html_escape', $var);
556
-		}
557
-		else
555
+		} else
558 556
 		{
559 557
 			return htmlspecialchars($var, ENT_QUOTES, config_item('charset'));
560 558
 		}
Please login to merge, or discard this patch.
web_interface/astpp/system/core/Input.php 2 patches
Indentation   +100 added lines, -100 removed lines patch added patch discarded remove patch
@@ -134,13 +134,13 @@  discard block
 block discarded – undo
134 134
 	// --------------------------------------------------------------------
135 135
 
136 136
 	/**
137
-	* Fetch an item from the GET array
138
-	*
139
-	* @access	public
140
-	* @param	string
141
-	* @param	bool
142
-	* @return	string
143
-	*/
137
+	 * Fetch an item from the GET array
138
+	 *
139
+	 * @access	public
140
+	 * @param	string
141
+	 * @param	bool
142
+	 * @return	string
143
+	 */
144 144
 	function get($index = NULL, $xss_clean = FALSE)
145 145
 	{
146 146
 		// Check if a field has been provided
@@ -162,13 +162,13 @@  discard block
 block discarded – undo
162 162
 	// --------------------------------------------------------------------
163 163
 
164 164
 	/**
165
-	* Fetch an item from the POST array
166
-	*
167
-	* @access	public
168
-	* @param	string
169
-	* @param	bool
170
-	* @return	string
171
-	*/
165
+	 * Fetch an item from the POST array
166
+	 *
167
+	 * @access	public
168
+	 * @param	string
169
+	 * @param	bool
170
+	 * @return	string
171
+	 */
172 172
 	function post($index = NULL, $xss_clean = FALSE)
173 173
 	{
174 174
 		// Check if a field has been provided
@@ -191,13 +191,13 @@  discard block
 block discarded – undo
191 191
 	// --------------------------------------------------------------------
192 192
 
193 193
 	/**
194
-	* Fetch an item from either the GET array or the POST
195
-	*
196
-	* @access	public
197
-	* @param	string	The index key
198
-	* @param	bool	XSS cleaning
199
-	* @return	string
200
-	*/
194
+	 * Fetch an item from either the GET array or the POST
195
+	 *
196
+	 * @access	public
197
+	 * @param	string	The index key
198
+	 * @param	bool	XSS cleaning
199
+	 * @return	string
200
+	 */
201 201
 	function get_post($index = '', $xss_clean = FALSE)
202 202
 	{
203 203
 		if ( ! isset($_POST[$index]) )
@@ -213,13 +213,13 @@  discard block
 block discarded – undo
213 213
 	// --------------------------------------------------------------------
214 214
 
215 215
 	/**
216
-	* Fetch an item from the COOKIE array
217
-	*
218
-	* @access	public
219
-	* @param	string
220
-	* @param	bool
221
-	* @return	string
222
-	*/
216
+	 * Fetch an item from the COOKIE array
217
+	 *
218
+	 * @access	public
219
+	 * @param	string
220
+	 * @param	bool
221
+	 * @return	string
222
+	 */
223 223
 	function cookie($index = '', $xss_clean = FALSE)
224 224
 	{
225 225
 		return $this->_fetch_from_array($_COOKIE, $index, $xss_clean);
@@ -228,21 +228,21 @@  discard block
 block discarded – undo
228 228
 	// ------------------------------------------------------------------------
229 229
 
230 230
 	/**
231
-	* Set cookie
232
-	*
233
-	* Accepts six parameter, or you can submit an associative
234
-	* array in the first parameter containing all the values.
235
-	*
236
-	* @access	public
237
-	* @param	mixed
238
-	* @param	string	the value of the cookie
239
-	* @param	string	the number of seconds until expiration
240
-	* @param	string	the cookie domain.  Usually:  .yourdomain.com
241
-	* @param	string	the cookie path
242
-	* @param	string	the cookie prefix
243
-	* @param	bool	true makes the cookie secure
244
-	* @return	void
245
-	*/
231
+	 * Set cookie
232
+	 *
233
+	 * Accepts six parameter, or you can submit an associative
234
+	 * array in the first parameter containing all the values.
235
+	 *
236
+	 * @access	public
237
+	 * @param	mixed
238
+	 * @param	string	the value of the cookie
239
+	 * @param	string	the number of seconds until expiration
240
+	 * @param	string	the cookie domain.  Usually:  .yourdomain.com
241
+	 * @param	string	the cookie path
242
+	 * @param	string	the cookie prefix
243
+	 * @param	bool	true makes the cookie secure
244
+	 * @return	void
245
+	 */
246 246
 	function set_cookie($name = '', $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = FALSE)
247 247
 	{
248 248
 		if (is_array($name))
@@ -289,13 +289,13 @@  discard block
 block discarded – undo
289 289
 	// --------------------------------------------------------------------
290 290
 
291 291
 	/**
292
-	* Fetch an item from the SERVER array
293
-	*
294
-	* @access	public
295
-	* @param	string
296
-	* @param	bool
297
-	* @return	string
298
-	*/
292
+	 * Fetch an item from the SERVER array
293
+	 *
294
+	 * @access	public
295
+	 * @param	string
296
+	 * @param	bool
297
+	 * @return	string
298
+	 */
299 299
 	function server($index = '', $xss_clean = FALSE)
300 300
 	{
301 301
 		return $this->_fetch_from_array($_SERVER, $index, $xss_clean);
@@ -304,11 +304,11 @@  discard block
 block discarded – undo
304 304
 	// --------------------------------------------------------------------
305 305
 
306 306
 	/**
307
-	* Fetch the IP Address
308
-	*
309
-	* @access	public
310
-	* @return	string
311
-	*/
307
+	 * Fetch the IP Address
308
+	 *
309
+	 * @access	public
310
+	 * @return	string
311
+	 */
312 312
 	function ip_address()
313 313
 	{
314 314
 		if ($this->ip_address !== FALSE)
@@ -363,14 +363,14 @@  discard block
 block discarded – undo
363 363
 	// --------------------------------------------------------------------
364 364
 
365 365
 	/**
366
-	* Validate IP Address
367
-	*
368
-	* Updated version suggested by Geert De Deckere
369
-	*
370
-	* @access	public
371
-	* @param	string
372
-	* @return	string
373
-	*/
366
+	 * Validate IP Address
367
+	 *
368
+	 * Updated version suggested by Geert De Deckere
369
+	 *
370
+	 * @access	public
371
+	 * @param	string
372
+	 * @return	string
373
+	 */
374 374
 	function valid_ip($ip)
375 375
 	{
376 376
 		$ip_segments = explode('.', $ip);
@@ -402,11 +402,11 @@  discard block
 block discarded – undo
402 402
 	// --------------------------------------------------------------------
403 403
 
404 404
 	/**
405
-	* User Agent
406
-	*
407
-	* @access	public
408
-	* @return	string
409
-	*/
405
+	 * User Agent
406
+	 *
407
+	 * @access	public
408
+	 * @return	string
409
+	 */
410 410
 	function user_agent()
411 411
 	{
412 412
 		if ($this->user_agent !== FALSE)
@@ -422,19 +422,19 @@  discard block
 block discarded – undo
422 422
 	// --------------------------------------------------------------------
423 423
 
424 424
 	/**
425
-	* Sanitize Globals
426
-	*
427
-	* This function does the following:
428
-	*
429
-	* Unsets $_GET data (if query strings are not enabled)
430
-	*
431
-	* Unsets all globals if register_globals is enabled
432
-	*
433
-	* Standardizes newline characters to \n
434
-	*
435
-	* @access	private
436
-	* @return	void
437
-	*/
425
+	 * Sanitize Globals
426
+	 *
427
+	 * This function does the following:
428
+	 *
429
+	 * Unsets $_GET data (if query strings are not enabled)
430
+	 *
431
+	 * Unsets all globals if register_globals is enabled
432
+	 *
433
+	 * Standardizes newline characters to \n
434
+	 *
435
+	 * @access	private
436
+	 * @return	void
437
+	 */
438 438
 	function _sanitize_globals()
439 439
 	{
440 440
 		// It would be "wrong" to unset any of these GLOBALS.
@@ -527,15 +527,15 @@  discard block
 block discarded – undo
527 527
 	// --------------------------------------------------------------------
528 528
 
529 529
 	/**
530
-	* Clean Input Data
531
-	*
532
-	* This is a helper function. It escapes data and
533
-	* standardizes newline characters to \n
534
-	*
535
-	* @access	private
536
-	* @param	string
537
-	* @return	string
538
-	*/
530
+	 * Clean Input Data
531
+	 *
532
+	 * This is a helper function. It escapes data and
533
+	 * standardizes newline characters to \n
534
+	 *
535
+	 * @access	private
536
+	 * @param	string
537
+	 * @return	string
538
+	 */
539 539
 	function _clean_input_data($str)
540 540
 	{
541 541
 		if (is_array($str))
@@ -588,16 +588,16 @@  discard block
 block discarded – undo
588 588
 	// --------------------------------------------------------------------
589 589
 
590 590
 	/**
591
-	* Clean Keys
592
-	*
593
-	* This is a helper function. To prevent malicious users
594
-	* from trying to exploit keys we make sure that keys are
595
-	* only named with alpha-numeric text and a few other items.
596
-	*
597
-	* @access	private
598
-	* @param	string
599
-	* @return	string
600
-	*/
591
+	 * Clean Keys
592
+	 *
593
+	 * This is a helper function. To prevent malicious users
594
+	 * from trying to exploit keys we make sure that keys are
595
+	 * only named with alpha-numeric text and a few other items.
596
+	 *
597
+	 * @access	private
598
+	 * @param	string
599
+	 * @return	string
600
+	 */
601 601
 	function _clean_input_keys($str)
602 602
 	{
603 603
 		if ( ! preg_match("/^[a-z0-9:_\/-]+$/i", $str))
Please login to merge, or discard this patch.
Braces   +12 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
1
+<?php  if ( ! defined('BASEPATH')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * CodeIgniter
4 6
  *
@@ -203,8 +205,7 @@  discard block
 block discarded – undo
203 205
 		if ( ! isset($_POST[$index]) )
204 206
 		{
205 207
 			return $this->get($index, $xss_clean);
206
-		}
207
-		else
208
+		} else
208 209
 		{
209 210
 			return $this->post($index, $xss_clean);
210 211
 		}
@@ -277,8 +278,7 @@  discard block
 block discarded – undo
277 278
 		if ( ! is_numeric($expire))
278 279
 		{
279 280
 			$expire = time() - 86500;
280
-		}
281
-		else
281
+		} else
282 282
 		{
283 283
 			$expire = ($expire > 0) ? time() + $expire : 0;
284 284
 		}
@@ -322,20 +322,16 @@  discard block
 block discarded – undo
322 322
 			$proxies = is_array($proxies) ? $proxies : array($proxies);
323 323
 
324 324
 			$this->ip_address = in_array($_SERVER['REMOTE_ADDR'], $proxies) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
325
-		}
326
-		elseif ($this->server('REMOTE_ADDR') AND $this->server('HTTP_CLIENT_IP'))
325
+		} elseif ($this->server('REMOTE_ADDR') AND $this->server('HTTP_CLIENT_IP'))
327 326
 		{
328 327
 			$this->ip_address = $_SERVER['HTTP_CLIENT_IP'];
329
-		}
330
-		elseif ($this->server('REMOTE_ADDR'))
328
+		} elseif ($this->server('REMOTE_ADDR'))
331 329
 		{
332 330
 			$this->ip_address = $_SERVER['REMOTE_ADDR'];
333
-		}
334
-		elseif ($this->server('HTTP_CLIENT_IP'))
331
+		} elseif ($this->server('HTTP_CLIENT_IP'))
335 332
 		{
336 333
 			$this->ip_address = $_SERVER['HTTP_CLIENT_IP'];
337
-		}
338
-		elseif ($this->server('HTTP_X_FORWARDED_FOR'))
334
+		} elseif ($this->server('HTTP_X_FORWARDED_FOR'))
339 335
 		{
340 336
 			$this->ip_address = $_SERVER['HTTP_X_FORWARDED_FOR'];
341 337
 		}
@@ -454,8 +450,7 @@  discard block
 block discarded – undo
454 450
 					global $$global;
455 451
 					$$global = NULL;
456 452
 				}
457
-			}
458
-			else
453
+			} else
459 454
 			{
460 455
 				foreach ($global as $key => $val)
461 456
 				{
@@ -472,8 +467,7 @@  discard block
 block discarded – undo
472 467
 		if ($this->_allow_get_array == FALSE)
473 468
 		{
474 469
 			$_GET = array();
475
-		}
476
-		else
470
+		} else
477 471
 		{
478 472
 			if (is_array($_GET) AND count($_GET) > 0)
479 473
 			{
@@ -631,8 +625,7 @@  discard block
 block discarded – undo
631 625
 		if (function_exists('apache_request_headers'))
632 626
 		{
633 627
 			$headers = apache_request_headers();
634
-		}
635
-		else
628
+		} else
636 629
 		{
637 630
 			$headers['Content-Type'] = (isset($_SERVER['CONTENT_TYPE'])) ? $_SERVER['CONTENT_TYPE'] : @getenv('CONTENT_TYPE');
638 631
 
Please login to merge, or discard this patch.
web_interface/astpp/system/core/Hooks.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
 
83 83
 		if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/hooks.php'))
84 84
 		{
85
-		    include(APPPATH.'config/'.ENVIRONMENT.'/hooks.php');
85
+			include(APPPATH.'config/'.ENVIRONMENT.'/hooks.php');
86 86
 		}
87 87
 		elseif (is_file(APPPATH.'config/hooks.php'))
88 88
 		{
Please login to merge, or discard this patch.
Braces   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
1
+<?php  if ( ! defined('BASEPATH')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * CodeIgniter
4 6
  *
@@ -83,8 +85,7 @@  discard block
 block discarded – undo
83 85
 		if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/hooks.php'))
84 86
 		{
85 87
 		    include(APPPATH.'config/'.ENVIRONMENT.'/hooks.php');
86
-		}
87
-		elseif (is_file(APPPATH.'config/hooks.php'))
88
+		} elseif (is_file(APPPATH.'config/hooks.php'))
88 89
 		{
89 90
 			include(APPPATH.'config/hooks.php');
90 91
 		}
@@ -123,8 +124,7 @@  discard block
 block discarded – undo
123 124
 			{
124 125
 				$this->_run_hook($val);
125 126
 			}
126
-		}
127
-		else
127
+		} else
128 128
 		{
129 129
 			$this->_run_hook($this->hooks[$which]);
130 130
 		}
@@ -225,8 +225,7 @@  discard block
 block discarded – undo
225 225
 
226 226
 			$HOOK = new $class;
227 227
 			$HOOK->$function($params);
228
-		}
229
-		else
228
+		} else
230 229
 		{
231 230
 			if ( ! function_exists($function))
232 231
 			{
Please login to merge, or discard this patch.
web_interface/astpp/system/core/Router.php 1 patch
Braces   +9 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
1
+<?php  if ( ! defined('BASEPATH')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * CodeIgniter
4 6
  *
@@ -132,8 +134,7 @@  discard block
 block discarded – undo
132 134
 		if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/routes.php'))
133 135
 		{
134 136
 			include(APPPATH.'config/'.ENVIRONMENT.'/routes.php');
135
-		}
136
-		elseif (is_file(APPPATH.'config/routes.php'))
137
+		} elseif (is_file(APPPATH.'config/routes.php'))
137 138
 		{
138 139
 			include(APPPATH.'config/routes.php');
139 140
 		}
@@ -195,8 +196,7 @@  discard block
 block discarded – undo
195 196
 			$this->set_class($x[0]);
196 197
 			$this->set_method($x[1]);
197 198
 			$this->_set_request($x);
198
-		}
199
-		else
199
+		} else
200 200
 		{
201 201
 			$this->set_class($this->default_controller);
202 202
 			$this->set_method('index');
@@ -237,8 +237,7 @@  discard block
 block discarded – undo
237 237
 		{
238 238
 			// A standard method request
239 239
 			$this->set_method($segments[1]);
240
-		}
241
-		else
240
+		} else
242 241
 		{
243 242
 			// This lets the "routed" segment array identify that the default
244 243
 			// index method is being used.
@@ -295,14 +294,12 @@  discard block
 block discarded – undo
295 294
 						$this->set_method(isset($x[1]) ? $x[1] : 'index');
296 295
 
297 296
 						return $x;
298
-					}
299
-					else
297
+					} else
300 298
 					{
301 299
 						show_404($this->fetch_directory().$segments[0]);
302 300
 					}
303 301
 				}
304
-			}
305
-			else
302
+			} else
306 303
 			{
307 304
 				// Is the method being specified in the route?
308 305
 				if (strpos($this->default_controller, '/') !== FALSE)
@@ -311,8 +308,7 @@  discard block
 block discarded – undo
311 308
 
312 309
 					$this->set_class($x[0]);
313 310
 					$this->set_method($x[1]);
314
-				}
315
-				else
311
+				} else
316 312
 				{
317 313
 					$this->set_class($this->default_controller);
318 314
 					$this->set_method('index');
Please login to merge, or discard this patch.
web_interface/astpp/system/core/URI.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -162,13 +162,13 @@
 block discarded – undo
162 162
 //================ITPL=======================
163 163
   $pos = strpos($str, "_json");
164 164
  if($pos > 0 && !isset($_SERVER['HTTP_X_REQUESTED_WITH'])){
165
-       $this->uri_string = str_replace('_json', '', trim($str, '/'));
165
+	   $this->uri_string = str_replace('_json', '', trim($str, '/'));
166 166
  }else{
167 167
 		// If the URI contains only a slash we'll kill it
168 168
 		$this->uri_string = ($str == '/') ? '' : $str;
169 169
 }
170 170
 /*===============================*/	
171
-        }
171
+		}
172 172
 
173 173
 	// --------------------------------------------------------------------
174 174
 
Please login to merge, or discard this patch.
Braces   +10 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
1
+<?php  if ( ! defined('BASEPATH')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * CodeIgniter
4 6
  *
@@ -135,8 +137,7 @@  discard block
 block discarded – undo
135 137
 		{
136 138
 			$this->_set_uri_string($this->_detect_uri());
137 139
 			return;
138
-		}
139
-		elseif ($uri == 'CLI')
140
+		} elseif ($uri == 'CLI')
140 141
 		{
141 142
 			$this->_set_uri_string($this->_parse_cli_args());
142 143
 			return;
@@ -163,7 +164,7 @@  discard block
 block discarded – undo
163 164
   $pos = strpos($str, "_json");
164 165
  if($pos > 0 && !isset($_SERVER['HTTP_X_REQUESTED_WITH'])){
165 166
        $this->uri_string = str_replace('_json', '', trim($str, '/'));
166
- }else{
167
+ } else{
167 168
 		// If the URI contains only a slash we'll kill it
168 169
 		$this->uri_string = ($str == '/') ? '' : $str;
169 170
 }
@@ -192,8 +193,7 @@  discard block
 block discarded – undo
192 193
 		if (strpos($uri, $_SERVER['SCRIPT_NAME']) === 0)
193 194
 		{
194 195
 			$uri = substr($uri, strlen($_SERVER['SCRIPT_NAME']));
195
-		}
196
-		elseif (strpos($uri, dirname($_SERVER['SCRIPT_NAME'])) === 0)
196
+		} elseif (strpos($uri, dirname($_SERVER['SCRIPT_NAME'])) === 0)
197 197
 		{
198 198
 			$uri = substr($uri, strlen(dirname($_SERVER['SCRIPT_NAME'])));
199 199
 		}
@@ -210,8 +210,7 @@  discard block
 block discarded – undo
210 210
 		{
211 211
 			$_SERVER['QUERY_STRING'] = $parts[1];
212 212
 			parse_str($_SERVER['QUERY_STRING'], $_GET);
213
-		}
214
-		else
213
+		} else
215 214
 		{
216 215
 			$_SERVER['QUERY_STRING'] = '';
217 216
 			$_GET = array();
@@ -426,8 +425,7 @@  discard block
 block discarded – undo
426 425
 		{
427 426
 			$total_segments = 'total_segments';
428 427
 			$segment_array = 'segment_array';
429
-		}
430
-		else
428
+		} else
431 429
 		{
432 430
 			$total_segments = 'total_rsegments';
433 431
 			$segment_array = 'rsegment_array';
@@ -468,8 +466,7 @@  discard block
 block discarded – undo
468 466
 			if ($i % 2)
469 467
 			{
470 468
 				$retval[$lastval] = $seg;
471
-			}
472
-			else
469
+			} else
473 470
 			{
474 471
 				$retval[$seg] = FALSE;
475 472
 				$lastval = $seg;
@@ -565,8 +562,7 @@  discard block
 block discarded – undo
565 562
 		if ($where == 'trailing')
566 563
 		{
567 564
 			$leading	= '';
568
-		}
569
-		elseif ($where == 'leading')
565
+		} elseif ($where == 'leading')
570 566
 		{
571 567
 			$trailing	= '';
572 568
 		}
Please login to merge, or discard this patch.