Merge pull request #17999 from daamien/17996_fix_adherents_type_subscription_comparisons

FIX #17996: Avoid implicit type casts for llx_adherent_type.subscription
This commit is contained in:
Laurent Destailleur 2021-06-21 19:51:09 +02:00 committed by GitHub
commit f1fde18301
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -363,13 +363,13 @@ if ($search_type > 0) {
$sql .= " AND t.rowid=".((int) $search_type);
}
if ($search_filter == 'withoutsubscription') {
$sql .= " AND (datefin IS NULL OR t.subscription = 0)";
$sql .= " AND (datefin IS NULL OR t.subscription = '0')";
}
if ($search_filter == 'uptodate') {
$sql .= " AND (datefin >= '".$db->idate($now)."' OR t.subscription = 0)";
$sql .= " AND (datefin >= '".$db->idate($now)."' OR t.subscription = '0')";
}
if ($search_filter == 'outofdate') {
$sql .= " AND (datefin < '".$db->idate($now)."' AND t.subscription = 1)";
$sql .= " AND (datefin < '".$db->idate($now)."' AND t.subscription = '1')";
}
if ($search_status != '') {
// Peut valoir un nombre ou liste de nombre separes par virgules