From d913736bd1a6850d32bfe81bd958e3e17984100e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 Sep 2020 17:59:21 +0200 Subject: [PATCH] Update list.php --- htdocs/comm/propal/list.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index e3097ea67d7..511ba918a43 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -1311,10 +1311,10 @@ if ($resql) print $formfile->showdocuments('massfilesarea_proposals', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); - if ($action == 'validate'){ - if (GETPOST('confirm') == 'yes'){ - foreach ($toselect as $checked){ - $sql = "SELECT ref, fk_statut AS statut FROM ".MAIN_DB_PREFIX."propal WHERE rowid = ".$checked; + if ($action == 'validate') { + if (GETPOST('confirm') == 'yes') { + foreach ($toselect as $checked) { + $sql = "SELECT ref, fk_statut AS status FROM ".MAIN_DB_PREFIX."propal WHERE rowid = ".$checked; $resql = $db->query($sql); if ($resql){ $obj = $db->fetch_object($resql); @@ -1327,7 +1327,7 @@ if ($resql) } else { $numref = $obj->ref; } - if ($obj->statut == 0){ + if ($obj->status == 0){ $sql = "UPDATE ".MAIN_DB_PREFIX."propal SET fk_statut = 1, ref ='".$numref."' WHERE rowid = ".$checked; $resql = $db->query($sql); if ($resql){ @@ -1346,13 +1346,13 @@ if ($resql) } if ($action == "sign") { - if (GETPOST('confirm') == 'yes'){ + if (GETPOST('confirm') == 'yes') { foreach ($toselect as $checked) { - $sqlp = "SELECT ref, fk_statut AS statut FROM " . MAIN_DB_PREFIX . "propal WHERE rowid = " . $checked; + $sqlp = "SELECT ref, fk_statut AS status FROM " . MAIN_DB_PREFIX . "propal WHERE rowid = " . $checked; $resqlp = $db->query($sqlp); if ($resqlp) { $objp = $db->fetch_object($resqlp); - if ($objp->statut == 1) { + if ($objp->status == 1) { $sqlp = "UPDATE " . MAIN_DB_PREFIX . "propal SET fk_statut = 2 WHERE rowid = " . $checked; $resqlp = $db->query($sqlp); if ($resqlp) {