diff --git a/dev/initdata/generate-thirdparty.php b/dev/initdata/generate-thirdparty.php index 54e17c7f8d7..f1e0f4f360b 100755 --- a/dev/initdata/generate-thirdparty.php +++ b/dev/initdata/generate-thirdparty.php @@ -116,7 +116,6 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++) $contact->firstname = $listoflastname[mt_rand(0, count($listoflastname)-1)]; if ( $contact->create($user) ) { - } } diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index 6773e1d2c03..32c44ce91e4 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -122,14 +122,14 @@ - + 0 0 - + @@ -195,7 +195,7 @@ --> - + @@ -213,6 +213,8 @@ 0 + + @@ -337,7 +339,7 @@ - @@ -375,7 +377,7 @@ 0 - + 0 diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index 06a2fb60d67..2f23cd3eae8 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -677,7 +677,6 @@ if ($id) { foreach ($fieldlist as $field => $value) { - $showfield=1; $class="left"; $valuetoshow=$obj->{$fieldlist[$field]}; diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index c49ed42741b..f54c477ff52 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -273,7 +273,6 @@ if ($action == 'create') { print ''; } elseif ($id > 0 || $ref) { - $result = $object->fetch($id, $ref, 1); if ($result > 0) { diff --git a/htdocs/accountancy/admin/categories.php b/htdocs/accountancy/admin/categories.php index a7fe40acefc..5fdd43eb020 100644 --- a/htdocs/accountancy/admin/categories.php +++ b/htdocs/accountancy/admin/categories.php @@ -130,7 +130,6 @@ if (! empty($cat_id)) } if (is_array($accountingcategory->lines_cptbk) && count($accountingcategory->lines_cptbk) > 0) { - print $form->multiselectarray('cpt_bk', $arraykeyvalue, GETPOST('cpt_bk', 'array'), null, null, null, null, "90%"); print '
'; /*print ''; print ''; foreach ($list_account_main as $key) { - print ''; // Param $label = $langs->trans($key); diff --git a/htdocs/accountancy/admin/defaultaccounts.php b/htdocs/accountancy/admin/defaultaccounts.php index 13d3a267956..6b47578761c 100644 --- a/htdocs/accountancy/admin/defaultaccounts.php +++ b/htdocs/accountancy/admin/defaultaccounts.php @@ -83,7 +83,6 @@ if (GETPOST('change_chart', 'alpha')) $chartofaccounts = GETPOST('chartofaccounts', 'int'); if (! empty($chartofaccounts)) { - if (! dolibarr_set_const($db, 'CHARTOFACCOUNTS', $chartofaccounts, 'chaine', 0, '', $conf->entity)) { $error ++; } @@ -144,7 +143,6 @@ print ''; print '
'; foreach ($list_account_main as $key) { - print ''; // Param $label = $langs->trans($key); @@ -172,7 +170,6 @@ print '
'; print '
'; foreach ($list_account as $key) { - print ''; // Param $label = $langs->trans($key); diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php index e13a66998b7..e506f5bf512 100644 --- a/htdocs/accountancy/admin/export.php +++ b/htdocs/accountancy/admin/export.php @@ -114,7 +114,7 @@ if ($action == 'update') { $error ++; } } - } + } if (! $error) { // reload @@ -203,7 +203,6 @@ print "\n"; $num = count($main_option); if ($num) { foreach ($main_option as $key) { - print ''; // Param diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index fcdf4de032c..44fe3e936cd 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -609,7 +609,6 @@ if ($id) $langs->load("accountancy"); foreach ($fieldlist as $field => $value) { - $showfield=1; $class="left"; $valuetoshow=$obj->{$fieldlist[$field]}; diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index 2922d3bdf23..091018dc909 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -117,7 +117,6 @@ if ($action == 'update') { ); if (in_array($accounting_product_mode, $accounting_product_modes)) { - if (! dolibarr_set_const($db, 'ACCOUNTING_PRODUCT_MODE', $accounting_product_mode, 'chaine', 0, '', $conf->entity)) { $error ++; } @@ -129,7 +128,6 @@ if ($action == 'update') { if (! empty($btn_changeaccount)) { //$msg = '
' . $langs->trans("Processing") . '...
'; if (! empty($chk_prod)) { - $accounting = new AccountingAccount($db); //$msg .= '
' . count($chk_prod) . ' ' . $langs->trans("SelectedLines") . '
'; diff --git a/htdocs/accountancy/bookkeeping/balancebymonth.php b/htdocs/accountancy/bookkeeping/balancebymonth.php index d0e9b940074..bdc78911513 100644 --- a/htdocs/accountancy/bookkeeping/balancebymonth.php +++ b/htdocs/accountancy/bookkeeping/balancebymonth.php @@ -105,7 +105,6 @@ if ($resql) { $num = $db->num_rows($resql); while ( $i < $num ) { - $row = $db->fetch_row($resql); print ''; diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index 5f9ba37d341..cc6307bae2c 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -83,7 +83,6 @@ $object = new BookKeeping($db); */ if ($action == "confirm_update") { - $error = 0; if ((floatval($debit) != 0.0) && (floatval($credit) != 0.0)) { @@ -585,7 +584,6 @@ if ($action == 'create') if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } else { - print load_fiche_titre($langs->trans("ListeMvts"), '', ''); print ''; @@ -601,7 +599,6 @@ if ($action == 'create') print "
' . length_accountg($row[0]) . '
"; if (count($object->linesmvt) > 0) { - $total_debit = 0; $total_credit = 0; diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index b14a118a342..5158e12ebb6 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -316,7 +316,6 @@ if (empty($reshook)) } if ($action == 'delbookkeeping' && $user->rights->accounting->mouvements->supprimer) { - $import_key = GETPOST('importkey', 'alpha'); if (! empty($import_key)) { @@ -331,7 +330,6 @@ if ($action == 'delbookkeeping' && $user->rights->accounting->mouvements->suppri } } if ($action == 'delbookkeepingyearconfirm' && $user->rights->accounting->mouvements->supprimer_tous) { - $delyear = GETPOST('delyear', 'int'); if ($delyear==-1) { $delyear=0; @@ -362,7 +360,6 @@ if ($action == 'delbookkeepingyearconfirm' && $user->rights->accounting->mouveme } } if ($action == 'delmouvconfirm' && $user->rights->accounting->mouvements->supprimer) { - $mvt_num = GETPOST('mvt_num', 'int'); if (! empty($mvt_num)) { @@ -468,7 +465,6 @@ if (! empty($sortfield)) { // Export into a file with format defined into setup (FEC, CSV, ...) // Must be after definition of $sql if ($action == 'export_file' && $user->rights->accounting->mouvements->export) { - // TODO Replace the fetchAll + ->export later that consume too much memory on large export with the query($sql) and loop on each line to export them. $result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter, 'AND', $conf->global->ACCOUNTING_REEXPORT); @@ -578,7 +574,6 @@ if ($action == 'delmouv') { print $formconfirm; } if ($action == 'delbookkeepingyear') { - $form_question = array (); $delyear = GETPOST('delyear'); $deljournal = GETPOST('deljournal'); diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index d91772a6ab3..4f275e3e2b0 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -179,7 +179,6 @@ if (! empty($search_credit)) { if ($action == 'delmouvconfirm') { - $mvt_num = GETPOST('mvt_num', 'int'); if (! empty($mvt_num)) { @@ -229,7 +228,6 @@ if ($action == 'delmouv') { print $formconfirm; } if ($action == 'delbookkeepingyear') { - $form_question = array (); $delyear = GETPOST('delyear'); @@ -338,7 +336,6 @@ while ($i < min($num, $limit)) // Is it a break ? if ($accountg != $displayed_account_number || ! isset($displayed_account_number)) { - // Affiche un Sous-Total par compte comptable if (isset($displayed_account_number)) { print ''; diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php index b7a19101758..4bc60fc904f 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php @@ -100,7 +100,6 @@ if ($result < 0) */ if ($action == 'lettering') { - $result = $lettering->updateLettering($toselect); if ($result < 0) { @@ -251,7 +250,6 @@ if ($resql) { $tmp = ''; while ( $obj = $db->fetch_object($resql) ) { - if ($tmp != $obj->lettering_code || empty($tmp)) $tmp = $obj->lettering_code; /*if ($tmp != $obj->lettering_code || empty($obj->lettering_code))*/ $solde += ($obj->credit - $obj->debit); diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php index eaa741e1722..df513f8d074 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php @@ -99,7 +99,6 @@ if ($result<0) * Action */ if ($action == 'lettering') { - $result = $lettering->updateLettering($toselect); if ($result < 0) { @@ -248,7 +247,6 @@ if ($resql) { $solde = 0; $tmp = ''; while ($obj = $db->fetch_object($resql)) { - if ($tmp != $obj->lettering_code || empty($tmp)) $tmp = $obj->lettering_code; /*if ($tmp != $obj->lettering_code || empty($obj->lettering_code))*/ $solde += ($obj->credit - $obj->debit); diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index 84a851eea50..7e8f14f2a53 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -549,7 +549,6 @@ class AccountancyExport $end_line = "\n"; foreach ($objectLines as $line) { - $date = dol_print_date($line->doc_date, '%d%m%Y'); print $line->id . $separator; @@ -585,7 +584,6 @@ class AccountancyExport $end_line = "\n"; foreach ($objectLines as $line) { - $date = dol_print_date($line->doc_date, '%d%m%Y'); print $line->piece_num . $separator; @@ -625,7 +623,6 @@ class AccountancyExport $end_line = "\n"; foreach ($objectLines as $line) { - $date = dol_print_date($line->doc_date, '%d/%m/%Y'); print $date . $separator; @@ -934,7 +931,6 @@ class AccountancyExport $end_line = "\r\n"; foreach ($objectLines as $line) { - $date_document = dol_print_date($line->doc_date, '%Y%m%d'); $date_creation = dol_print_date($line->date_creation, '%Y%m%d'); @@ -1087,7 +1083,6 @@ class AccountancyExport print $end_line; foreach($objectLines as $line) { - $date = dol_print_date($line->doc_date, '%Y%m%d'); print $date . $separator; //Date diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index f9c2e3391ba..21cbdeb9662 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -407,7 +407,6 @@ class AccountingAccount extends CommonObject $result = $this->checkUsage(); if ($result > 0) { - $this->db->begin(); // if (! $error) { diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index a2066cb75b4..b4e747d65f3 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -1584,9 +1584,7 @@ class BookKeeping extends CommonObject dol_syslog(get_class($this) . "::" . __METHOD__, LOG_DEBUG); $result = $this->db->query($sql); if ($result) { - while ($obj = $this->db->fetch_object($result)) { - $line = new BookKeepingLine(); $line->id = $obj->rowid; diff --git a/htdocs/accountancy/class/lettering.class.php b/htdocs/accountancy/class/lettering.class.php index e20b49dbd25..ef63fc8b15f 100644 --- a/htdocs/accountancy/class/lettering.class.php +++ b/htdocs/accountancy/class/lettering.class.php @@ -149,7 +149,6 @@ class Lettering extends BookKeeping } } } elseif ($obj->type == 'payment') { - $sql = 'SELECT DISTINCT bk.rowid, fac.ref, fac.ref, pay.fk_bank, fac.rowid as fact_id'; $sql .= " FROM " . MAIN_DB_PREFIX . "facture fac "; $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "paiement_facture as payfac ON payfac.fk_facture=fac.rowid"; diff --git a/htdocs/accountancy/customer/card.php b/htdocs/accountancy/customer/card.php index 52057485a30..00c4a945ff9 100644 --- a/htdocs/accountancy/customer/card.php +++ b/htdocs/accountancy/customer/card.php @@ -112,7 +112,6 @@ if (! empty($id)) { $i = 0; if ($num_lines) { - $objp = $db->fetch_object($result); print '' . "\n"; diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php index 68649aa264d..f43ca801c25 100644 --- a/htdocs/accountancy/customer/index.php +++ b/htdocs/accountancy/customer/index.php @@ -97,7 +97,6 @@ if ($action == 'clean' || $action == 'validatehistory') } if ($action == 'validatehistory') { - $error = 0; $db->begin(); @@ -195,7 +194,6 @@ if ($resql) { $num = $db->num_rows($resql); while ( $row = $db->fetch_row($resql)) { - print ''; for($i = 1; $i <= 12; $i ++) { print ''; diff --git a/htdocs/accountancy/expensereport/index.php b/htdocs/accountancy/expensereport/index.php index d3fc63d3bf8..ea855921c5a 100644 --- a/htdocs/accountancy/expensereport/index.php +++ b/htdocs/accountancy/expensereport/index.php @@ -94,7 +94,6 @@ if ($action == 'clean' || $action == 'validatehistory') } if ($action == 'validatehistory') { - $error = 0; $db->begin(); @@ -187,7 +186,6 @@ if ($resql) { $num = $db->num_rows($resql); while ( $row = $db->fetch_row($resql)) { - print ' diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index b24e3361d16..2848ed4119e 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -94,7 +94,6 @@ $hookmanager->initHooks(array('membertypecard','globalcard')); */ if ($cancel) { - $action=''; if (! empty($backtopage)) { diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index a13b7bd1580..3caa3418af5 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -268,7 +268,6 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // Active if (in_array($name, $def)) { - print ''."\n"; if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) { - print ''; print ''."\n"; print ''."\n"; diff --git a/htdocs/admin/bank.php b/htdocs/admin/bank.php index 689202c023d..70b273e2fcc 100644 --- a/htdocs/admin/bank.php +++ b/htdocs/admin/bank.php @@ -253,7 +253,6 @@ $i = 0; $nbofbank = count($bankorder); while ($i < $nbofbank) { - print ''; print ''; // Chemin du binaire genbarcode sous linux if (! isset($_SERVER['WINDIR'])) { - print ''; print ''; print ''; print ''; print ''; print ''; print ''; @@ -381,7 +380,6 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) { - if (file_exists($dir.'/'.$file)) { $name = substr($file, 4, dol_strlen($file) -16); diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index ca90c836929..1e158bc7a7f 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -474,7 +474,6 @@ print ''; // Activate FileCache - Developement if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIVATE_FILECACHE)) { - print ''; diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index cb07d741a06..5bb2dbe79ed 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -282,7 +282,6 @@ foreach ($dirmodels as $reldir) $handle = opendir($dir); if (is_resource($handle)) { - while (($file = readdir($handle))!==false) { if (substr($file, 0, 13) == 'mod_commande_' && substr($file, dol_strlen($file)-3, 3) == 'php') @@ -299,7 +298,6 @@ foreach ($dirmodels as $reldir) if ($module->isEnabled()) { - print ''; @@ -423,7 +421,6 @@ foreach ($dirmodels as $reldir) { if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) { - if (file_exists($dir.'/'.$file)) { $name = substr($file, 4, dol_strlen($file) -16); diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index dde962fe9bc..e6ea9a2cb17 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -470,7 +470,6 @@ print ''."\n"; // Barcode if (! empty($conf->barcode->enabled)) { - print ''; print ''; @@ -555,7 +554,6 @@ print ''; // ProfID1 if ($langs->transcountry("ProfId1", $mysoc->country_code) != '-') { - print ''; @@ -359,7 +357,6 @@ foreach ($dirmodels as $reldir) { if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) { - if (file_exists($dir.'/'.$file)) { $name = substr($file, 4, dol_strlen($file) -16); diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php index d69a14deb2e..7e724c52280 100644 --- a/htdocs/admin/delais.php +++ b/htdocs/admin/delais.php @@ -265,7 +265,6 @@ print '
'; print ''.$langs->trans("DescWeather").' '; if($action == 'edit') { - $str_mode_std = $langs->trans('MeteoStdModEnabled').' : '.$langs->trans('MeteoUseMod', $langs->transnoentitiesnoconv('MeteoPercentageMod')); $str_mode_percentage = $langs->trans('MeteoPercentageModEnabled').' : '.$langs->trans('MeteoUseMod', $langs->transnoentitiesnoconv('MeteoStdMod')); if(empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) $str_mode_enabled = $str_mode_std; @@ -292,8 +291,6 @@ $text=''; $options='class="valignmiddle" height="60px"'; if ($action == 'edit') { - - print '
global->MAIN_USE_METEO_WITH_PERCENTAGE) ? '' : 'style="display:none;"').'>'; print '
'; @@ -364,9 +361,7 @@ if ($action == 'edit') { global->MAIN_USE_METEO_WITH_PERCENTAGE)) { - print '
'; print '
'; print img_weather($text, 0, $options); @@ -386,7 +381,6 @@ if ($action == 'edit') { print '
'; print '
'; } else { - print '
'; print '
'; print img_weather($text, 0, $options); @@ -411,11 +405,9 @@ if ($action == 'edit') { print '
'; if($action == 'edit') { - print '
'; print '
'; } else { - print '
'; } diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 31ade656480..501a6d18113 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -1728,7 +1728,6 @@ else { if ($showemptyline) { - print '
'; $showemptyline=0; } diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php index 4951f57c22f..e65eb2bbb0a 100644 --- a/htdocs/admin/dolistore/class/dolistore.class.php +++ b/htdocs/admin/dolistore/class/dolistore.class.php @@ -226,7 +226,6 @@ class Dolistore $html .= self::get_categories($cat->id); $html .= "\n"; } else { - } } diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php index e8dbfab9942..29ef6d40a1e 100644 --- a/htdocs/admin/expedition.php +++ b/htdocs/admin/expedition.php @@ -366,7 +366,6 @@ foreach ($dirmodels as $reldir) { if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) { - if (file_exists($dir.'/'.$file)) { $name = substr($file, 4, dol_strlen($file) -16); diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php index 8dde3449b6e..8a5cef82ceb 100644 --- a/htdocs/admin/expensereport.php +++ b/htdocs/admin/expensereport.php @@ -247,7 +247,6 @@ foreach ($dirmodels as $reldir) if ($module->isEnabled()) { - print ''; @@ -367,10 +366,8 @@ foreach ($dirmodels as $reldir) { if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) { - if (file_exists($dir.'/'.$file)) { - $name = substr($file, 4, dol_strlen($file) -16); $classname = substr($file, 0, dol_strlen($file) -12); diff --git a/htdocs/admin/external_rss.php b/htdocs/admin/external_rss.php index d16f3e493f5..e3adeaca890 100644 --- a/htdocs/admin/external_rss.php +++ b/htdocs/admin/external_rss.php @@ -300,7 +300,6 @@ if ($resql) // Logo if ($result > 0 && empty($rss->error)) { - print ''; print ""; print ''; @@ -303,7 +302,6 @@ print '
'; if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { - /* * Documents models for Holidays */ @@ -369,7 +367,6 @@ foreach ($dirmodels as $reldir) { if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) { - if (file_exists($dir.'/'.$file)) { $name = substr($file, 4, dol_strlen($file) -16); diff --git a/htdocs/admin/limits.php b/htdocs/admin/limits.php index ea19b7034a6..27f99ecb4f1 100644 --- a/htdocs/admin/limits.php +++ b/htdocs/admin/limits.php @@ -172,7 +172,6 @@ if (empty($mysoc->country_code)) } else { - // Show examples print ''.$langs->trans("ExamplesWithCurrentSetup").":
\n"; diff --git a/htdocs/admin/livraison.php b/htdocs/admin/livraison.php index 1f8a74f6eb8..99cd481095b 100644 --- a/htdocs/admin/livraison.php +++ b/htdocs/admin/livraison.php @@ -356,8 +356,6 @@ foreach ($dirmodels as $reldir) { if (file_exists($dir.'/'.$file)) { - - $name = substr($file, 4, dol_strlen($file) -16); $classname = substr($file, 0, dol_strlen($file) -12); diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index ff2b788a026..79d152fb7bf 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -364,7 +364,6 @@ if ($action == 'edit') // ID if (! empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer')))) { - $mainstmpid=(! empty($conf->global->MAIN_MAIL_SMTPS_ID)?$conf->global->MAIN_MAIL_SMTPS_ID:''); print ''; print ''; print ''; diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index 4c8f4188e4b..db9efb0e5c7 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -294,7 +294,6 @@ foreach ($dirmodels as $reldir) if ($module->isEnabled()) { - print ''; @@ -596,7 +595,6 @@ if (empty($conf->facture->enabled)) $i = 0; while ($i < $num) { - $row = $db->fetch_row($resql); print '
'.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).'
'; if ($row[0] == 'tobind') { @@ -271,7 +269,6 @@ if ($resql) { $num = $db->num_rows($resql); while ( $row = $db->fetch_row($resql)) { - print '
'; if ($row[0] == 'tobind') { @@ -398,7 +395,6 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. $num = $db->num_rows($resql); while ($row = $db->fetch_row($resql)) { - print '
' . $row[0] . '' . price(price2num($row[$i])) . '
'; if ($row[0] == 'tobind') { @@ -259,7 +257,6 @@ if ($resql) { $num = $db->num_rows($resql); while ( $row = $db->fetch_row($resql)) { - print '
'; if ($row[0] == 'tobind') { diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 2dd4f845c39..6e709835f42 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -167,7 +167,6 @@ $journal_label = $accountingjournalstatic->label; dol_syslog("accountancy/journal/bankjournal.php", LOG_DEBUG); $result = $db->query($sql); if ($result) { - $num = $db->num_rows($result); //print $sql; @@ -268,10 +267,8 @@ if ($result) { // get_url may return -1 which is not traversable if (is_array($links) && count($links) > 0) { - // Now loop on each link of record in bank. foreach ($links as $key => $val) { - if (in_array($links[$key]['type'], array('sc', 'payment_sc', 'payment', 'payment_supplier', 'payment_vat', 'payment_expensereport', 'banktransfert', 'payment_donation', 'member', 'payment_loan', 'payment_salary', 'payment_various'))) { // So we excluded 'company' and 'user' here. We want only payment lines diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php index 23d97360563..6cefc893b39 100644 --- a/htdocs/accountancy/journal/expensereportsjournal.php +++ b/htdocs/accountancy/journal/expensereportsjournal.php @@ -115,7 +115,6 @@ $sql .= " ORDER BY er.date_debut"; dol_syslog('accountancy/journal/expensereportsjournal.php', LOG_DEBUG); $result = $db->query($sql); if ($result) { - $taber = array (); $tabht = array (); $tabtva = array (); @@ -485,7 +484,6 @@ if ($action == 'exportcsv') { // ISO and not UTF8 ! } if (empty($action) || $action == 'view') { - llxHeader('', $langs->trans("ExpenseReportsJournal")); $nom = $langs->trans("ExpenseReportsJournal") . ' | ' . $accountingjournalstatic->getNomUrl(0, 1, 1, '', 1); diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index c83c004c6b2..ddf456c85f0 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -242,7 +242,6 @@ if ($action == 'writebookkeeping') { $invoicestatic = new FactureFournisseur($db); foreach ($tabfac as $key => $val) { // Loop on each invoice - $errorforline = 0; $totalcredit = 0; @@ -716,7 +715,6 @@ if ($action == 'exportcsv') { // ISO and not UTF8 ! } if (empty($action) || $action == 'view') { - llxHeader('', $langs->trans("PurchasesJournal")); $nom = $langs->trans("PurchasesJournal") . ' | ' . $accountingjournalstatic->getNomUrl(0, 1, 1, '', 1); diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 17b2657b5dc..ed56065df0a 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -255,7 +255,6 @@ if ($action == 'writebookkeeping') { $invoicestatic = new Facture($db); foreach ($tabfac as $key => $val) { // Loop on each invoice - $errorforline = 0; $totalcredit = 0; @@ -654,7 +653,6 @@ if ($action == 'exportcsv') { // ISO and not UTF8 ! if (empty($action) || $action == 'view') { - llxHeader('', $langs->trans("SellsJournal")); $nom = $langs->trans("SellsJournal") . ' | ' . $accountingjournalstatic->getNomUrl(0, 1, 1, '', 1); diff --git a/htdocs/accountancy/supplier/index.php b/htdocs/accountancy/supplier/index.php index 88a599d1fc5..faa48ac9176 100644 --- a/htdocs/accountancy/supplier/index.php +++ b/htdocs/accountancy/supplier/index.php @@ -95,7 +95,6 @@ if ($action == 'clean' || $action == 'validatehistory') } if ($action == 'validatehistory') { - $error = 0; $db->begin(); @@ -187,7 +186,6 @@ if ($resql) { $num = $db->num_rows($resql); while ( $row = $db->fetch_row($resql)) { - print '
'; if ($row[0] == 'tobind') { @@ -258,7 +256,6 @@ if ($resql) { $num = $db->num_rows($resql); while ( $row = $db->fetch_row($resql)) { - print '
'; if ($row[0] == 'tobind') { diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 2bcbc21c3a0..e9bd50de0ff 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -2370,7 +2370,6 @@ class Adherent extends CommonObject $langs->load("orders"); if (! dol_strlen($modele)) { - $modele = 'standard'; if ($this->modelpdf) { diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index a57a90a3aac..94df4b10ba0 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -383,7 +383,6 @@ class AdherentType extends CommonObject $result = $this->db->query($sql); if ($result) { - $this->description = $this->db->escape($this->note); // Multilangs diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php index 092827ef731..a6343596632 100644 --- a/htdocs/adherents/document.php +++ b/htdocs/adherents/document.php @@ -90,7 +90,6 @@ if ($id > 0) $result=$membert->fetch($object->typeid); if ($result > 0) { - // Build file list $filearray=dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC), 1); $totalsize=0; diff --git a/htdocs/adherents/tpl/linkedobjectblock.tpl.php b/htdocs/adherents/tpl/linkedobjectblock.tpl.php index 4334a54605b..8e2ec3ba730 100644 --- a/htdocs/adherents/tpl/linkedobjectblock.tpl.php +++ b/htdocs/adherents/tpl/linkedobjectblock.tpl.php @@ -39,7 +39,6 @@ $langs->load("members"); $total=0; foreach($linkedObjectBlock as $key => $objectlink) { - ?>
trans("Subscription"); ?>'."\n"; if ($conf->global->ACTION_EVENT_ADDON_PDF != "$name") { @@ -363,7 +362,6 @@ print '
'.$langs->trans("AGENDA_USE_EVENT_TYPE_DEFAULT").'
' . $bankorder[$i][0] . "\n"; print $bankorder[$i][1]; @@ -341,7 +340,6 @@ foreach ($dirmodels as $reldir) { foreach ($filelist as $file) { if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) { - if (file_exists($dir . '/' . $file)) { $name = substr($file, 4, dol_strlen($file) - 16); $classname = substr($file, 0, dol_strlen($file) - 12); diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index 0475cdfccf1..b6c9a5dec9a 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -319,7 +319,6 @@ print '
'.$langs->trans("GenbarcodeLocation").''; @@ -335,7 +334,6 @@ if (! isset($_SERVER['WINDIR'])) // Module products if (! empty($conf->product->enabled)) { - print '
'.$langs->trans("SetDefaultBarcodeTypeProducts").''; @@ -346,7 +344,6 @@ if (! empty($conf->product->enabled)) // Module thirdparty if (! empty($conf->societe->enabled)) { - print '
'.$langs->trans("SetDefaultBarcodeTypeThirdParties").''; diff --git a/htdocs/admin/bom.php b/htdocs/admin/bom.php index e5e12d41808..5bf01de1053 100644 --- a/htdocs/admin/bom.php +++ b/htdocs/admin/bom.php @@ -255,7 +255,6 @@ foreach ($dirmodels as $reldir) if ($module->isEnabled()) { - print '
'.$module->name."\n"; print $module->info(); print '
'.$langs->trans("EnableFileCache").''; print $form->selectyesno('MAIN_ACTIVATE_FILECACHE', $conf->global->MAIN_ACTIVATE_FILECACHE, 1); print '
'.$module->name."\n"; print $module->info(); print '
'; print '
'; if (! empty($mysoc->country_code)) { @@ -571,7 +569,6 @@ if ($langs->transcountry("ProfId1", $mysoc->country_code) != '-') // ProfId2 if ($langs->transcountry("ProfId2", $mysoc->country_code) != '-') { - print '
'; if (! empty($mysoc->country_code)) { @@ -587,7 +584,6 @@ if ($langs->transcountry("ProfId2", $mysoc->country_code) != '-') // ProfId3 if ($langs->transcountry("ProfId3", $mysoc->country_code) != '-') { - print '
'; if (! empty($mysoc->country_code)) { @@ -603,7 +599,6 @@ if ($langs->transcountry("ProfId3", $mysoc->country_code) != '-') // ProfId4 if ($langs->transcountry("ProfId4", $mysoc->country_code) != '-') { - print '
'; if (! empty($mysoc->country_code)) { @@ -619,7 +614,6 @@ if ($langs->transcountry("ProfId4", $mysoc->country_code) != '-') // ProfId5 if ($langs->transcountry("ProfId5", $mysoc->country_code) != '-') { - print '
'; if (! empty($mysoc->country_code)) { @@ -635,7 +629,6 @@ if ($langs->transcountry("ProfId5", $mysoc->country_code) != '-') // ProfId6 if ($langs->transcountry("ProfId6", $mysoc->country_code) != '-') { - print '
'; if (! empty($mysoc->country_code)) { diff --git a/htdocs/admin/compta.php b/htdocs/admin/compta.php index bb2bfdde409..0955d7c6d17 100644 --- a/htdocs/admin/compta.php +++ b/htdocs/admin/compta.php @@ -68,7 +68,6 @@ if ($action == 'update') if (in_array($accounting_mode, $accounting_modes)) { - if (!dolibarr_set_const($db, 'ACCOUNTING_MODE', $accounting_mode, 'chaine', 0, '', $conf->entity)) { $error++; } diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index 53555a35586..37559c3d4ab 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -118,7 +118,6 @@ if (! empty($consts) && $action == 'update') // Mass delete if (! empty($consts) && $action == 'delete') { - $nbdeleted=0; foreach($consts as $const) { diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php index e6c8c15c0d4..0aa97dd36e6 100644 --- a/htdocs/admin/contract.php +++ b/htdocs/admin/contract.php @@ -219,7 +219,6 @@ foreach ($dirmodels as $reldir) $handle = opendir($dir); if (is_resource($handle)) { - while (($file = readdir($handle))!==false) { if (substr($file, 0, 13) == 'mod_contract_' && substr($file, dol_strlen($file)-3, 3) == 'php') @@ -236,7 +235,6 @@ foreach ($dirmodels as $reldir) if ($module->isEnabled()) { - print '
'.$module->nom."\n"; print $module->info(); print '
   
'.$module->nom."\n"; print $module->info(); print '
".$langs->trans("Logo")."'; diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index 759038930ef..dccfcdfdda1 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -720,7 +720,6 @@ if ($resql) $i = 0; while ($i < $num) { - $row = $db->fetch_row($resql); print '
'.$module->nom."\n"; print $module->info(); print '
'.$langs->trans("MAIN_MAIL_SMTPS_ID").''; // SuperAdministrator access only @@ -384,7 +383,6 @@ if ($action == 'edit') // PW if (! empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer')))) { - $mainsmtppw=(! empty($conf->global->MAIN_MAIL_SMTPS_PW)?$conf->global->MAIN_MAIL_SMTPS_PW:''); print '
'.$langs->trans("MAIN_MAIL_SMTPS_PW").''; // SuperAdministrator access only diff --git a/htdocs/admin/mails_emailing.php b/htdocs/admin/mails_emailing.php index 3d6cfc2d228..94f3820c5b9 100644 --- a/htdocs/admin/mails_emailing.php +++ b/htdocs/admin/mails_emailing.php @@ -316,7 +316,6 @@ if ($action == 'edit') // ID if (! empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) { - $mainstmpid=(! empty($conf->global->MAIN_MAIL_SMTPS_ID_EMAILING)?$conf->global->MAIN_MAIL_SMTPS_ID_EMAILING:''); print '
'.$langs->trans("MAIN_MAIL_SMTPS_ID").''; // SuperAdministrator access only diff --git a/htdocs/admin/menus/edit.php b/htdocs/admin/menus/edit.php index 43888d3e061..5a54a9e5c9f 100644 --- a/htdocs/admin/menus/edit.php +++ b/htdocs/admin/menus/edit.php @@ -323,7 +323,6 @@ if ($action == 'create') $res = $db->query($sql); if ($res) { - while ($menu = $db->fetch_array($res)) { $parent_rowid = $menu['rowid']; diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index f26e657679a..687c3750c89 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -729,7 +729,6 @@ if ($mode == 'common') print ''; } else { - print ''; print img_picto($langs->trans("Activated"), 'switch_on'); print ''; diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php index cc1d53d14f8..6d1a5c57cf6 100644 --- a/htdocs/admin/notification.php +++ b/htdocs/admin/notification.php @@ -164,7 +164,6 @@ print ''; $i=0; foreach($listofnotifiedevents as $notifiedevent) { - $label=$langs->trans("Notify_".$notifiedevent['code']); //!=$langs->trans("Notify_".$notifiedevent['code'])?$langs->trans("Notify_".$notifiedevent['code']):$notifiedevent['label']; $elementLabel = $langs->trans(ucfirst($notifiedevent['elementtype'])); @@ -209,7 +208,6 @@ $listofnotifiedevents=$notificationtrigger->getListOfManagedEvents(); foreach($listofnotifiedevents as $notifiedevent) { - $label=$langs->trans("Notify_".$notifiedevent['code']); //!=$langs->trans("Notify_".$notifiedevent['code'])?$langs->trans("Notify_".$notifiedevent['code']):$notifiedevent['label']; $elementLabel = $langs->trans(ucfirst($notifiedevent['elementtype'])); diff --git a/htdocs/admin/oauthlogintokens.php b/htdocs/admin/oauthlogintokens.php index 20c0ae222eb..bb3c83c2ee2 100644 --- a/htdocs/admin/oauthlogintokens.php +++ b/htdocs/admin/oauthlogintokens.php @@ -122,7 +122,6 @@ dol_fiche_head($head, 'tokengeneration', '', -1, 'technic'); if ($mode == 'setup' && $user->admin) { - print $langs->trans("OAuthSetupForLogin")."

\n"; foreach($list as $key) @@ -381,7 +380,6 @@ if ($mode == 'userconf' && $user->admin) $sql = 'SELECT p.rowid, p.printer_name, p.printer_location, p.printer_id, p.copy, p.module, p.driver, p.userid, u.login FROM '.MAIN_DB_PREFIX.'printing as p, '.MAIN_DB_PREFIX.'user as u WHERE p.userid=u.rowid'; $resql = $db->query($sql); while ($row=$db->fetch_array($resql)) { - print '
'.$row['login'].''.$row['module'].'
'.$module->nom."\n"; print $module->info(); print '
'; diff --git a/htdocs/admin/sms.php b/htdocs/admin/sms.php index 73cad8f69ad..833d6c25d22 100644 --- a/htdocs/admin/sms.php +++ b/htdocs/admin/sms.php @@ -207,7 +207,6 @@ if ($action == 'edit') } else { - if (! count($listofmethods)) print '
'.$langs->trans("NoSmsEngine", 'DoliStore').'
'; print '
'; diff --git a/htdocs/admin/supplier_invoice.php b/htdocs/admin/supplier_invoice.php index 27a126c7ef6..9cb387aedc9 100644 --- a/htdocs/admin/supplier_invoice.php +++ b/htdocs/admin/supplier_invoice.php @@ -237,7 +237,6 @@ foreach ($dirmodels as $reldir) $handle = opendir($dir); if (is_resource($handle)) { - while (($file = readdir($handle))!==false) { if (substr($file, 0, 24) == 'mod_facture_fournisseur_' && substr($file, dol_strlen($file)-3, 3) == 'php') @@ -365,7 +364,6 @@ foreach ($dirmodels as $reldir) if (is_dir($dir)) { - $handle=opendir($dir); diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php index ac7d5e98539..6369efb1361 100644 --- a/htdocs/admin/supplier_order.php +++ b/htdocs/admin/supplier_order.php @@ -267,7 +267,6 @@ foreach ($dirmodels as $reldir) $handle = opendir($dir); if (is_resource($handle)) { - while (($file = readdir($handle))!==false) { if (substr($file, 0, 25) == 'mod_commande_fournisseur_' && substr($file, dol_strlen($file)-3, 3) == 'php') diff --git a/htdocs/admin/supplier_payment.php b/htdocs/admin/supplier_payment.php index 65bb18fcc5f..8da430a9fa1 100644 --- a/htdocs/admin/supplier_payment.php +++ b/htdocs/admin/supplier_payment.php @@ -213,7 +213,6 @@ foreach ($dirmodels as $reldir) $handle = opendir($dir); if (is_resource($handle)) { - while (($file = readdir($handle))!==false) { if (! is_dir($dir.$file) || (substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS')) @@ -337,7 +336,6 @@ foreach ($dirmodels as $reldir) if (is_dir($dir)) { - $handle=opendir($dir); diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php index 55fb4329d39..bd2cb10a3ad 100644 --- a/htdocs/admin/supplier_proposal.php +++ b/htdocs/admin/supplier_proposal.php @@ -246,7 +246,6 @@ foreach ($dirmodels as $reldir) $handle = opendir($dir); if (is_resource($handle)) { - while (($file = readdir($handle))!==false) { if (substr($file, 0, 22) == 'mod_supplier_proposal_' && substr($file, dol_strlen($file)-3, 3) == 'php') @@ -263,7 +262,6 @@ foreach ($dirmodels as $reldir) if ($module->isEnabled()) { - print ''; @@ -537,7 +535,6 @@ print ''; if ($conf->banque->enabled) { - print ''; } diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php index 92823045a62..bd93d7a9fc5 100644 --- a/htdocs/admin/syslog.php +++ b/htdocs/admin/syslog.php @@ -50,7 +50,6 @@ foreach ($dirsyslogs as $reldir) { $handle = opendir($newdir); if (is_resource($handle)) { - while (($file = readdir($handle)) !== false) { if (substr($file, 0, 11) == 'mod_syslog_' && substr($file, dol_strlen($file) - 3, 3) == 'php') { $file = substr($file, 0, dol_strlen($file) - 4); diff --git a/htdocs/admin/system/database-tables.php b/htdocs/admin/system/database-tables.php index 195b5c83143..01836dd4a72 100644 --- a/htdocs/admin/system/database-tables.php +++ b/htdocs/admin/system/database-tables.php @@ -202,7 +202,6 @@ else if ($resql) { while ($row = $db->fetch_row($resql)) { - $rescount = $db->query("SELECT COUNT(*) FROM " . $row[0]); if ($rescount) { $row_count = $db->fetch_row($rescount); diff --git a/htdocs/admin/ticket.php b/htdocs/admin/ticket.php index d97252dc53b..8bb39f0056b 100644 --- a/htdocs/admin/ticket.php +++ b/htdocs/admin/ticket.php @@ -214,7 +214,6 @@ foreach ($dirmodels as $reldir) { if (is_dir($dir)) { $handle = opendir($dir); if (is_resource($handle)) { - while (($file = readdir($handle)) !== false) { if (preg_match('/^(mod_.*)\.php$/i', $file, $reg)) { $file = $reg[1]; diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index ba2dde77bec..4d234e266e8 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -108,7 +108,6 @@ if ($action == 'update') } else { - $db->rollback(); if ($db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { @@ -158,7 +157,6 @@ if ($action == 'add') } else { - $db->rollback(); if ($db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { diff --git a/htdocs/admin/user.php b/htdocs/admin/user.php index 2ead8e03210..ba6c3660bcd 100644 --- a/htdocs/admin/user.php +++ b/htdocs/admin/user.php @@ -239,7 +239,6 @@ foreach ($dirmodels as $reldir) { if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) { - if (file_exists($dir.'/'.$file)) { $name = substr($file, 4, dol_strlen($file) -16); diff --git a/htdocs/admin/usergroup.php b/htdocs/admin/usergroup.php index c0c4e3c57d8..190391b462b 100644 --- a/htdocs/admin/usergroup.php +++ b/htdocs/admin/usergroup.php @@ -186,7 +186,6 @@ foreach ($dirmodels as $reldir) { if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) { - if (file_exists($dir.'/'.$file)) { $name = substr($file, 4, dol_strlen($file) -16); diff --git a/htdocs/admin/website.php b/htdocs/admin/website.php index 1c7fe75f0de..0343fecf69d 100644 --- a/htdocs/admin/website.php +++ b/htdocs/admin/website.php @@ -572,7 +572,6 @@ if ($id) // Lines with values while ($i < $num) { - $obj = $db->fetch_object($resql); //print_r($obj); print ''; diff --git a/htdocs/asset/type.php b/htdocs/asset/type.php index 6803f9d65e7..459bd2d8edc 100644 --- a/htdocs/asset/type.php +++ b/htdocs/asset/type.php @@ -83,7 +83,6 @@ $hookmanager->initHooks(array('assettypecard','globalcard')); */ if ($cancel) { - $action=''; if (! empty($backtopage)) diff --git a/htdocs/barcode/printsheet.php b/htdocs/barcode/printsheet.php index a0bb66f2b81..1ed7c449868 100644 --- a/htdocs/barcode/printsheet.php +++ b/htdocs/barcode/printsheet.php @@ -197,7 +197,6 @@ if ($action == 'builddoc') // For labels if ($mode == 'label') { - $txtforsticker="%PHOTO%"; // Photo will be barcode image, %BARCODE% posible when using TCPDF generator $textleft=make_substitutions((empty($conf->global->BARCODE_LABEL_LEFT_TEXT)?$txtforsticker:$conf->global->BARCODE_LABEL_LEFT_TEXT), $substitutionarray); $textheader=make_substitutions((empty($conf->global->BARCODE_LABEL_HEADER_TEXT)?'':$conf->global->BARCODE_LABEL_HEADER_TEXT), $substitutionarray); diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php index b44f27f7fe8..1f0c82e780b 100644 --- a/htdocs/blockedlog/admin/blockedlog_list.php +++ b/htdocs/blockedlog/admin/blockedlog_list.php @@ -92,7 +92,6 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' } if ($action === 'downloadblockchain') { - $auth = new BlockedLogAuthority($db); $bc = $auth->getLocalBlockChain(); diff --git a/htdocs/blockedlog/ajax/authority.php b/htdocs/blockedlog/ajax/authority.php index bcbb4a66f91..45479c1e4db 100644 --- a/htdocs/blockedlog/ajax/authority.php +++ b/htdocs/blockedlog/ajax/authority.php @@ -51,7 +51,6 @@ if($auth->fetch(0, $signature)<=0) { if(!empty($hash)) { - echo $auth->checkBlockchain($hash) ? 'hashisok' : 'hashisjunk'; } elseif(!empty($newblock)){ @@ -62,7 +61,6 @@ elseif(!empty($newblock)){ echo 'blockadded'; } else{ - echo 'blockalreadyadded'; } } diff --git a/htdocs/blockedlog/class/authority.class.php b/htdocs/blockedlog/class/authority.class.php index 7325f9ae50c..cec6410b7b6 100644 --- a/htdocs/blockedlog/class/authority.class.php +++ b/htdocs/blockedlog/class/authority.class.php @@ -310,17 +310,14 @@ class BlockedLogAuthority $signature=$block_static->getSignature(); foreach($blocks as &$block) { - $url = $conf->global->BLOCKEDLOG_AUTHORITY_URL.'/blockedlog/ajax/authority.php?s='.$signature.'&b='.$block->signature; $res = file_get_contents($url); echo $block->signature.' '.$url. ' '.$res.'
'; if($res === 'blockalreadyadded' || $res === 'blockadded') { - $block->setCertified(); } else { - $this->error = $langs->trans('ImpossibleToContactAuthority ', $url); return -1; } diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index 14366f46de7..24548f736f2 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -977,7 +977,6 @@ class BlockedLog if (empty($cachedlogs)) $cachedlogs=array(); if ($element=='all') { - $sql="SELECT rowid FROM ".MAIN_DB_PREFIX."blockedlog WHERE entity=".$conf->entity; } @@ -1006,7 +1005,6 @@ class BlockedLog $res = $this->db->query($sql); if($res) { - $results=array(); $i = 0; @@ -1046,7 +1044,6 @@ class BlockedLog global $db,$conf,$mysoc; if (empty($conf->global->BLOCKEDLOG_ENTITY_FINGERPRINT)) { // creation of a unique fingerprint - require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index 9b2646b3e9d..84560d5a533 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -943,7 +943,6 @@ class BOM extends CommonObject $langs->load("mrp"); if (! dol_strlen($modele)) { - $modele = 'standard'; if ($this->modelpdf) { diff --git a/htdocs/bookmarks/bookmarks.lib.php b/htdocs/bookmarks/bookmarks.lib.php index 1e54cc816fd..8128815ef3b 100644 --- a/htdocs/bookmarks/bookmarks.lib.php +++ b/htdocs/bookmarks/bookmarks.lib.php @@ -38,7 +38,6 @@ function printBookmarksList($aDb, $aLangs) $ret = ''."\n"; if (! empty($conf->use_javascript_ajax)) { // Bookmark autosubmit can't work when javascript is off. - require_once DOL_DOCUMENT_ROOT.'/bookmarks/class/bookmark.class.php'; if (! isset($conf->global->BOOKMARKS_SHOW_IN_MENU)) $conf->global->BOOKMARKS_SHOW_IN_MENU=5; diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 0ba6d7569b5..7feb0aac37a 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -54,7 +54,6 @@ $object=new Bookmark($db); if ($action == 'add' || $action == 'addproduct' || $action == 'update') { - if ($action == 'update') { $invertedaction = 'edit'; } else { diff --git a/htdocs/cashdesk/admin/cashdesk.php b/htdocs/cashdesk/admin/cashdesk.php index 22b8fea0a05..f9c438149e7 100644 --- a/htdocs/cashdesk/admin/cashdesk.php +++ b/htdocs/cashdesk/admin/cashdesk.php @@ -125,7 +125,6 @@ print $form->select_company($conf->global->CASHDESK_ID_THIRDPARTY, 'socid', '(s. print ''; if (! empty($conf->banque->enabled)) { - print ''; print ''; // Force warehouse (this is not a default value) print ''); } else { - echo (''); } ?> @@ -87,16 +85,13 @@ $langs->loadLangs(array("main","bills","banks")); getsetPaymentMode() == 'DIF' ) { - echo (''); } else { - echo (''); } // Affichage du montant rendu (reglement en especes) if ( $obj_facturation->montantRendu() ) { - echo (''); } diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 48bb4179afc..cd3885b77b1 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -1637,7 +1637,6 @@ class Categorie extends CommonObject { $nbfile = count($file['name']); for ($i = 0; $i <= $nbfile; $i ++) { - $originImage = $dir . $file['name'][$i]; // Cree fichier en taille origine diff --git a/htdocs/categories/photos.php b/htdocs/categories/photos.php index 70cf6e3e8f7..6def65666a0 100644 --- a/htdocs/categories/photos.php +++ b/htdocs/categories/photos.php @@ -69,7 +69,6 @@ if ($id > 0) if (isset($_FILES['userfile']) && $_FILES['userfile']['size'] > 0 && $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) { if ($object->id) { - $file = $_FILES['userfile']; if (is_array($file['name']) && count($file['name']) > 0) { diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 737b488c090..fb246b5358b 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -125,7 +125,6 @@ if ($id > 0 && $removeelem > 0) $elementtype = 'member'; } elseif ($type == Categorie::TYPE_CONTACT && $user->rights->societe->creer) { - require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; $tmpobject = new Contact($db); $result = $tmpobject->fetch($removeelem); @@ -644,7 +643,6 @@ if ($type == Categorie::TYPE_CONTACT) } else { - print ''; print ''; print ''; diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index cc3accde763..6e8c5535f03 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -278,7 +278,6 @@ if (empty($reshook) && $action == 'add') $taskid = GETPOST('taskid', 'int'); if(!empty($taskid)){ - $taskProject = new Task($db); if($taskProject->fetch($taskid)>0){ $object->fk_project = $taskProject->fk_project; diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index e6ee5e9d1d0..fc343f443a2 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -631,7 +631,6 @@ $currentdaytoshow = $firstdaytoshow; echo '
'; while($currentdaytoshow<$lastdaytoshow) { - echo '
'.$module->nom."\n"; print $module->info(); print '
'; print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").' '; if (! empty($conf->use_javascript_ajax)) @@ -559,7 +556,6 @@ if ($conf->banque->enabled) } else { - print '
'; print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").' '.$langs->trans('NotAvailable').'
'.$langs->trans("CashDeskBankAccountForSell").''; $form->select_comptes($conf->global->CASHDESK_ID_BANKACCOUNT_CASH, 'CASHDESK_ID_BANKACCOUNT_CASH', 0, "courant=2", 1); @@ -146,7 +145,6 @@ if (! empty($conf->banque->enabled)) if (! empty($conf->stock->enabled)) { - print '
'.$langs->trans("CashDeskDoNotDecreaseStock").''; if (empty($conf->productbatch->enabled)) { diff --git a/htdocs/cashdesk/class/Facturation.class.php b/htdocs/cashdesk/class/Facturation.class.php index 40b338ccca6..2f8a993829e 100644 --- a/htdocs/cashdesk/class/Facturation.class.php +++ b/htdocs/cashdesk/class/Facturation.class.php @@ -296,12 +296,10 @@ class Facturation } elseif ( $aId == 'RESET' ) { - $this->id = null; } else { - $this->id = $aId; } } @@ -343,7 +341,6 @@ class Facturation } elseif ( $aQte == 'RESET' ) { - $this->qte = null; } else @@ -408,13 +405,10 @@ class Facturation { if (is_null($aMontantRemise)) { - return $this->montant_remise; } elseif ( $aMontantRemise == 'RESET' ) { - $this->montant_remise = null; } else { - $this->montant_remise = $aMontantRemise; } } @@ -429,13 +423,10 @@ class Facturation { if (is_null($aPrix)) { - return $this->prix; } elseif ( $aPrix == 'RESET' ) { - $this->prix = null; } else { - $this->prix = $aPrix; } } @@ -449,13 +440,10 @@ class Facturation public function tva($aTva = null) { if (is_null($aTva)) { - return $this->tva; } elseif ( $aTva == 'RESET' ) { - $this->tva = null; } else { - $this->tva = $aTva; } } @@ -469,13 +457,10 @@ class Facturation public function numInvoice($aNumFacture = null) { if (is_null($aNumFacture)) { - return $this->num_facture; } elseif ( $aNumFacture == 'RESET' ) { - $this->num_facture = null; } else { - $this->num_facture = $aNumFacture; } } @@ -490,13 +475,10 @@ class Facturation { if (is_null($aModeReglement)) { - return $this->mode_reglement; } elseif ( $aModeReglement == 'RESET' ) { - $this->mode_reglement = null; } else { - $this->mode_reglement = $aModeReglement; } } @@ -511,13 +493,10 @@ class Facturation { if (is_null($aMontantEncaisse)) { - return $this->montant_encaisse; } elseif ( $aMontantEncaisse == 'RESET' ) { - $this->montant_encaisse = null; } else { - $this->montant_encaisse = $aMontantEncaisse; } } @@ -532,13 +511,10 @@ class Facturation { if (is_null($aMontantRendu)) { - return $this->montant_rendu; } elseif ( $aMontantRendu == 'RESET' ) { - $this->montant_rendu = null; } else { - $this->montant_rendu = $aMontantRendu; } } @@ -552,13 +528,10 @@ class Facturation public function paiementLe($aPaiementLe = null) { if (is_null($aPaiementLe)) { - return $this->paiement_le; } elseif ( $aPaiementLe == 'RESET' ) { - $this->paiement_le = null; } else { - $this->paiement_le = $aPaiementLe; } } @@ -572,13 +545,10 @@ class Facturation public function prixTotalHt($aTotalHt = null) { if (is_null($aTotalHt)) { - return $this->prix_total_ht; } elseif ( $aTotalHt == 'RESET' ) { - $this->prix_total_ht = null; } else { - $this->prix_total_ht = $aTotalHt; } } @@ -592,13 +562,10 @@ class Facturation public function montantTva($aMontantTva = null) { if (is_null($aMontantTva)) { - return $this->montant_tva; } elseif ( $aMontantTva == 'RESET' ) { - $this->montant_tva = null; } else { - $this->montant_tva = $aMontantTva; } } diff --git a/htdocs/cashdesk/facturation.php b/htdocs/cashdesk/facturation.php index f7e7c3af501..c52ecccef77 100644 --- a/htdocs/cashdesk/facturation.php +++ b/htdocs/cashdesk/facturation.php @@ -36,7 +36,6 @@ $form=new Form($db); // Get list of articles (in warehouse '$conf_fkentrepot' if defined and stock module enabled) if ( GETPOST('filtre', 'alpha') ) { - // Avec filtre $ret=array(); $i=0; @@ -88,7 +87,6 @@ if ( GETPOST('filtre', 'alpha') ) { } $tab_designations=$ret; } else { - // Sans filtre $ret=array(); $i=0; diff --git a/htdocs/cashdesk/tpl/liste_articles.tpl.php b/htdocs/cashdesk/tpl/liste_articles.tpl.php index a35abb46789..d892c1df0e6 100644 --- a/htdocs/cashdesk/tpl/liste_articles.tpl.php +++ b/htdocs/cashdesk/tpl/liste_articles.tpl.php @@ -57,10 +57,8 @@ else echo ('

'.$tab[$i]['ref'].' - '.$tab[$i]['label'].'

'."\n"); if ( $tab[$i]['remise_percent'] > 0 ) { - $remise_percent = ' -'.$tab[$i]['remise_percent'].'%'; } else { - $remise_percent = ''; } diff --git a/htdocs/cashdesk/tpl/validation1.tpl.php b/htdocs/cashdesk/tpl/validation1.tpl.php index 64f340983ff..e8c16712b74 100644 --- a/htdocs/cashdesk/tpl/validation1.tpl.php +++ b/htdocs/cashdesk/tpl/validation1.tpl.php @@ -39,12 +39,10 @@ $langs->loadLangs(array("main","bills","banks")); montantTva() ) { - echo ('
'.$langs->trans("VAT").''.price(price2num($obj_facturation->montantTva(), 'MT'), 0, $langs, 0, 0, -1, $conf->currency).'
'.$langs->trans("VAT").''.$langs->trans("NoVAT").'
'.$langs->trans("DateDue").''.$obj_facturation->paiementLe().'
'.$langs->trans("Received").''.price(price2num($obj_facturation->montantEncaisse(), 'MT'), 0, $langs, 0, 0, -1, $conf->currency).'
'.$langs->trans("Change").''.price(price2num($obj_facturation->montantRendu(), 'MT'), 0, $langs, 0, 0, -1, $conf->currency).'
'; echo ''; @@ -779,7 +778,6 @@ while($currentdaytoshow<$lastdaytoshow) { $i = 0; for ($iter_day = 0; $iter_day < 8; $iter_day++) { - if (($i + 1) < $begin_d || ($i + 1) > $end_d) { $i++; diff --git a/htdocs/comm/action/rapport/index.php b/htdocs/comm/action/rapport/index.php index 5d1b7ba919e..8cc1774cba2 100644 --- a/htdocs/comm/action/rapport/index.php +++ b/htdocs/comm/action/rapport/index.php @@ -144,7 +144,6 @@ if ($resql) if ($obj) { - print ''; // Date diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index c0d2c4703ca..43af4f8f1c0 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -208,7 +208,6 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) } else { - print ''; } print "
'.$langs->trans("NoProposal").'

"; @@ -379,7 +378,6 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) } else { - print ''.$langs->trans("NoOrder").''; } print ""; @@ -430,7 +428,6 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD)); while ($i < $nbofloop) { - $obj = $db->fetch_object($resql); print ''; $supplierorderstatic->id=$obj->rowid; @@ -470,7 +467,6 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande } else { - print ''.$langs->trans("NoSupplierOrder").''; } print ""; diff --git a/htdocs/comm/mailing/advtargetemailing.php b/htdocs/comm/mailing/advtargetemailing.php index 9544a394508..1049431b7f2 100644 --- a/htdocs/comm/mailing/advtargetemailing.php +++ b/htdocs/comm/mailing/advtargetemailing.php @@ -114,7 +114,6 @@ if ($action == 'loadfilter') { } if ($action == 'add') { - $user_contact_query = false; $array_query = array (); @@ -168,7 +167,6 @@ if ($action == 'add') { } if (preg_match("/^contact_/", $key)) { - $array_query[$key] = GETPOST($key); $specials_date_key = array ( @@ -262,7 +260,6 @@ if ($action == 'clear') { } if ($action == 'savefilter' || $action == 'createfilter') { - $template_name = GETPOST('template_name'); $error = 0; @@ -272,7 +269,6 @@ if ($action == 'savefilter' || $action == 'createfilter') { } if (empty($error)) { - $array_query = array (); // Get extra fields @@ -325,7 +321,6 @@ if ($action == 'savefilter' || $action == 'createfilter') { } if (preg_match("/^contact_/", $key)) { - $array_query[$key] = GETPOST($key); $specials_date_key = array ( @@ -359,7 +354,6 @@ if ($action == 'savefilter' || $action == 'createfilter') { setEventMessages($advTarget->error, $advTarget->errors, 'errors'); } } elseif ($action == 'savefilter') { - $result = $advTarget->update($user); if ($result < 0) { setEventMessages($advTarget->error, $advTarget->errors, 'errors'); @@ -421,7 +415,6 @@ $formcompany = new FormCompany($db); $formother = new FormOther($db); if ($object->fetch($id) >= 0) { - $head = emailing_prepare_head($object); dol_fiche_head($head, 'advtargets', $langs->trans("Mailing"), 0, 'email'); @@ -465,7 +458,6 @@ if ($object->fetch($id) >= 0) { // Show email selectors if ($object->statut == 0 && $user->rights->mailing->creer) { - include DOL_DOCUMENT_ROOT . '/core/tpl/advtarget.tpl.php'; } } diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index 7346bf87543..465bf7dcc50 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -556,7 +556,6 @@ class AdvanceTargetingMailing extends CommonObject $sqlwhere[]= 't.entity IN ('.getEntity('societe').')'; if (count($arrayquery)>0) { - if (array_key_exists('cust_saleman', $arrayquery)) { $sql.= " LEFT OUTER JOIN " . MAIN_DB_PREFIX . "societe_commerciaux as saleman ON saleman.fk_soc=t.rowid "; } @@ -565,7 +564,6 @@ class AdvanceTargetingMailing extends CommonObject } if (!empty($arrayquery['cust_name'])) { - $sqlwhere[]= $this->transformToSQL('t.nom', $arrayquery['cust_name']); } if (!empty($arrayquery['cust_code'])) { @@ -617,13 +615,11 @@ class AdvanceTargetingMailing extends CommonObject //Standard Extrafield feature if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) { - $elementtype = Societe::$table_element; $extrafields->fetch_name_optionals_label($elementtype); foreach($extrafields->attributes[$elementtype]['label'] as $key=>$val) { - if (($extrafields->attributes[$elementtype]['type'][$key] == 'varchar') || ($extrafields->attributes[$elementtype]['type'][$key] == 'text')) { if (!empty($arrayquery['options_'.$key])) { @@ -713,7 +709,6 @@ class AdvanceTargetingMailing extends CommonObject $sqlwhere[]= 't.entity IN ('.getEntity('socpeople').')'; if (count($arrayquery)>0) { - if (array_key_exists('contact_categ', $arrayquery)) { $sql.= " LEFT OUTER JOIN " . MAIN_DB_PREFIX . "categorie_contact as contactcateg ON contactcateg.fk_socpeople=t.rowid "; } @@ -767,7 +762,6 @@ class AdvanceTargetingMailing extends CommonObject $extrafields->fetch_name_optionals_label($elementtype); foreach($extrafields->attributes[$elementtype]['label'] as $key=>$val) { - if (($extrafields->attributes[$elementtype]['type'][$key] == 'varchar') || ($extrafields->attributes[$elementtype]['type'][$key] == 'text')) { if (!empty($arrayquery['options_'.$key.'_cnct'])) { @@ -809,7 +803,6 @@ class AdvanceTargetingMailing extends CommonObject } if (!empty($arrayquery['cust_name'])) { - $sqlwhere[]= $this->transformToSQL('ts.nom', $arrayquery['cust_name']); } if (!empty($arrayquery['cust_code'])) { @@ -870,7 +863,6 @@ class AdvanceTargetingMailing extends CommonObject $extrafields->fetch_name_optionals_label($elementtype); foreach($extrafields->attributes[$elementtype]['label'] as $key=>$val) { - if (($extrafields->attributes[$elementtype]['type'][$key] == 'varchar') || ($extrafields->attributes[$elementtype]['type'][$key] == 'text')) { if (!empty($arrayquery['options_'.$key])) { diff --git a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php index 55b7177eb73..67ec7414e7c 100644 --- a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php +++ b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php @@ -114,7 +114,6 @@ class FormAdvTargetEmailing extends Form dol_syslog(get_class($this) . "::select_country sql=" . $sql); $resql = $this->db->query($sql); if ($resql) { - $num = $this->db->num_rows($resql); $i = 0; if ($num) { @@ -175,7 +174,6 @@ class FormAdvTargetEmailing extends Form $resql_usr = $this->db->query($sql_usr); if ($resql_usr) { while ( $obj_usr = $this->db->fetch_object($resql_usr) ) { - $label = $obj_usr->firstname . " " . $obj_usr->name . " (" . $obj_usr->login . ')'; $options_array [$obj_usr->rowid] = $label; @@ -249,7 +247,6 @@ class FormAdvTargetEmailing extends Form $sql = 'SELECT ' . $keyList . ', ' . $InfoFieldList [1]; $sql .= ' FROM ' . MAIN_DB_PREFIX . $InfoFieldList [0]; if (! empty($InfoFieldList [3])) { - // We have to join on extrafield table if (strpos($InfoFieldList [3], 'extra') !== false) { $sql .= ' as main, ' . MAIN_DB_PREFIX . $InfoFieldList [0] . '_extrafields as extra'; @@ -266,7 +263,6 @@ class FormAdvTargetEmailing extends Form dol_syslog(get_class($this) . "::".__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { - $num = $this->db->num_rows($resql); $i = 0; if ($num) { @@ -306,7 +302,6 @@ class FormAdvTargetEmailing extends Form $resql=$this->db->query($sql); if ($resql) { - $num = $this->db->num_rows($resql); $i = 0; if ($num) @@ -396,7 +391,6 @@ class FormAdvTargetEmailing extends Form $resql=$this->db->query($sql); if ($resql) { - $num = $this->db->num_rows($resql); $i = 0; if ($num) @@ -442,8 +436,6 @@ class FormAdvTargetEmailing extends Form dol_syslog(get_class($this) . "::".__METHOD__, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { - - $out .= ''; print ''; diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 4e72c6312e6..5cd3902b7d1 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -265,7 +265,6 @@ class Account extends CommonObject $string = ''; foreach ($this->getFieldsToShow() as $val) { - if ($val == 'BankCode') { $string .= $this->code_banque.' '; } elseif ($val == 'BankAccountNumber') { @@ -493,7 +492,6 @@ class Account extends CommonObject } if ($accline->insert() > 0) { - if ($categorie>0) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_class ("; $sql .= "lineid, fk_categ"; diff --git a/htdocs/compta/bank/document.php b/htdocs/compta/bank/document.php index 0d517a43fec..32bfe66f7d1 100644 --- a/htdocs/compta/bank/document.php +++ b/htdocs/compta/bank/document.php @@ -97,7 +97,6 @@ $form = new Form($db); if ($id > 0 || !empty($ref)) { if ($object->fetch($id, $ref)) { - $upload_dir = $conf->bank->dir_output . '/' . $object->ref; // Onglets diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index e6313bf42cc..f264bb074b3 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -1822,7 +1822,6 @@ if (empty($reshook)) } if (! $error && ($qty >= 0) && (! empty($product_desc) || ! empty($idprod))) { - $ret = $object->fetch($id); if ($ret < 0) { dol_print_error($db, $object->error); @@ -2327,7 +2326,6 @@ if (empty($reshook)) // Change each progression persent on each lines foreach($object->lines as $line) { - // no traitement for special product if ($line->product_type == 9 ) continue; @@ -3185,7 +3183,6 @@ if ($action == 'create') if (! empty($conf->global->INVOICE_USE_SITUATION)) { if($conf->global->INVOICE_USE_SITUATION_RETAINED_WARRANTY){ - $rwStyle = 'display:none;'; if(GETPOST('type', 'int') == Facture::TYPE_SITUATION){ $rwStyle = ''; @@ -4350,7 +4347,6 @@ elseif ($id > 0 || ! empty($ref)) // List of previous situation invoices if (($object->situation_cycle_ref > 0) && ! empty($conf->global->INVOICE_USE_SITUATION)) { - print ''; @@ -4663,7 +4659,6 @@ elseif ($id > 0 || ! empty($ref)) // Retained warranty : usualy use on construction industry if(!empty($object->situation_final) && !empty($object->retained_warranty) && $displayWarranty){ - // Billed - retained warranty if($object->type == Facture::TYPE_SITUATION) { diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 18d153dc597..9ff90b7b025 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -1839,7 +1839,6 @@ class FactureLigneRec extends CommonInvoiceLine $result = $this->db->query($sql); if ($result) { - $objp = $this->db->fetch_object($result); $this->id = $objp->rowid; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 6149a161694..84835fa9608 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -848,7 +848,6 @@ class Facture extends CommonInvoice if (! $error) { - $result=$this->update_price(1); if ($result > 0) { @@ -1933,7 +1932,6 @@ class Facture extends CommonInvoice if (! $error) { - $this->ref_client = $ref_client; $this->db->commit(); @@ -3465,7 +3463,6 @@ class Facture extends CommonInvoice $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); foreach ($dirmodels as $reldir) { - $dir = dol_buildpath($reldir."core/modules/facture/"); // Load file with numbering class (if found) @@ -5216,7 +5213,6 @@ class FactureLigne extends CommonInvoiceLine $returnPercent = floatval($res['situation_percent']); if($include_credit_note) { - $sql = 'SELECT fd.situation_percent FROM ' . MAIN_DB_PREFIX . 'facturedet fd'; $sql.= ' JOIN ' . MAIN_DB_PREFIX . 'facture f ON (f.rowid = fd.fk_facture) '; $sql.= ' WHERE fd.fk_prev_id =' . $this->fk_prev_id; diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 60c96a92f65..4642c0b7da1 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -356,7 +356,6 @@ if ($massaction == 'withdrawrequest') } else { - $db->rollback(); setEventMessages($aBill->error, $aBill->errors, 'errors'); } diff --git a/htdocs/compta/localtax/card.php b/htdocs/compta/localtax/card.php index 86388fd7e87..e7762b834e4 100644 --- a/htdocs/compta/localtax/card.php +++ b/htdocs/compta/localtax/card.php @@ -61,7 +61,6 @@ if ($_POST["cancel"] == $langs->trans("Cancel") && ! $id) if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) { - $db->begin(); $datev=dol_mktime(12, 0, 0, $_POST["datevmonth"], $_POST["datevday"], $_POST["datevyear"]); diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php index 1e6ab5b4da1..97f97bbc735 100644 --- a/htdocs/compta/localtax/clients.php +++ b/htdocs/compta/localtax/clients.php @@ -195,7 +195,6 @@ if($calc ==0 || $calc == 2) { if(($min == 0 || ($min > 0 && $coll->amount > $min)) && ($local==1?$coll->localtax1:$coll->localtax2) !=0) { - $intra = str_replace($find, $replace, $coll->tva_intra); if(empty($intra)) { @@ -269,7 +268,6 @@ if($calc ==0 || $calc == 1){ { if(($min == 0 || ($min > 0 && $coll->amount > $min)) && ($local==1?$coll->localtax1:$coll->localtax2) != 0) { - $intra = str_replace($find, $replace, $coll->tva_intra); if(empty($intra)) { diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index 9ab469376e5..3afce69e94b 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -444,7 +444,6 @@ if ($action == 'new') foreach ($accounts as $bid => $account_label) { - print ' '; } elseif (GETPOST('action') == 'confirm_delete' && GETPOST('confirm') == 'yes' && GETPOST('socid') > 0) { - // La suppression n'a pas été possible require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php'; $societe = new Societe($this->db); $societe->fetch(GETPOST('socid')); // On vérifie si il est utilisé if ((in_array($object->forme_juridique_code, array(11, 12, 13, 15, 17, 18, 19, 35, 60, 200, 311, 312, 316, 401, 600, 700, 1005)) || $societe->typent_id == 8) && $societe->isObjectUsed(GETPOST('socid'))) { - require_once DOL_DOCUMENT_ROOT . '/core/class/html.form.class.php'; $form = new Form($this->db); echo $form->formconfirm($_SERVER["PHP_SELF"] . "?socid=" . GETPOST('socid'), substr($langs->trans("DATAPOLICIES_POPUP_ANONYME_TITLE"), 0, strlen($langs->trans("DATAPOLICIES_POPUP_ANONYME_TITLE")) - 2), $langs->trans("DATAPOLICIES_POPUP_ANONYME_TEXTE"), 'anonymiser', '', '', 1); @@ -428,7 +424,6 @@ class ActionsDatapolicy $societe->fetch(GETPOST('socid')); if (!in_array($object->forme_juridique_code, array(11, 12, 13, 15, 17, 18, 19, 35, 60, 200, 311, 312, 316, 401, 600, 700, 1005)) && $societe->typent_id != 8) { - require_once DOL_DOCUMENT_ROOT . '/core/class/html.form.class.php'; $jsscript .= '