From: x2001corpet Date: Fri, 30 Jun 2006 13:12:01 +0000 (+0000) Subject: bug dans la recherche avancee X-Git-Tag: xorg/0.9.10~23 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=282fc57ece1a77d62a099f802a1c634d8464020a;p=platal.git bug dans la recherche avancee git-svn-id: svn+ssh://murphy/home/svn/platal/branches/platal-0.9.10@349 839d8a87-29fc-0310-9880-83ba4fa771e5 --- diff --git a/include/search/classes.inc.php b/include/search/classes.inc.php index 8a6c364..c164852 100644 --- a/include/search/classes.inc.php +++ b/include/search/classes.inc.php @@ -447,14 +447,15 @@ class MapSField extends RefSField function MapSField($_fieldFormName, $_fieldDbName='', $_refTable, $_refAlias, $_refCondition, $_mapId=false) { - if ($_mapId === false) - $this->mapId = Env::get($_fieldFormName); - else - $this->mapId = $_mapId; - $this->RefSField($_fieldFormName, $_fieldDbName, $_refTable, $_refAlias, $_refCondition, true, false); + if ($_mapId === false) + $this->mapId = Env::get($_fieldFormName, ''); + else + $this->mapId = $_mapId; + $this->RefSField($_fieldFormName, $_fieldDbName, $_refTable, $_refAlias, $_refCondition, true, false); } function get_select_statement() { + if ($this->mapId === '') return false; $res = implode(' OR ', array_filter(array_map(array($this, 'get_single_match_statement'), $this->fieldDbName))); foreach ($this->refTable as $i => $refT) $last = $i; @@ -465,7 +466,7 @@ class MapSField extends RefSField } function get_request() { - $this->value = $this->mapId; + $this->value = $this->mapId; } }