From 993925b47a0bfb08e79961c47bcc3d247a03a5dd Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Thu, 21 Aug 2008 12:43:31 +0000 Subject: whitespace fixes a minor re-ordering of the changelog --- system/helpers/smiley_helper.php | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'system/helpers/smiley_helper.php') diff --git a/system/helpers/smiley_helper.php b/system/helpers/smiley_helper.php index 8f7543746..efa338467 100644 --- a/system/helpers/smiley_helper.php +++ b/system/helpers/smiley_helper.php @@ -36,7 +36,7 @@ * @param string form name * @param string field name * @return string - */ + */ if ( ! function_exists('js_insert_smiley')) { function js_insert_smiley($form_name = '', $form_field = '') @@ -49,7 +49,7 @@ if ( ! function_exists('js_insert_smiley')) } EOF; - } + } } // ------------------------------------------------------------------------ @@ -62,7 +62,7 @@ EOF; * @access public * @param string the URL to the folder containing the smiley images * @return array - */ + */ if ( ! function_exists('get_clickable_smileys')) { function get_clickable_smileys($image_url = '', $smileys = NULL) @@ -72,12 +72,12 @@ if ( ! function_exists('get_clickable_smileys')) if (FALSE === ($smileys = _get_smiley_array())) { return $smileys; - } + } } // Add a trailing slash to the file path if needed $image_url = preg_replace("/(.+?)\/*$/", "\\1/", $image_url); - + $used = array(); foreach ($smileys as $key => $val) { @@ -89,12 +89,12 @@ if ( ! function_exists('get_clickable_smileys')) { continue; } - - $link[] = "\"".$smileys[$key][3]."\""; - + + $link[] = "\"".$smileys[$key][3]."\""; + $used[$smileys[$key][0]] = TRUE; } - + return $link; } } @@ -110,7 +110,7 @@ if ( ! function_exists('get_clickable_smileys')) * @param string the text to be parsed * @param string the URL to the folder containing the smiley images * @return string - */ + */ if ( ! function_exists('parse_smileys')) { function parse_smileys($str = '', $image_url = '', $smileys = NULL) @@ -125,17 +125,17 @@ if ( ! function_exists('parse_smileys')) if (FALSE === ($smileys = _get_smiley_array())) { return $str; - } + } } - + // Add a trailing slash to the file path if needed $image_url = preg_replace("/(.+?)\/*$/", "\\1/", $image_url); foreach ($smileys as $key => $val) - { + { $str = str_replace($key, "\"".$smileys[$key][3]."\"", $str); } - + return $str; } } @@ -149,7 +149,7 @@ if ( ! function_exists('parse_smileys')) * * @access private * @return mixed - */ + */ if ( ! function_exists('_get_smiley_array')) { function _get_smiley_array() @@ -160,12 +160,12 @@ if ( ! function_exists('_get_smiley_array')) } include(APPPATH.'config/smileys'.EXT); - + if ( ! isset($smileys) OR ! is_array($smileys)) { return FALSE; } - + return $smileys; } } -- cgit v1.2.3-24-g4f1b