Fix: Show of licence
This commit is contained in:
parent
5c1ed363ad
commit
f39b552cf0
@ -462,15 +462,18 @@ 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)
|
||||||
|
{
|
||||||
|
$htmlfile=$searchdir."/langs/".$this->defaultlang."/".$filename;
|
||||||
if (is_readable($htmlfile)) return true;
|
if (is_readable($htmlfile)) return true;
|
||||||
|
|
||||||
if ($searchalt) {
|
if ($searchalt) {
|
||||||
// Test si fichier dans repertoire de la langue alternative
|
// Test si fichier dans repertoire de la langue alternative
|
||||||
if ($this->defaultlang != "en_US") $htmlfilealt = $this->dir."/en_US/".$filename;
|
if ($this->defaultlang != "en_US") $htmlfilealt = $searchdir."/langs/en_US/".$filename;
|
||||||
else $htmlfilealt = $this->dir."/fr_FR/".$filename;
|
else $htmlfilealt = $searchdir."/langs/fr_FR/".$filename;
|
||||||
if (is_readable($htmlfilealt)) return true;
|
if (is_readable($htmlfilealt)) return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -487,7 +490,9 @@ 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)
|
||||||
|
{
|
||||||
|
$htmlfile=($searchdir."/langs/".$this->defaultlang."/".$filename);
|
||||||
if (is_readable($htmlfile))
|
if (is_readable($htmlfile))
|
||||||
{
|
{
|
||||||
$content=file_get_contents($htmlfile);
|
$content=file_get_contents($htmlfile);
|
||||||
@ -500,8 +505,8 @@ class Translate {
|
|||||||
|
|
||||||
if ($searchalt) {
|
if ($searchalt) {
|
||||||
// Test si fichier dans repertoire de la langue alternative
|
// Test si fichier dans repertoire de la langue alternative
|
||||||
if ($this->defaultlang != "en_US") $htmlfilealt = $this->dir."/en_US/".$filename;
|
if ($this->defaultlang != "en_US") $htmlfilealt = $searchdir."/en_US/".$filename;
|
||||||
else $htmlfilealt = $this->dir."/fr_FR/".$filename;
|
else $htmlfilealt = $searchdir."/langs/fr_FR/".$filename;
|
||||||
if (is_readable($htmlfilealt))
|
if (is_readable($htmlfilealt))
|
||||||
{
|
{
|
||||||
$content=file_get_contents($htmlfile);
|
$content=file_get_contents($htmlfile);
|
||||||
@ -512,6 +517,7 @@ class Translate {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user