From 119d8a7547e155edaaa53682b9247cd7e80d8c9d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 8 Jan 2014 15:27:53 +0200 Subject: Optimize get_instance() calls/assignments --- system/helpers/html_helper.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'system/helpers/html_helper.php') diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php index ece39584b..988eee715 100644 --- a/system/helpers/html_helper.php +++ b/system/helpers/html_helper.php @@ -199,15 +199,13 @@ if ( ! function_exists('img')) { if ($k === 'src' && strpos($v, '://') === FALSE) { - $CI =& get_instance(); - if ($index_page === TRUE) { - $img .= ' src="'.$CI->config->site_url($v).'"'; + $img .= ' src="'.get_instance()->config->site_url($v).'"'; } else { - $img .= ' src="'.$CI->config->slash_item('base_url').$v.'"'; + $img .= ' src="'.get_instance()->config->slash_item('base_url').$v.'"'; } } else -- cgit v1.2.3-24-g4f1b