From c7c3780400a49107701414d05596bd37b4649ba1 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 5 Oct 2018 15:34:32 +0200 Subject: [PATCH] clean code --- htdocs/admin/prelevement.php | 2 -- htdocs/compta/index.php | 9 ++------- htdocs/core/boxes/modules_boxes.php | 1 - htdocs/fourn/commande/dispatch.php | 4 ---- htdocs/variants/card.php | 1 - htdocs/variants/combinations.php | 1 - 6 files changed, 2 insertions(+), 16 deletions(-) diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index c40eca7380e..cdfcd451f2c 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -465,7 +465,6 @@ if (! empty($conf->global->MAIN_MODULE_NOTIFICATION)) { $num = $db->num_rows($resql); $i = 0; - $var = false; while ($i < $num) { $obj = $db->fetch_object($resql); @@ -511,7 +510,6 @@ if (! empty($conf->global->MAIN_MODULE_NOTIFICATION)) { $num = $db->num_rows($resql); $i = 0; - $var = false; while ($i < $num) { $obj = $db->fetch_object($resql); diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index ea43c270b5f..eec0c640b67 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -162,7 +162,6 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) if ( $resql ) { - $var = false; $num = $db->num_rows($resql); print ''; @@ -350,7 +349,6 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) $resql = $db->query($sql); if ($resql) { - $var=false; $num = $db->num_rows($resql); $i = 0; @@ -473,7 +471,6 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- $resql=$db->query($sql); if ($resql) { - $var=false; $num = $db->num_rows($resql); print '
'; @@ -520,7 +517,6 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- $total_ttc += $obj->total_ttc; $totalam += $obj->am; $i++; - $var = !$var; } } else @@ -1069,7 +1065,7 @@ if ($resql) $obj = $db->fetch_object($resql); - print ""; + print ''; print ''; $i++; } @@ -1080,7 +1076,6 @@ if ($resql) print ''; - +// End of page llxFooter(); - $db->close(); diff --git a/htdocs/core/boxes/modules_boxes.php b/htdocs/core/boxes/modules_boxes.php index 4377b90d17a..47646a0facf 100644 --- a/htdocs/core/boxes/modules_boxes.php +++ b/htdocs/core/boxes/modules_boxes.php @@ -213,7 +213,6 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" box require_once DOL_DOCUMENT_ROOT .'/core/lib/files.lib.php'; $MAXLENGTHBOX=60; // Mettre 0 pour pas de limite - $var = false; $cachetime = 900; // 900 : 15mn $cachedir = DOL_DATA_ROOT.'/boxes/temp'; diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 44b10bf6f88..7f2e5ba4139 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -533,7 +533,6 @@ if ($id > 0 || ! empty($ref)) { $nbproduct = 0; // Nb of predefined product lines to dispatch (already done or not) if SUPPLIER_ORDER_DISABLE_STOCK_DISPATCH_WHEN_TOTAL_REACHED is off (default) // or nb of line that remain to dispatch if SUPPLIER_ORDER_DISABLE_STOCK_DISPATCH_WHEN_TOTAL_REACHED is on. - $var = false; while ( $i < $num ) { $objp = $db->fetch_object($resql); @@ -794,8 +793,6 @@ if ($id > 0 || ! empty($ref)) { print ''; print "\n"; - $var = false; - while ( $i < $num ) { $objp = $db->fetch_object($resql); @@ -869,7 +866,6 @@ if ($id > 0 || ! empty($ref)) { print "\n"; $i ++; - $var = ! $var; } $db->free($resql); diff --git a/htdocs/variants/card.php b/htdocs/variants/card.php index be73db1fff0..8cb4e13b33e 100644 --- a/htdocs/variants/card.php +++ b/htdocs/variants/card.php @@ -133,7 +133,6 @@ if ($confirm == 'yes') { $langs->load('products'); $title = $langs->trans('ProductAttributeName', dol_htmlentities($object->label)); -$var = false; llxHeader('', $title); diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index 0d1ea7af03b..f5c0d813995 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -27,7 +27,6 @@ require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination2ValuePair.cla $langs->loadLangs(array("products", "other")); -$var = false; $id = GETPOST('id', 'int'); $valueid = GETPOST('valueid', 'int'); $ref = GETPOST('ref');
".dol_print_date($db->jdate($obj->da),"day")."
'.dol_print_date($db->jdate($obj->da),"day").''.$obj->libelle.' '.$obj->label.'
' . $langs->trans("Date") . '