we don't need diogenes session anymore
authorx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sun, 16 Jul 2006 21:55:53 +0000 (21:55 +0000)
committerx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sun, 16 Jul 2006 21:55:53 +0000 (21:55 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@526 839d8a87-29fc-0310-9880-83ba4fa771e5

include/platal/session.inc.php
include/xnet/session.inc.php
include/xorg/session.inc.php

index 54d99fb..73de7fe 100644 (file)
@@ -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.");
index eef22e2..445fdfe 100644 (file)
@@ -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));
     }
 
     // }}}
index e435712..f1a05f6 100644 (file)
  *  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();
-    }
-
-    // }}}
 }
 
 // }}}