Backport rev386
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sat, 8 Jul 2006 14:18:29 +0000 (14:18 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sat, 8 Jul 2006 14:18:29 +0000 (14:18 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@387 839d8a87-29fc-0310-9880-83ba4fa771e5

include/xnet/globals.inc.php

index 50548e4..f1ee414 100644 (file)
@@ -59,11 +59,15 @@ class XnetGlobals extends PlatalGlobals
             // for url like /groupex/event.php/file.csv
             if (substr($gp, -4) == ".php")
                 $gp = basename(dirname(dirname($_SERVER['PHP_SELF'])));
-            $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
-                                       WHERE  diminutif = {?}', $gp);
-            if (!($aid = $res->fetchOneAssoc())) {
+            if (strlen($gp) != 0) {
+                $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
+                                           WHERE  diminutif = {?}', $gp);
+                if (!($aid = $res->fetchOneAssoc())) {
+                    $aid = array();
+                }
+            } else {
                 $aid = array();
             }
         }