From ddbf5e59e1bff8b4b30121a2d25ad36a07bff8ce Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Mon, 18 Jun 2018 10:12:19 +0200 Subject: [PATCH] clean and update code --- htdocs/contrat/services_list.php | 1 - htdocs/don/payment/payment.php | 5 +---- htdocs/expensereport/list.php | 1 - htdocs/exports/class/export.class.php | 3 --- htdocs/exports/export.php | 12 ++---------- htdocs/exports/index.php | 6 +----- 6 files changed, 4 insertions(+), 24 deletions(-) diff --git a/htdocs/contrat/services_list.php b/htdocs/contrat/services_list.php index c94be74b0b8..290226f815e 100644 --- a/htdocs/contrat/services_list.php +++ b/htdocs/contrat/services_list.php @@ -531,7 +531,6 @@ print "\n"; $contractstatic=new Contrat($db); $productstatic=new Product($db); -$var=true; $i=0; $totalarray=array(); while ($i < min($num,$limit)) diff --git a/htdocs/don/payment/payment.php b/htdocs/don/payment/payment.php index fe4197dbc15..d1cfaa6f0ad 100644 --- a/htdocs/don/payment/payment.php +++ b/htdocs/don/payment/payment.php @@ -249,7 +249,6 @@ if (GETPOST('action','aZ09') == 'create') print ''.$langs->trans("Amount").''; print "\n"; - $var=true; $total=0; $totalrecu=0; @@ -257,8 +256,6 @@ if (GETPOST('action','aZ09') == 'create') { $objp = $don; - - print ''; print ''.price($objp->amount).""; @@ -288,7 +285,7 @@ if (GETPOST('action','aZ09') == 'create') if ($i > 1) { // Print total - print ""; + print ''; print ''.$langs->trans("Total").':'; print "".price($total_ttc).""; print "".price($totalrecu).""; diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index 0caf115690d..5565512f7f5 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -644,7 +644,6 @@ if ($resql) if ($num > 0) { $i=0; - $var=true; $totalarray=array(); while ($i < min($num,$limit)) { diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php index 8a662c83dcf..050318944d6 100644 --- a/htdocs/exports/class/export.class.php +++ b/htdocs/exports/class/export.class.php @@ -80,7 +80,6 @@ class Export dol_syslog(get_class($this)."::load_arrays user=".$user->id." filter=".$filter); - $var=true; $i=0; // Define list of modules directories into modulesdir @@ -595,8 +594,6 @@ class Export // Genere ligne de titre $objmodel->write_title($this->array_export_fields[$indice],$array_selected,$outputlangs,$this->array_export_TypeFields[$indice]); - $var=true; - while ($obj = $this->db->fetch_object($resql)) { // Process special operations diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index 0a0d225e750..6d65418be3c 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -585,12 +585,10 @@ if ($step == 2 && $datatoexport) // $this->array_export_entities[0]=$module->export_fields_entities[$r]; // $this->array_export_alias[0]=$module->export_fields_alias[$r]; - $var=true; $i = 0; foreach($fieldsarray as $code=>$label) { - print ''; $i++; @@ -779,7 +777,6 @@ if ($step == 3 && $datatoexport) // Select request if all fields are selected $sqlmaxforexport=$objexport->build_sql(0, array(), array()); - $var=true; $i = 0; // on boucle sur les champs foreach($fieldsarray as $code => $label) @@ -977,7 +974,6 @@ if ($step == 4 && $datatoexport) //print ''.$langs->trans("FieldsTitle").''; print ''; - $var=true; foreach($array_selected as $code=>$value) { print ''; @@ -1074,7 +1070,7 @@ if ($step == 4 && $datatoexport) print ''.$langs->trans("ExportModelName").''; print ' '; print ''; - $var=false; + print ''; print ''; print ''; @@ -1091,10 +1087,8 @@ if ($step == 4 && $datatoexport) { $num = $db->num_rows($resql); $i = 0; - $var=false; while ($i < $num) { - $obj = $db->fetch_object($resql); print ''; print $obj->label; @@ -1229,8 +1223,7 @@ if ($step == 5 && $datatoexport) print $langs->trans("NowClickToGenerateToBuildExportFile").'
'; - // Liste des formats d'exports disponibles - $var=true; + // List of available export formats print ''; print ''; print ''; @@ -1248,7 +1241,6 @@ if ($step == 5 && $datatoexport) unset($liste[$key]); } - print ''; print ''; print ''; //print ''; print ''; -$var=true; if (count($export->array_export_code)) { foreach ($export->array_export_code as $key => $value) @@ -112,8 +111,7 @@ print '
'; //print '
'; -// List of available export format -$var=true; +// List of available export formats print '
'.$langs->trans("AvailableFormats").'
'.img_picto_common($key,$objmodelexport->getPictoForKey($key)).' '; $text=$objmodelexport->getDriverDescForKey($key); diff --git a/htdocs/exports/index.php b/htdocs/exports/index.php index 01a663dc484..b23d1ff6ab7 100644 --- a/htdocs/exports/index.php +++ b/htdocs/exports/index.php @@ -60,7 +60,6 @@ print ''.$langs->trans("Module").''.$langs->trans("ExportableDatas").' 
'; print ''; print ''; @@ -125,7 +123,6 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/export/modules_export.php'; $model=new ModeleExports($db); $liste=$model->liste_modeles($db); // This is not a static method for exports because method load non static properties -$var=true; foreach($liste as $key => $val) { if (preg_match('/__\(Disabled\)__/',$liste[$key])) @@ -133,7 +130,6 @@ foreach($liste as $key => $val) $liste[$key]=preg_replace('/__\(Disabled\)__/','('.$langs->transnoentitiesnoconv("Disabled").')',$liste[$key]); } - print ''; print ''; $text=$model->getDriverDescForKey($key);
'.$langs->trans("AvailableFormats").'
'.img_picto_common($model->getDriverLabelForKey($key),$model->getPictoForKey($key)).'