Changeset 1119 for trunk/include/functions.inc.php
- Timestamp:
- Apr 3, 2006, 12:26:19 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions.inc.php
r1113 r1119 32 32 include_once( PHPWG_ROOT_PATH .'include/functions_group.inc.php' ); 33 33 include_once( PHPWG_ROOT_PATH .'include/functions_html.inc.php' ); 34 include_once( PHPWG_ROOT_PATH .'include/functions_tag.inc.php' ); 34 35 include_once( PHPWG_ROOT_PATH .'include/functions_url.inc.php' ); 35 36 … … 268 269 return $picture_size; 269 270 } 271 272 /** 273 * simplify a string to insert it into an URL 274 * 275 * based on str2url function from Dotclear 276 * 277 * @param string 278 * @return string 279 */ 280 function str2url($str) 281 { 282 $str = strtr( 283 $str, 284 'ÀÁÂÃÄÅàáâãäåÇçÒÓÔÕÖØòóôõöøÈÉÊËèéêëÌÍÎÏìíîïÙÚÛÜùúûü¾ÝÿýÑñ', 285 'AAAAAAaaaaaaCcOOOOOOooooooEEEEeeeeIIIIiiiiUUUUuuuuYYyyNn' 286 ); 287 288 $str = str_replace('Æ', 'AE', $str); 289 $str = str_replace('æ', 'ae', $str); 290 $str = str_replace('¼', 'OE', $str); 291 $str = str_replace('½', 'oe', $str); 292 293 $str = preg_replace('/[^a-z0-9_\s\'\:\/\[\]-]/','',strtolower($str)); 294 $str = preg_replace('/[\s\'\:\/\[\]-]+/',' ',trim($str)); 295 $res = str_replace(' ','_',$str); 296 297 return $res; 298 } 299 270 300 //-------------------------------------------- PhpWebGallery specific functions 271 301 … … 830 860 return $available_upgrade_ids; 831 861 } 832 833 862 ?>
Note: See TracChangeset
for help on using the changeset viewer.