mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-27 19:59:56 +03:00
fixes #732, avoid conflict with PHP function "transliterate"
This commit is contained in:
parent
f520f82736
commit
a3cf80c77c
3 changed files with 5 additions and 5 deletions
|
@ -337,7 +337,7 @@ if (function_exists('mb_strtolower') && defined('PWG_CHARSET'))
|
|||
* @param string $term
|
||||
* @return string
|
||||
*/
|
||||
function transliterate($term)
|
||||
function pwg_transliterate($term)
|
||||
{
|
||||
return remove_accents( mb_strtolower($term, PWG_CHARSET) );
|
||||
}
|
||||
|
@ -347,7 +347,7 @@ else
|
|||
/**
|
||||
* @ignore
|
||||
*/
|
||||
function transliterate($term)
|
||||
function pwg_transliterate($term)
|
||||
{
|
||||
return remove_accents( strtolower($term) );
|
||||
}
|
||||
|
@ -361,7 +361,7 @@ else
|
|||
*/
|
||||
function str2url($str)
|
||||
{
|
||||
$str = $safe = transliterate($str);
|
||||
$str = $safe = pwg_transliterate($str);
|
||||
$str = preg_replace('/[^\x80-\xffa-z0-9_\s\'\:\/\[\],-]/','',$str);
|
||||
$str = preg_replace('/[\s\'\:\/\[\],-]+/',' ',trim($str));
|
||||
$res = str_replace(' ','_',$str);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue