From: x2003bruneau Date: Sat, 8 Jul 2006 14:18:29 +0000 (+0000) Subject: Backport rev386 X-Git-Tag: xorg/0.9.11~508 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=bd5af2f0bb79461d88842c8bd238b7b3f3e691a6;p=platal.git Backport rev386 git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@387 839d8a87-29fc-0310-9880-83ba4fa771e5 --- diff --git a/include/xnet/globals.inc.php b/include/xnet/globals.inc.php index 50548e4..f1ee414 100644 --- a/include/xnet/globals.inc.php +++ b/include/xnet/globals.inc.php @@ -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(); } }