From 9d447124206bcdb0651df836ee89e4a073bf7d17 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Tue, 27 May 2008 23:46:45 +0200 Subject: [PATCH] Use $core->blog->url when possible. Signed-off-by: Florent Bruneau --- class.xorg.auth.php | 5 +++-- page.auth.admin.php | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/class.xorg.auth.php b/class.xorg.auth.php index 0986afc..c1e9b82 100644 --- a/class.xorg.auth.php +++ b/class.xorg.auth.php @@ -36,12 +36,13 @@ class xorgAuth extends dcAuth { if (@$_SESSION['auth-xorg']) { return true; } + global $core; $_SESSION["auth-x-challenge"] = md5(uniqid(rand(), 1)); $url = "https://www.polytechnique.org/auth-groupex/utf8"; $url .= "?session=" . session_id(); $url .= "&challenge=" . $_SESSION["auth-x-challenge"]; $url .= "&pass=" . md5($_SESSION["auth-x-challenge"] . XORG_AUTH_KEY); - $url .= "&url=http://murphy.m4x.org/~x2003bruneau/dotclear/auth/XorgReturn" . urlencode("?path=" . $path); + $url .= "&url=" . urlencode($core->blog->url . "auth/XorgReturn?path=" . $path); session_write_close(); header("Location: $url"); exit; @@ -111,7 +112,7 @@ class xorgAuth extends dcAuth { global $core; $core->session->start(); $core->session->destroy(); - header('Location: http://murphy.m4x.org/~x2003bruneau/dotclear/'); + header('Location: ' . $core->blog->url); exit; } diff --git a/page.auth.admin.php b/page.auth.admin.php index fc07a97..31f0901 100644 --- a/page.auth.admin.php +++ b/page.auth.admin.php @@ -14,7 +14,8 @@ class xorgLoginPage extends dcUrlHandlers { # If we have a session cookie, go to index.php if (isset($_SESSION['sess_user_id'])) { - header('Location: http://murphy.m4x.org/~x2003bruneau/dotclear/admin/index.php'); + global $core; + header('Location: ' . $core->blog->url . 'admin/index.php'); } # Loading locales for detected language @@ -70,8 +71,8 @@ class xorgLoginPage extends dcUrlHandlers { { echo '
'. - '

Via Polytechnique.org

' . - '

Via le formulaire

' . + '

Via Polytechnique.org

' . + '

Via le formulaire

' . '
'. '

'.__('You must accept cookies in order to use the private area.').'

'; -- 2.1.4