From: x2000habouzit Date: Sun, 16 Jul 2006 21:55:53 +0000 (+0000) Subject: we don't need diogenes session anymore X-Git-Tag: xorg/0.9.11~376 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=4869f6657c664e6e968f30ea7c39c0cb7e627d3d;p=platal.git we don't need diogenes session anymore git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@526 839d8a87-29fc-0310-9880-83ba4fa771e5 --- diff --git a/include/platal/session.inc.php b/include/platal/session.inc.php index 54d99fb..73de7fe 100644 --- a/include/platal/session.inc.php +++ b/include/platal/session.inc.php @@ -19,8 +19,8 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ***************************************************************************/ -require_once('diogenes/diogenes.core.session.inc.php'); -require_once('diogenes/diogenes.misc.inc.php'); +require_once 'diogenes/diogenes.misc.inc.php'; +require_once 'diogenes/diogenes.core.logger.inc.php'; // {{{ function check_perms() @@ -33,7 +33,6 @@ function check_perms() global $page; if (!has_perms()) { if ($_SESSION['log']) { - require_once('diogenes/diogenes.core.logger.inc.php'); $_SESSION['log']->log("noperms",$_SERVER['PHP_SELF']); } $page->kill("Tu n'as pas les permissions nécessaires pour accéder à cette page."); diff --git a/include/xnet/session.inc.php b/include/xnet/session.inc.php index eef22e2..445fdfe 100644 --- a/include/xnet/session.inc.php +++ b/include/xnet/session.inc.php @@ -23,13 +23,15 @@ require_once('platal/session.inc.php'); // {{{ class XorgSession -class XnetSession extends DiogenesCoreSession +class XnetSession { + var $challenge; + // {{{ function XnetSession() function XnetSession() { - $this->DiogenesCoreSession(); + $this->challenge = md5(uniqid(rand(), 1)); } // }}} diff --git a/include/xorg/session.inc.php b/include/xorg/session.inc.php index e435712..f1a05f6 100644 --- a/include/xorg/session.inc.php +++ b/include/xorg/session.inc.php @@ -19,17 +19,20 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ***************************************************************************/ -require_once('platal/session.inc.php'); +require_once 'platal/session.inc.php'; // {{{ class XorgSession -class XorgSession extends DiogenesCoreSession +class XorgSession { + var $challenge; + // {{{ function XorgSession() function XorgSession() { - $this->DiogenesCoreSession(); + $this->challenge = md5(uniqid(rand(), 1)); + if (!Session::has('uid')) { try_cookie(); } @@ -207,26 +210,6 @@ class XorgSession extends DiogenesCoreSession } // }}} - // {{{ function getUserId() - - function getUserId($auth,$username) - { - global $globals; - $res = $globals->xdb->query("SELECT id FROM aliases WHERE alias = {?}",$username); - return $res->fetchOneCell(); - } - - // }}} - // {{{ function getUsername() - - function getUsername($auth,$uid) - { - global $globals; - $res = $globals->xdb->query("SELECT alias FROM aliases WHERE id = {?} AND type='a_vie'", $uid); - return $res->fetchOneCell(); - } - - // }}} } // }}}