Rewrite FlagSet in order to run flag operation in constant time.
[platal.git] / include / xorg / session.inc.php
index 34581a1..b3f66bf 100644 (file)
@@ -180,7 +180,7 @@ class XorgSession
 
     public static function &make_perms($perm)
     {
-        $flags = new FlagSet();
+        $flags = new PlFlagSet();
         if ($perm == 'disabled' || $perm == 'ext') {
             return $flags;
         }
@@ -261,11 +261,11 @@ function start_connexion ($uid, $identified)
     $suid = S::v('suid');
 
     if ($suid) {
-        $logger = new CoreLogger($uid, $suid['uid']);
+        $logger = new PlLogger($uid, $suid['uid']);
         $logger->log("suid_start", S::v('forlife')." by {$suid['uid']}");
         $sess['suid'] = $suid;
     } else {
-        $logger = S::v('log', new CoreLogger($uid));
+        $logger = S::v('log', new PlLogger($uid));
         $logger->log("connexion", Env::v('n'));
         setcookie('ORGuid', $uid, (time()+25920000), '/', '', 0);
     }
@@ -286,7 +286,7 @@ function start_connexion ($uid, $identified)
         if (check_ip('ban')) {
             send_warning_mail($mail_subject);
             $_SESSION = array();
-            $_SESSION['perms'] = new FlagSet();
+            $_SESSION['perms'] = new PlFlagSet();
             global $page;
             $newpage = false;
             if (!$page) {