From 423503cb5b2ce003564c68b4662bdb3215f90aea Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Fri, 14 Jul 2006 19:11:34 +0000 Subject: [PATCH] remove wiki rewrite rule atm, it makes nasty things with the groups (capitalized as well). also rework group detection git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@482 839d8a87-29fc-0310-9880-83ba4fa771e5 --- htdocs.net/.htaccess | 4 ---- include/xnet/globals.inc.php | 14 +++++++------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/htdocs.net/.htaccess b/htdocs.net/.htaccess index 73d78b6..6e2ffaa 100644 --- a/htdocs.net/.htaccess +++ b/htdocs.net/.htaccess @@ -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 diff --git a/include/xnet/globals.inc.php b/include/xnet/globals.inc.php index f1ee414..f57dac0 100644 --- a/include/xnet/globals.inc.php +++ b/include/xnet/globals.inc.php @@ -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 -- 2.1.4