From e1b50e4456f3d29f661fcbb4384eeaa4dd8553f7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 26 Jan 2011 12:07:01 +0000 Subject: [PATCH] Fix: Direction was lost when using cache --- htdocs/core/class/translate.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index 7aee2ec680b..f7c7c4bafaa 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -252,9 +252,9 @@ class Translate { if ($alt < 2) // We do not load direction for alternate files 2 { $this->tab_translate[$key]=$value; - if ($usecachekey) $tabtranslatedomain[$key]=$value; // To save lang content in cache - - if ($stopafterdirection) break; + + if ($stopafterdirection) break; // We do not save tab if we stop after DIRECTION + else if ($usecachekey) $tabtranslatedomain[$key]=$value; } } else @@ -264,6 +264,7 @@ class Translate { //print 'XX'.$key; $this->tab_translate[$key]=$value; + if ($usecachekey) $tabtranslatedomain[$key]=$value; // To save lang content in cache } }