From e45406694bad98a794542606027396957e780354 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 23 Nov 2013 19:28:41 +0100 Subject: [PATCH] Fix: no filter is value is '' --- htdocs/comm/action/class/actioncomm.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 33057e96eb8..b10bb5f90a3 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -887,7 +887,7 @@ class ActionComm extends CommonObject $sql.= " AND a.entity = ".$conf->entity; foreach ($filters as $key => $value) { - if ($key == 'notolderthan') $sql.=" AND a.datep >= '".$this->db->idate($now-($value*24*60*60))."'"; + if ($key == 'notolderthan' && $value != '') $sql.=" AND a.datep >= '".$this->db->idate($now-($value*24*60*60))."'"; if ($key == 'year') $sql.=" AND a.datep BETWEEN '".$this->db->idate(dol_get_first_day($value,1))."' AND '".$this->db->idate(dol_get_last_day($value,12))."'"; if ($key == 'id') $sql.=" AND a.id=".(is_numeric($value)?$value:0); if ($key == 'idfrom') $sql.=" AND a.id >= ".(is_numeric($value)?$value:0);