fix wiki auth for xnet
authorx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sun, 30 Jul 2006 21:56:31 +0000 (21:56 +0000)
committerx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sun, 30 Jul 2006 21:56:31 +0000 (21:56 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@739 839d8a87-29fc-0310-9880-83ba4fa771e5

include/wiki.inc.php

index 750df72..cb05c88 100644 (file)
@@ -111,16 +111,19 @@ function wiki_apply_perms($perm) {
         return;
 
       case 'logged':
-        if ((empty($GLOBALS['IS_XNET_SITE']) && !XorgSession::doAuthCookie()) ||
-          ($GLOBALS['IS_XNET_SITE'] && !$_SESSION['session']->doAuth())) {
+        if (empty($GLOBALS['IS_XNET_SITE']) && !XorgSession::doAuthCookie()) {
             $platal = new Platal();
             $platal->force_login($page);
         }
+        if ($GLOBALS['IS_XNET_SITE'] && !$_SESSION['session']->doAuth()) {
+            $platal = new Xnet();
+            $platal->force_login($page);
+        }
         return;
 
       default:
         if (!$_SESSION['session']->doAuth()) {
-            $platal = new Platal();
+            $platal = empty($GLOBALS['IS_XNET_SITE']) ? new Platal() : new Xnet();
             $platal->force_login($page);
         }
         if ($perm == 'admin') {