X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fxnet%2Fsession.inc.php;h=7fcb61311be28c1bac1eb64472810052b0dcd7b4;hb=06db561e25dcd609e824d1461fd2814d1e46d807;hp=147fab842eff2e00686dbb7dfa9c7aab18527934;hpb=fd834b4b349e02bdedb8ed8c7a1392dccb0d4da8;p=platal.git diff --git a/include/xnet/session.inc.php b/include/xnet/session.inc.php index 147fab8..7fcb613 100644 --- a/include/xnet/session.inc.php +++ b/include/xnet/session.inc.php @@ -19,19 +19,15 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ***************************************************************************/ -require_once dirname(__FILE__).'/../../classes/Session.php'; - class XnetSession { // {{{ function init - function init() { + public static function init() { global $globals; S::init(); - $_SESSION['session'] = new XnetSession; - if (!S::logged()) { // prevent connexion to be linked to deconnexion if (($i = strpos($_SERVER['REQUEST_URI'], 'exit')) !== false) @@ -48,21 +44,21 @@ class XnetSession } // }}} - // {{{ function destroy() + // {{{ public static function destroy() - function destroy() { + public static function destroy() { S::destroy(); XnetSession::init(); } // }}} - // {{{ function doAuth() + // {{{ public static function doAuth() /** Try to do an authentication. * * @param page the calling page (by reference) */ - function doAuth() + public static function doAuth() { if (S::identified()) { // ok, c'est bon, on n'a rien à faire return true; @@ -76,9 +72,16 @@ class XnetSession } // }}} + // {{{ doAuthCookie + + public static function doAuthCookie() { + return XnetSession::doAuth(); + } + + // }}} // {{{ doAuthX - function doAuthX() { + public static function doAuthX() { global $globals, $page; if (md5('1'.S::v('challenge').$globals->xnet->secret.Get::i('uid').'1') != Get::v('auth')) { @@ -100,8 +103,8 @@ class XnetSession S::kill('loginX'); Get::kill('auth'); Get::kill('uid'); - $path = Get::v('p'); - Get::kill('p'); + $path = Get::v('n'); + Get::kill('n'); Get::kill('PHPSESSID'); $args = array();