Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
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();
}