Completed
Pull Request — v3.0 (#136)
by
unknown
25:07
created
web_interface/astpp/system/libraries/Zip.php 3 patches
Doc Comments   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,6 +103,7 @@  discard block
 block discarded – undo
103 103
 	 *
104 104
 	 * @access	private
105 105
 	 * @param	string	the directory name
106
+	 * @param integer $file_mdate
106 107
 	 * @return	void
107 108
 	 */
108 109
 	function _add_dir($dir, $file_mtime, $file_mdate)
@@ -156,6 +157,7 @@  discard block
 block discarded – undo
156 157
 	 * @access	public
157 158
 	 * @param	mixed
158 159
 	 * @param	string
160
+	 * @param string $data
159 161
 	 * @return	void
160 162
 	 */
161 163
 	function add_data($filepath, $data = NULL)
@@ -185,6 +187,7 @@  discard block
 block discarded – undo
185 187
 	 * @access	private
186 188
 	 * @param	string	the file name/path
187 189
 	 * @param	string	the data to be encoded
190
+	 * @param integer $file_mdate
188 191
 	 * @return	void
189 192
 	 */
190 193
 	function _add_data($filepath, $data, $file_mtime, $file_mdate)
@@ -323,7 +326,7 @@  discard block
 block discarded – undo
323 326
 	 * Get the Zip file
324 327
 	 *
325 328
 	 * @access	public
326
-	 * @return	binary string
329
+	 * @return	false|string string
327 330
 	 */
328 331
 	function get_zip()
329 332
 	{
@@ -378,7 +381,7 @@  discard block
 block discarded – undo
378 381
 	 * @access	public
379 382
 	 * @param	string	the file name
380 383
 	 * @param	string	the data to be encoded
381
-	 * @return	bool
384
+	 * @return	boolean|null
382 385
 	 */
383 386
 	function download($filename = 'backup.zip')
384 387
 	{
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -30,12 +30,12 @@  discard block
 block discarded – undo
30 30
  * @author		ExpressionEngine Dev Team
31 31
  * @link		http://codeigniter.com/user_guide/libraries/zip.html
32 32
  */
33
-class CI_Zip  {
33
+class CI_Zip {
34 34
 
35 35
 	var $zipdata	= '';
36
-	var $directory	= '';
36
+	var $directory = '';
37 37
 	var $entries	= 0;
38
-	var $file_num	= 0;
38
+	var $file_num = 0;
39 39
 	var $offset		= 0;
40 40
 	var $now;
41 41
 
@@ -128,9 +128,9 @@  discard block
 block discarded – undo
128 128
 			"\x50\x4b\x01\x02\x00\x00\x0a\x00\x00\x00\x00\x00"
129 129
 			.pack('v', $file_mtime)
130 130
 			.pack('v', $file_mdate)
131
-			.pack('V',0) // crc32
132
-			.pack('V',0) // compressed filesize
133
-			.pack('V',0) // uncompressed filesize
131
+			.pack('V', 0) // crc32
132
+			.pack('V', 0) // compressed filesize
133
+			.pack('V', 0) // uncompressed filesize
134 134
 			.pack('v', strlen($dir)) // length of pathname
135 135
 			.pack('v', 0) // extra field length
136 136
 			.pack('v', 0) // file comment length
@@ -387,12 +387,12 @@  discard block
 block discarded – undo
387 387
 			$filename .= '.zip';
388 388
 		}
389 389
 
390
-		$CI =& get_instance();
390
+		$CI = & get_instance();
391 391
 		$CI->load->helper('download');
392 392
 
393 393
 		$get_zip = $this->get_zip();
394 394
 
395
-		$zip_content =& $get_zip;
395
+		$zip_content = & $get_zip;
396 396
 
397 397
 		force_download($filename, $zip_content);
398 398
 	}
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
 		$this->directory	= '';
415 415
 		$this->entries		= 0;
416 416
 		$this->file_num		= 0;
417
-		$this->offset		= 0;
417
+		$this->offset = 0;
418 418
 	}
419 419
 
420 420
 }
Please login to merge, or discard this patch.
Braces   +5 added lines, -5 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
  * Code Igniter
4 6
  *
@@ -115,8 +117,7 @@  discard block
 block discarded – undo
115 117
 		if ($primary === TRUE)
116 118
 		{
117 119
 			$this->primary_keys[] = $key;
118
-		}
119
-		else
120
+		} else
120 121
 		{
121 122
 			$this->keys[] = $key;
122 123
 		}
