@@ -63,63 +63,63 @@ discard block |
||
63 | 63 | * |
64 | 64 | * @var array |
65 | 65 | */ |
66 | - protected $_ci_view_paths = array(VIEWPATH => TRUE); |
|
66 | + protected $_ci_view_paths = array(VIEWPATH => TRUE); |
|
67 | 67 | |
68 | 68 | /** |
69 | 69 | * List of paths to load libraries from |
70 | 70 | * |
71 | 71 | * @var array |
72 | 72 | */ |
73 | - protected $_ci_library_paths = array(APPPATH, BASEPATH); |
|
73 | + protected $_ci_library_paths = array(APPPATH, BASEPATH); |
|
74 | 74 | |
75 | 75 | /** |
76 | 76 | * List of paths to load models from |
77 | 77 | * |
78 | 78 | * @var array |
79 | 79 | */ |
80 | - protected $_ci_model_paths = array(APPPATH); |
|
80 | + protected $_ci_model_paths = array(APPPATH); |
|
81 | 81 | |
82 | 82 | /** |
83 | 83 | * List of paths to load helpers from |
84 | 84 | * |
85 | 85 | * @var array |
86 | 86 | */ |
87 | - protected $_ci_helper_paths = array(APPPATH, BASEPATH); |
|
87 | + protected $_ci_helper_paths = array(APPPATH, BASEPATH); |
|
88 | 88 | |
89 | 89 | /** |
90 | 90 | * List of cached variables |
91 | 91 | * |
92 | 92 | * @var array |
93 | 93 | */ |
94 | - protected $_ci_cached_vars = array(); |
|
94 | + protected $_ci_cached_vars = array(); |
|
95 | 95 | |
96 | 96 | /** |
97 | 97 | * List of loaded classes |
98 | 98 | * |
99 | 99 | * @var array |
100 | 100 | */ |
101 | - protected $_ci_classes = array(); |
|
101 | + protected $_ci_classes = array(); |
|
102 | 102 | |
103 | 103 | /** |
104 | 104 | * List of loaded models |
105 | 105 | * |
106 | 106 | * @var array |
107 | 107 | */ |
108 | - protected $_ci_models = array(); |
|
108 | + protected $_ci_models = array(); |
|
109 | 109 | |
110 | 110 | /** |
111 | 111 | * List of loaded helpers |
112 | 112 | * |
113 | 113 | * @var array |
114 | 114 | */ |
115 | - protected $_ci_helpers = array(); |
|
115 | + protected $_ci_helpers = array(); |
|
116 | 116 | |
117 | 117 | /** |
118 | 118 | * List of class name mappings |
119 | 119 | * |
120 | 120 | * @var array |
121 | 121 | */ |
122 | - protected $_ci_varmap = array( |
|
122 | + protected $_ci_varmap = array( |
|
123 | 123 | 'unit_test' => 'unit', |
124 | 124 | 'user_agent' => 'agent' |
125 | 125 | ); |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | public function __construct() |
137 | 137 | { |
138 | 138 | $this->_ci_ob_level = ob_get_level(); |
139 | - $this->_ci_classes =& is_loaded(); |
|
139 | + $this->_ci_classes = & is_loaded(); |
|
140 | 140 | |
141 | 141 | log_message('info', 'Loader Class Initialized'); |
142 | 142 | } |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | return $this; |
270 | 270 | } |
271 | 271 | |
272 | - $CI =& get_instance(); |
|
272 | + $CI = & get_instance(); |
|
273 | 273 | if (isset($CI->$name)) |
274 | 274 | { |
275 | 275 | throw new RuntimeException('The model name you are loading is the name of a resource that is already being used: '.$name); |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | public function database($params = '', $return = FALSE, $query_builder = NULL) |
341 | 341 | { |
342 | 342 | // Grab the super object |
343 | - $CI =& get_instance(); |
|
343 | + $CI = & get_instance(); |
|
344 | 344 | |
345 | 345 | // Do we even need to load the database class? |
346 | 346 | if ($return === FALSE && $query_builder === NULL && isset($CI->db) && is_object($CI->db) && ! empty($CI->db->conn_id)) |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | $CI->db = ''; |
361 | 361 | |
362 | 362 | // Load the DB class |
363 | - $CI->db =& DB($params, $query_builder); |
|
363 | + $CI->db = & DB($params, $query_builder); |
|
364 | 364 | return $this; |
365 | 365 | } |
366 | 366 | |
@@ -375,12 +375,12 @@ discard block |
||
375 | 375 | */ |
376 | 376 | public function dbutil($db = NULL, $return = FALSE) |
377 | 377 | { |
378 | - $CI =& get_instance(); |
|
378 | + $CI = & get_instance(); |
|
379 | 379 | |
380 | 380 | if ( ! is_object($db) OR ! ($db instanceof CI_DB)) |
381 | 381 | { |
382 | 382 | class_exists('CI_DB', FALSE) OR $this->database(); |
383 | - $db =& $CI->db; |
|
383 | + $db = & $CI->db; |
|
384 | 384 | } |
385 | 385 | |
386 | 386 | require_once(BASEPATH.'database/DB_utility.php'); |
@@ -407,11 +407,11 @@ discard block |
||
407 | 407 | */ |
408 | 408 | public function dbforge($db = NULL, $return = FALSE) |
409 | 409 | { |
410 | - $CI =& get_instance(); |
|
410 | + $CI = & get_instance(); |
|
411 | 411 | if ( ! is_object($db) OR ! ($db instanceof CI_DB)) |
412 | 412 | { |
413 | 413 | class_exists('CI_DB', FALSE) OR $this->database(); |
414 | - $db =& $CI->db; |
|
414 | + $db = & $CI->db; |
|
415 | 415 | } |
416 | 416 | |
417 | 417 | require_once(BASEPATH.'database/DB_forge.php'); |
@@ -744,7 +744,7 @@ discard block |
||
744 | 744 | $this->_ci_view_paths = array($path.'views/' => $view_cascade) + $this->_ci_view_paths; |
745 | 745 | |
746 | 746 | // Add config file path |
747 | - $config =& $this->_ci_get_component('config'); |
|
747 | + $config = & $this->_ci_get_component('config'); |
|
748 | 748 | $config->_config_paths[] = $path; |
749 | 749 | |
750 | 750 | return $this; |
@@ -779,7 +779,7 @@ discard block |
||
779 | 779 | */ |
780 | 780 | public function remove_package_path($path = '') |
781 | 781 | { |
782 | - $config =& $this->_ci_get_component('config'); |
|
782 | + $config = & $this->_ci_get_component('config'); |
|
783 | 783 | |
784 | 784 | if ($path === '') |
785 | 785 | { |
@@ -880,12 +880,12 @@ discard block |
||
880 | 880 | |
881 | 881 | // This allows anything loaded using $this->load (views, files, etc.) |
882 | 882 | // to become accessible from within the Controller and Model functions. |
883 | - $_ci_CI =& get_instance(); |
|
883 | + $_ci_CI = & get_instance(); |
|
884 | 884 | foreach (get_object_vars($_ci_CI) as $_ci_key => $_ci_var) |
885 | 885 | { |
886 | 886 | if ( ! isset($this->$_ci_key)) |
887 | 887 | { |
888 | - $this->$_ci_key =& $_ci_CI->$_ci_key; |
|
888 | + $this->$_ci_key = & $_ci_CI->$_ci_key; |
|
889 | 889 | } |
890 | 890 | } |
891 | 891 | |
@@ -1022,7 +1022,7 @@ discard block |
||
1022 | 1022 | // return a new instance of the object |
1023 | 1023 | if ($object_name !== NULL) |
1024 | 1024 | { |
1025 | - $CI =& get_instance(); |
|
1025 | + $CI = & get_instance(); |
|
1026 | 1026 | if ( ! isset($CI->$object_name)) |
1027 | 1027 | { |
1028 | 1028 | return $this->_ci_init_library($class, '', $params, $object_name); |
@@ -1083,7 +1083,7 @@ discard block |
||
1083 | 1083 | // return a new instance of the object |
1084 | 1084 | if ($object_name !== NULL) |
1085 | 1085 | { |
1086 | - $CI =& get_instance(); |
|
1086 | + $CI = & get_instance(); |
|
1087 | 1087 | if ( ! isset($CI->$object_name)) |
1088 | 1088 | { |
1089 | 1089 | return $this->_ci_init_library($library_name, $prefix, $params, $object_name); |
@@ -1226,7 +1226,7 @@ discard block |
||
1226 | 1226 | } |
1227 | 1227 | |
1228 | 1228 | // Don't overwrite existing properties |
1229 | - $CI =& get_instance(); |
|
1229 | + $CI = & get_instance(); |
|
1230 | 1230 | if (isset($CI->$object_name)) |
1231 | 1231 | { |
1232 | 1232 | if ($CI->$object_name instanceof $class_name) |
@@ -1359,7 +1359,7 @@ discard block |
||
1359 | 1359 | */ |
1360 | 1360 | protected function &_ci_get_component($component) |
1361 | 1361 | { |
1362 | - $CI =& get_instance(); |
|
1362 | + $CI = & get_instance(); |
|
1363 | 1363 | return $CI->$component; |
1364 | 1364 | } |
1365 | 1365 |
@@ -113,7 +113,7 @@ |
||
113 | 113 | */ |
114 | 114 | public function __construct() |
115 | 115 | { |
116 | - $config =& get_config(); |
|
116 | + $config = & get_config(); |
|
117 | 117 | |
118 | 118 | $this->_log_path = ($config['log_path'] !== '') ? $config['log_path'] : APPPATH.'logs/'; |
119 | 119 | $this->_file_ext = (isset($config['log_file_extension']) && $config['log_file_extension'] !== '') |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | * |
77 | 77 | * @var array |
78 | 78 | */ |
79 | - public $mimes = array(); |
|
79 | + public $mimes = array(); |
|
80 | 80 | |
81 | 81 | /** |
82 | 82 | * Mime-type for the current page |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | * |
112 | 112 | * @var array |
113 | 113 | */ |
114 | - protected $_profiler_sections = array(); |
|
114 | + protected $_profiler_sections = array(); |
|
115 | 115 | |
116 | 116 | /** |
117 | 117 | * Parse markers flag |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | ); |
140 | 140 | |
141 | 141 | // Get mime types for later |
142 | - $this->mimes =& get_mimes(); |
|
142 | + $this->mimes = & get_mimes(); |
|
143 | 143 | |
144 | 144 | log_message('info', 'Output Class Initialized'); |
145 | 145 | } |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | // Is this extension supported? |
238 | 238 | if (isset($this->mimes[$extension])) |
239 | 239 | { |
240 | - $mime_type =& $this->mimes[$extension]; |
|
240 | + $mime_type = & $this->mimes[$extension]; |
|
241 | 241 | |
242 | 242 | if (is_array($mime_type)) |
243 | 243 | { |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | { |
307 | 307 | if (strncasecmp($header, $headers[$i], $l = strlen($header)) === 0) |
308 | 308 | { |
309 | - return trim(substr($headers[$i], $l+1)); |
|
309 | + return trim(substr($headers[$i], $l + 1)); |
|
310 | 310 | } |
311 | 311 | } |
312 | 312 | |
@@ -407,13 +407,13 @@ discard block |
||
407 | 407 | // Note: We use load_class() because we can't use $CI =& get_instance() |
408 | 408 | // since this function is sometimes called by the caching mechanism, |
409 | 409 | // which happens before the CI super object is available. |
410 | - $BM =& load_class('Benchmark', 'core'); |
|
411 | - $CFG =& load_class('Config', 'core'); |
|
410 | + $BM = & load_class('Benchmark', 'core'); |
|
411 | + $CFG = & load_class('Config', 'core'); |
|
412 | 412 | |
413 | 413 | // Grab the super object if we can. |
414 | 414 | if (class_exists('CI_Controller', FALSE)) |
415 | 415 | { |
416 | - $CI =& get_instance(); |
|
416 | + $CI = & get_instance(); |
|
417 | 417 | } |
418 | 418 | |
419 | 419 | // -------------------------------------------------------------------- |
@@ -421,7 +421,7 @@ discard block |
||
421 | 421 | // Set the output data |
422 | 422 | if ($output === '') |
423 | 423 | { |
424 | - $output =& $this->final_output; |
|
424 | + $output = & $this->final_output; |
|
425 | 425 | } |
426 | 426 | |
427 | 427 | // -------------------------------------------------------------------- |
@@ -542,7 +542,7 @@ discard block |
||
542 | 542 | */ |
543 | 543 | public function _write_cache($output) |
544 | 544 | { |
545 | - $CI =& get_instance(); |
|
545 | + $CI = & get_instance(); |
|
546 | 546 | $path = $CI->config->item('cache_path'); |
547 | 547 | $cache_path = ($path === '') ? APPPATH.'cache/' : $path; |
548 | 548 | |
@@ -726,7 +726,7 @@ discard block |
||
726 | 726 | */ |
727 | 727 | public function delete_cache($uri = '') |
728 | 728 | { |
729 | - $CI =& get_instance(); |
|
729 | + $CI = & get_instance(); |
|
730 | 730 | $cache_path = $CI->config->item('cache_path'); |
731 | 731 | if ($cache_path === '') |
732 | 732 | { |
@@ -62,21 +62,21 @@ discard block |
||
62 | 62 | * |
63 | 63 | * @var array |
64 | 64 | */ |
65 | - public $routes = array(); |
|
65 | + public $routes = array(); |
|
66 | 66 | |
67 | 67 | /** |
68 | 68 | * Current class name |
69 | 69 | * |
70 | 70 | * @var string |
71 | 71 | */ |
72 | - public $class = ''; |
|
72 | + public $class = ''; |
|
73 | 73 | |
74 | 74 | /** |
75 | 75 | * Current method name |
76 | 76 | * |
77 | 77 | * @var string |
78 | 78 | */ |
79 | - public $method = 'index'; |
|
79 | + public $method = 'index'; |
|
80 | 80 | |
81 | 81 | /** |
82 | 82 | * Sub-directory that contains the requested controller class |
@@ -123,8 +123,8 @@ discard block |
||
123 | 123 | */ |
124 | 124 | public function __construct($routing = NULL) |
125 | 125 | { |
126 | - $this->config =& load_class('Config', 'core'); |
|
127 | - $this->uri =& load_class('URI', 'core'); |
|
126 | + $this->config = & load_class('Config', 'core'); |
|
127 | + $this->uri = & load_class('URI', 'core'); |
|
128 | 128 | |
129 | 129 | $this->enable_query_strings = ( ! is_cli() && $this->config->item('enable_query_strings') === TRUE); |
130 | 130 | |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | if (is_array($routing)) |
137 | 137 | { |
138 | 138 | empty($routing['controller']) OR $this->set_class($routing['controller']); |
139 | - empty($routing['function']) OR $this->set_method($routing['function']); |
|
139 | + empty($routing['function']) OR $this->set_method($routing['function']); |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | log_message('info', 'Router Class Initialized'); |
@@ -53,22 +53,22 @@ discard block |
||
53 | 53 | * |
54 | 54 | * @var array |
55 | 55 | */ |
56 | - public $filename_bad_chars = array( |
|
56 | + public $filename_bad_chars = array( |
|
57 | 57 | '../', '<!--', '-->', '<', '>', |
58 | 58 | "'", '"', '&', '$', '#', |
59 | 59 | '{', '}', '[', ']', '=', |
60 | 60 | ';', '?', '%20', '%22', |
61 | - '%3c', // < |
|
62 | - '%253c', // < |
|
63 | - '%3e', // > |
|
64 | - '%0e', // > |
|
65 | - '%28', // ( |
|
66 | - '%29', // ) |
|
67 | - '%2528', // ( |
|
68 | - '%26', // & |
|
69 | - '%24', // $ |
|
70 | - '%3f', // ? |
|
71 | - '%3b', // ; |
|
61 | + '%3c', // < |
|
62 | + '%253c', // < |
|
63 | + '%3e', // > |
|
64 | + '%0e', // > |
|
65 | + '%28', // ( |
|
66 | + '%29', // ) |
|
67 | + '%2528', // ( |
|
68 | + '%26', // & |
|
69 | + '%24', // $ |
|
70 | + '%3f', // ? |
|
71 | + '%3b', // ; |
|
72 | 72 | '%3d' // = |
73 | 73 | ); |
74 | 74 | |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | * |
108 | 108 | * @var int |
109 | 109 | */ |
110 | - protected $_csrf_expire = 7200; |
|
110 | + protected $_csrf_expire = 7200; |
|
111 | 111 | |
112 | 112 | /** |
113 | 113 | * CSRF Token name |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | * |
117 | 117 | * @var string |
118 | 118 | */ |
119 | - protected $_csrf_token_name = 'ci_csrf_token'; |
|
119 | + protected $_csrf_token_name = 'ci_csrf_token'; |
|
120 | 120 | |
121 | 121 | /** |
122 | 122 | * CSRF Cookie name |
@@ -125,14 +125,14 @@ discard block |
||
125 | 125 | * |
126 | 126 | * @var string |
127 | 127 | */ |
128 | - protected $_csrf_cookie_name = 'ci_csrf_token'; |
|
128 | + protected $_csrf_cookie_name = 'ci_csrf_token'; |
|
129 | 129 | |
130 | 130 | /** |
131 | 131 | * List of never allowed strings |
132 | 132 | * |
133 | 133 | * @var array |
134 | 134 | */ |
135 | - protected $_never_allowed_str = array( |
|
135 | + protected $_never_allowed_str = array( |
|
136 | 136 | 'document.cookie' => '[removed]', |
137 | 137 | 'document.write' => '[removed]', |
138 | 138 | '.parentNode' => '[removed]', |
@@ -795,7 +795,7 @@ discard block |
||
795 | 795 | */ |
796 | 796 | protected function _sanitize_naughty_html($matches) |
797 | 797 | { |
798 | - static $naughty_tags = array( |
|
798 | + static $naughty_tags = array( |
|
799 | 799 | 'alert', 'prompt', 'confirm', 'applet', 'audio', 'basefont', 'base', 'behavior', 'bgsound', |
800 | 800 | 'blink', 'body', 'embed', 'expression', 'form', 'frameset', 'frame', 'head', 'html', 'ilayer', |
801 | 801 | 'iframe', 'input', 'button', 'select', 'isindex', 'layer', 'link', 'meta', 'keygen', 'object', |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | */ |
99 | 99 | public function __construct() |
100 | 100 | { |
101 | - $this->config =& load_class('Config', 'core'); |
|
101 | + $this->config = & load_class('Config', 'core'); |
|
102 | 102 | |
103 | 103 | // If query strings are enabled, we don't need to parse any segments. |
104 | 104 | // However, they don't make sense under CLI. |
@@ -558,11 +558,11 @@ discard block |
||
558 | 558 | |
559 | 559 | if ($where === 'trailing') |
560 | 560 | { |
561 | - $leading = ''; |
|
561 | + $leading = ''; |
|
562 | 562 | } |
563 | 563 | elseif ($where === 'leading') |
564 | 564 | { |
565 | - $trailing = ''; |
|
565 | + $trailing = ''; |
|
566 | 566 | } |
567 | 567 | |
568 | 568 | return $leading.$this->$which($n).$trailing; |
@@ -74,8 +74,8 @@ discard block |
||
74 | 74 | public function __construct(&$db) |
75 | 75 | { |
76 | 76 | // Assign the main CI object to $this->CI and load the file helper since we use it a lot |
77 | - $this->CI =& get_instance(); |
|
78 | - $this->db =& $db; |
|
77 | + $this->CI = & get_instance(); |
|
78 | + $this->db = & $db; |
|
79 | 79 | $this->CI->load->helper('file'); |
80 | 80 | |
81 | 81 | $this->check_path(); |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | { |
195 | 195 | if ($segment_one === '') |
196 | 196 | { |
197 | - $segment_one = ($this->CI->uri->segment(1) == FALSE) ? 'default' : $this->CI->uri->segment(1); |
|
197 | + $segment_one = ($this->CI->uri->segment(1) == FALSE) ? 'default' : $this->CI->uri->segment(1); |
|
198 | 198 | } |
199 | 199 | |
200 | 200 | if ($segment_two === '') |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | * |
93 | 93 | * @var string |
94 | 94 | */ |
95 | - public $dbdriver = 'mysqli'; |
|
95 | + public $dbdriver = 'mysqli'; |
|
96 | 96 | |
97 | 97 | /** |
98 | 98 | * Sub-driver |
@@ -107,63 +107,63 @@ discard block |
||
107 | 107 | * |
108 | 108 | * @var string |
109 | 109 | */ |
110 | - public $dbprefix = ''; |
|
110 | + public $dbprefix = ''; |
|
111 | 111 | |
112 | 112 | /** |
113 | 113 | * Character set |
114 | 114 | * |
115 | 115 | * @var string |
116 | 116 | */ |
117 | - public $char_set = 'utf8'; |
|
117 | + public $char_set = 'utf8'; |
|
118 | 118 | |
119 | 119 | /** |
120 | 120 | * Collation |
121 | 121 | * |
122 | 122 | * @var string |
123 | 123 | */ |
124 | - public $dbcollat = 'utf8_general_ci'; |
|
124 | + public $dbcollat = 'utf8_general_ci'; |
|
125 | 125 | |
126 | 126 | /** |
127 | 127 | * Encryption flag/data |
128 | 128 | * |
129 | 129 | * @var mixed |
130 | 130 | */ |
131 | - public $encrypt = FALSE; |
|
131 | + public $encrypt = FALSE; |
|
132 | 132 | |
133 | 133 | /** |
134 | 134 | * Swap Prefix |
135 | 135 | * |
136 | 136 | * @var string |
137 | 137 | */ |
138 | - public $swap_pre = ''; |
|
138 | + public $swap_pre = ''; |
|
139 | 139 | |
140 | 140 | /** |
141 | 141 | * Database port |
142 | 142 | * |
143 | 143 | * @var int |
144 | 144 | */ |
145 | - public $port = ''; |
|
145 | + public $port = ''; |
|
146 | 146 | |
147 | 147 | /** |
148 | 148 | * Persistent connection flag |
149 | 149 | * |
150 | 150 | * @var bool |
151 | 151 | */ |
152 | - public $pconnect = FALSE; |
|
152 | + public $pconnect = FALSE; |
|
153 | 153 | |
154 | 154 | /** |
155 | 155 | * Connection ID |
156 | 156 | * |
157 | 157 | * @var object|resource |
158 | 158 | */ |
159 | - public $conn_id = FALSE; |
|
159 | + public $conn_id = FALSE; |
|
160 | 160 | |
161 | 161 | /** |
162 | 162 | * Result ID |
163 | 163 | * |
164 | 164 | * @var object|resource |
165 | 165 | */ |
166 | - public $result_id = FALSE; |
|
166 | + public $result_id = FALSE; |
|
167 | 167 | |
168 | 168 | /** |
169 | 169 | * Debug flag |
@@ -172,21 +172,21 @@ discard block |
||
172 | 172 | * |
173 | 173 | * @var bool |
174 | 174 | */ |
175 | - public $db_debug = FALSE; |
|
175 | + public $db_debug = FALSE; |
|
176 | 176 | |
177 | 177 | /** |
178 | 178 | * Benchmark time |
179 | 179 | * |
180 | 180 | * @var int |
181 | 181 | */ |
182 | - public $benchmark = 0; |
|
182 | + public $benchmark = 0; |
|
183 | 183 | |
184 | 184 | /** |
185 | 185 | * Executed queries count |
186 | 186 | * |
187 | 187 | * @var int |
188 | 188 | */ |
189 | - public $query_count = 0; |
|
189 | + public $query_count = 0; |
|
190 | 190 | |
191 | 191 | /** |
192 | 192 | * Bind marker |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | * |
196 | 196 | * @var string |
197 | 197 | */ |
198 | - public $bind_marker = '?'; |
|
198 | + public $bind_marker = '?'; |
|
199 | 199 | |
200 | 200 | /** |
201 | 201 | * Save queries flag |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | * |
205 | 205 | * @var bool |
206 | 206 | */ |
207 | - public $save_queries = TRUE; |
|
207 | + public $save_queries = TRUE; |
|
208 | 208 | |
209 | 209 | /** |
210 | 210 | * Queries list |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | * @see CI_DB_driver::$save_queries |
213 | 213 | * @var string[] |
214 | 214 | */ |
215 | - public $queries = array(); |
|
215 | + public $queries = array(); |
|
216 | 216 | |
217 | 217 | /** |
218 | 218 | * Query times |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | * |
222 | 222 | * @var array |
223 | 223 | */ |
224 | - public $query_times = array(); |
|
224 | + public $query_times = array(); |
|
225 | 225 | |
226 | 226 | /** |
227 | 227 | * Data cache |
@@ -230,28 +230,28 @@ discard block |
||
230 | 230 | * |
231 | 231 | * @var array |
232 | 232 | */ |
233 | - public $data_cache = array(); |
|
233 | + public $data_cache = array(); |
|
234 | 234 | |
235 | 235 | /** |
236 | 236 | * Transaction enabled flag |
237 | 237 | * |
238 | 238 | * @var bool |
239 | 239 | */ |
240 | - public $trans_enabled = TRUE; |
|
240 | + public $trans_enabled = TRUE; |
|
241 | 241 | |
242 | 242 | /** |
243 | 243 | * Strict transaction mode flag |
244 | 244 | * |
245 | 245 | * @var bool |
246 | 246 | */ |
247 | - public $trans_strict = TRUE; |
|
247 | + public $trans_strict = TRUE; |
|
248 | 248 | |
249 | 249 | /** |
250 | 250 | * Transaction depth level |
251 | 251 | * |
252 | 252 | * @var int |
253 | 253 | */ |
254 | - protected $_trans_depth = 0; |
|
254 | + protected $_trans_depth = 0; |
|
255 | 255 | |
256 | 256 | /** |
257 | 257 | * Transaction status flag |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | * |
261 | 261 | * @var bool |
262 | 262 | */ |
263 | - protected $_trans_status = TRUE; |
|
263 | + protected $_trans_status = TRUE; |
|
264 | 264 | |
265 | 265 | /** |
266 | 266 | * Transaction failure flag |
@@ -269,28 +269,28 @@ discard block |
||
269 | 269 | * |
270 | 270 | * @var bool |
271 | 271 | */ |
272 | - protected $_trans_failure = FALSE; |
|
272 | + protected $_trans_failure = FALSE; |
|
273 | 273 | |
274 | 274 | /** |
275 | 275 | * Cache On flag |
276 | 276 | * |
277 | 277 | * @var bool |
278 | 278 | */ |
279 | - public $cache_on = FALSE; |
|
279 | + public $cache_on = FALSE; |
|
280 | 280 | |
281 | 281 | /** |
282 | 282 | * Cache directory path |
283 | 283 | * |
284 | 284 | * @var bool |
285 | 285 | */ |
286 | - public $cachedir = ''; |
|
286 | + public $cachedir = ''; |
|
287 | 287 | |
288 | 288 | /** |
289 | 289 | * Cache auto-delete flag |
290 | 290 | * |
291 | 291 | * @var bool |
292 | 292 | */ |
293 | - public $cache_autodel = FALSE; |
|
293 | + public $cache_autodel = FALSE; |
|
294 | 294 | |
295 | 295 | /** |
296 | 296 | * DB Cache object |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | * |
306 | 306 | * @var bool |
307 | 307 | */ |
308 | - protected $_protect_identifiers = TRUE; |
|
308 | + protected $_protect_identifiers = TRUE; |
|
309 | 309 | |
310 | 310 | /** |
311 | 311 | * List of reserved identifiers |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | * |
315 | 315 | * @var string[] |
316 | 316 | */ |
317 | - protected $_reserved_identifiers = array('*'); |
|
317 | + protected $_reserved_identifiers = array('*'); |
|
318 | 318 | |
319 | 319 | /** |
320 | 320 | * Identifier escape character |
@@ -711,8 +711,8 @@ discard block |
||
711 | 711 | } |
712 | 712 | |
713 | 713 | // Load and instantiate the result driver |
714 | - $driver = $this->load_rdriver(); |
|
715 | - $RES = new $driver($this); |
|
714 | + $driver = $this->load_rdriver(); |
|
715 | + $RES = new $driver($this); |
|
716 | 716 | |
717 | 717 | // Is query caching enabled? If so, we'll serialize the |
718 | 718 | // result object and save it to a cache file. |
@@ -725,13 +725,13 @@ discard block |
||
725 | 725 | // result object, so we'll have to compile the data |
726 | 726 | // and save it) |
727 | 727 | $CR = new CI_DB_result($this); |
728 | - $CR->result_object = $RES->result_object(); |
|
729 | - $CR->result_array = $RES->result_array(); |
|
730 | - $CR->num_rows = $RES->num_rows(); |
|
728 | + $CR->result_object = $RES->result_object(); |
|
729 | + $CR->result_array = $RES->result_array(); |
|
730 | + $CR->num_rows = $RES->num_rows(); |
|
731 | 731 | |
732 | 732 | // Reset these since cached objects can not utilize resource IDs. |
733 | - $CR->conn_id = NULL; |
|
734 | - $CR->result_id = NULL; |
|
733 | + $CR->conn_id = NULL; |
|
734 | + $CR->result_id = NULL; |
|
735 | 735 | |
736 | 736 | $this->CACHE->write($sql, $CR); |
737 | 737 | } |
@@ -1553,17 +1553,17 @@ discard block |
||
1553 | 1553 | ? '\s+'.preg_quote(trim(sprintf($this->_like_escape_str, $this->_like_escape_chr)), '/') |
1554 | 1554 | : ''; |
1555 | 1555 | $_operators = array( |
1556 | - '\s*(?:<|>|!)?=\s*', // =, <=, >=, != |
|
1557 | - '\s*<>?\s*', // <, <> |
|
1558 | - '\s*>\s*', // > |
|
1559 | - '\s+IS NULL', // IS NULL |
|
1560 | - '\s+IS NOT NULL', // IS NOT NULL |
|
1561 | - '\s+EXISTS\s*\([^\)]+\)', // EXISTS(sql) |
|
1562 | - '\s+NOT EXISTS\s*\([^\)]+\)', // NOT EXISTS(sql) |
|
1563 | - '\s+BETWEEN\s+', // BETWEEN value AND value |
|
1564 | - '\s+IN\s*\([^\)]+\)', // IN(list) |
|
1565 | - '\s+NOT IN\s*\([^\)]+\)', // NOT IN (list) |
|
1566 | - '\s+LIKE\s+\S.*('.$_les.')?', // LIKE 'expr'[ ESCAPE '%s'] |
|
1556 | + '\s*(?:<|>|!)?=\s*', // =, <=, >=, != |
|
1557 | + '\s*<>?\s*', // <, <> |
|
1558 | + '\s*>\s*', // > |
|
1559 | + '\s+IS NULL', // IS NULL |
|
1560 | + '\s+IS NOT NULL', // IS NOT NULL |
|
1561 | + '\s+EXISTS\s*\([^\)]+\)', // EXISTS(sql) |
|
1562 | + '\s+NOT EXISTS\s*\([^\)]+\)', // NOT EXISTS(sql) |
|
1563 | + '\s+BETWEEN\s+', // BETWEEN value AND value |
|
1564 | + '\s+IN\s*\([^\)]+\)', // IN(list) |
|
1565 | + '\s+NOT IN\s*\([^\)]+\)', // NOT IN (list) |
|
1566 | + '\s+LIKE\s+\S.*('.$_les.')?', // LIKE 'expr'[ ESCAPE '%s'] |
|
1567 | 1567 | '\s+NOT LIKE\s+\S.*('.$_les.')?' // NOT LIKE 'expr'[ ESCAPE '%s'] |
1568 | 1568 | ); |
1569 | 1569 | |
@@ -1731,7 +1731,7 @@ discard block |
||
1731 | 1731 | */ |
1732 | 1732 | public function display_error($error = '', $swap = '', $native = FALSE) |
1733 | 1733 | { |
1734 | - $LANG =& load_class('Lang', 'core'); |
|
1734 | + $LANG = & load_class('Lang', 'core'); |
|
1735 | 1735 | $LANG->load('db'); |
1736 | 1736 | |
1737 | 1737 | $heading = $LANG->line('db_error_heading'); |
@@ -1769,7 +1769,7 @@ discard block |
||
1769 | 1769 | } |
1770 | 1770 | } |
1771 | 1771 | |
1772 | - $error =& load_class('Exceptions', 'core'); |
|
1772 | + $error = & load_class('Exceptions', 'core'); |
|
1773 | 1773 | echo $error->show_error($heading, $message, 'error_db'); |
1774 | 1774 | exit(8); // EXIT_DATABASE |
1775 | 1775 | } |
@@ -58,28 +58,28 @@ discard block |
||
58 | 58 | * |
59 | 59 | * @var array |
60 | 60 | */ |
61 | - public $fields = array(); |
|
61 | + public $fields = array(); |
|
62 | 62 | |
63 | 63 | /** |
64 | 64 | * Keys data |
65 | 65 | * |
66 | 66 | * @var array |
67 | 67 | */ |
68 | - public $keys = array(); |
|
68 | + public $keys = array(); |
|
69 | 69 | |
70 | 70 | /** |
71 | 71 | * Primary Keys data |
72 | 72 | * |
73 | 73 | * @var array |
74 | 74 | */ |
75 | - public $primary_keys = array(); |
|
75 | + public $primary_keys = array(); |
|
76 | 76 | |
77 | 77 | /** |
78 | 78 | * Database character set |
79 | 79 | * |
80 | 80 | * @var string |
81 | 81 | */ |
82 | - public $db_char_set = ''; |
|
82 | + public $db_char_set = ''; |
|
83 | 83 | |
84 | 84 | // -------------------------------------------------------------------- |
85 | 85 | |
@@ -88,28 +88,28 @@ discard block |
||
88 | 88 | * |
89 | 89 | * @var string |
90 | 90 | */ |
91 | - protected $_create_database = 'CREATE DATABASE %s'; |
|
91 | + protected $_create_database = 'CREATE DATABASE %s'; |
|
92 | 92 | |
93 | 93 | /** |
94 | 94 | * DROP DATABASE statement |
95 | 95 | * |
96 | 96 | * @var string |
97 | 97 | */ |
98 | - protected $_drop_database = 'DROP DATABASE %s'; |
|
98 | + protected $_drop_database = 'DROP DATABASE %s'; |
|
99 | 99 | |
100 | 100 | /** |
101 | 101 | * CREATE TABLE statement |
102 | 102 | * |
103 | 103 | * @var string |
104 | 104 | */ |
105 | - protected $_create_table = "%s %s (%s\n)"; |
|
105 | + protected $_create_table = "%s %s (%s\n)"; |
|
106 | 106 | |
107 | 107 | /** |
108 | 108 | * CREATE TABLE IF statement |
109 | 109 | * |
110 | 110 | * @var string |
111 | 111 | */ |
112 | - protected $_create_table_if = 'CREATE TABLE IF NOT EXISTS'; |
|
112 | + protected $_create_table_if = 'CREATE TABLE IF NOT EXISTS'; |
|
113 | 113 | |
114 | 114 | /** |
115 | 115 | * CREATE TABLE keys flag |
@@ -119,42 +119,42 @@ discard block |
||
119 | 119 | * |
120 | 120 | * @var bool |
121 | 121 | */ |
122 | - protected $_create_table_keys = FALSE; |
|
122 | + protected $_create_table_keys = FALSE; |
|
123 | 123 | |
124 | 124 | /** |
125 | 125 | * DROP TABLE IF EXISTS statement |
126 | 126 | * |
127 | 127 | * @var string |
128 | 128 | */ |
129 | - protected $_drop_table_if = 'DROP TABLE IF EXISTS'; |
|
129 | + protected $_drop_table_if = 'DROP TABLE IF EXISTS'; |
|
130 | 130 | |
131 | 131 | /** |
132 | 132 | * RENAME TABLE statement |
133 | 133 | * |
134 | 134 | * @var string |
135 | 135 | */ |
136 | - protected $_rename_table = 'ALTER TABLE %s RENAME TO %s;'; |
|
136 | + protected $_rename_table = 'ALTER TABLE %s RENAME TO %s;'; |
|
137 | 137 | |
138 | 138 | /** |
139 | 139 | * UNSIGNED support |
140 | 140 | * |
141 | 141 | * @var bool|array |
142 | 142 | */ |
143 | - protected $_unsigned = TRUE; |
|
143 | + protected $_unsigned = TRUE; |
|
144 | 144 | |
145 | 145 | /** |
146 | 146 | * NULL value representation in CREATE/ALTER TABLE statements |
147 | 147 | * |
148 | 148 | * @var string |
149 | 149 | */ |
150 | - protected $_null = ''; |
|
150 | + protected $_null = ''; |
|
151 | 151 | |
152 | 152 | /** |
153 | 153 | * DEFAULT value representation in CREATE/ALTER TABLE statements |
154 | 154 | * |
155 | 155 | * @var string |
156 | 156 | */ |
157 | - protected $_default = ' DEFAULT '; |
|
157 | + protected $_default = ' DEFAULT '; |
|
158 | 158 | |
159 | 159 | // -------------------------------------------------------------------- |
160 | 160 | |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | */ |
167 | 167 | public function __construct(&$db) |
168 | 168 | { |
169 | - $this->db =& $db; |
|
169 | + $this->db = & $db; |
|
170 | 170 | log_message('info', 'Database Forge Class Initialized'); |
171 | 171 | } |
172 | 172 |