Oops, fix 45319df (default value for baseurl)
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 28 Oct 2007 18:15:29 +0000 (19:15 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 28 Oct 2007 18:15:29 +0000 (19:15 +0100)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
include/globals.inc.php.in

index 37a8cfe..53e9339 100644 (file)
@@ -51,14 +51,14 @@ class PlatalGlobals
     public function __construct($sess)
     {
         $this->session   = $sess;
+        $this->spoolroot = dirname(dirname(__FILE__));
 
-        $base = empty($_SERVER['HTTPS']) ? 'http://' : 'https://';
+        $this->read_config();
         if (isset($_SERVER) && isset($_SERVER['SERVER_NAME'])) {
+            $base = empty($_SERVER['HTTPS']) ? 'http://' : 'https://';
             $this->baseurl   = @trim($base.$_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF']), '/');
         }
-        $this->spoolroot = dirname(dirname(__FILE__));
 
-        $this->read_config();
         $this->setlocale();
     }