remove the too complicated thing for menu, use a good old template
[platal.git] / classes / Xnet.php
index 408ff55..9435a9d 100644 (file)
@@ -31,7 +31,7 @@ class Xnet extends Platal
         global $globals;
         if ($globals->asso()) {
             if ($p = strpos($this->path, '/')) {
-                $this->ns   = substr($this->path, 0, $p);
+                $this->ns   = substr($this->path, 0, $p).'/';
                 $this->path = 'grp'.substr($this->path, $p);
             } else {
                 $this->ns   = $this->path.'/';
@@ -39,6 +39,20 @@ class Xnet extends Platal
             }
         }
     }
+
+    function find_hook()
+    {
+        $ans = parent::find_hook();
+        if ($ans && $this->ns) {
+            $this->path = $this->ns . substr($this->path, 4);
+        }
+        return $ans;
+    }
+
+    function force_login(&$page)
+    {
+        http_redirect(S::v('loginX'));
+    }
 }
 
 ?>