Changeset 30 for tags/1.0.0/lib
- Timestamp:
- Dec 10, 2005 2:36:04 AM (19 years ago)
- Location:
- tags/1.0.0/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/1.0.0/lib/App.inc.php
r29 r30 352 352 } 353 353 354 $url = ohref($url, $carry_args, $always_include_sid);354 $url = url($url, $carry_args, $always_include_sid); 355 355 356 356 header(sprintf('Location: %s', $url)); … … 459 459 * @return string url with attached queries and, if not using cookies, the session id 460 460 */ 461 function oHREF($url='', $carry_args=null, $always_include_sid=false)461 function url($url='', $carry_args=null, $always_include_sid=false) 462 462 { 463 463 static $_using_trans_sid; … … 509 509 // Get the first delimiter that is needed in the url. 510 510 $delim = preg_match('/\?/', $url) ? ini_get('arg_separator.output') : '?'; 511 511 512 512 $q = ''; 513 513 if ($do_carry_queries) { … … 553 553 $url .= $q . $delim . session_name() . '=' . session_id(); 554 554 // logMsg(sprintf('oHREF appending session id to URL: %s', $url), LOG_DEBUG, __FILE__, __LINE__); 555 return $url;556 555 } else { 557 556 $url .= $q; 558 return $url; 559 } 557 } 558 559 return $url; 560 } 561 562 /** 563 * Returns a URL processed with App::url and htmlentities for printing in html. 564 * 565 * @access public 566 * @param string $url Input URL to parse. 567 * @return string URL with App::url() and htmlentities() applied. 568 * @author Quinn Comendant <quinn@strangecode.com> 569 * @since 09 Dec 2005 17:58:45 570 */ 571 function oHREF($url, $carry_args=null, $always_include_sid=false) 572 { 573 $url = url($url, $carry_args, $always_include_sid); 574 // Replace any & not followed by an html or unicode entity with it's & equivalent. 575 $url = preg_replace('/&(?![\w\d#]{1,10};)/', '&', $url); 576 return $url; 560 577 } 561 578 -
tags/1.0.0/lib/Utilities.inc.php
r29 r30 206 206 207 207 /** 208 * Encodes an email into a user (at) domain (dot) com format. 209 * 210 * @access public 211 * @param string $email An email to encode. 212 * @param string $at Replaces the @. 213 * @param string $dot Replaces the .. 214 * @return string Encoded email. 215 */ 216 function encodeEmail($email, $at='-at-', $dot='-dot-') 217 { 218 $search = array('/@/', '/\./'); 219 $replace = array($at, $dot); 220 return preg_replace($search, $replace, $email); 221 } 222 223 /** 208 224 * Return a human readable filesize. 209 225 *
Note: See TracChangeset
for help on using the changeset viewer.