From f5ec96bfce153104a524a878f84cfd6e51ae774d Mon Sep 17 00:00:00 2001 From: daraelmin Date: Mon, 14 Jun 2021 12:19:24 +0200 Subject: [PATCH] Clean code (use Adh constant and precise comment) --- htdocs/adherents/stats/byproperties.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/adherents/stats/byproperties.php b/htdocs/adherents/stats/byproperties.php index f934ebcf0af..63deec867ef 100644 --- a/htdocs/adherents/stats/byproperties.php +++ b/htdocs/adherents/stats/byproperties.php @@ -29,7 +29,7 @@ $graphwidth = 700; $mapratio = 0.5; $graphheight = round($graphwidth * $mapratio); -$mode = GETPOST('mode') ?GETPOST('mode') : ''; +$mode = GETPOST('mode') ? GETPOST('mode') : ''; // Security check @@ -69,7 +69,7 @@ $sql .= " d.morphy as code"; $sql .= " FROM ".MAIN_DB_PREFIX."adherent as d"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."subscription as s ON s.fk_adherent = d.rowid"; $sql .= " WHERE d.entity IN (".getEntity('adherent').")"; -$sql .= " AND d.statut <> -1"; // Not draft +$sql .= " AND d.statut <> ".Adherent::STATUS_DRAFT; $sql .= " GROUP BY d.morphy"; $foundphy = $foundmor = 0; @@ -104,7 +104,7 @@ $sql .= " d.morphy as code"; $sql .= " FROM ".MAIN_DB_PREFIX."adherent as d"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."subscription as s ON s.fk_adherent = d.rowid"; $sql .= " WHERE d.entity IN (".getEntity('adherent').")"; -$sql .= " AND d.statut >= 1"; // Active (not draft=-1, not resiliated=0) +$sql .= " AND d.statut >= 1"; // Active (not excluded=-2, not draft=-1, not resiliated=0) $sql .= " GROUP BY d.morphy"; $foundphy = $foundmor = 0;