From 865220a488b853f25f15f5516c848ee540fa7361 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 19 May 2007 06:13:35 +0100 Subject: [PATCH] properly enable gettext stuff when needed --- functions.php | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/functions.php b/functions.php index d3245ce53..0336602e3 100644 --- a/functions.php +++ b/functions.php @@ -6,22 +6,11 @@ define('DEFAULT_ERROR_LEVEL', E_ERROR | E_WARNING | E_PARSE); } */ - if (ENABLE_TRANSLATIONS == true) { - require_once "accept-to-gettext.php"; - require_once "gettext/gettext.inc"; - } else { - function __($msg) { - return $msg; - } - function startup_gettext() { - // no-op - return true; - } - } - require_once 'config.php'; if (ENABLE_TRANSLATIONS == true) { + require_once "accept-to-gettext.php"; + require_once "gettext/gettext.inc"; function startup_gettext() { @@ -37,6 +26,15 @@ } startup_gettext(); + + } else { + function __($msg) { + return $msg; + } + function startup_gettext() { + // no-op + return true; + } } require_once 'db-prefs.php';