small fixes from previous
[platal.git] / classes / Xnet.php
index 408ff55..3d5dbb1 100644 (file)
@@ -31,14 +31,29 @@ class Xnet extends Platal
         global $globals;
         if ($globals->asso()) {
             if ($p = strpos($this->path, '/')) {
-                $this->ns   = substr($this->path, 0, $p);
-                $this->path = 'grp'.substr($this->path, $p);
+                $this->ns   = substr($this->path, 0, $p).'/';
+                $this->path = '%grp'.substr($this->path, $p);
             } else {
                 $this->ns   = $this->path.'/';
-                $this->path = 'grp';
+                $this->path = '%grp';
             }
         }
     }
+
+    function find_hook()
+    {
+        $ans = parent::find_hook();
+        if ($ans && $this->ns) {
+            $this->path    = $this->ns . substr($this->path, 5);
+            $this->argv[0] = $this->ns . substr($this->argv[0], 5);
+        }
+        return $ans;
+    }
+
+    function force_login(&$page)
+    {
+        http_redirect(S::v('loginX'));
+    }
 }
 
 ?>