diff options
-rw-r--r-- | system/helpers/cookie_helper.php | 18 | ||||
-rw-r--r-- | system/helpers/date_helper.php | 28 | ||||
-rw-r--r-- | system/helpers/form_helper.php | 4 | ||||
-rw-r--r-- | system/helpers/security_helper.php | 4 | ||||
-rw-r--r-- | system/helpers/url_helper.php | 12 |
5 files changed, 33 insertions, 33 deletions
diff --git a/system/helpers/cookie_helper.php b/system/helpers/cookie_helper.php index fc5920f25..8985fae2e 100644 --- a/system/helpers/cookie_helper.php +++ b/system/helpers/cookie_helper.php @@ -56,19 +56,19 @@ function set_cookie($name = '', $value = '', $expire = '', $domain = '', $path = } // Set the config file options - $obj =& get_instance(); + $CI =& get_instance(); - if ($prefix == '' AND $obj->config->item('cookie_prefix') != '') + if ($prefix == '' AND $CI->config->item('cookie_prefix') != '') { - $obj->config->item('cookie_prefix'); + $CI->config->item('cookie_prefix'); } - if ($domain == '' AND $obj->config->item('cookie_domain') != '') + if ($domain == '' AND $CI->config->item('cookie_domain') != '') { - $obj->config->item('cookie_domain'); + $CI->config->item('cookie_domain'); } - if ($prefix == '/' AND $obj->config->item('cookie_path') != '/') + if ($prefix == '/' AND $CI->config->item('cookie_path') != '/') { - $obj->config->item('cookie_path'); + $CI->config->item('cookie_path'); } if ( ! is_numeric($expire)) @@ -102,8 +102,8 @@ function set_cookie($name = '', $value = '', $expire = '', $domain = '', $path = */ function get_cookie($index = '', $xss_clean = FALSE) { - $obj =& get_instance(); - return $obj->input->cookie($index, $xss_clean); + $CI =& get_instance(); + return $CI->input->cookie($index, $xss_clean); } // -------------------------------------------------------------------- diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php index 987658c2e..03519e686 100644 --- a/system/helpers/date_helper.php +++ b/system/helpers/date_helper.php @@ -37,9 +37,9 @@ */ function now() { - $obj =& get_instance(); + $CI =& get_instance(); - if (strtolower($obj->config->item('time_reference')) == 'gmt') + if (strtolower($CI->config->item('time_reference')) == 'gmt') { $now = time(); $system_time = mktime(gmdate("H", $now), gmdate("i", $now), gmdate("s", $now), gmdate("m", $now), gmdate("d", $now), gmdate("Y", $now)); @@ -140,8 +140,8 @@ function standard_date($fmt = 'DATE_RFC822', $time = '') */ function timespan($seconds = 1, $time = '') { - $obj =& get_instance(); - $obj->lang->load('date'); + $CI =& get_instance(); + $CI->lang->load('date'); if ( ! is_numeric($seconds)) { @@ -167,7 +167,7 @@ function timespan($seconds = 1, $time = '') if ($years > 0) { - $str .= $years.' '.$obj->lang->line((($years > 1) ? 'date_years' : 'date_year')).', '; + $str .= $years.' '.$CI->lang->line((($years > 1) ? 'date_years' : 'date_year')).', '; } $seconds -= $years * 31536000; @@ -177,7 +177,7 @@ function timespan($seconds = 1, $time = '') { if ($months > 0) { - $str .= $months.' '.$obj->lang->line((($months > 1) ? 'date_months' : 'date_month')).', '; + $str .= $months.' '.$CI->lang->line((($months > 1) ? 'date_months' : 'date_month')).', '; } $seconds -= $months * 2628000; @@ -189,7 +189,7 @@ function timespan($seconds = 1, $time = '') { if ($weeks > 0) { - $str .= $weeks.' '.$obj->lang->line((($weeks > 1) ? 'date_weeks' : 'date_week')).', '; + $str .= $weeks.' '.$CI->lang->line((($weeks > 1) ? 'date_weeks' : 'date_week')).', '; } $seconds -= $weeks * 604800; @@ -201,7 +201,7 @@ function timespan($seconds = 1, $time = '') { if ($days > 0) { - $str .= $days.' '.$obj->lang->line((($days > 1) ? 'date_days' : 'date_day')).', '; + $str .= $days.' '.$CI->lang->line((($days > 1) ? 'date_days' : 'date_day')).', '; } $seconds -= $days * 86400; @@ -213,7 +213,7 @@ function timespan($seconds = 1, $time = '') { if ($hours > 0) { - $str .= $hours.' '.$obj->lang->line((($hours > 1) ? 'date_hours' : 'date_hour')).', '; + $str .= $hours.' '.$CI->lang->line((($hours > 1) ? 'date_hours' : 'date_hour')).', '; } $seconds -= $hours * 3600; @@ -225,7 +225,7 @@ function timespan($seconds = 1, $time = '') { if ($minutes > 0) { - $str .= $minutes.' '.$obj->lang->line((($minutes > 1) ? 'date_minutes' : 'date_minute')).', '; + $str .= $minutes.' '.$CI->lang->line((($minutes > 1) ? 'date_minutes' : 'date_minute')).', '; } $seconds -= $minutes * 60; @@ -233,7 +233,7 @@ function timespan($seconds = 1, $time = '') if ($str == '') { - $str .= $seconds.' '.$obj->lang->line((($seconds > 1) ? 'date_seconds' : 'date_second')).', '; + $str .= $seconds.' '.$CI->lang->line((($seconds > 1) ? 'date_seconds' : 'date_second')).', '; } return substr(trim($str), 0, -1); @@ -475,8 +475,8 @@ function human_to_unix($datestr = '') */ function timezone_menu($default = 'UTC', $class = "", $name = 'timezones') { - $obj =& get_instance(); - $obj->lang->load('date'); + $CI =& get_instance(); + $CI->lang->load('date'); if ($default == 'GMT') $default = 'UTC'; @@ -493,7 +493,7 @@ function timezone_menu($default = 'UTC', $class = "", $name = 'timezones') foreach (timezones() as $key => $val) { $selected = ($default == $key) ? " selected='selected'" : ''; - $menu .= "<option value='{$key}'{$selected}>".$obj->lang->line($key)."</option>\n"; + $menu .= "<option value='{$key}'{$selected}>".$CI->lang->line($key)."</option>\n"; } $menu .= "</select>"; diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index eb97913f1..3fd361041 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -40,9 +40,9 @@ */ function form_open($action = '', $attributes = array(), $hidden = array()) { - $obj =& get_instance(); + $CI =& get_instance(); - $form = '<form action="'.$obj->config->site_url($action).'"'; + $form = '<form action="'.$CI->config->site_url($action).'"'; if ( ! isset($attributes['method'])) { diff --git a/system/helpers/security_helper.php b/system/helpers/security_helper.php index f14ba72a0..347cab427 100644 --- a/system/helpers/security_helper.php +++ b/system/helpers/security_helper.php @@ -37,8 +37,8 @@ */ function xss_clean($str, $charset = 'ISO-8859-1') { - $obj =& get_instance(); - return $obj->input->xss_clean($str, $charset); + $CI =& get_instance(); + return $CI->input->xss_clean($str, $charset); } // -------------------------------------------------------------------- diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php index 6e2f7f452..2f93bcfbf 100644 --- a/system/helpers/url_helper.php +++ b/system/helpers/url_helper.php @@ -39,8 +39,8 @@ */ function site_url($uri = '') { - $obj =& get_instance(); - return $obj->config->site_url($uri); + $CI =& get_instance(); + return $CI->config->site_url($uri); } // ------------------------------------------------------------------------ @@ -55,8 +55,8 @@ function site_url($uri = '') */ function base_url() { - $obj =& get_instance(); - return $obj->config->slash_item('base_url'); + $CI =& get_instance(); + return $CI->config->slash_item('base_url'); } // ------------------------------------------------------------------------ @@ -71,8 +71,8 @@ function base_url() */ function index_page() { - $obj =& get_instance(); - return $obj->config->item('index_page'); + $CI =& get_instance(); + return $CI->config->item('index_page'); } // ------------------------------------------------------------------------ |