Qual: Removed deprecated code
This commit is contained in:
parent
ebc4ed58a4
commit
f6a44ba5bb
@ -23,7 +23,7 @@
|
|||||||
* \brief File for Tanslate class
|
* \brief File for Tanslate class
|
||||||
* \author Eric Seigne
|
* \author Eric Seigne
|
||||||
* \author Laurent Destailleur
|
* \author Laurent Destailleur
|
||||||
* \version $Id: translate.class.php,v 1.51 2011/08/17 21:41:24 eldy Exp $
|
* \version $Id: translate.class.php,v 1.52 2011/08/17 21:51:20 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -260,17 +260,17 @@ class Translate {
|
|||||||
{
|
{
|
||||||
$value=trim(preg_replace('/\\n/',"\n",$tab[1]));
|
$value=trim(preg_replace('/\\n/',"\n",$tab[1]));
|
||||||
|
|
||||||
if ($key == 'CHARSET') // This is to declare in which charset files are encoded
|
//if ($key == 'CHARSET') // This is to declare in which charset files are encoded
|
||||||
{
|
//{
|
||||||
$this->charset_inputfile[$newdomain]=strtoupper($value);
|
// $this->charset_inputfile[$newdomain]=strtoupper($value);
|
||||||
//print 'File '.$file_lang.' is declared to have format '.$this->charset_inputfile[$newdomain].'<br>';
|
//print 'File '.$file_lang.' is declared to have format '.$this->charset_inputfile[$newdomain].'<br>';
|
||||||
}
|
//}
|
||||||
elseif ($key == 'DIRECTION') // This is to declare direction of language
|
//else
|
||||||
|
if ($key == 'DIRECTION') // This is to declare direction of language
|
||||||
{
|
{
|
||||||
if ($alt < 2 || empty($this->tab_translate[$key])) // We load direction only for primary files or if not yet loaded
|
if ($alt < 2 || empty($this->tab_translate[$key])) // We load direction only for primary files or if not yet loaded
|
||||||
{
|
{
|
||||||
$this->tab_translate[$key]=$value;
|
$this->tab_translate[$key]=$value;
|
||||||
|
|
||||||
if ($stopafterdirection) break; // We do not save tab if we stop after DIRECTION
|
if ($stopafterdirection) break; // We do not save tab if we stop after DIRECTION
|
||||||
else if ($usecachekey) $tabtranslatedomain[$key]=$value;
|
else if ($usecachekey) $tabtranslatedomain[$key]=$value;
|
||||||
}
|
}
|
||||||
@ -278,11 +278,9 @@ class Translate {
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// On stocke toujours dans le tableau Tab en UTF-8
|
// On stocke toujours dans le tableau Tab en UTF-8
|
||||||
if (! empty($this->charset_inputfile[$newdomain]) && $this->charset_inputfile[$newdomain] == 'ISO-8859-1') $value=utf8_encode($value);
|
//if (! empty($this->charset_inputfile[$newdomain]) && $this->charset_inputfile[$newdomain] == 'ISO-8859-1') $value=utf8_encode($value);
|
||||||
|
|
||||||
//print 'XX'.$key;
|
|
||||||
$this->tab_translate[$key]=$value;
|
$this->tab_translate[$key]=$value;
|
||||||
|
|
||||||
if ($usecachekey) $tabtranslatedomain[$key]=$value; // To save lang content in cache
|
if ($usecachekey) $tabtranslatedomain[$key]=$value; // To save lang content in cache
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -294,7 +292,6 @@ class Translate {
|
|||||||
// To save lang content for usecachekey into cache
|
// To save lang content for usecachekey into cache
|
||||||
if ($usecachekey && sizeof($tabtranslatedomain))
|
if ($usecachekey && sizeof($tabtranslatedomain))
|
||||||
{
|
{
|
||||||
require_once(DOL_DOCUMENT_ROOT ."/lib/memory.lib.php");
|
|
||||||
$ressetcache=dol_setcache($usecachekey,$tabtranslatedomain);
|
$ressetcache=dol_setcache($usecachekey,$tabtranslatedomain);
|
||||||
if ($ressetcache < 0)
|
if ($ressetcache < 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user