Add PlGlobals::init().
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 24 Jul 2008 20:13:37 +0000 (22:13 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 24 Jul 2008 20:16:11 +0000 (22:16 +0200)
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 <florent.bruneau@polytechnique.org>
classes/platal.php
classes/plglobals.php

index 2a69b72..b795f14 100644 (file)
@@ -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()) {
index 2636890..9089e1f 100644 (file)
@@ -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);