From d95d46a7c551a5439ff8791e61311a42a64aadd0 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Thu, 24 Jul 2008 22:13:37 +0200 Subject: [PATCH] Add PlGlobals::init(). The constructor of PlGlobals was not the place to initialise dynamic data since $globals does not exist then whereas XDB requires $globals. Signed-off-by: Florent Bruneau --- classes/platal.php | 1 + classes/plglobals.php | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/classes/platal.php b/classes/platal.php index 2a69b72..b795f14 100644 --- a/classes/platal.php +++ b/classes/platal.php @@ -42,6 +42,7 @@ class Platal $platal =& $this; $globalclass = PL_GLOBALS_CLASS; $globals = new $globalclass(); + $globals->init(); $sessionclass = PL_SESSION_CLASS; $session = new $sessionclass(); if (!$session->startAvailableAuth()) { diff --git a/classes/plglobals.php b/classes/plglobals.php index 2636890..9089e1f 100644 --- a/classes/plglobals.php +++ b/classes/plglobals.php @@ -104,6 +104,13 @@ class PlGlobals $this->setLocale(); } + /** Initialiase dynamic data in the object. + * This is te place to read data from the database if needed. + */ + public function init() + { + } + private function readIniFile($filename) { $array = parse_ini_file($filename, true); -- 2.1.4