From: Florent Bruneau Date: Sun, 28 Oct 2007 18:15:29 +0000 (+0100) Subject: Oops, fix 45319df (default value for baseurl) X-Git-Tag: xorg/0.9.16~250 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=296075a47dbd690bffc96c7d31da031200699751;p=platal.git Oops, fix 45319df (default value for baseurl) Signed-off-by: Florent Bruneau --- diff --git a/include/globals.inc.php.in b/include/globals.inc.php.in index 37a8cfe..53e9339 100644 --- a/include/globals.inc.php.in +++ b/include/globals.inc.php.in @@ -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(); }