diff options
Diffstat (limited to 'system/libraries')
-rw-r--r-- | system/libraries/Controller.php | 2 | ||||
-rw-r--r-- | system/libraries/Email.php | 6 | ||||
-rw-r--r-- | system/libraries/Encrypt.php | 4 | ||||
-rw-r--r-- | system/libraries/Image_lib.php | 8 | ||||
-rw-r--r-- | system/libraries/Language.php | 4 | ||||
-rw-r--r-- | system/libraries/Model.php | 8 | ||||
-rw-r--r-- | system/libraries/Output.php | 24 | ||||
-rw-r--r-- | system/libraries/Pagination.php | 6 | ||||
-rw-r--r-- | system/libraries/Parser.php | 6 | ||||
-rw-r--r-- | system/libraries/Profiler.php | 4 | ||||
-rw-r--r-- | system/libraries/Unit.php | 12 | ||||
-rw-r--r-- | system/libraries/Upload.php | 12 | ||||
-rw-r--r-- | system/libraries/Xmlrpc.php | 12 | ||||
-rw-r--r-- | system/libraries/Xmlrpcs.php | 4 |
14 files changed, 55 insertions, 57 deletions
diff --git a/system/libraries/Controller.php b/system/libraries/Controller.php index 58bec841e..4b9e3e960 100644 --- a/system/libraries/Controller.php +++ b/system/libraries/Controller.php @@ -102,7 +102,7 @@ class Controller extends CI_Base { * Run Scaffolding * * @access private - * @return voikd + * @return void */ function _ci_scaffolding() { diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 99de17414..23f7fe456 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -1629,10 +1629,10 @@ class CI_Email { */ function _set_error_message($msg, $val = '') { - $obj =& get_instance(); - $obj->lang->load('email'); + $CI =& get_instance(); + $CI->lang->load('email'); - if (FALSE === ($line = $obj->lang->line($msg))) + if (FALSE === ($line = $CI->lang->line($msg))) { $this->_debug_msg[] = str_replace('%s', $val, $msg)."<br />"; } diff --git a/system/libraries/Encrypt.php b/system/libraries/Encrypt.php index 537b1ab20..2a1de6f37 100644 --- a/system/libraries/Encrypt.php +++ b/system/libraries/Encrypt.php @@ -66,8 +66,8 @@ class CI_Encrypt { return $this->encryption_key; } - $obj =& get_instance(); - $key = $obj->config->item('encryption_key'); + $CI =& get_instance(); + $key = $CI->config->item('encryption_key'); if ($key === FALSE) { diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index ca1d7478b..79b2f9c1c 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -1503,22 +1503,22 @@ class CI_Image_lib { */ function set_error($msg) { - $obj =& get_instance(); - $obj->lang->load('imglib'); + $CI =& get_instance(); + $CI->lang->load('imglib'); if (is_array($msg)) { foreach ($msg as $val) { - $msg = ($obj->lang->line($val) == FALSE) ? $val : $obj->lang->line($val); + $msg = ($CI->lang->line($val) == FALSE) ? $val : $CI->lang->line($val); $this->error_msg[] = $msg; log_message('error', $msg); } } else { - $msg = ($obj->lang->line($msg) == FALSE) ? $msg : $obj->lang->line($msg); + $msg = ($CI->lang->line($msg) == FALSE) ? $msg : $CI->lang->line($msg); $this->error_msg[] = $msg; log_message('error', $msg); } diff --git a/system/libraries/Language.php b/system/libraries/Language.php index dabfd4145..00e2fb7e8 100644 --- a/system/libraries/Language.php +++ b/system/libraries/Language.php @@ -61,8 +61,8 @@ class CI_Language { if ($idiom == '') { - $obj =& get_instance(); - $deft_lang = $obj->config->item('language'); + $CI =& get_instance(); + $deft_lang = $CI->config->item('language'); $idiom = ($deft_lang == '') ? 'english' : $deft_lang; } diff --git a/system/libraries/Model.php b/system/libraries/Model.php index 55c995636..46f0367cb 100644 --- a/system/libraries/Model.php +++ b/system/libraries/Model.php @@ -49,18 +49,18 @@ class Model { */ function _assign_libraries($use_reference = TRUE) { - $obj =& get_instance(); - foreach (get_object_vars($obj) as $key => $var) + $CI =& get_instance(); + foreach (get_object_vars($CI) as $key => $var) { if (is_object($var) AND ! isset($this->$key)) { if ($use_reference === TRUE) { - $this->$key =& $obj->$key; + $this->$key =& $CI->$key; } else { - $this->$key = $obj->$key; + $this->$key = $CI->$key; } } } diff --git a/system/libraries/Output.php b/system/libraries/Output.php index 4ab5dd23c..507beab59 100644 --- a/system/libraries/Output.php +++ b/system/libraries/Output.php @@ -135,7 +135,7 @@ class CI_Output { */ function _display($output = '') { - // Note: We use globals because we can't use $obj =& get_instance() + // Note: We use globals because we can't use $CI =& get_instance() // since this function is sometimes called by the caching mechanism, // which happens before the CI super object is available. global $BM, $CFG; @@ -207,25 +207,25 @@ class CI_Output { // -------------------------------------------------------------------- // Grab the super object. We'll need it in a moment... - $obj =& get_instance(); + $CI =& get_instance(); // Do we need to generate profile data? // If so, load the Profile class and run it. if ($this->enable_profiler == TRUE) { - $obj->load->library('profiler'); + $CI->load->library('profiler'); // If the output data contains closing </body> and </html> tags // we will remove them and add them back after we insert the profile data if (preg_match("|</body>.*?</html>|is", $output)) { $output = preg_replace("|</body>.*?</html>|is", '', $output); - $output .= $obj->profiler->run(); + $output .= $CI->profiler->run(); $output .= '</body></html>'; } else { - $output .= $obj->profiler->run(); + $output .= $CI->profiler->run(); } } @@ -233,9 +233,9 @@ class CI_Output { // Does the controller contain a function named _output()? // If so send the output there. Otherwise, echo it. - if (method_exists($obj, '_output')) + if (method_exists($CI, '_output')) { - $obj->_output($output); + $CI->_output($output); } else { @@ -256,8 +256,8 @@ class CI_Output { */ function _write_cache($output) { - $obj =& get_instance(); - $path = $obj->config->item('cache_path'); + $CI =& get_instance(); + $path = $CI->config->item('cache_path'); $cache_path = ($path == '') ? BASEPATH.'cache/' : $path; @@ -266,9 +266,9 @@ class CI_Output { return; } - $uri = $obj->config->item('base_url'). - $obj->config->item('index_page'). - $obj->uri->uri_string(); + $uri = $CI->config->item('base_url'). + $CI->config->item('index_page'). + $CI->uri->uri_string(); $cache_path .= md5($uri); diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index 867d214fc..efbe6c27f 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -122,10 +122,10 @@ class CI_Pagination { } // Determine the current page number. - $obj =& get_instance(); - if ($obj->uri->segment($this->uri_segment) != 0) + $CI =& get_instance(); + if ($CI->uri->segment($this->uri_segment) != 0) { - $this->cur_page = $obj->uri->segment($this->uri_segment); + $this->cur_page = $CI->uri->segment($this->uri_segment); } if ( ! is_numeric($this->cur_page)) diff --git a/system/libraries/Parser.php b/system/libraries/Parser.php index 42e78b0ee..a0c9dab9e 100644 --- a/system/libraries/Parser.php +++ b/system/libraries/Parser.php @@ -44,8 +44,8 @@ class CI_Parser { */ function parse($template, $data, $return = FALSE) { - $obj =& get_instance(); - $template = $obj->load->view($template, $data, TRUE); + $CI =& get_instance(); + $template = $CI->load->view($template, $data, TRUE); if ($template == '') { @@ -66,7 +66,7 @@ class CI_Parser { if ($return == FALSE) { - $obj->output->final_output = $template; + $CI->output->final_output = $template; } return $template; diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index d91f23193..3370c9113 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -173,9 +173,7 @@ class CI_Profiler { * @return string */ function run($output = '') - { - $obj =& get_instance(); - + { $output = '<br clear="all" />'; $output .= "<div style='background-color:#fff;padding:10px;'>"; diff --git a/system/libraries/Unit.php b/system/libraries/Unit.php index 0df78c253..6573f4269 100644 --- a/system/libraries/Unit.php +++ b/system/libraries/Unit.php @@ -171,8 +171,8 @@ class CI_Unit { */ function result($results = array()) { - $obj =& get_instance(); - $obj->load->language('unit_test'); + $CI =& get_instance(); + $CI->load->language('unit_test'); if (count($results) == 0) { @@ -189,20 +189,20 @@ class CI_Unit { { foreach ($val as $k => $v) { - if (FALSE !== ($line = $obj->lang->line(strtolower('ut_'.$v)))) + if (FALSE !== ($line = $CI->lang->line(strtolower('ut_'.$v)))) { $v = $line; } - $temp[$obj->lang->line('ut_'.$k)] = $v; + $temp[$CI->lang->line('ut_'.$k)] = $v; } } else { - if (FALSE !== ($line = $obj->lang->line(strtolower('ut_'.$val)))) + if (FALSE !== ($line = $CI->lang->line(strtolower('ut_'.$val)))) { $val = $line; } - $temp[$obj->lang->line('ut_'.$key)] = $val; + $temp[$CI->lang->line('ut_'.$key)] = $val; } } diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index 37fccdfd8..13fa8acdf 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -684,8 +684,8 @@ class CI_Upload { $data = fread($fp, filesize($file)); - $obj =& get_instance(); - $data = $obj->input->xss_clean($data); + $CI =& get_instance(); + $data = $CI->input->xss_clean($data); fwrite($fp, $data); flock($fp, LOCK_UN); @@ -703,21 +703,21 @@ class CI_Upload { */ function set_error($msg) { - $obj =& get_instance(); - $obj->lang->load('upload'); + $CI =& get_instance(); + $CI->lang->load('upload'); if (is_array($msg)) { foreach ($msg as $val) { - $msg = ($obj->lang->line($val) == FALSE) ? $val : $obj->lang->line($val); + $msg = ($CI->lang->line($val) == FALSE) ? $val : $CI->lang->line($val); $this->error_msg[] = $msg; log_message('error', $msg); } } else { - $msg = ($obj->lang->line($msg) == FALSE) ? $msg : $obj->lang->line($msg); + $msg = ($CI->lang->line($msg) == FALSE) ? $msg : $CI->lang->line($msg); $this->error_msg[] = $msg; log_message('error', $msg); } diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index 4cb16f74e..0a3dedae1 100644 --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -493,7 +493,7 @@ class XML_RPC_Response function decode($array=FALSE) { - $obj =& get_instance(); + $CI =& get_instance(); if ($array !== FALSE && is_array($array)) { @@ -505,7 +505,7 @@ class XML_RPC_Response } else { - $array[$key] = $obj->input->xss_clean($array[$key]); + $array[$key] = $CI->input->xss_clean($array[$key]); } } @@ -521,7 +521,7 @@ class XML_RPC_Response } else { - $result = $obj->input->xss_clean($result); + $result = $CI->input->xss_clean($result); } } @@ -1107,7 +1107,7 @@ class XML_RPC_Message extends CI_Xmlrpc function output_parameters($array=FALSE) { - $obj =& get_instance(); + $CI =& get_instance(); if ($array !== FALSE && is_array($array)) { @@ -1119,7 +1119,7 @@ class XML_RPC_Message extends CI_Xmlrpc } else { - $array[$key] = $obj->input->xss_clean($array[$key]); + $array[$key] = $CI->input->xss_clean($array[$key]); } } @@ -1139,7 +1139,7 @@ class XML_RPC_Message extends CI_Xmlrpc } else { - $parameters[] = $obj->input->xss_clean($a_param); + $parameters[] = $CI->input->xss_clean($a_param); } } } diff --git a/system/libraries/Xmlrpcs.php b/system/libraries/Xmlrpcs.php index b47104857..e4d3cffde 100644 --- a/system/libraries/Xmlrpcs.php +++ b/system/libraries/Xmlrpcs.php @@ -318,8 +318,8 @@ class CI_Xmlrpcs extends CI_Xmlrpc } else { - $obj =& get_instance(); - return $obj->$method_parts['1']($m); + $CI =& get_instance(); + return $CI->$method_parts['1']($m); //$class = new $method_parts['0']; //return $class->$method_parts['1']($m); //return call_user_func(array(&$method_parts['0'],$method_parts['1']), $m); |