Merge branch 'master' into feature-6237/Phrases_system_MkIII

This commit is contained in:
Paolo
2022-04-12 11:01:31 +02:00
161 changed files with 60593 additions and 48778 deletions
+21 -13
View File
@@ -314,32 +314,40 @@ function sanitizeProblemChars($str)
$enc = 'UTF-8';
$acentos = array(
'A' => '/À|Á|Â|Ã|Å/',
'A' => '/À|Á|Â|Ã|Å|Ă|Ǎ/',
'Ae' => '/Ä/',
'a' => '/à|á|â|ã|å/',
'ae'=> '/ä/',
'C' => '/Ç/',
'c' => '/ç/',
'a' => '/à|á|â|ã|å|ă|ǎ/',
'ae' => '/ä/',
'C' => '/Ç|Č/',
'c' => '/ç|č/',
'E' => '/È|É|Ê|Ë/',
'e' => '/è|é|ê|ë/',
'I' => '/Ì|Í|Î|Ï/',
'i' => '/ì|í|î|ï/',
'N' => '/Ñ/',
'I' => '/Ì|Í|Î|Ï/',
'i' => '/ì|í|î|ï/',
'N' => '/Ñ|Ň|ň/',
'n' => '/ñ/',
'O' => '/Ò|Ó|Ô|Õ/',
'O' => '/Ò|Ó|Ô|Õ/',
'Oe' => '/Ö/',
'o' => '/ò|ó|ô|õ/',
'o' => '/ò|ó|ô|õ/',
'oe' => '/ö/',
'U' => '/Ù|Ú|Û/',
'R' => '/Ř/',
'r' => '/ř/',
'S' => '/Š/',
's' => '/š/',
'T' => '/Ť/',
't' => '/ť/',
'U' => '/Ù|Ú|Û|Ŭ|Ǔ/',
'Ue' => '/Ü/',
'u' => '/ù|ú|û/',
'u' => '/ù|ú|û|ŭ|ǔ/',
'ue' => '/ü/',
'Y' => '/Ý/',
'y' => '/ý|ÿ/',
'Z' => '/Ž/',
'z' => '/ž/',
'a.' => '/ª/',
'o.' => '/º/',
'ss' => '/ß/'
);
return preg_replace($acentos, array_keys($acentos), htmlentities($str,ENT_NOQUOTES, $enc));
return preg_replace($acentos, array_keys($acentos), htmlentities($str, ENT_NOQUOTES | ENT_HTML5, $enc));
}
+18
View File
@@ -31,6 +31,24 @@ function printPageTitle($title)
}
}
/**
* Print the meta tag http-equiv refresh having as content the value of the given parameter
*/
function printRefreshMeta($refresh)
{
if ($refresh != null)
{
if (is_numeric($refresh) && $refresh > 0)
{
echo '<meta http-equiv="refresh" content="'.$refresh.'">';
}
else
{
show_error('The provided refresh parameter has to be a number greater then 0');
}
}
}
/**
* Generates tags for the style sheets you want to include, the parameter could by a string or an array of strings
*/