Skip to content
Permalink
Browse files

fixes #732, avoid conflict with PHP function "transliterate"

  • Loading branch information...
plegall committed Jul 13, 2017
1 parent f520f82 commit a3cf80c77c4418272eefe0f30cbe8920e5c7e5b3
Showing with 5 additions and 5 deletions.
  1. +3 −3 include/functions.inc.php
  2. +1 −1 include/functions_html.inc.php
  3. +1 −1 tags.php
@@ -337,7 +337,7 @@ function remove_accents($string)
* @param string $term
* @return string
*/
function transliterate($term)
function pwg_transliterate($term)
{
return remove_accents( mb_strtolower($term, PWG_CHARSET) );
}
@@ -347,7 +347,7 @@ function transliterate($term)
/**
* @ignore
*/
function transliterate($term)
function pwg_transliterate($term)
{
return remove_accents( strtolower($term) );
}
@@ -361,7 +361,7 @@ function transliterate($term)
*/
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);
@@ -261,7 +261,7 @@ function tag_alpha_compare($a, $b)
{
if (!isset($cache[__FUNCTION__][ $tag['name'] ]))
{
$cache[__FUNCTION__][ $tag['name'] ] = transliterate($tag['name']);
$cache[__FUNCTION__][ $tag['name'] ] = pwg_transliterate($tag['name']);
}
}
@@ -101,7 +101,7 @@ function id_compare($a, $b)
foreach ($tags as $tag)
{
$tag_letter = mb_strtoupper(mb_substr(transliterate($tag['name']), 0, 1, PWG_CHARSET), PWG_CHARSET);
$tag_letter = mb_strtoupper(mb_substr(pwg_transliterate($tag['name']), 0, 1, PWG_CHARSET), PWG_CHARSET);
if ($current_tag_idx==0) {
$current_letter = $tag_letter;

0 comments on commit a3cf80c

Please sign in to comment.
You can’t perform that action at this time.