From 95c9d19d5eb8e41f86e5818ec96b11c63584e584 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 Mar 2013 11:31:49 +0100 Subject: [PATCH] Fix: Restore ability to filter on '0' --- htdocs/exports/class/export.class.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php index 622f26506f9ce..07199f815d815 100644 --- a/htdocs/exports/class/export.class.php +++ b/htdocs/exports/class/export.class.php @@ -233,8 +233,7 @@ function build_sql($indice, $array_selected, $array_filterValue) // pour ne pas a gerer le nombre de condition foreach ($array_filterValue as $key => $value) { - if (!empty($value)) - $sqlWhere.=" and ".$this->build_filterQuery($this->array_export_TypeFields[0][$key], $key, $array_filterValue[$key]); + if ($value != '') $sqlWhere.=" and ".$this->build_filterQuery($this->array_export_TypeFields[0][$key], $key, $array_filterValue[$key]); } $sql.=$sqlWhere; } @@ -248,7 +247,7 @@ function build_sql($indice, $array_selected, $array_filterValue) * * @param string $TypeField Type of 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'>" */ function build_filterQuery($TypeField, $NameField, $ValueField)