From: Florent Bruneau Date: Sat, 6 Mar 2010 20:42:25 +0000 (+0100) Subject: Fix autocompletion. X-Git-Tag: xorg/1.0.0~332^2~92 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=9d44d2c7a81ca3fda06ef3897d77f6b3005098e2;p=platal.git Fix autocompletion. Signed-off-by: Florent Bruneau --- diff --git a/classes/direnum.php b/classes/direnum.php index bc3a856..cce7e39 100644 --- a/classes/direnum.php +++ b/classes/direnum.php @@ -276,7 +276,7 @@ abstract class DirEnumeration return XDB::iterator('SELECT ' . $this->valfield . ' AS field' . ($this->ac_distinct ? (', COUNT(DISTINCT ' . $this->ac_unique . ') AS nb') : '') - . ($this->ac_withid ? (', ' . $this->idfield . ' AS id') : '') . ' + . ($this->ac_withid ? (', ' . $this->from . '.' . $this->idfield . ' AS id') : '') . ' FROM ' . $this->from . ' ' . $this->ac_join . ' WHERE ' . $where . ' diff --git a/modules/search.php b/modules/search.php index c0b2791..a0057ef 100644 --- a/modules/search.php +++ b/modules/search.php @@ -206,7 +206,7 @@ class SearchModule extends PLModule 'nationaliteTxt' => DirEnum::NATIONALITIES, 'schoolTxt' => DirEnum::EDUSCHOOLS, ); - if (!array_key_exists($enums, $type)) { + if (!array_key_exists($type, $enums)) { exit(); }