@@ -150,8 +151,7 @@  discard block
 block discarded – undo
150 151
 													)
151 152
 								));
152 153
 				$this->add_key('id', TRUE);
153
-			}
154
-			else
154
+			} else
155 155
 			{
156 156
 				if (strpos($field, ' ') === FALSE)
157 157
 				{
Please login to merge, or discard this patch.
web_interface/astpp/index.php 3 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.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -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
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 	define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/'));
188 188
 	
189 189
 	//Name of the "assets folder'
190
-	define('ASSETSDIR',realpath($assets_path).'/');
190
+	define('ASSETSDIR', realpath($assets_path).'/');
191 191
 	
192 192
 	// The path to the "application" folder
193 193
 	if (is_dir($application_folder))
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/CodeIgniter.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
  *  Start the timer... tick tock tick tock...
113 113
  * ------------------------------------------------------
114 114
  */
115
-	$BM =& load_class('Benchmark', 'core');
115
+	$BM = & load_class('Benchmark', 'core');
116 116
 	$BM->mark('total_execution_time_start');
117 117
 	$BM->mark('loading_time:_base_classes_start');
118 118
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
  *  Instantiate the hooks class
122 122
  * ------------------------------------------------------
123 123
  */
124
-	$EXT =& load_class('Hooks', 'core');
124
+	$EXT = & load_class('Hooks', 'core');
125 125
 
126 126
 /*
127 127
  * ------------------------------------------------------
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
  *  Instantiate the config class
136 136
  * ------------------------------------------------------
137 137
  */
138
-	$CFG =& load_class('Config', 'core');
138
+	$CFG = & load_class('Config', 'core');
139 139
 
140 140
 	// Do we have any manually set config items in the index.php file?
141 141
 	if (isset($assign_to_config))
@@ -155,21 +155,21 @@  discard block
 block discarded – undo
155 155
  *
156 156
  */
157 157
 
158
-	$UNI =& load_class('Utf8', 'core');
158
+	$UNI = & load_class('Utf8', 'core');
159 159
 
160 160
 /*
161 161
  * ------------------------------------------------------
162 162
  *  Instantiate the URI class
163 163
  * ------------------------------------------------------
164 164
  */
165
-	$URI =& load_class('URI', 'core');
165
+	$URI = & load_class('URI', 'core');
166 166
 
167 167
 /*
168 168
  * ------------------------------------------------------
169 169
  *  Instantiate the routing class and set the routing
170 170
  * ------------------------------------------------------
171 171
  */
172
-	$RTR =& load_class('Router', 'core');
172
+	$RTR = & load_class('Router', 'core');
173 173
 	$RTR->_set_routing();
174 174
 
175 175
 	// Set any routing overrides that may exist in the main index file
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
  *  Instantiate the output class
184 184
  * ------------------------------------------------------
185 185
  */
186
-	$OUT =& load_class('Output', 'core');
186
+	$OUT = & load_class('Output', 'core');
187 187
 
188 188
 /*
189 189
  * ------------------------------------------------------
@@ -203,21 +203,21 @@  discard block
 block discarded – undo
203 203
  * Load the security class for xss and csrf support
204 204
  * -----------------------------------------------------
205 205
  */
206
-	$SEC =& load_class('Security', 'core');
206
+	$SEC = & load_class('Security', 'core');
207 207
 
208 208
 /*
209 209
  * ------------------------------------------------------
210 210
  *  Load the Input class and sanitize globals
211 211
  * ------------------------------------------------------
212 212
  */
213
-	$IN	=& load_class('Input', 'core');
213
+	$IN = & load_class('Input', 'core');
214 214
 
215 215
 /*
216 216
  * ------------------------------------------------------
217 217
  *  Load the Language class
218 218
  * ------------------------------------------------------
219 219
  */
220
-	$LANG =& load_class('Lang', 'core');
220
+	$LANG = & load_class('Lang', 'core');
221 221
 
222 222
 /*
223 223
  * ------------------------------------------------------
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
  *
@@ -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/Lang.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,13 +31,13 @@  discard block
 block discarded – undo
31 31
 	 *
32 32
 	 * @var array
33 33
 	 */
34
-	var $language	= array();
34
+	var $language = array();
35 35
 	/**
36 36
 	 * List of loaded language files
37 37
 	 *
38 38
 	 * @var array
39 39
 	 */
40
-	var $is_loaded	= array();
40
+	var $is_loaded = array();
41 41
 
42 42
 	/**
43 43
 	 * Constructor
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 			return;
79 79
 		}
80 80
 
81
-		$config =& get_config();
81
+		$config = & get_config();
82 82
 
83 83
 		if ($idiom == '')
84 84
 		{
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 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
 // ------------------------------------------------------------------------
4 6
 
@@ -59,8 +61,7 @@  discard block
 block discarded – undo
59 61
 		if ($download == "")
60 62
 		{
61 63
 			return $str;	
62
-		}
63
-		else
64
+		} else
64 65
 		{	
65 66
 			echo $str;
66 67
 		}		
Please login to merge, or discard this patch.
web_interface/astpp/system/core/Router.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -41,35 +41,35 @@  discard block
 block discarded – undo
41 41
 	 * @var array
42 42
 	 * @access public
43 43
 	 */
44
-	var $routes			= array();
44
+	var $routes = array();
45 45
 	/**
46 46
 	 * List of error routes
47 47
 	 *
48 48
 	 * @var array
49 49
 	 * @access public
50 50
 	 */
51
-	var $error_routes	= array();
51
+	var $error_routes = array();
52 52
 	/**
53 53
 	 * Current class name
54 54
 	 *
55 55
 	 * @var string
56 56
 	 * @access public
57 57
 	 */
58
-	var $class			= '';
58
+	var $class = '';
59 59
 	/**
60 60
 	 * Current method name
61 61
 	 *
62 62
 	 * @var string
63 63
 	 * @access public
64 64
 	 */
65
-	var $method			= 'index';
65
+	var $method = 'index';
66 66
 	/**
67 67
 	 * Sub-directory that contains the requested controller class
68 68
 	 *
69 69
 	 * @var string
70 70
 	 * @access public
71 71
 	 */
72
-	var $directory		= '';
72
+	var $directory = '';
73 73
 	/**
74 74
 	 * Default controller (and method if specific)
75 75
 	 *
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
 	 */
86 86
 	function __construct()
87 87
 	{
88
-		$this->config =& load_class('Config', 'core');
89
-		$this->uri =& load_class('URI', 'core');
88
+		$this->config = & load_class('Config', 'core');
89
+		$this->uri = & load_class('URI', 'core');
90 90
 		log_message('debug', "Router Class Initialized");
91 91
 	}
92 92
 
Please login to merge, or discard this 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 4 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.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 	 * @var array
35 35
 	 * @access public
36 36
 	 */
37
-	var	$keyval			= array();
37
+	var	$keyval = array();
38 38
 	/**
39 39
 	 * Current uri string
40 40
 	 *
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	 * @var array
49 49
 	 * @access public
50 50
 	 */
51
-	var $segments		= array();
51
+	var $segments = array();
52 52
 	/**
53 53
 	 * Re-indexed list of uri segments
54 54
 	 * Starts at 1 instead of 0
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	 * @var array
57 57
 	 * @access public
58 58
 	 */
59
-	var $rsegments		= array();
59
+	var $rsegments = array();
60 60
 
61 61
 	/**
62 62
 	 * Constructor
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	 */
70 70
 	function __construct()
71 71
 	{
72
-		$this->config =& load_class('Config', 'core');
72
+		$this->config = & load_class('Config', 'core');
73 73
 		log_message('debug', "URI Class Initialized");
74 74
 	}
75 75
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 			}
111 111
 
112 112
 			// No PATH_INFO?... What about QUERY_STRING?
113
-			$path =  (isset($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] : @getenv('QUERY_STRING');
113
+			$path = (isset($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] : @getenv('QUERY_STRING');
114 114
 			if (trim($path, '/') != '')
115 115
 			{
116 116
 				$this->_set_uri_string($path);
@@ -161,9 +161,9 @@  discard block
 block discarded – undo
161 161
 		$str = remove_invisible_characters($str, FALSE);
162 162
 //================ITPL=======================
163 163
   $pos = strpos($str, "_json");
164
- if($pos > 0 && !isset($_SERVER['HTTP_X_REQUESTED_WITH'])){
164
+ if ($pos > 0 && ! isset($_SERVER['HTTP_X_REQUESTED_WITH'])) {
165 165
        $this->uri_string = str_replace('_json', '', trim($str, '/'));
166
- }else{
166
+ } else {
167 167
 		// If the URI contains only a slash we'll kill it
168 168
 		$this->uri_string = ($str == '/') ? '' : $str;
169 169
 }
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
 	{
243 243
 		$args = array_slice($_SERVER['argv'], 1);
244 244
 
245
-		return $args ? '/' . implode('/', $args) : '';
245
+		return $args ? '/'.implode('/', $args) : '';
246 246
 	}
247 247
 
248 248
 	// --------------------------------------------------------------------
@@ -267,8 +267,8 @@  discard block
 block discarded – undo
267 267
 		}
268 268
 
269 269
 		// Convert programatic characters to entities
270
-		$bad	= array('$',		'(',		')',		'%28',		'%29');
271
-		$good	= array('&#36;',	'&#40;',	'&#41;',	'&#40;',	'&#41;');
270
+		$bad = array('$', '(', ')', '%28', '%29');
271
+		$good = array('&#36;', '&#40;', '&#41;', '&#40;', '&#41;');
272 272
 
273 273
 		return str_replace($bad, $good, $str);
274 274
 	}
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 	 */
284 284
 	function _remove_url_suffix()
285 285
 	{
286
-		if  ($this->config->item('url_suffix') != "")
286
+		if ($this->config->item('url_suffix') != "")
287 287
 		{
288 288
 			$this->uri_string = preg_replace("|".preg_quote($this->config->item('url_suffix'))."$|", "", $this->uri_string);
289 289
 		}
@@ -559,16 +559,16 @@  discard block
 block discarded – undo
559 559
 	 */
560 560
 	function _slash_segment($n, $where = 'trailing', $which = 'segment')
561 561
 	{
562
-		$leading	= '/';
563
-		$trailing	= '/';
562
+		$leading = '/';
563
+		$trailing = '/';
564 564
 
565 565
 		if ($where == 'trailing')
566 566
 		{
567
-			$leading	= '';
567
+			$leading = '';
568 568
 		}
569 569
 		elseif ($where == 'leading')
570 570
 		{
571
-			$trailing	= '';
571
+			$trailing = '';
572 572
 		}
573 573
 
574 574
 		return $leading.$this->$which($n).$trailing;
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.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
 	 * and "_end" respectively).  It then compiles the execution times for
106 106
 	 * all points and returns it as an array
107 107
 	 *
108
-	 * @return	array
108
+	 * @return	string
109 109
 	 */
110 110
 	protected function _compile_benchmarks()
111 111
 	{
Please login to merge, or discard this patch.
web_interface/astpp/system/core/Controller.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,17 +36,17 @@
 block discarded – undo
36 36
 	 */
37 37
 	public function __construct()
38 38
 	{
39
-		self::$instance =& $this;
39
+		self::$instance = & $this;
40 40
 		
41 41
 		// Assign all the class objects that were instantiated by the
42 42
 		// bootstrap file (CodeIgniter.php) to local class variables
43 43
 		// so that CI can run as one big super object.
44 44
 		foreach (is_loaded() as $var => $class)
45 45
 		{
46
-			$this->$var =& load_class($class);
46
+			$this->$var = & load_class($class);
47 47
 		}
48 48
 
49
-		$this->load =& load_class('Loader', 'core');
49
+		$this->load = & load_class('Loader', 'core');
50 50
 
51 51
 		$this->load->initialize();
52 52
 		
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 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
 | -------------------------------------------------------------------
4 6
 | AUTO-LOADER
Please login to merge, or discard this patch.
web_interface/astpp/system/core/Utf8.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,13 +60,11 @@  discard block
 block discarded – undo
58 60
 			{
59 61
 				define('MB_ENABLED', TRUE);
60 62
 				mb_internal_encoding('UTF-8');
61
-			}
62
-			else
63
+			} else
63 64
 			{
64 65
 				define('MB_ENABLED', FALSE);
65 66
 			}
66
-		}
67
-		else
67
+		} else
68 68
 		{
69 69
 			log_message('debug', "UTF-8 Support Disabled");
70 70
 			define('UTF8_ENABLED', FALSE);
@@ -127,12 +127,10 @@  discard block
 block discarded – undo
127 127
 		if (function_exists('iconv'))
128 128
 		{
129 129
 			$str = @iconv($encoding, 'UTF-8', $str);
130
-		}
131
-		elseif (function_exists('mb_convert_encoding'))
130
+		} elseif (function_exists('mb_convert_encoding'))
132 131
 		{
133 132
 			$str = @mb_convert_encoding($str, 'UTF-8', $encoding);
134
-		}
135
-		else
133
+		} else
136 134
 		{
137 135
 			return FALSE;
138 136
 		}
Please login to merge, or discard this patch.
web_interface/astpp/system/libraries/Parser.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	 */
45 45
 	public function parse($template, $data, $return = FALSE)
46 46
 	{
47
-		$CI =& get_instance();
47
+		$CI = & get_instance();
48 48
 		$template = $CI->load->view($template, $data, TRUE);
49 49
 
50 50
 		return $this->_parse($template, $data, $return);
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
 		if ($return == FALSE)
106 106
 		{
107
-			$CI =& get_instance();
107
+			$CI = & get_instance();
108 108
 			$CI->output->append_output($template);
109 109
 		}
110 110
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 	 */
198 198
 	function _match_pair($string, $variable)
199 199
 	{
200
-		if ( ! preg_match("|" . preg_quote($this->l_delim) . $variable . preg_quote($this->r_delim) . "(.+?)". preg_quote($this->l_delim) . '/' . $variable . preg_quote($this->r_delim) . "|s", $string, $match))
200
+		if ( ! preg_match("|".preg_quote($this->l_delim).$variable.preg_quote($this->r_delim)."(.+?)".preg_quote($this->l_delim).'/'.$variable.preg_quote($this->r_delim)."|s", $string, $match))
201 201
 		{
202 202
 			return FALSE;
203 203
 		}
Please login to merge, or discard this patch.
Braces   +5 added lines, -5 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
  *
@@ -95,8 +97,7 @@  discard block
 block discarded – undo
95 97
 			if (is_array($val))
96 98
 			{
97 99
 				$template = $this->_parse_pair($key, $val, $template);
98
-			}
99
-			else
100
+			} else
100 101
 			{
101 102
 				$template = $this->_parse_single($key, (string)$val, $template);
102 103
 			}
@@ -172,8 +173,7 @@  discard block
 block discarded – undo
172 173
 				if ( ! is_array($val))
173 174
 				{
174 175
 					$temp = $this->_parse_single($key, $val, $temp);
175
-				}
176
-				else
176
+				} else
177 177
 				{
178 178
 					$temp = $this->_parse_pair($key, $val, $temp);
179 179
 				}
Please login to merge, or discard this patch.