Skip to content

Commit

Permalink
Qual: Removed deprecated code
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Aug 17, 2011
1 parent d2bfc64 commit 6adf5ac
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions htdocs/core/class/translate.class.php
Expand Up @@ -23,7 +23,7 @@
* \brief File for Tanslate class
* \author Eric Seigne
* \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 $
*/


Expand Down Expand Up @@ -260,29 +260,27 @@ function Load($domain,$alt=0,$stopafterdirection=0,$forcelangdir='')
{
$value=trim(preg_replace('/\\n/',"\n",$tab[1]));

if ($key == 'CHARSET') // This is to declare in which charset files are encoded
{
$this->charset_inputfile[$newdomain]=strtoupper($value);
//if ($key == 'CHARSET') // This is to declare in which charset files are encoded
//{
// $this->charset_inputfile[$newdomain]=strtoupper($value);
//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
{
$this->tab_translate[$key]=$value;

if ($stopafterdirection) break; // We do not save tab if we stop after DIRECTION
else if ($usecachekey) $tabtranslatedomain[$key]=$value;
}
}
else
{
// 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;

if ($usecachekey) $tabtranslatedomain[$key]=$value; // To save lang content in cache
}
}
Expand All @@ -294,7 +292,6 @@ function Load($domain,$alt=0,$stopafterdirection=0,$forcelangdir='')
// To save lang content for usecachekey into cache
if ($usecachekey && sizeof($tabtranslatedomain))
{
require_once(DOL_DOCUMENT_ROOT ."/lib/memory.lib.php");
$ressetcache=dol_setcache($usecachekey,$tabtranslatedomain);
if ($ressetcache < 0)
{
Expand Down

0 comments on commit 6adf5ac

Please sign in to comment.