remove wiki rewrite rule atm, it makes nasty things with the groups (capitalized...
authorx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Fri, 14 Jul 2006 19:11:34 +0000 (19:11 +0000)
committerx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Fri, 14 Jul 2006 19:11:34 +0000 (19:11 +0000)
also rework group detection

git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@482 839d8a87-29fc-0310-9880-83ba4fa771e5

htdocs.net/.htaccess
include/xnet/globals.inc.php

index 73d78b6..6e2ffaa 100644 (file)
@@ -3,10 +3,6 @@ RewriteEngine on
 
 RewriteBase /~x2000habouzit
 
-# wiki
-
-RewriteRule ^([A-Z].*) wiki.php?n=$1 [L,QSA]
-
 # Rewrite URLs of the form 'index.php?q=x':
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
index f1ee414..f57dac0 100644 (file)
@@ -43,7 +43,7 @@ class XnetGlobals extends PlatalGlobals
         $globals->hook->config(null);
 
         $globals->read_config();
-        
+
         $globals->dbconnect();
         if ($globals->debug & 1) {
             $globals->db->trace_on();
@@ -54,12 +54,12 @@ class XnetGlobals extends PlatalGlobals
     function asso($key=null)
     {
         static $aid = null;
-        if ($aid === null) {
-            $gp  = basename(dirname($_SERVER['PHP_SELF']));
-            // for url like /groupex/event.php/file.csv
-            if (substr($gp, -4) == ".php")
-                $gp = basename(dirname(dirname($_SERVER['PHP_SELF'])));
-            if (strlen($gp) != 0) {
+
+        if (is_null($aid)) {
+            $gp = Get::get('p');
+            $gp = substr($gp, 0, strpos($gp, '/'));
+
+            if ($gp) {
                 $res = $this->xdb->query('SELECT  a.*, d.nom AS domnom
                                             FROM  groupex.asso AS a
                                        LEFT JOIN  groupex.dom  AS d ON d.id = a.dom