From 646a447cf4817dfe051c98392bdf8306fabb8eeb Mon Sep 17 00:00:00 2001 From: Menno Dekker Date: Wed, 19 May 2010 12:46:02 +0000 Subject: [PATCH] dev: fixed gettext leak by caching result git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@8726 b72ed6b6-b9f8-46b5-92b4-906544132732 --- classes/core/surveytranslator.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/classes/core/surveytranslator.php b/classes/core/surveytranslator.php index e7ae5707a60..93641fae502 100644 --- a/classes/core/surveytranslator.php +++ b/classes/core/surveytranslator.php @@ -125,7 +125,9 @@ function getLanguageDetails($codetosearch) function getLanguageData($orderbynative=false) { global $clang; + static $supportedLanguages; + if (!isset($supportedLanguages)) { // Albanian $supportedLanguages['sq']['description'] = $clang->gT('Albanian'); $supportedLanguages['sq']['nativedescription'] = 'Shqipe'; @@ -450,6 +452,7 @@ function getLanguageData($orderbynative=false) { $supportedLanguages['vi']['nativedescription'] = 'Tiếng Việt'; $supportedLanguages['vi']['rtl'] = false; $supportedLanguages['vi']['dateformat'] = 5; + } if ($orderbynative) {