| @@ -192,16 +192,14 @@ discard block | ||
| 192 | 192 | if (empty($library)) | 
| 193 | 193 |  		{ | 
| 194 | 194 | return $this; | 
| 195 | - } | |
| 196 | - elseif (is_array($library)) | |
| 195 | + } elseif (is_array($library)) | |
| 197 | 196 |  		{ | 
| 198 | 197 | foreach ($library as $key => $value) | 
| 199 | 198 |  			{ | 
| 200 | 199 | if (is_int($key)) | 
| 201 | 200 |  				{ | 
| 202 | 201 | $this->library($value, $params); | 
| 203 | - } | |
| 204 | - else | |
| 202 | + } else | |
| 205 | 203 |  				{ | 
| 206 | 204 | $this->library($key, $params, $value); | 
| 207 | 205 | } | 
| @@ -236,8 +234,7 @@ discard block | ||
| 236 | 234 | if (empty($model)) | 
| 237 | 235 |  		{ | 
| 238 | 236 | return $this; | 
| 239 | - } | |
| 240 | - elseif (is_array($model)) | |
| 237 | + } elseif (is_array($model)) | |
| 241 | 238 |  		{ | 
| 242 | 239 | foreach ($model as $key => $value) | 
| 243 | 240 |  			{ | 
| @@ -303,8 +300,7 @@ discard block | ||
| 303 | 300 |  				{ | 
| 304 | 301 | throw new RuntimeException($app_path."Model.php exists, but doesn't declare class CI_Model"); | 
| 305 | 302 | } | 
| 306 | - } | |
| 307 | -			elseif ( ! class_exists('CI_Model', FALSE)) | |
| 303 | +			} elseif ( ! class_exists('CI_Model', FALSE)) | |
| 308 | 304 |  			{ | 
| 309 | 305 | require_once(BASEPATH.'core'.DIRECTORY_SEPARATOR.'Model.php'); | 
| 310 | 306 | } | 
| @@ -343,8 +339,7 @@ discard block | ||
| 343 | 339 |  			{ | 
| 344 | 340 |  				throw new RuntimeException('Unable to locate the model you have specified: '.$model); | 
| 345 | 341 | } | 
| 346 | - } | |
| 347 | - elseif ( ! is_subclass_of($model, 'CI_Model')) | |
| 342 | + } elseif ( ! is_subclass_of($model, 'CI_Model')) | |
| 348 | 343 |  		{ | 
| 349 | 344 |  			throw new RuntimeException("Class ".$model." already exists and doesn't extend CI_Model"); | 
| 350 | 345 | } | 
| @@ -455,8 +450,7 @@ discard block | ||
| 455 | 450 | require_once($driver_path); | 
| 456 | 451 | $class = 'CI_DB_'.$db->dbdriver.'_'.$db->subdriver.'_forge'; | 
| 457 | 452 | } | 
| 458 | - } | |
| 459 | - else | |
| 453 | + } else | |
| 460 | 454 |  		{ | 
| 461 | 455 | $class = 'CI_DB_'.$db->dbdriver.'_forge'; | 
| 462 | 456 | } | 
| @@ -724,8 +718,7 @@ discard block | ||
| 724 | 718 | } | 
| 725 | 719 | |
| 726 | 720 | return $this; | 
| 727 | - } | |
| 728 | - elseif (empty($library)) | |
| 721 | + } elseif (empty($library)) | |
| 729 | 722 |  		{ | 
| 730 | 723 | return FALSE; | 
| 731 | 724 | } | 
| @@ -818,8 +811,7 @@ discard block | ||
| 818 | 811 | array_shift($this->_ci_helper_paths); | 
| 819 | 812 | array_shift($this->_ci_view_paths); | 
| 820 | 813 | array_pop($config->_config_paths); | 
| 821 | - } | |
| 822 | - else | |
| 814 | + } else | |
| 823 | 815 |  		{ | 
| 824 | 816 | $path = rtrim($path, '/').'/'; | 
| 825 | 817 |  			foreach (array('_ci_library_paths', '_ci_model_paths', '_ci_helper_paths') as $var) | 
| @@ -881,8 +873,7 @@ discard block | ||
| 881 | 873 |  		{ | 
| 882 | 874 |  			$_ci_x = explode('/', $_ci_path); | 
| 883 | 875 | $_ci_file = end($_ci_x); | 
| 884 | - } | |
| 885 | - else | |
| 876 | + } else | |
| 886 | 877 |  		{ | 
| 887 | 878 | $_ci_ext = pathinfo($_ci_view, PATHINFO_EXTENSION); | 
| 888 | 879 | $_ci_file = ($_ci_ext === '') ? $_ci_view.'.php' : $_ci_view; | 
| @@ -952,8 +943,7 @@ discard block | ||
| 952 | 943 |  		if ( ! is_php('5.4') && ! ini_get('short_open_tag') && config_item('rewrite_short_tags') === TRUE) | 
| 953 | 944 |  		{ | 
| 954 | 945 |  			echo eval('?>'.preg_replace('/;*\s*\?>/', '; ?>', str_replace('<?=', '<?php echo ', file_get_contents($_ci_path)))); | 
| 955 | - } | |
| 956 | - else | |
| 946 | + } else | |
| 957 | 947 |  		{ | 
| 958 | 948 | include($_ci_path); // include() vs include_once() allows for multiple views with the same name | 
| 959 | 949 | } | 
| @@ -980,8 +970,7 @@ discard block | ||
| 980 | 970 | if (ob_get_level() > $this->_ci_ob_level + 1) | 
| 981 | 971 |  		{ | 
| 982 | 972 | ob_end_flush(); | 
| 983 | - } | |
| 984 | - else | |
| 973 | + } else | |
| 985 | 974 |  		{ | 
| 986 | 975 | $_ci_CI->output->append_output(ob_get_contents()); | 
| 987 | 976 | @ob_end_clean(); | 
| @@ -1019,8 +1008,7 @@ discard block | ||
| 1019 | 1008 | |
| 1020 | 1009 | // Get the filename from the path | 
| 1021 | 1010 | $class = substr($class, $last_slash); | 
| 1022 | - } | |
| 1023 | - else | |
| 1011 | + } else | |
| 1024 | 1012 |  		{ | 
| 1025 | 1013 | $subdir = ''; | 
| 1026 | 1014 | } | 
| @@ -1138,8 +1126,7 @@ discard block | ||
| 1138 | 1126 | if (class_exists($prefix.$library_name, FALSE)) | 
| 1139 | 1127 |  				{ | 
| 1140 | 1128 | return $this->_ci_init_library($library_name, $prefix, $params, $object_name); | 
| 1141 | - } | |
| 1142 | - else | |
| 1129 | + } else | |
| 1143 | 1130 |  				{ | 
| 1144 | 1131 |  					log_message('debug', $path.' exists, but does not declare '.$prefix.$library_name); | 
| 1145 | 1132 | } | 
| @@ -1159,8 +1146,7 @@ discard block | ||
| 1159 | 1146 |  				{ | 
| 1160 | 1147 |  					$prefix = config_item('subclass_prefix'); | 
| 1161 | 1148 | break; | 
| 1162 | - } | |
| 1163 | - else | |
| 1149 | + } else | |
| 1164 | 1150 |  				{ | 
| 1165 | 1151 |  					log_message('debug', $path.' exists, but does not declare '.$subclass); | 
| 1166 | 1152 | } | 
| @@ -1207,8 +1193,7 @@ discard block | ||
| 1207 | 1193 |  					{ | 
| 1208 | 1194 | include($path.'config/'.strtolower($class).'.php'); | 
| 1209 | 1195 | $found = TRUE; | 
| 1210 | - } | |
| 1211 | - elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php')) | |
| 1196 | + } elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php')) | |
| 1212 | 1197 |  					{ | 
| 1213 | 1198 | include($path.'config/'.ucfirst(strtolower($class)).'.php'); | 
| 1214 | 1199 | $found = TRUE; | 
| @@ -1218,8 +1203,7 @@ discard block | ||
| 1218 | 1203 |  					{ | 
| 1219 | 1204 | include($path.'config/'.ENVIRONMENT.'/'.strtolower($class).'.php'); | 
| 1220 | 1205 | $found = TRUE; | 
| 1221 | - } | |
| 1222 | - elseif (file_exists($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php')) | |
| 1206 | + } elseif (file_exists($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php')) | |
| 1223 | 1207 |  					{ | 
| 1224 | 1208 | include($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'); | 
| 1225 | 1209 | $found = TRUE; | 
| @@ -1410,8 +1394,7 @@ discard block | ||
| 1410 | 1394 | if ( ! is_array($filename)) | 
| 1411 | 1395 |  		{ | 
| 1412 | 1396 | return array(strtolower(str_replace(array($extension, '.php'), '', $filename).$extension)); | 
| 1413 | - } | |
| 1414 | - else | |
| 1397 | + } else | |
| 1415 | 1398 |  		{ | 
| 1416 | 1399 | foreach ($filename as $key => $val) | 
| 1417 | 1400 |  			{ | 
| @@ -104,8 +104,7 @@ discard block | ||
| 104 | 104 | empty($this->database) OR $this->dsn .= ';dbname='.$this->database; | 
| 105 | 105 | empty($this->char_set) OR $this->dsn .= ';charset='.$this->char_set; | 
| 106 | 106 | empty($this->appname) OR $this->dsn .= ';appname='.$this->appname; | 
| 107 | - } | |
| 108 | - else | |
| 107 | + } else | |
| 109 | 108 |  		{ | 
| 110 | 109 | if ( ! empty($this->char_set) && strpos($this->dsn, 'charset=', 6) === FALSE) | 
| 111 | 110 |  			{ | 
| @@ -282,8 +281,7 @@ discard block | ||
| 282 | 281 | if (count($this->qb_select) === 0) | 
| 283 | 282 |  			{ | 
| 284 | 283 | $select = '*'; // Inevitable | 
| 285 | - } | |
| 286 | - else | |
| 284 | + } else | |
| 287 | 285 |  			{ | 
| 288 | 286 | // Use only field names and their aliases, everything else is out of our scope. | 
| 289 | 287 | $select = array(); | 
| @@ -105,8 +105,7 @@ discard block | ||
| 105 | 105 | empty($this->port) OR $this->dsn .= ';port='.$this->port; | 
| 106 | 106 | empty($this->database) OR $this->dsn .= ';dbname='.$this->database; | 
| 107 | 107 | empty($this->char_set) OR $this->dsn .= ';charset='.$this->char_set; | 
| 108 | - } | |
| 109 | -		elseif ( ! empty($this->char_set) && strpos($this->dsn, 'charset=', 6) === FALSE && is_php('5.3.6')) | |
| 108 | +		} elseif ( ! empty($this->char_set) && strpos($this->dsn, 'charset=', 6) === FALSE && is_php('5.3.6')) | |
| 110 | 109 |  		{ | 
| 111 | 110 | $this->dsn .= ';charset='.$this->char_set; | 
| 112 | 111 | } | 
| @@ -138,8 +137,7 @@ discard block | ||
| 138 | 137 | if ($this->stricton) | 
| 139 | 138 |  			{ | 
| 140 | 139 | $sql = 'CONCAT(@@sql_mode, ",", "STRICT_ALL_TABLES")'; | 
| 141 | - } | |
| 142 | - else | |
| 140 | + } else | |
| 143 | 141 |  			{ | 
| 144 | 142 | $sql = 'REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE( | 
| 145 | 143 | @@sql_mode, | 
| @@ -156,8 +154,7 @@ discard block | ||
| 156 | 154 | if (empty($this->options[PDO::MYSQL_ATTR_INIT_COMMAND])) | 
| 157 | 155 |  				{ | 
| 158 | 156 | $this->options[PDO::MYSQL_ATTR_INIT_COMMAND] = 'SET SESSION sql_mode = '.$sql; | 
| 159 | - } | |
| 160 | - else | |
| 157 | + } else | |
| 161 | 158 |  				{ | 
| 162 | 159 | $this->options[PDO::MYSQL_ATTR_INIT_COMMAND] .= ', @@session.sql_mode = '.$sql; | 
| 163 | 160 | } |