Fix: Restore ability to filter on '0'

This commit is contained in:
Laurent Destailleur 2013-03-15 11:31:49 +01:00
parent d6c18c1789
commit 95c9d19d5e

View File

@ -233,8 +233,7 @@ class Export
// pour ne pas a gerer le nombre de condition // pour ne pas a gerer le nombre de condition
foreach ($array_filterValue as $key => $value) foreach ($array_filterValue as $key => $value)
{ {
if (!empty($value)) if ($value != '') $sqlWhere.=" and ".$this->build_filterQuery($this->array_export_TypeFields[0][$key], $key, $array_filterValue[$key]);
$sqlWhere.=" and ".$this->build_filterQuery($this->array_export_TypeFields[0][$key], $key, $array_filterValue[$key]);
} }
$sql.=$sqlWhere; $sql.=$sqlWhere;
} }
@ -248,7 +247,7 @@ class Export
* *
* @param string $TypeField Type of Field to filter * @param string $TypeField Type of Field to filter
* @param string $NameField Name of the field to filter * @param string $NameField Name of the field to filter
* @param string $ValueField Initial value of the field to filter * @param string $ValueField Value of the field for filter. Must not be ''
* @return string sql string of then field ex : "field='xxx'>" * @return string sql string of then field ex : "field='xxx'>"
*/ */
function build_filterQuery($TypeField, $NameField, $ValueField) function build_filterQuery($TypeField, $NameField, $ValueField)