From ce2b69675075444c9e40b72bcdd42ab7edbbe633 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 28 Jan 2011 22:51:06 +0100 Subject: update to CI 2.0 Signed-off-by: Florian Pritz --- system/helpers/html_helper.php | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) mode change 100644 => 100755 system/helpers/html_helper.php (limited to 'system/helpers/html_helper.php') diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php old mode 100644 new mode 100755 index c18a68778..68c6f5908 --- a/system/helpers/html_helper.php +++ b/system/helpers/html_helper.php @@ -2,11 +2,11 @@ /** * CodeIgniter * - * An open source application development framework for PHP 4.3.2 or newer + * An open source application development framework for PHP 5.1.6 or newer * * @package CodeIgniter * @author ExpressionEngine Dev Team - * @copyright Copyright (c) 2008 - 2010, EllisLab, Inc. + * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. * @license http://codeigniter.com/user_guide/license.html * @link http://codeigniter.com * @since Version 1.0 @@ -97,7 +97,7 @@ if ( ! function_exists('ol')) * @param string * @param mixed * @param mixed - * @param intiger + * @param integer * @return string */ if ( ! function_exists('_list')) @@ -199,6 +199,12 @@ if ( ! function_exists('img')) $src = array('src' => $src); } + // If there is no alt attribute defined, set it to an empty string + if ( ! isset($src['alt'])) + { + $src['alt'] = ''; + } + $img = '$v) @@ -210,16 +216,16 @@ if ( ! function_exists('img')) if ($index_page === TRUE) { - $img .= ' src="'.$CI->config->site_url($v).'" '; + $img .= ' src="'.$CI->config->site_url($v).'"'; } else { - $img .= ' src="'.$CI->config->slash_item('base_url').$v.'" '; + $img .= ' src="'.$CI->config->slash_item('base_url').$v.'"'; } } else { - $img .= " $k=\"$v\" "; + $img .= " $k=\"$v\""; } } @@ -301,11 +307,11 @@ if ( ! function_exists('link_tag')) { if ($index_page === TRUE) { - $link .= ' href="'.$CI->config->site_url($v).'" '; + $link .= 'href="'.$CI->config->site_url($v).'" '; } else { - $link .= ' href="'.$CI->config->slash_item('base_url').$v.'" '; + $link .= 'href="'.$CI->config->slash_item('base_url').$v.'" '; } } else @@ -320,15 +326,15 @@ if ( ! function_exists('link_tag')) { if ( strpos($href, '://') !== FALSE) { - $link .= ' href="'.$href.'" '; + $link .= 'href="'.$href.'" '; } elseif ($index_page === TRUE) { - $link .= ' href="'.$CI->config->site_url($href).'" '; + $link .= 'href="'.$CI->config->site_url($href).'" '; } else { - $link .= ' href="'.$CI->config->slash_item('base_url').$href.'" '; + $link .= 'href="'.$CI->config->slash_item('base_url').$href.'" '; } $link .= 'rel="'.$rel.'" type="'.$type.'" '; @@ -382,9 +388,9 @@ if ( ! function_exists('meta')) $str = ''; foreach ($name as $meta) { - $type = ( ! isset($meta['type']) OR $meta['type'] == 'name') ? 'name' : 'http-equiv'; - $name = ( ! isset($meta['name'])) ? '' : $meta['name']; - $content = ( ! isset($meta['content'])) ? '' : $meta['content']; + $type = ( ! isset($meta['type']) OR $meta['type'] == 'name') ? 'name' : 'http-equiv'; + $name = ( ! isset($meta['name'])) ? '' : $meta['name']; + $content = ( ! isset($meta['content'])) ? '' : $meta['content']; $newline = ( ! isset($meta['newline'])) ? "\n" : $meta['newline']; $str .= ''.$newline; -- cgit v1.2.3-24-g4f1b