From e334c472fb4be44feec3a73402fc4a2b062cbfc0 Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 21 Oct 2006 19:44:22 +0000 Subject: --- system/helpers/url_helper.php | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'system/helpers/url_helper.php') diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php index 2f93bcfbf..cd628c6ae 100644 --- a/system/helpers/url_helper.php +++ b/system/helpers/url_helper.php @@ -7,12 +7,12 @@ * @package CodeIgniter * @author Rick Ellis * @copyright Copyright (c) 2006, pMachine, Inc. - * @license http://www.codeignitor.com/user_guide/license.html + * @license http://www.codeignitor.com/user_guide/license.html * @link http://www.codeigniter.com * @since Version 1.0 * @filesource */ - + // ------------------------------------------------------------------------ /** @@ -30,7 +30,7 @@ /** * Site URL * - * Create a local URL based on your basepath. Segments can be passed via the + * Create a local URL based on your basepath. Segments can be passed via the * first parameter either as a string or an array. * * @access public @@ -38,7 +38,7 @@ * @return string */ function site_url($uri = '') -{ +{ $CI =& get_instance(); return $CI->config->site_url($uri); } @@ -54,7 +54,7 @@ function site_url($uri = '') * @return string */ function base_url() -{ +{ $CI =& get_instance(); return $CI->config->slash_item('base_url'); } @@ -70,7 +70,7 @@ function base_url() * @return string */ function index_page() -{ +{ $CI =& get_instance(); return $CI->config->item('index_page'); } @@ -173,7 +173,7 @@ function anchor_popup($uri = '', $title = '', $attributes = FALSE) */ function mailto($email, $title = '', $attributes = '') { - if ($title == "") + if ($title == "") { $title = $email; } @@ -201,7 +201,7 @@ function mailto($email, $title = '', $attributes = '') */ function safe_mailto($email, $title = '', $attributes = '') { - if ($title == "") + if ($title == "") { $title = $email; } @@ -216,7 +216,7 @@ function safe_mailto($email, $title = '', $attributes = '') $x[] = "|".ord(substr($email, $i, 1)); } - $x[] = '"'; + $x[] = '"'; if ($attributes != '') { @@ -250,7 +250,7 @@ function safe_mailto($email, $title = '', $attributes = '') if ($ordinal < 128) { - $x[] = "|".$ordinal; + $x[] = "|".$ordinal; } else { @@ -266,7 +266,7 @@ function safe_mailto($email, $title = '', $attributes = '') $x[] = "|".$number; $count = 1; $temp = array(); - } + } } } @@ -282,15 +282,15 @@ var l=new Array(); $i = 0; foreach ($x as $val){ ?>l[]=''; -for (var i = l.length-1; i >= 0; i=i-1){ -if (l[i].substring(0, 1) == '|') document.write("&#"+unescape(l[i].substring(1))+";"); +for (var i = l.length-1; i >= 0; i=i-1){ +if (l[i].substring(0, 1) == '|') document.write("&#"+unescape(l[i].substring(1))+";"); else document.write(unescape(l[i]));} //]]> $val) { $str = preg_replace("#".$key."#", $val, $str); - } + } return trim(stripslashes($str)); } @@ -445,12 +445,12 @@ function url_title($str, $separator = 'dash') * @return string */ function redirect($uri = '', $method = 'location') -{ +{ switch($method) { case 'refresh' : header("Refresh:0;url=".site_url($uri)); break; - default : header("location:".site_url($uri)); + default : header("location:".site_url($uri)); break; } exit; -- cgit v1.2.3-24-g4f1b