Fix: Show of licence
This commit is contained in:
parent
5c1ed363ad
commit
f39b552cf0
@ -462,16 +462,19 @@ class Translate {
|
|||||||
function file_exists($filename,$searchalt=0)
|
function file_exists($filename,$searchalt=0)
|
||||||
{
|
{
|
||||||
// Test si fichier dans repertoire de la langue
|
// Test si fichier dans repertoire de la langue
|
||||||
$htmlfile=$this->dir."/".$this->defaultlang."/".$filename;
|
foreach($this->dir as $searchdir)
|
||||||
if (is_readable($htmlfile)) return true;
|
{
|
||||||
|
$htmlfile=$searchdir."/langs/".$this->defaultlang."/".$filename;
|
||||||
if ($searchalt) {
|
if (is_readable($htmlfile)) return true;
|
||||||
// Test si fichier dans repertoire de la langue alternative
|
|
||||||
if ($this->defaultlang != "en_US") $htmlfilealt = $this->dir."/en_US/".$filename;
|
if ($searchalt) {
|
||||||
else $htmlfilealt = $this->dir."/fr_FR/".$filename;
|
// Test si fichier dans repertoire de la langue alternative
|
||||||
if (is_readable($htmlfilealt)) return true;
|
if ($this->defaultlang != "en_US") $htmlfilealt = $searchdir."/langs/en_US/".$filename;
|
||||||
}
|
else $htmlfilealt = $searchdir."/langs/fr_FR/".$filename;
|
||||||
|
if (is_readable($htmlfilealt)) return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -487,32 +490,35 @@ class Translate {
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
// Test si fichier dans repertoire de la langue
|
// Test si fichier dans repertoire de la langue
|
||||||
$htmlfile=$this->dir."/".$this->defaultlang."/".$filename;
|
foreach($this->dir as $searchdir)
|
||||||
if (is_readable($htmlfile))
|
{
|
||||||
{
|
$htmlfile=($searchdir."/langs/".$this->defaultlang."/".$filename);
|
||||||
$content=file_get_contents($htmlfile);
|
if (is_readable($htmlfile))
|
||||||
$isutf8=utf8_check($content);
|
{
|
||||||
if (! $isutf8 && $conf->character_set_client == 'UTF-8') print utf8_encode($content);
|
$content=file_get_contents($htmlfile);
|
||||||
elseif ($isutf8 && $conf->character_set_client == 'ISO-8859-1') print utf8_decode($content);
|
$isutf8=utf8_check($content);
|
||||||
else print $content;
|
if (! $isutf8 && $conf->character_set_client == 'UTF-8') print utf8_encode($content);
|
||||||
return true;
|
elseif ($isutf8 && $conf->character_set_client == 'ISO-8859-1') print utf8_decode($content);
|
||||||
}
|
else print $content;
|
||||||
|
|
||||||
if ($searchalt) {
|
|
||||||
// Test si fichier dans repertoire de la langue alternative
|
|
||||||
if ($this->defaultlang != "en_US") $htmlfilealt = $this->dir."/en_US/".$filename;
|
|
||||||
else $htmlfilealt = $this->dir."/fr_FR/".$filename;
|
|
||||||
if (is_readable($htmlfilealt))
|
|
||||||
{
|
|
||||||
$content=file_get_contents($htmlfile);
|
|
||||||
$isutf8=utf8_check($content);
|
|
||||||
if (! $isutf8 && $conf->character_set_client == 'UTF-8') print utf8_encode($content);
|
|
||||||
elseif ($isutf8 && $conf->character_set_client == 'ISO-8859-1') print utf8_decode($content);
|
|
||||||
else print $content;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
if ($searchalt) {
|
||||||
|
// Test si fichier dans repertoire de la langue alternative
|
||||||
|
if ($this->defaultlang != "en_US") $htmlfilealt = $searchdir."/en_US/".$filename;
|
||||||
|
else $htmlfilealt = $searchdir."/langs/fr_FR/".$filename;
|
||||||
|
if (is_readable($htmlfilealt))
|
||||||
|
{
|
||||||
|
$content=file_get_contents($htmlfile);
|
||||||
|
$isutf8=utf8_check($content);
|
||||||
|
if (! $isutf8 && $conf->character_set_client == 'UTF-8') print utf8_encode($content);
|
||||||
|
elseif ($isutf8 && $conf->character_set_client == 'ISO-8859-1') print utf8_decode($content);
|
||||||
|
else print $content;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user