diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 322c08bd77c..996f2d16c8d 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -307,7 +307,7 @@ $memberstatic = new Adherent($db); $now = dol_now(); -if (!empty($search_categ) || !empty($catid)) { +if ((!empty($search_categ) && $search_categ > 0) || !empty($catid)) { $sql = "SELECT DISTINCT"; } else { $sql = "SELECT"; @@ -336,7 +336,7 @@ $sql .= " FROM ".MAIN_DB_PREFIX."adherent as d"; if (!empty($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (d.rowid = ef.fk_object)"; } -if (!empty($search_categ) || !empty($catid)) { +if ((!empty($search_categ) && $search_categ > 0) || !empty($catid)) { // We need this table joined to the select in order to filter by categ $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_member as cm ON d.rowid = cm.fk_member"; } @@ -540,7 +540,7 @@ if ($search_login) { if ($search_email) { $param .= "&search_email=".urlencode($search_email); } -if ($search_categ) { +if ($search_categ > 0 || $search_categ == -2) { $param .= "&search_categ=".urlencode($search_categ); } if ($search_company) { @@ -573,7 +573,7 @@ if ($search_phone_mobile != '') { if ($search_filter && $search_filter != '-1') { $param .= "&search_filter=".urlencode($search_filter); } -if ($search_status != "" && $search_status != Adherent::STATUS_DRAFT) { +if ($search_status != "" && $search_status != -3) { $param .= "&search_status=".urlencode($search_status); } if ($search_type > 0) { diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 552022f883f..cc9099b463b 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -687,7 +687,7 @@ if ($search_opp_percent != '') { if ($search_public != '') { $param .= '&search_public='.urlencode($search_public); } -if ($search_project_user != '') { +if ($search_project_user > 0) { $param .= '&search_project_user='.urlencode($search_project_user); } if ($search_sale > 0) {