From a36e46d44db24622eeed4438342dfdbd98a28727 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Sat, 21 Jan 2012 22:00:33 +0100 Subject: Setup script and clean config file. --- ratatoeskr/sys/translation.php | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'ratatoeskr/sys/translation.php') diff --git a/ratatoeskr/sys/translation.php b/ratatoeskr/sys/translation.php index ca43c13..6c494db 100644 --- a/ratatoeskr/sys/translation.php +++ b/ratatoeskr/sys/translation.php @@ -9,10 +9,12 @@ * See "ratatoeskr/licenses/ratatoeskr" for more information. */ -require_once(dirname(__FILE__) . "/models.php"); require_once(dirname(__FILE__) . "/utils.php"); require_once(dirname(__FILE__) . "/init_ste.php"); +if(!defined("SETUP")) + require_once(dirname(__FILE__) . "/models.php"); + if(!defined(TRANSLATION_PLUGIN_LOADED)) { $ste->register_tag( @@ -38,9 +40,17 @@ if(!defined(TRANSLATION_PLUGIN_LOADED)) */ function load_language($lang=NULL) { - global $ratatoeskr_settings; - if($lang === NULL) - $lang = $ratatoeskr_settings["default_language"]; + if(!defined("SETUP")) + { + global $ratatoeskr_settings; + if($lang === NULL) + $lang = $ratatoeskr_settings["default_language"]; + } + else + { + if($lang === NULL) + $lang = "en"; + } /* * Because we will include an file defined by the $lang param, we will -- cgit v1.2.3-70-g09d2