From 9d44d2c7a81ca3fda06ef3897d77f6b3005098e2 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Sat, 6 Mar 2010 21:42:25 +0100 Subject: [PATCH] Fix autocompletion. Signed-off-by: Florent Bruneau --- classes/direnum.php | 2 +- modules/search.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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(); } -- 2.1.4