Modified default controller from index.php to app.php

This commit is contained in:
absurdo 2023-10-25 13:16:30 +02:00
parent 841b16266a
commit c9365707b8
3 changed files with 51 additions and 5 deletions

View file

@ -51,7 +51,7 @@ class Utils {
$text=preg_replace('~[^-\w]+~', '', $text);
return $text;*/
/*
$from='àáâãäåæçèéêëìíîïðòóôõöøùúûýþÿŕñÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÐÒÓÔÕÖØÙÚÛÝỲŸÞŔÑ¿?!¡()"|#*%,;+&$ºª<>`çÇ{}@~=^:´[]';
$to= 'aaaaaaaceeeeiiiidoooooouuuybyrnAAAAAACEEEEIIIIDOOOOOOUUUYYYBRN---------------------------------';
@ -88,9 +88,55 @@ class Utils {
$text=trim(preg_replace('~'.$replace_space.'+~', $replace_space, $text), '-');
$text=preg_replace('~[^-\w]+~', '', $text);
if($replace_dot==1)
{
$text=preg_replace('~[^-\w]+~', '', $text);
}
return utf8_encode($text); */
$from=iconv('utf-8', 'us-ascii//TRANSLIT', '¿?{}@~=^:´[]#*·');
$to= iconv('utf-8', 'us-ascii//TRANSLIT', '---------------');
if($replace_dot==1)
{
$from.='.';
$to.='-';
}
if($replace_barr==1)
{
$from.="/";
$to.="-";
}
//utf8_decode(urldecode($text));
$text=trim(str_replace(" ", $replace_space, $text));
$text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);
$text=preg_replace('~[^-\w]+~', '', $text);
//$text = strtr($text, $from, $to);
//Used for pass base64 via GET that use upper, for example.
if($respect_upper==0)
{
$text = strtolower($text);
}
return $text; //iconv('us-ascii//TRANSLIT', 'utf-8', $text);
return utf8_encode($text);
}