From 86d854f3f4918e001ba26c361f3a1b2a6cc8e445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 24 Oct 2018 23:04:26 +0200 Subject: [PATCH] Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose --- dev/initdata/generate-invoice.php | 3 -- dev/initdata/generate-proposal.php | 2 -- dev/setup/codesniffer/ruleset.xml | 1 + htdocs/accountancy/admin/accountmodel.php | 1 - htdocs/accountancy/admin/categories_list.php | 1 - htdocs/accountancy/admin/journals_list.php | 1 - htdocs/accountancy/admin/productaccount.php | 1 - htdocs/accountancy/bookkeeping/balance.php | 1 - htdocs/accountancy/bookkeeping/list.php | 1 - .../accountancy/class/bookkeeping.class.php | 1 - htdocs/accountancy/customer/lines.php | 1 - htdocs/accountancy/journal/sellsjournal.php | 1 - htdocs/adherents/card.php | 3 -- htdocs/adherents/cartes/carte.php | 1 - htdocs/adherents/class/adherent.class.php | 2 -- htdocs/adherents/class/subscription.class.php | 1 - htdocs/adherents/note.php | 1 - htdocs/adherents/type.php | 1 - htdocs/admin/barcode.php | 1 - htdocs/admin/chequereceipts.php | 1 - htdocs/admin/delais.php | 8 ----- htdocs/admin/dict.php | 1 - .../class/PSWebServiceLibrary.class.php | 1 - htdocs/admin/facture.php | 3 -- htdocs/admin/ldap.php | 1 - htdocs/admin/ldap_members.php | 1 - htdocs/admin/ldap_users.php | 1 - htdocs/admin/limits.php | 1 - htdocs/admin/modules.php | 6 ---- htdocs/admin/oauth.php | 1 - htdocs/admin/oauthlogintokens.php | 3 -- htdocs/admin/payment.php | 2 -- htdocs/admin/pdf.php | 1 - htdocs/admin/receiptprinter.php | 1 - htdocs/admin/supplier_payment.php | 1 - htdocs/admin/syslog.php | 2 -- htdocs/admin/tools/eaccelerator.php | 1 - htdocs/admin/tools/listsessions.php | 1 - htdocs/admin/translation.php | 1 - htdocs/admin/website.php | 1 - htdocs/asset/class/asset.class.php | 1 - htdocs/asset/type.php | 3 -- htdocs/blockedlog/admin/blockedlog_list.php | 2 -- htdocs/blockedlog/ajax/authority.php | 2 -- htdocs/blockedlog/ajax/check_signature.php | 1 - htdocs/blockedlog/class/authority.class.php | 4 --- htdocs/blockedlog/class/blockedlog.class.php | 3 -- htdocs/bookmarks/card.php | 1 - htdocs/cashdesk/class/Facturation.class.php | 32 ------------------- htdocs/cashdesk/facturation.php | 1 - htdocs/cashdesk/facturation_dhtml.php | 1 - htdocs/cashdesk/facturation_verif.php | 2 -- htdocs/cashdesk/tpl/facturation1.tpl.php | 1 - htdocs/cashdesk/tpl/liste_articles.tpl.php | 2 -- htdocs/cashdesk/tpl/validation1.tpl.php | 5 --- htdocs/cashdesk/validation_verif.php | 1 - htdocs/categories/class/categorie.class.php | 2 -- htdocs/categories/traduction.php | 1 - htdocs/categories/viewcat.php | 1 - htdocs/comm/action/card.php | 2 -- htdocs/comm/action/class/actioncomm.class.php | 2 -- .../action/class/api_agendaevents.class.php | 1 - htdocs/comm/action/index.php | 1 - htdocs/comm/action/list.php | 2 -- htdocs/comm/action/pertype.php | 1 - htdocs/comm/action/peruser.php | 2 -- htdocs/comm/address.php | 3 -- htdocs/comm/card.php | 2 -- htdocs/comm/index.php | 2 -- htdocs/comm/mailing/advtargetemailing.php | 1 - htdocs/comm/mailing/card.php | 1 - htdocs/comm/mailing/cibles.php | 1 - .../mailing/class/advtargetemailing.class.php | 9 ------ .../html.formadvtargetemailing.class.php | 3 -- htdocs/comm/mailing/class/mailing.class.php | 2 -- htdocs/comm/mailing/index.php | 1 - htdocs/comm/multiprix.php | 1 - htdocs/comm/propal/card.php | 3 -- .../comm/propal/class/api_proposals.class.php | 1 - htdocs/comm/propal/class/propal.class.php | 3 -- htdocs/comm/propal/list.php | 1 - htdocs/commande/card.php | 1 - htdocs/commande/class/api_orders.class.php | 2 -- htdocs/commande/class/commande.class.php | 1 - htdocs/commande/list.php | 1 - htdocs/commande/orderstoinvoice.php | 5 --- htdocs/compta/bank/annuel.php | 1 - htdocs/compta/bank/card.php | 3 -- .../bank/class/paymentvarious.class.php | 1 - htdocs/compta/bank/ligne.php | 2 -- htdocs/compta/compta-files.php | 2 -- htdocs/compta/deplacement/card.php | 1 - htdocs/compta/deplacement/document.php | 1 - htdocs/compta/deplacement/index.php | 1 - htdocs/compta/facture/card.php | 13 -------- htdocs/compta/facture/class/facture.class.php | 2 -- .../facture/class/paymentterm.class.php | 2 -- htdocs/compta/facture/contact.php | 1 - htdocs/compta/facture/fiche-rec.php | 4 --- .../compta/facture/invoicetemplate_list.php | 1 - htdocs/compta/facture/list.php | 4 --- htdocs/compta/index.php | 3 -- htdocs/compta/localtax/clients.php | 2 -- htdocs/compta/paiement/card.php | 2 -- htdocs/compta/paiement/cheque/card.php | 4 --- .../cheque/class/remisecheque.class.php | 1 - .../compta/paiement/class/cpaiement.class.php | 2 -- htdocs/compta/paiement_charge.php | 1 - htdocs/compta/payment_sc/card.php | 1 - .../class/bonprelevement.class.php | 4 --- .../class/rejetprelevement.class.php | 1 - htdocs/compta/prelevement/create.php | 1 - htdocs/compta/prelevement/factures.php | 1 - htdocs/compta/prelevement/fiche-rejet.php | 1 - htdocs/compta/prelevement/fiche-stat.php | 1 - htdocs/compta/prelevement/ligne.php | 1 - htdocs/compta/resultat/index.php | 3 -- .../salaries/class/paymentsalary.class.php | 1 - htdocs/compta/salaries/document.php | 1 - .../sociales/class/cchargesociales.class.php | 2 -- .../sociales/class/chargesociales.class.php | 2 -- .../class/paymentsocialcontribution.class.php | 1 - htdocs/compta/stats/byratecountry.php | 2 -- htdocs/compta/stats/casoc.php | 1 - htdocs/compta/tva/class/tva.class.php | 1 - htdocs/contact/card.php | 2 -- htdocs/contact/class/contact.class.php | 1 - htdocs/contrat/class/api_contracts.class.php | 2 -- htdocs/contrat/class/contrat.class.php | 3 -- htdocs/contrat/contact.php | 1 - htdocs/contrat/document.php | 1 - htdocs/contrat/index.php | 5 --- htdocs/contrat/note.php | 1 - htdocs/core/actions_sendmails.inc.php | 1 - htdocs/core/ajax/ajaxdirtree.php | 1 - htdocs/core/ajax/check_notifications.php | 1 - htdocs/core/ajax/price.php | 1 - htdocs/core/boxes/box_actions.php | 1 - htdocs/core/boxes/box_factures.php | 1 - .../boxes/box_graph_invoices_permonth.php | 1 - .../box_graph_invoices_supplier_permonth.php | 1 - .../core/boxes/box_graph_orders_permonth.php | 1 - .../box_graph_orders_supplier_permonth.php | 1 - .../boxes/box_graph_propales_permonth.php | 1 - htdocs/core/boxes/box_services_expired.php | 2 -- htdocs/core/class/comment.class.php | 1 - htdocs/core/class/commonobject.class.php | 6 ---- htdocs/core/class/ctyperesource.class.php | 4 --- htdocs/core/class/dolgraph.class.php | 1 - htdocs/core/class/dolreceiptprinter.class.php | 2 -- .../core/class/emailsenderprofile.class.php | 1 - htdocs/core/class/extrafields.class.php | 3 -- htdocs/core/class/html.form.class.php | 2 -- htdocs/core/class/html.formfile.class.php | 2 -- htdocs/core/class/html.formother.class.php | 1 - htdocs/core/class/notify.class.php | 2 -- htdocs/core/class/rssparser.class.php | 4 --- htdocs/core/class/utils.class.php | 1 - htdocs/core/db/mssql.class.php | 2 -- htdocs/core/db/sqlite3.class.php | 2 -- htdocs/core/lib/admin.lib.php | 1 - htdocs/core/lib/company.lib.php | 1 - htdocs/core/lib/emailing.lib.php | 1 - htdocs/core/lib/fichinter.lib.php | 1 - htdocs/core/lib/files.lib.php | 1 - htdocs/core/lib/functions.lib.php | 6 ---- htdocs/core/lib/xcal.lib.php | 1 - htdocs/core/login/functions_ldap.php | 1 - htdocs/core/menus/standard/eldy.lib.php | 6 ---- htdocs/core/menus/standard/eldy_menu.php | 2 -- htdocs/core/menus/standard/empty.php | 2 -- htdocs/core/modules/DolibarrModules.class.php | 4 --- .../modules/cheque/modules_chequereceipts.php | 1 - .../commande/doc/pdf_einstein.modules.php | 1 - .../commande/doc/pdf_eratosthene.modules.php | 3 -- .../expedition/doc/pdf_rouget.modules.php | 2 -- .../doc/pdf_standard.modules.php | 1 - .../modules/facture/doc/pdf_crabe.modules.php | 4 --- .../facture/doc/pdf_sponge.modules.php | 5 --- .../modules/import/import_csv.modules.php | 1 - .../modules/import/import_xlsx.modules.php | 1 - .../thirdparties_services_expired.modules.php | 1 - htdocs/core/modules/modStock.class.php | 1 - .../doc/doc_generic_project_odt.modules.php | 1 - .../task/doc/doc_generic_task_odt.modules.php | 1 - .../modules/propale/doc/pdf_azur.modules.php | 1 - .../modules/propale/doc/pdf_cyan.modules.php | 3 -- .../modGeneratePassStandard.class.php | 1 - .../stock/doc/pdf_stdmovement.modules.php | 1 - .../pdf/pdf_canelle.modules.php | 1 - .../pdf/pdf_muscadet.modules.php | 1 - .../doc/pdf_aurore.modules.php | 1 - htdocs/core/tpl/card_presend.tpl.php | 1 - htdocs/core/tpl/resource_view.tpl.php | 1 - .../interface_80_modStripe_Stripe.class.php | 1 - htdocs/cron/card.php | 1 - htdocs/datapolicy/admin/setup.php | 2 -- htdocs/datapolicy/class/datapolicy.class.php | 2 -- .../datapolicy/class/datapolicycron.class.php | 2 -- htdocs/datapolicy/mailing.php | 2 -- htdocs/don/card.php | 1 - htdocs/don/document.php | 1 - htdocs/don/payment/card.php | 2 -- htdocs/ecm/class/ecmdirectory.class.php | 1 - htdocs/ecm/dir_add_card.php | 1 - htdocs/ecm/dir_card.php | 1 - htdocs/ecm/file_card.php | 1 - htdocs/ecm/index_auto.php | 1 - htdocs/expedition/card.php | 9 ------ .../expedition/class/api_shipments.class.php | 1 - htdocs/expedition/class/expedition.class.php | 4 --- htdocs/expedition/contact.php | 1 - htdocs/expedition/list.php | 1 - htdocs/expedition/shipment.php | 3 -- htdocs/expensereport/card.php | 7 ---- .../class/api_expensereports.class.php | 1 - .../class/expensereport.class.php | 2 -- .../class/paymentexpensereport.class.php | 1 - htdocs/expensereport/document.php | 1 - htdocs/expensereport/export_csv.php | 4 --- htdocs/expensereport/index.php | 1 - htdocs/expensereport/payment/card.php | 2 -- htdocs/expensereport/payment/payment.php | 1 - htdocs/exports/export.php | 4 --- htdocs/fichinter/card-rec.php | 5 --- htdocs/fichinter/card.php | 8 ----- htdocs/fichinter/class/fichinter.class.php | 1 - htdocs/fichinter/contact.php | 1 - htdocs/fichinter/document.php | 1 - .../class/fournisseur.commande.class.php | 5 --- .../fournisseur.commande.dispatch.class.php | 2 -- .../fourn/class/fournisseur.facture.class.php | 2 -- htdocs/fourn/class/paiementfourn.class.php | 1 - htdocs/fourn/commande/card.php | 10 ------ htdocs/fourn/commande/contact.php | 1 - htdocs/fourn/commande/document.php | 1 - htdocs/fourn/commande/list.php | 1 - htdocs/fourn/commande/orderstoinvoice.php | 2 -- htdocs/fourn/contact.php | 1 - htdocs/fourn/facture/card.php | 9 ------ htdocs/fourn/facture/contact.php | 1 - htdocs/fourn/facture/document.php | 1 - htdocs/fourn/facture/impayees.php | 1 - htdocs/fourn/facture/list.php | 1 - htdocs/fourn/paiement/card.php | 3 -- htdocs/ftp/index.php | 5 --- htdocs/holiday/card.php | 5 --- htdocs/holiday/class/holiday.class.php | 2 -- htdocs/holiday/list.php | 1 - htdocs/holiday/month_report.php | 1 - htdocs/holiday/view_log.php | 1 - htdocs/hrm/admin/admin_establishment.php | 1 - htdocs/hrm/establishment/card.php | 1 - htdocs/hrm/index.php | 3 -- htdocs/imports/import.php | 4 --- htdocs/install/check.php | 2 -- htdocs/install/lib/repair.lib.php | 1 - htdocs/install/repair.php | 1 - htdocs/install/step2.php | 1 - htdocs/install/step4.php | 1 - htdocs/install/upgrade2.php | 4 --- htdocs/livraison/card.php | 3 -- htdocs/loan/class/loanschedule.class.php | 2 -- htdocs/loan/class/paymentloan.class.php | 1 - htdocs/margin/productMargins.php | 2 -- .../template/class/actions_mymodule.class.php | 1 - .../template/class/myobject.class.php | 1 - htdocs/opensurvey/results.php | 1 - htdocs/printing/admin/printing.php | 2 -- htdocs/product/admin/price_rules.php | 1 - htdocs/product/admin/product.php | 1 - htdocs/product/admin/product_tools.php | 1 - htdocs/product/card.php | 2 -- htdocs/product/class/product.class.php | 3 -- .../class/propalmergepdfproduct.class.php | 6 ---- htdocs/product/composition/card.php | 2 -- htdocs/product/document.php | 1 - htdocs/product/index.php | 2 -- .../inventory/class/inventory.class.php | 1 - .../product/inventory/tpl/inventory.tpl.php | 1 - htdocs/product/price.php | 2 -- htdocs/product/reassort.php | 2 -- htdocs/product/reassortlot.php | 1 - htdocs/product/stock/card.php | 3 -- htdocs/product/stock/class/entrepot.class.php | 2 -- .../stock/class/mouvementstock.class.php | 1 - .../class/productstockentrepot.class.php | 2 -- htdocs/product/stock/index.php | 1 - htdocs/product/stock/product.php | 8 ----- htdocs/product/stock/productlot_card.php | 2 -- htdocs/product/stock/productlot_document.php | 3 -- htdocs/product/stock/valo.php | 2 -- htdocs/product/traduction.php | 1 - htdocs/projet/activity/index.php | 3 -- htdocs/projet/card.php | 1 - htdocs/projet/class/api_projects.class.php | 1 - htdocs/projet/class/api_tasks.class.php | 1 - htdocs/projet/class/project.class.php | 2 -- htdocs/projet/class/projectstats.class.php | 1 - htdocs/projet/class/task.class.php | 1 - htdocs/projet/document.php | 1 - htdocs/projet/element.php | 1 - htdocs/projet/list.php | 1 - htdocs/projet/tasks.php | 1 - htdocs/projet/tasks/comment.php | 1 - htdocs/projet/tasks/contact.php | 1 - htdocs/public/cron/cron_run_jobs.php | 1 - htdocs/public/donations/donateurs_code.php | 1 - htdocs/public/emailing/mailing-read.php | 1 - htdocs/public/members/public_card.php | 1 - htdocs/public/onlinesign/newonlinesign.php | 3 -- htdocs/public/payment/newpayment.php | 1 - htdocs/public/stripe/ipn.php | 5 --- htdocs/resource/card.php | 1 - htdocs/resource/class/dolresource.class.php | 2 -- htdocs/resource/document.php | 1 - htdocs/resource/element_resource.php | 1 - htdocs/societe/admin/societe.php | 4 --- .../canvas/actions_card_common.class.php | 1 - .../company/actions_card_company.class.php | 1 - htdocs/societe/card.php | 7 ---- htdocs/societe/class/address.class.php | 2 -- .../societe/class/api_thirdparties.class.php | 2 -- .../class/companybankaccount.class.php | 1 - .../class/companypaymentmode.class.php | 1 - htdocs/societe/class/societe.class.php | 4 --- htdocs/societe/class/societeaccount.class.php | 1 - htdocs/societe/consumption.php | 1 - htdocs/societe/price.php | 1 - htdocs/stripe/charge.php | 1 - htdocs/stripe/class/actions_stripe.class.php | 1 - htdocs/stripe/class/stripe.class.php | 1 - htdocs/stripe/payment.php | 1 - htdocs/supplier_proposal/card.php | 1 - .../class/api_supplier_proposals.class.php | 1 - .../class/supplier_proposal.class.php | 4 --- htdocs/supplier_proposal/contact.php | 1 - htdocs/ticket/list.php | 1 - htdocs/user/card.php | 2 -- htdocs/user/class/user.class.php | 2 -- htdocs/user/clicktodial.php | 1 - htdocs/user/param_ihm.php | 2 -- htdocs/variants/admin/admin.php | 1 - htdocs/variants/card.php | 1 - .../class/ProductCombination.class.php | 1 - htdocs/variants/combinations.php | 4 --- htdocs/variants/generator.php | 1 - htdocs/webservices/server_actioncomm.php | 1 - htdocs/webservices/server_category.php | 2 -- htdocs/webservices/server_invoice.php | 2 -- htdocs/webservices/server_order.php | 6 ---- .../webservices/server_productorservice.php | 5 --- htdocs/webservices/server_thirdparty.php | 1 - htdocs/webservices/server_user.php | 1 - htdocs/website/index.php | 2 -- scripts/cron/cron_run_jobs.php | 1 - scripts/emailings/mailing-send.php | 2 -- .../members/sync_members_ldap2dolibarr.php | 1 - scripts/product/migrate_picture_path.php | 1 - test/phpunit/CodingSqlTest.php | 3 -- 360 files changed, 1 insertion(+), 720 deletions(-) diff --git a/dev/initdata/generate-invoice.php b/dev/initdata/generate-invoice.php index 4064336cbab..280518bd4e3 100755 --- a/dev/initdata/generate-invoice.php +++ b/dev/initdata/generate-invoice.php @@ -185,7 +185,4 @@ while ($i < GEN_NUMBER_FACTURE && $result >= 0) { dol_print_error($db,$object->error); } - } - - diff --git a/dev/initdata/generate-proposal.php b/dev/initdata/generate-proposal.php index 631b734fc9e..eb2bfe15a00 100755 --- a/dev/initdata/generate-proposal.php +++ b/dev/initdata/generate-proposal.php @@ -218,6 +218,4 @@ while ($i < GEN_NUMBER_PROPAL && $result >= 0) { dol_print_error($db,$object->error); } - } - diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index 79b16bdbf55..67bf58e51ed 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -173,6 +173,7 @@ 0 + diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index efa23a6a586..d3843763732 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -247,7 +247,6 @@ if (GETPOST('actionadd','alpha') || GETPOST('actionmodify','alpha')) { $obj = $db->fetch_object($result); $newid=($obj->newid + 1); - } else { dol_print_error($db); } diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index 14a6b56512d..9f6b0bf14fe 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -202,7 +202,6 @@ if (GETPOST('actionadd','alpha') || GETPOST('actionmodify','alpha')) { $obj = $db->fetch_object($result); $newid=($obj->newid + 1); - } else { dol_print_error($db); } diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index ae254788b08..3511ae431ec 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -202,7 +202,6 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { $obj = $db->fetch_object($result); $newid=($obj->newid + 1); - } else { dol_print_error($db); } diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index 0babd9aab5f..a84e2f6fcab 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -173,7 +173,6 @@ if ($action == 'update') { $cpt++; } - } if ($ko) setEventMessages($langs->trans("XLineFailedToBeBinded", $ko), null, 'errors'); diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 161e3346b9c..9feb2a7c234 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -315,7 +315,6 @@ if ($action != 'export_csv') print ""; print ''; - } // End of page diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 4a4630edfa5..46575c21143 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -760,7 +760,6 @@ if ($num > 0) else print ''; } print ''; - } } diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 0ce49e76f51..b07f76a22df 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -1841,7 +1841,6 @@ class BookKeeping extends CommonObject } return $obj->label; - } else { $this->error = "Error " . $this->db->lasterror(); dol_syslog(__METHOD__ . " " . $this->error, LOG_ERR); diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index af80d70f043..7d8599b683c 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -135,7 +135,6 @@ if (is_array($changeaccount) && count($changeaccount) > 0) { $account_parent = ''; // Protection to avoid to mass apply it a second time } - } diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 10cb339c2d6..ee7d45d6c66 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -500,7 +500,6 @@ if ($action == 'writebookkeeping') { break; // Break in the foreach } } - } $tabpay = $tabfac; diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 908a46c91d1..e7b36b77ad9 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -789,7 +789,6 @@ if (empty($reshook)) $mode='emailfrommember'; $trackid='mem'.$object->id; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; - } @@ -1320,7 +1319,6 @@ else print ''; print ''; - } if ($id > 0 && $action != 'edit') @@ -1858,7 +1856,6 @@ else print '\n"; } } - } } print ''; diff --git a/htdocs/adherents/cartes/carte.php b/htdocs/adherents/cartes/carte.php index ff7e9c3be2e..c50de6f8c81 100644 --- a/htdocs/adherents/cartes/carte.php +++ b/htdocs/adherents/cartes/carte.php @@ -208,7 +208,6 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DescADHERENT_CARD_TYPE")); } if (! $mesg) $result=members_card_pdf_create($db, $arrayofmembers, $model, $outputlangs); - } elseif ($mode == 'label') { diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 317d7697231..3df36ef3eda 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -2509,7 +2509,6 @@ class Adherent extends CommonObject } $this->db->free($result); - } else { @@ -2738,7 +2737,6 @@ class Adherent extends CommonObject $nbok++; // TODO Add event email sent for member - } } else diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php index 562b34af2b1..7b8f453c94c 100644 --- a/htdocs/adherents/class/subscription.class.php +++ b/htdocs/adherents/class/subscription.class.php @@ -416,7 +416,6 @@ class Subscription extends CommonObject } $this->db->free($result); - } else { diff --git a/htdocs/adherents/note.php b/htdocs/adherents/note.php index 8cd12cd6ca2..c12c45de8b7 100644 --- a/htdocs/adherents/note.php +++ b/htdocs/adherents/note.php @@ -116,7 +116,6 @@ if ($id) dol_fiche_end(); - } // End of page diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index e9ad0b91498..7e69d4fbc98 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -694,7 +694,6 @@ if ($rowid > 0) { dol_print_error($db); } - } /* ************************************************************************** */ diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index 519f2b42938..6a356843d6b 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -75,7 +75,6 @@ else if ($action == 'update') else if ($action == 'updateengine') { // TODO Update engines. - } if ($action && $action != 'setcoder' && $action != 'setModuleOptions') diff --git a/htdocs/admin/chequereceipts.php b/htdocs/admin/chequereceipts.php index 82b0ed3848c..f85018c03b8 100644 --- a/htdocs/admin/chequereceipts.php +++ b/htdocs/admin/chequereceipts.php @@ -217,7 +217,6 @@ foreach ($dirmodels as $reldir) print ''; print "\n"; - } } } diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php index 19fa67abcff..add4e2aec80 100644 --- a/htdocs/admin/delais.php +++ b/htdocs/admin/delais.php @@ -155,7 +155,6 @@ if ($action == 'update') for($i=0; $i<4; $i++) { if(isset($_POST['MAIN_METEO'.$plus.'_LEVEL'.$i])) dolibarr_set_const($db, 'MAIN_METEO'.$plus.'_LEVEL'.$i, GETPOST('MAIN_METEO'.$plus.'_LEVEL'.$i, 'int'),'chaine',0,'',$conf->entity); } - } @@ -254,7 +253,6 @@ else print ''; print ''; - } print '
'; @@ -272,7 +270,6 @@ if($action == 'edit') { print ''; print '

'; - } else { if(empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) print $langs->trans('MeteoStdModEnabled'); else print $langs->trans('MeteoPercentageModEnabled'); @@ -362,7 +359,6 @@ if ($action == 'edit') { global->MAIN_USE_METEO_WITH_PERCENTAGE)) { @@ -385,7 +381,6 @@ if ($action == 'edit') { print '> '.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL3.' %'; print ''; print ''; - } else { print '
'; @@ -406,7 +401,6 @@ if ($action == 'edit') { print '> '.$level3; print '
'; print ''; - } } @@ -416,13 +410,11 @@ if($action == 'edit') { print '
'; print '
'; - } else { // Boutons d'action print '
'; - } // End of page diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 0b5b63d35d6..4d5471b1aa8 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -705,7 +705,6 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) { $obj = $db->fetch_object($result); $newid=($obj->newid + 1); - } else { dol_print_error($db); } diff --git a/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php b/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php index 4617481d04d..c8fcd061689 100644 --- a/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php +++ b/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php @@ -177,7 +177,6 @@ class PrestaShopWebservice { $this->printDebug('HTTP REQUEST HEADER', curl_getinfo($session, CURLINFO_HEADER_OUT)); $this->printDebug('HTTP RESPONSE HEADER', $header); - } $status_code = curl_getinfo($session, CURLINFO_HTTP_CODE); if ($status_code === 0) diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index cd84dbf65a5..5cb093cc443 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -261,8 +261,6 @@ if ($action == 'setDefaultPDFModulesByType') setEventMessages($langs->trans("Error"), null, 'errors'); } } - - } @@ -436,7 +434,6 @@ foreach ($dirmodels as $reldir) print ''; print "\n"; - } } } diff --git a/htdocs/admin/ldap.php b/htdocs/admin/ldap.php index 052b2f38988..1f7b803a50e 100644 --- a/htdocs/admin/ldap.php +++ b/htdocs/admin/ldap.php @@ -336,7 +336,6 @@ if (function_exists("ldap_connect")) print $langs->trans("Error").' '.$ldap->error; print '
'; } - } } diff --git a/htdocs/admin/ldap_members.php b/htdocs/admin/ldap_members.php index 2f36f239257..61da334a90d 100644 --- a/htdocs/admin/ldap_members.php +++ b/htdocs/admin/ldap_members.php @@ -439,7 +439,6 @@ if (function_exists("ldap_connect")) print $langs->trans("ErrorLDAPMakeManualTest",$conf->ldap->dir_temp).'
'; } } - } // End of page diff --git a/htdocs/admin/ldap_users.php b/htdocs/admin/ldap_users.php index 513aa63f035..87df901cfa9 100644 --- a/htdocs/admin/ldap_users.php +++ b/htdocs/admin/ldap_users.php @@ -443,7 +443,6 @@ if (function_exists("ldap_connect")) } $liste[$key] = $label; } - } else { diff --git a/htdocs/admin/limits.php b/htdocs/admin/limits.php index f9fe219afef..ca4b8fca512 100644 --- a/htdocs/admin/limits.php +++ b/htdocs/admin/limits.php @@ -253,7 +253,6 @@ else print " x ".$langs->trans("Quantity").": ".$qty; print " - ".$langs->trans("VAT").": ".$vat.'%'; print "   ->   ".$langs->trans("TotalPriceAfterRounding").": ".$tmparray[0].' / '.$tmparray[1].' / '.$tmparray[2]."
\n"; - } // Important: can debug rounding, to simulate the rounded total diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index c089e9ef204..81eec5a4247 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -433,9 +433,7 @@ if ($action == 'reset_confirm' && $user->admin) $form = new Form($db); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?value='.$value.'&mode='.$mode.$param, $langs->trans('ConfirmUnactivation'), $langs->trans(GETPOST('confirm_message_code')), 'reset', '', 'no', 1); - } - } print $formconfirm; @@ -711,16 +709,13 @@ if ($mode == 'common') print 'warnings_unactivation[$mysoc->country_code].'&value=' . $modName . '&mode=' . $mode . $param . '">'; print img_picto($langs->trans("Activated"),'switch_on'); print ''; - } else { print ''; print img_picto($langs->trans("Activated"),'switch_on'); print ''; - } - } print ''."\n"; @@ -775,7 +770,6 @@ if ($mode == 'common') { print ''.img_picto($langs->trans("NothingToSetup"),"setup",'class="opacitytransp" style="padding-right: 6px"').''; } - } else // Module not yet activated { diff --git a/htdocs/admin/oauth.php b/htdocs/admin/oauth.php index d18608feaf4..16827306bda 100644 --- a/htdocs/admin/oauth.php +++ b/htdocs/admin/oauth.php @@ -139,7 +139,6 @@ foreach ($list as $key) print ''; print ''; print ''; - } print ''."\n"; diff --git a/htdocs/admin/oauthlogintokens.php b/htdocs/admin/oauthlogintokens.php index fb9f2dd374e..f29c49e9f38 100644 --- a/htdocs/admin/oauthlogintokens.php +++ b/htdocs/admin/oauthlogintokens.php @@ -327,7 +327,6 @@ if ($mode == 'setup' && $user->admin) print ''; } - } if ($mode == 'test' && $user->admin) @@ -352,11 +351,9 @@ if ($mode == 'test' && $user->admin) else { print $langs->trans('PleaseConfigureDriverfromList'); } - } print ''; - } if ($mode == 'userconf' && $user->admin) diff --git a/htdocs/admin/payment.php b/htdocs/admin/payment.php index 4ca9411e105..816ab8344ce 100644 --- a/htdocs/admin/payment.php +++ b/htdocs/admin/payment.php @@ -83,7 +83,6 @@ if ($action == 'setparams') { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } - } @@ -217,7 +216,6 @@ foreach ($dirmodels as $reldir) print ''; print "\n"; - } } } diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index 0dba6ea6700..50d8fb5b927 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -517,7 +517,6 @@ else // Show $text.= yn($conf->global->MAIN_PDF_MAIN_HIDE_THIRD_TAX,1); $text.= ''; } - } // Sales TAX / VAT information diff --git a/htdocs/admin/receiptprinter.php b/htdocs/admin/receiptprinter.php index 9205d49deae..b8d92687d84 100644 --- a/htdocs/admin/receiptprinter.php +++ b/htdocs/admin/receiptprinter.php @@ -438,7 +438,6 @@ if ($mode == 'template' && $user->admin) print ''; dol_fiche_end(); - } // to remove after test diff --git a/htdocs/admin/supplier_payment.php b/htdocs/admin/supplier_payment.php index 55fb311ccda..77f2a95070e 100644 --- a/htdocs/admin/supplier_payment.php +++ b/htdocs/admin/supplier_payment.php @@ -301,7 +301,6 @@ foreach ($dirmodels as $reldir) print ''; print "\n"; - } } } diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php index e163fc83de5..d9ab678faa8 100644 --- a/htdocs/admin/syslog.php +++ b/htdocs/admin/syslog.php @@ -132,9 +132,7 @@ if ($action == 'set') { $db->rollback(); setEventMessages($error, $errors, 'errors'); - } - } // Set level diff --git a/htdocs/admin/tools/eaccelerator.php b/htdocs/admin/tools/eaccelerator.php index a3205c11a27..c6209cd7c34 100644 --- a/htdocs/admin/tools/eaccelerator.php +++ b/htdocs/admin/tools/eaccelerator.php @@ -168,7 +168,6 @@ function create_script_table($list) default: $sortby = "file"; ($order == "asc" ? uasort($list, 'compare') : uasort($list, 'revcompare')); - } foreach($list as $script) { diff --git a/htdocs/admin/tools/listsessions.php b/htdocs/admin/tools/listsessions.php index 643269bfacd..8ddc1d65525 100644 --- a/htdocs/admin/tools/listsessions.php +++ b/htdocs/admin/tools/listsessions.php @@ -170,7 +170,6 @@ if ($savehandler == 'files') print ''.$langs->trans("NoSessionFound",$savepath,$openbasedir).''; } print ""; - } else { diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index 4c215e9ae52..da26d6648cd 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -384,7 +384,6 @@ if ($mode == 'overwrite') print ''; print ''; - } if ($mode == 'searchkey') diff --git a/htdocs/admin/website.php b/htdocs/admin/website.php index fcdeee79249..e36b8d59df3 100644 --- a/htdocs/admin/website.php +++ b/htdocs/admin/website.php @@ -167,7 +167,6 @@ if (GETPOST('actionadd','alpha') || GETPOST('actionmodify','alpha')) { $obj = $db->fetch_object($result); $newid=($obj->newid + 1); - } else { dol_print_error($db); } diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 8eeacdc1964..22e24703bc3 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -463,7 +463,6 @@ class Asset extends CommonObject } $this->db->free($result); - } else { diff --git a/htdocs/asset/type.php b/htdocs/asset/type.php index 001912f7de3..9e06c4a765d 100644 --- a/htdocs/asset/type.php +++ b/htdocs/asset/type.php @@ -356,7 +356,6 @@ if ($action == 'create') print ''; print $formaccounting->select_account($object->accountancy_code_depreciation_expense, 'accountancy_code_depreciation_expense', 1, '', 1, 1); print ''; - } else // For external software { @@ -732,7 +731,6 @@ if ($rowid > 0) { dol_print_error($db); } - } /* ************************************************************************** */ @@ -782,7 +780,6 @@ if ($rowid > 0) print ''; print $formaccounting->select_account($object->accountancy_code_depreciation_expense, 'accountancy_code_depreciation_expense', 1, '', 1, 1); print ''; - } else // For external software { diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php index cd558c020a6..734e9d31f67 100644 --- a/htdocs/blockedlog/admin/blockedlog_list.php +++ b/htdocs/blockedlog/admin/blockedlog_list.php @@ -444,7 +444,6 @@ if (! empty($conf->global->BLOCKEDLOG_SCAN_ALL_FOR_LOWERIDINERROR)) // TODO Make a full scan of table in reverse order of id of $block, so we can use the parameter $previoushash into checkSignature to save requests // to find the $loweridinerror. - } else { @@ -538,7 +537,6 @@ if (is_array($blocks)) print ''; print ''; - } } } diff --git a/htdocs/blockedlog/ajax/authority.php b/htdocs/blockedlog/ajax/authority.php index 7bde15aa879..1104eeb3c02 100644 --- a/htdocs/blockedlog/ajax/authority.php +++ b/htdocs/blockedlog/ajax/authority.php @@ -53,7 +53,6 @@ if($auth->fetch(0, $signature)<=0) { if(!empty($hash)) { echo $auth->checkBlockchain($hash) ? 'hashisok' : 'hashisjunk'; - } elseif(!empty($newblock)){ if($auth->checkBlock($newblock)) { @@ -65,7 +64,6 @@ elseif(!empty($newblock)){ else{ echo 'blockalreadyadded'; - } } else{ diff --git a/htdocs/blockedlog/ajax/check_signature.php b/htdocs/blockedlog/ajax/check_signature.php index 199f9051e07..9617e6cd1ef 100644 --- a/htdocs/blockedlog/ajax/check_signature.php +++ b/htdocs/blockedlog/ajax/check_signature.php @@ -49,7 +49,6 @@ $auth->signature = $block_static->getSignature(); foreach($blocks as &$b) { $auth->blockchain.=$b->signature; - } $hash = $auth->getBlockchainHash(); diff --git a/htdocs/blockedlog/class/authority.class.php b/htdocs/blockedlog/class/authority.class.php index 0102a5d88d6..0d0fc183b6c 100644 --- a/htdocs/blockedlog/class/authority.class.php +++ b/htdocs/blockedlog/class/authority.class.php @@ -73,7 +73,6 @@ class BlockedLogAuthority foreach($blocks as &$b) { $this->blockchain.=$b->signature; - } return $this->blockchain; @@ -319,15 +318,12 @@ class BlockedLogAuthority if($res === 'blockalreadyadded' || $res === 'blockadded') { $block->setCertified(); - } else { $this->error = $langs->trans('ImpossibleToContactAuthority ',$url); return -1; } - - } return 1; diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index eb2070d703a..46766277669 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -947,17 +947,14 @@ class BlockedLog $sql="SELECT rowid FROM ".MAIN_DB_PREFIX."blockedlog WHERE entity=".$conf->entity; - } else if ($element=='not_certified') { $sql="SELECT rowid FROM ".MAIN_DB_PREFIX."blockedlog WHERE entity=".$conf->entity." AND certified = 0"; - } else if ($element=='just_certified') { $sql="SELECT rowid FROM ".MAIN_DB_PREFIX."blockedlog WHERE entity=".$conf->entity." AND certified = 1"; - } else{ $sql="SELECT rowid FROM ".MAIN_DB_PREFIX."blockedlog diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index b82c2b11b6c..1d10dc7ca34 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -333,7 +333,6 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) } print ''; - } // End of page diff --git a/htdocs/cashdesk/class/Facturation.class.php b/htdocs/cashdesk/class/Facturation.class.php index 3051035813a..18487619a76 100644 --- a/htdocs/cashdesk/class/Facturation.class.php +++ b/htdocs/cashdesk/class/Facturation.class.php @@ -290,19 +290,16 @@ class Facturation if ( !$aId ) { return $this->id; - } else if ( $aId == 'RESET' ) { $this->id = null; - } else { $this->id = $aId; - } } @@ -410,15 +407,12 @@ class Facturation if (is_null($aMontantRemise)) { return $this->montant_remise; - } else if ( $aMontantRemise == 'RESET' ) { $this->montant_remise = null; - } else { $this->montant_remise = $aMontantRemise; - } } @@ -434,15 +428,12 @@ class Facturation if (is_null($aPrix)) { return $this->prix; - } else if ( $aPrix == 'RESET' ) { $this->prix = null; - } else { $this->prix = $aPrix; - } } @@ -457,15 +448,12 @@ class Facturation if (is_null($aTva)) { return $this->tva; - } else if ( $aTva == 'RESET' ) { $this->tva = null; - } else { $this->tva = $aTva; - } } @@ -480,15 +468,12 @@ class Facturation if (is_null($aNumFacture)) { return $this->num_facture; - } else if ( $aNumFacture == 'RESET' ) { $this->num_facture = null; - } else { $this->num_facture = $aNumFacture; - } } @@ -504,15 +489,12 @@ class Facturation if (is_null($aModeReglement)) { return $this->mode_reglement; - } else if ( $aModeReglement == 'RESET' ) { $this->mode_reglement = null; - } else { $this->mode_reglement = $aModeReglement; - } } @@ -528,15 +510,12 @@ class Facturation if (is_null($aMontantEncaisse)) { return $this->montant_encaisse; - } else if ( $aMontantEncaisse == 'RESET' ) { $this->montant_encaisse = null; - } else { $this->montant_encaisse = $aMontantEncaisse; - } } @@ -555,11 +534,9 @@ class Facturation } else if ( $aMontantRendu == 'RESET' ) { $this->montant_rendu = null; - } else { $this->montant_rendu = $aMontantRendu; - } } @@ -574,15 +551,12 @@ class Facturation if (is_null($aPaiementLe)) { return $this->paiement_le; - } else if ( $aPaiementLe == 'RESET' ) { $this->paiement_le = null; - } else { $this->paiement_le = $aPaiementLe; - } } @@ -597,15 +571,12 @@ class Facturation if (is_null($aTotalHt)) { return $this->prix_total_ht; - } else if ( $aTotalHt == 'RESET' ) { $this->prix_total_ht = null; - } else { $this->prix_total_ht = $aTotalHt; - } } @@ -620,15 +591,12 @@ class Facturation if (is_null($aMontantTva)) { return $this->montant_tva; - } else if ( $aMontantTva == 'RESET' ) { $this->montant_tva = null; - } else { $this->montant_tva = $aMontantTva; - } } diff --git a/htdocs/cashdesk/facturation.php b/htdocs/cashdesk/facturation.php index 6a2889f6e71..4ca8a562659 100644 --- a/htdocs/cashdesk/facturation.php +++ b/htdocs/cashdesk/facturation.php @@ -137,7 +137,6 @@ if ( $nbr_enreg > 1 ) { $top_liste_produits = '----- '.$nbr_enreg.' '.$langs->transnoentitiesnoconv("CashDeskProducts").' '.$langs->trans("CashDeskOn").' '.$nbr_enreg.' -----'; } - } else if ( $nbr_enreg == 1 ) { diff --git a/htdocs/cashdesk/facturation_dhtml.php b/htdocs/cashdesk/facturation_dhtml.php index e1a1dcc6bc8..bcfc1e82f82 100644 --- a/htdocs/cashdesk/facturation_dhtml.php +++ b/htdocs/cashdesk/facturation_dhtml.php @@ -108,5 +108,4 @@ if (dol_strlen($search) >= 0) // If search criteria is on char length at least print ''; } } - } diff --git a/htdocs/cashdesk/facturation_verif.php b/htdocs/cashdesk/facturation_verif.php index cdeeaf6c424..6aa81d991df 100644 --- a/htdocs/cashdesk/facturation_verif.php +++ b/htdocs/cashdesk/facturation_verif.php @@ -216,7 +216,6 @@ switch($action) $obj_facturation->remisePercent($_POST['txtRemise']); $obj_facturation->ajoutArticle(); // This add an entry into $_SESSION['poscart'] // We update prixTotalTtc - } $redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menutpl=facturation'; @@ -227,7 +226,6 @@ switch($action) $redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menutpl=facturation'; break; - } // We saved object obj_facturation diff --git a/htdocs/cashdesk/tpl/facturation1.tpl.php b/htdocs/cashdesk/tpl/facturation1.tpl.php index 4ddafd17c44..2ff71e2a359 100644 --- a/htdocs/cashdesk/tpl/facturation1.tpl.php +++ b/htdocs/cashdesk/tpl/facturation1.tpl.php @@ -89,7 +89,6 @@ $langs->loadLangs(array("main","bills","cashdesk")); print ''."\n"; - } ?> diff --git a/htdocs/cashdesk/tpl/liste_articles.tpl.php b/htdocs/cashdesk/tpl/liste_articles.tpl.php index 266c5e5840b..53209d735c4 100644 --- a/htdocs/cashdesk/tpl/liste_articles.tpl.php +++ b/htdocs/cashdesk/tpl/liste_articles.tpl.php @@ -60,11 +60,9 @@ else if ( $tab[$i]['remise_percent'] > 0 ) { $remise_percent = ' -'.$tab[$i]['remise_percent'].'%'; - } else { $remise_percent = ''; - } $remise = $tab[$i]['remise']; diff --git a/htdocs/cashdesk/tpl/validation1.tpl.php b/htdocs/cashdesk/tpl/validation1.tpl.php index 957d2d6b843..750831cead8 100644 --- a/htdocs/cashdesk/tpl/validation1.tpl.php +++ b/htdocs/cashdesk/tpl/validation1.tpl.php @@ -41,13 +41,11 @@ $langs->loadLangs(array("main","bills","banks")); if ( $obj_facturation->montantTva() ) { echo (''.$langs->trans("VAT").''.price(price2num($obj_facturation->montantTva(),'MT'),0,$langs,0,0,-1,$conf->currency).''); - } else { echo (''.$langs->trans("VAT").''.$langs->trans("NoVAT").''); - } ?> trans("TotalTTC"); ?> prixTotalTtc(),'MT'),0,$langs,0,0,-1,$conf->currency); ?> @@ -91,18 +89,15 @@ $langs->loadLangs(array("main","bills","banks")); if ( $obj_facturation->getsetPaymentMode() == 'DIF' ) { echo (''.$langs->trans("DateDue").''.$obj_facturation->paiementLe().''); - } else { echo (''.$langs->trans("Received").''.price(price2num($obj_facturation->montantEncaisse(),'MT'),0,$langs,0,0,-1,$conf->currency).''); - } // Affichage du montant rendu (reglement en especes) if ( $obj_facturation->montantRendu() ) { echo (''.$langs->trans("Change").''.price(price2num($obj_facturation->montantRendu(),'MT'),0,$langs,0,0,-1,$conf->currency).''); - } ?> diff --git a/htdocs/cashdesk/validation_verif.php b/htdocs/cashdesk/validation_verif.php index b42bc90d8fb..be1f201a8fe 100644 --- a/htdocs/cashdesk/validation_verif.php +++ b/htdocs/cashdesk/validation_verif.php @@ -328,7 +328,6 @@ switch ($action) $result=$invoice->set_paid($user); //print 'set paid';exit; } - } } else diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index a7ddab761e0..480edb83390 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -665,7 +665,6 @@ class Categorie extends CommonObject $this->db->rollback(); return -2; } - } else { @@ -1810,7 +1809,6 @@ class Categorie extends CommonObject { $this->label = $obj->label; $this->description = $obj->description; - } $this->multilangs["$obj->lang"]["label"] = $obj->label; $this->multilangs["$obj->lang"]["description"] = $obj->description; diff --git a/htdocs/categories/traduction.php b/htdocs/categories/traduction.php index dbcfca198d2..d3287703695 100644 --- a/htdocs/categories/traduction.php +++ b/htdocs/categories/traduction.php @@ -269,7 +269,6 @@ if ($action == 'edit') print ''; print ''; - } else if ($action != 'add') { diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index ba3580cea87..560cb4613be 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -168,7 +168,6 @@ if ($type == Categorie::TYPE_PRODUCT && $elemid && $action == 'addintocategory' setEventMessages($object->error,$object->errors,'errors'); } } - } diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index fd0a4a2b430..4e8b87eb591 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -597,7 +597,6 @@ if (GETPOST('actionmove','alpha') == 'mupdate') { $action=''; } - } // Actions to delete doc @@ -873,7 +872,6 @@ if ($action == 'create') } else { print $form->select_company('', 'socid', '', 'SelectThirdParty', 1, 0, $events, 0, 'minwidth300'); } - } print ''; diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 4a6cec809fe..92af9fef6da 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -401,7 +401,6 @@ class ActionComm extends CommonObject $error++; $this->errors[]=$this->db->lasterror(); } - } } } @@ -937,7 +936,6 @@ class ActionComm extends CommonObject $error++; $this->errors[]=$this->db->lasterror(); } - } } } diff --git a/htdocs/comm/action/class/api_agendaevents.class.php b/htdocs/comm/action/class/api_agendaevents.class.php index 677e477cd89..1e9dde34bde 100644 --- a/htdocs/comm/action/class/api_agendaevents.class.php +++ b/htdocs/comm/action/class/api_agendaevents.class.php @@ -309,7 +309,6 @@ class AgendaEvents extends DolibarrApi if (!isset($data[$field])) throw new RestException(400, "$field field missing"); $event[$field] = $data[$field]; - } return $event; } diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 4ffa4298d20..0bc022956b1 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -666,7 +666,6 @@ if ($resql) //print ' startincalendar='.dol_print_date($event->date_start_in_calendar).'-endincalendar='.dol_print_date($event->date_end_in_calendar).') was added in '.$j.' different index key of array
'; } $i++; - } } else diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 5628e65c6d9..02d3a16c7f3 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -643,7 +643,6 @@ if ($resql) print " "; } print ''; - } // Extra fields @@ -668,7 +667,6 @@ if ($resql) print ''; $db->free($resql); - } else { diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php index 31f22420cb8..0347f73a453 100644 --- a/htdocs/comm/action/pertype.php +++ b/htdocs/comm/action/pertype.php @@ -543,7 +543,6 @@ if ($resql) //print ' startincalendar='.dol_print_date($event->date_start_in_calendar).'-endincalendar='.dol_print_date($event->date_end_in_calendar).') was added in '.$j.' different index key of array
'; } $i++; - } } else diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 7b02857becf..b145dfa54ed 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -571,7 +571,6 @@ if ($resql) //print ' startincalendar='.dol_print_date($event->date_start_in_calendar).'-endincalendar='.dol_print_date($event->date_end_in_calendar).') was added in '.$j.' different index key of array
'; } $i++; - } $db->free($resql); } @@ -798,7 +797,6 @@ while($currentdaytoshow<$lastdaytoshow) { echo "
"; $currentdaytoshow = dol_time_plus_duree($currentdaytoshow, 7, 'd'); - } echo ''; diff --git a/htdocs/comm/address.php b/htdocs/comm/address.php index 9c8b275d198..4b32eea153a 100644 --- a/htdocs/comm/address.php +++ b/htdocs/comm/address.php @@ -151,7 +151,6 @@ if ($action == 'add' || $action == 'update') $action= "edit"; } } - } else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->supprimer) @@ -291,7 +290,6 @@ if ($action == 'create') print ''."\n"; print ''."\n"; - } } elseif ($action == 'edit') @@ -486,7 +484,6 @@ else } print ''; } - } diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 596c3cb3c5b..d11a81f5bdb 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -1301,7 +1301,6 @@ if ($object->id > 0) if ($object->client != 0 && $object->client != 2) print ''; else print ''; - } } } @@ -1344,7 +1343,6 @@ if ($object->id > 0) // List of done actions show_actions_done($conf,$langs,$db,$object); } - } else { diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 92757dcac36..cb384408e91 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -521,7 +521,6 @@ if (! empty($conf->societe->enabled) && $user->rights->societe->lire) print ''.dol_print_date($db->jdate($objp->tms),'day').""; print ''; $i++; - } $db->free($resql); @@ -580,7 +579,6 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->societe->lire) $i++; } - } else { diff --git a/htdocs/comm/mailing/advtargetemailing.php b/htdocs/comm/mailing/advtargetemailing.php index 72058578db7..8aa14a45b85 100644 --- a/htdocs/comm/mailing/advtargetemailing.php +++ b/htdocs/comm/mailing/advtargetemailing.php @@ -467,7 +467,6 @@ if ($object->fetch($id) >= 0) { if ($object->statut == 0 && $user->rights->mailing->creer) { include DOL_DOCUMENT_ROOT . '/core/tpl/advtarget.tpl.php'; - } } diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index a2e63da99cc..28e49e9d171 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -1165,7 +1165,6 @@ else print ''; dol_fiche_end(); - } else { diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index f07f308e74a..761a2bcc41d 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -643,7 +643,6 @@ if ($object->fetch($id) >= 0) } print "\n\n"; - } // End of page diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index c862b8392fd..baf48447bad 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -240,7 +240,6 @@ class AdvanceTargetingMailing extends CommonObject $this->datec = $this->db->jdate($obj->datec); $this->fk_user_mod = $obj->fk_user_mod; $this->tms = $this->db->jdate($obj->tms); - } $this->db->free($resql); @@ -304,7 +303,6 @@ class AdvanceTargetingMailing extends CommonObject $this->datec = $this->db->jdate($obj->datec); $this->fk_user_mod = $obj->fk_user_mod; $this->tms = $this->db->jdate($obj->tms); - } $this->db->free($resql); @@ -372,7 +370,6 @@ class AdvanceTargetingMailing extends CommonObject $this->datec = $this->db->jdate($obj->datec); $this->fk_user_mod = $obj->fk_user_mod; $this->tms = $this->db->jdate($obj->tms); - } $this->db->free($resql); @@ -664,14 +661,10 @@ class AdvanceTargetingMailing extends CommonObject $sqlwhere[]= " (te.".$key." LIKE '".$arrayquery['options_'.$key]."')"; } } - } - - } if (count($sqlwhere)>0) $sql.= " WHERE ".implode(" AND ",$sqlwhere); - } @@ -803,7 +796,6 @@ class AdvanceTargetingMailing extends CommonObject $sqlwhere[]= " (te.".$key." LIKE '".$arrayquery['options_'.$key.'_cnct']."')"; } } - } if (! empty($withThirdpartyFilter)) { @@ -969,7 +961,6 @@ class AdvanceTargetingMailing extends CommonObject if (count($return_sql_not_like)>0) { $return_sql_criteria .= ' AND (' . implode (' AND ', $return_sql_not_like).')'; } - }else { $return_sql_criteria .= $column_to_test . ' LIKE \''.$this->db->escape($criteria).'\''; } diff --git a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php index 3fdcd6178b0..19b1ce3e9b4 100644 --- a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php +++ b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php @@ -178,7 +178,6 @@ class FormAdvTargetEmailing extends Form $label = $obj_usr->firstname . " " . $obj_usr->name . " (" . $obj_usr->login . ')'; $options_array [$obj_usr->rowid] = $label; - } $this->db->free ( $resql_usr ); } else { @@ -323,7 +322,6 @@ class FormAdvTargetEmailing extends Form $i++; } } - } else { @@ -411,7 +409,6 @@ class FormAdvTargetEmailing extends Form $i++; } } - } else { diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php index bb6ac93d1c2..bc6f3beabd2 100644 --- a/htdocs/comm/mailing/class/mailing.class.php +++ b/htdocs/comm/mailing/class/mailing.class.php @@ -362,7 +362,6 @@ class Mailing extends CommonObject 'source_id'=>$obj->source_id, 'source_type'=>$obj->source_type); } - } } else @@ -373,7 +372,6 @@ class Mailing extends CommonObject $mailing_target->add_to_target($object->id, $target_array); } - } unset($object->context['createfromclone']); diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php index 9cd1e8546d0..f1745b406fd 100644 --- a/htdocs/comm/mailing/index.php +++ b/htdocs/comm/mailing/index.php @@ -182,7 +182,6 @@ if ($result) print ''; $i++; } - } else { diff --git a/htdocs/comm/multiprix.php b/htdocs/comm/multiprix.php index 55f49c44cfd..7bbf727a517 100644 --- a/htdocs/comm/multiprix.php +++ b/htdocs/comm/multiprix.php @@ -174,7 +174,6 @@ if ($_socid > 0) { dol_print_error($db); } - } // End of page diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 1e6df0b014f..f07a5cdfac8 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1364,7 +1364,6 @@ if (empty($reshook)) $upload_dir = $conf->propal->multidir_output[$object->entity]; $permissioncreate=$usercancreate; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; - } @@ -1777,7 +1776,6 @@ if ($action == 'create') print ''; } - } elseif ($object->id > 0) { /* * Show object in view mode @@ -1825,7 +1823,6 @@ if ($action == 'create') } $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('SetAcceptedRefused'), $text, 'setstatut', $formquestion, '', 1, 250); - } // Confirm delete diff --git a/htdocs/comm/propal/class/api_proposals.class.php b/htdocs/comm/propal/class/api_proposals.class.php index fc721912462..a03624f3122 100644 --- a/htdocs/comm/propal/class/api_proposals.class.php +++ b/htdocs/comm/propal/class/api_proposals.class.php @@ -700,7 +700,6 @@ class Proposals extends DolibarrApi if (!isset($data[$field])) throw new RestException(400, "$field field missing"); $propal[$field] = $data[$field]; - } return $propal; } diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 16a19d1b41f..e11f62bb446 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -3127,11 +3127,8 @@ class Propal extends CommonObject $cluser->fetch($obj->fk_user_cloture); $this->user_cloture = $cluser; } - - } $this->db->free($result); - } else { diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index bc45d022e4d..b0cc04702db 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -227,7 +227,6 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x', $toselect=''; $search_array_options=array(); $search_categ_cus=0; - } if ($object_statut != '') $viewstatut=$object_statut; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 75b949ff203..f468bd4b146 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -423,7 +423,6 @@ if (empty($reshook)) // modified by hook if ($reshook < 0) $error++; - } else { setEventMessages($object->error, $object->errors, 'errors'); $error++; diff --git a/htdocs/commande/class/api_orders.class.php b/htdocs/commande/class/api_orders.class.php index 60011592afe..1135a5c2502 100644 --- a/htdocs/commande/class/api_orders.class.php +++ b/htdocs/commande/class/api_orders.class.php @@ -297,7 +297,6 @@ class Orders extends DolibarrApi if ($updateRes > 0) { return $updateRes; - } else { throw new RestException(400, $this->commande->error); } @@ -793,7 +792,6 @@ class Orders extends DolibarrApi if (!isset($data[$field])) throw new RestException(400, $field ." field missing"); $commande[$field] = $data[$field]; - } return $commande; } diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 1925b71992e..2428e6052eb 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3616,7 +3616,6 @@ class Commande extends CommonOrder } $this->db->free($result); - } else { diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 0e851c78cff..2a9e215faa4 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -214,7 +214,6 @@ if (empty($reshook)) $uploaddir = $conf->commande->dir_output; $trigger_name='ORDER_SENTBYMAIL'; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; - } diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index 3335cf93276..a8da25e07f9 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -118,7 +118,6 @@ if (($action == 'create' || $action == 'add') && !$error) $originid=$orders_id[0]; $_GET['originid']=$orders_id[0]; - } if (isset($_POST['orders_to_invoice'])) { @@ -128,7 +127,6 @@ if (($action == 'create' || $action == 'add') && !$error) $originid=$orders_id[0]; $_POST['originid']=$orders_id[0]; - } $projectid = GETPOST('projectid','int')?GETPOST('projectid','int'):0; @@ -531,8 +529,6 @@ if ($action == 'create' && !$error) print ''; print "\n"; - - } // Mode liste @@ -737,7 +733,6 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error) { dol_print_error($db); } - } // End of page diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index 5e1a10390e2..47f31eac308 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -339,7 +339,6 @@ else $i++; } $db->free($resql); - } else { diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 2325d30a26a..6d2fa406ea7 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -576,7 +576,6 @@ else if ($action == 'delete') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans("DeleteAccount"),$langs->trans("ConfirmDeleteAccount"),"confirm_delete"); - } // Print form confirm @@ -766,7 +765,6 @@ else } print ''; - } /* ************************************************************************** */ @@ -1033,7 +1031,6 @@ else print ''; } - } // End of page diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index c997ff1a4f7..47edacb2410 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -452,7 +452,6 @@ class PaymentVarious extends CommonObject $result=$this->call_trigger('PAYMENT_VARIOUS_CREATE',$user); if ($result < 0) $error++; // End call triggers - } else $error++; diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php index 85cd839fd44..1587c5c10e8 100644 --- a/htdocs/compta/bank/ligne.php +++ b/htdocs/compta/bank/ligne.php @@ -451,7 +451,6 @@ if ($result) $receipt=new RemiseCheque($db); $receipt->fetch($objp->receiptid); print '     '.$langs->trans("CheckReceipt").': '.$receipt->getNomUrl(2); - } print ''; } @@ -682,7 +681,6 @@ if ($result) print ''; } - } $db->free($result); diff --git a/htdocs/compta/compta-files.php b/htdocs/compta/compta-files.php index 9e00bf10ae0..d8f4885a3b2 100644 --- a/htdocs/compta/compta-files.php +++ b/htdocs/compta/compta-files.php @@ -184,7 +184,6 @@ if(($action=="searchfiles"||$action=="dl" ) && $date_start && $date_stop){ } } $db->free($resd); - } /* * cleanup of old ZIP @@ -293,7 +292,6 @@ if ($result) print ''; print "\n"; } - } print ""; print '
'."\n\t\t\t"; diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php index 861ee6e897f..383ff1c571a 100644 --- a/htdocs/compta/deplacement/card.php +++ b/htdocs/compta/deplacement/card.php @@ -421,7 +421,6 @@ else if ($id) if ($action == 'delete') { print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteTrip"),$langs->trans("ConfirmDeleteTrip"),"confirm_delete"); - } $soc = new Societe($db); diff --git a/htdocs/compta/deplacement/document.php b/htdocs/compta/deplacement/document.php index e34a2aedb21..7ec837c81f2 100644 --- a/htdocs/compta/deplacement/document.php +++ b/htdocs/compta/deplacement/document.php @@ -122,7 +122,6 @@ if ($object->id) $permission = $user->rights->deplacement->creer; $param = '&id=' . $object->id; include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php'; - } else { diff --git a/htdocs/compta/deplacement/index.php b/htdocs/compta/deplacement/index.php index 98c939965a3..84c0c718c70 100644 --- a/htdocs/compta/deplacement/index.php +++ b/htdocs/compta/deplacement/index.php @@ -191,7 +191,6 @@ if ($result) $i++; } - } else { diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index a9fe72da41f..050f8786c3a 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -744,7 +744,6 @@ if (empty($reshook)) { $error++; } - } if ($object->type == Facture::TYPE_CREDIT_NOTE || $object->type == Facture::TYPE_DEPOSIT) { @@ -765,7 +764,6 @@ if (empty($reshook)) break; } } - } if (empty($error)) @@ -1000,15 +998,11 @@ if (empty($reshook)) $line->multicurrency_total_ht = $line->multicurrency_total_ht - $prevLine->multicurrency_total_ht; $line->multicurrency_total_tva = $line->multicurrency_total_tva - $prevLine->multicurrency_total_tva; $line->multicurrency_total_ttc = $line->multicurrency_total_ttc - $prevLine->multicurrency_total_ttc; - - } } // prorata $line->situation_percent = $maxPrevSituationPercent - $line->situation_percent; - - } } @@ -1040,7 +1034,6 @@ if (empty($reshook)) $object->update_price(1); } - } if(GETPOST('invoiceAvoirWithPaymentRestAmount', 'int')==1 && $id>0) @@ -1342,7 +1335,6 @@ if (empty($reshook)) $subprice_diff = $object->lines[0]->subprice - $diff / (1 + $object->lines[0]->tva_tx / 100); $object->updateline($object->lines[0]->id, $object->lines[0]->desc, $subprice_diff, $object->lines[0]->qty, $object->lines[0]->remise_percent, $object->lines[0]->date_start, $object->lines[0]->date_end, $object->lines[0]->tva_tx, 0, 0, 'HT', $object->lines[0]->info_bits, $object->lines[0]->product_type, 0, 0, 0, $object->lines[0]->pa_ht, $object->lines[0]->label, 0, array(), 100); } - } else { @@ -1489,7 +1481,6 @@ if (empty($reshook)) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); $error++; } - } else { setEventMessages($object->error, $object->errors, 'errors'); $error++; @@ -2363,7 +2354,6 @@ if (empty($reshook)) $line->situation_percent = $line->situation_percent - $maxPrevSituationPercent; if($line->update()<0) $errors++; - } } } @@ -2693,7 +2683,6 @@ if ($action == 'create') print ajax_combobox('fac_replacement'); print ajax_combobox('fac_avoir'); print ajax_combobox('situations'); - } if ($origin == 'contrat') @@ -3660,7 +3649,6 @@ else if ($id > 0 || ! empty($ref)) { $payment_id = GETPOST('paiement_id'); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&paiement_id='.$payment_id, $langs->trans('DeletePayment'), $langs->trans('ConfirmDeletePayment'), 'confirm_delete_paiement', '', 'no', 1); - } // Confirmation de la suppression d'une ligne produit @@ -4236,7 +4224,6 @@ else if ($id > 0 || ! empty($ref)) print '' . price($next_invoice->total_ttc) . ''; print '' . $next_invoice->getLibStatut(3, $totalpaye) . ''; print ''; - } $total_global_ht += $total_next_ht; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 20983ebd3c9..3d98271bb26 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -2465,7 +2465,6 @@ class Facture extends CommonInvoice else $this->situation_final = 1; $this->setFinal($user); - } } } @@ -4713,7 +4712,6 @@ class FactureLigne extends CommonInvoiceLine $this->db->commit(); return $this->id; - } else { diff --git a/htdocs/compta/facture/class/paymentterm.class.php b/htdocs/compta/facture/class/paymentterm.class.php index 31e362445f0..a3168db40d2 100644 --- a/htdocs/compta/facture/class/paymentterm.class.php +++ b/htdocs/compta/facture/class/paymentterm.class.php @@ -211,8 +211,6 @@ class PaymentTerm // extends CommonObject $this->type_cdr = $obj->type_cdr; $this->nbjour = $obj->nbjour; $this->decalage = $obj->decalage; - - } $this->db->free($resql); diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php index ab96700fc53..948056fe404 100644 --- a/htdocs/compta/facture/contact.php +++ b/htdocs/compta/facture/contact.php @@ -206,7 +206,6 @@ if ($id > 0 || ! empty($ref)) $res=@include dol_buildpath($reldir.'/contacts.tpl.php'); if ($res) break; } - } else { diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index a8eadd76a93..d9ce0137f04 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -263,7 +263,6 @@ if (empty($reshook)) if ($action == 'setconditions' && $user->rights->facture->creer) { $result=$object->setPaymentTerms(GETPOST('cond_reglement_id', 'int')); - } // Set mode elseif ($action == 'setmode' && $user->rights->facture->creer) @@ -629,12 +628,10 @@ if (empty($reshook)) $tmptxt .= $langs->transnoentitiesnoconv("CountryOrigin") . ': ' . getCountry($prod->country_code, 0, $db, $langs, 0); $tmptxt .= ')'; $desc = dol_concatdesc($desc, $tmptxt); - } $type = $prod->type; $fk_unit = $prod->fk_unit; - } else { @@ -1730,7 +1727,6 @@ else print ''; - } } diff --git a/htdocs/compta/facture/invoicetemplate_list.php b/htdocs/compta/facture/invoicetemplate_list.php index cf41f864f05..c61836e1b1b 100644 --- a/htdocs/compta/facture/invoicetemplate_list.php +++ b/htdocs/compta/facture/invoicetemplate_list.php @@ -190,7 +190,6 @@ if (empty($reshook)) $permtodelete = $user->rights->mymodule->delete; $uploaddir = $conf->mymodule->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';*/ - } diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 35338722353..553c6c9028a 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -230,7 +230,6 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter','a $toselect=''; $search_array_options=array(); $search_categ_cus=0; - } if (empty($reshook)) @@ -310,7 +309,6 @@ if ($massaction == 'withdrawrequest') else { $listofbills[] = $objecttmp; // $listofbills will only contains invoices with good payment method and no request already done } - } } @@ -340,7 +338,6 @@ if ($massaction == 'withdrawrequest') } } } - } @@ -1229,7 +1226,6 @@ if ($resql) else print ''; } print ''; - } } diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index eec0c640b67..692849d2fa6 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -204,7 +204,6 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) print ''; $tot_ttc+=$obj->total_ttc; $i++; - } print ''.$langs->trans("Total").''; @@ -596,7 +595,6 @@ if (! empty($conf->don->enabled) && $user->rights->societe->lire) $i++; } - } else { @@ -789,7 +787,6 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us //print "x".$tot_ttc."z".$obj->tot_fttc; $tot_tobill += ($obj->total_ttc-$obj->tot_fttc); $i++; - } print ''.$langs->trans("Total").'   ('.$langs->trans("RemainderToBill").': '.price($tot_tobill).') '; diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php index 8f986697a01..ff89a95414e 100644 --- a/htdocs/compta/localtax/clients.php +++ b/htdocs/compta/localtax/clients.php @@ -299,7 +299,6 @@ if($calc ==0 || $calc == 1){ print ''; print ''; - } else { @@ -322,7 +321,6 @@ if($calc ==0){ print ''.$langs->trans("TotalToPay").($q?', '.$langs->trans("Quadri").' '.$q:'').''; print ''.price(price2num($diff,'MT'))."\n"; print "\n"; - } print ''; diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php index 31c557373d0..1475cfd6e45 100644 --- a/htdocs/compta/paiement/card.php +++ b/htdocs/compta/paiement/card.php @@ -197,7 +197,6 @@ dol_fiche_head($head, 'payment', $langs->trans("PaymentCustomerInvoice"), -1, 'p if ($action == 'delete') { print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); - } /* @@ -207,7 +206,6 @@ if ($action == 'valide') { $facid = $_GET['facid']; print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); - } $linkback = '' . $langs->trans("BackToList") . ''; diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index 1f7b344f62d..9f42ef9b16c 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -340,7 +340,6 @@ else if ($action == 'delete') { print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("DeleteCheckReceipt"), $langs->trans("ConfirmDeleteCheckReceipt"), 'confirm_delete','','',1); - } /* @@ -349,7 +348,6 @@ else if ($action == 'valide') { print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("ValidateCheckReceipt"), $langs->trans("ConfirmValidateCheckReceipt"), 'confirm_valide','','',1); - } /* @@ -553,7 +551,6 @@ if ($action == 'new') print '
'; print '
'; } - } else { @@ -787,7 +784,6 @@ if ($user->societe_id == 0 && ! empty($object->id) && $object->statut == 0 && $u if ($user->societe_id == 0 && ! empty($object->id) && $user->rights->banque->cheque) { print ''.$langs->trans('Delete').''; - } print ''; diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index 64d0f8601fa..d190beffae2 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -121,7 +121,6 @@ class RemiseCheque extends CommonObject { $this->ref = $obj->ref; } - } $this->db->free($resql); diff --git a/htdocs/compta/paiement/class/cpaiement.class.php b/htdocs/compta/paiement/class/cpaiement.class.php index 1f0175bd370..26d4ea0510e 100644 --- a/htdocs/compta/paiement/class/cpaiement.class.php +++ b/htdocs/compta/paiement/class/cpaiement.class.php @@ -200,8 +200,6 @@ class Cpaiement $this->active = $obj->active; $this->accountancy_code = $obj->accountancy_code; $this->module = $obj->module; - - } $this->db->free($resql); diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php index 9b605e68929..38cee6b8434 100644 --- a/htdocs/compta/paiement_charge.php +++ b/htdocs/compta/paiement_charge.php @@ -147,7 +147,6 @@ if ($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm=='yes } } } - } diff --git a/htdocs/compta/payment_sc/card.php b/htdocs/compta/payment_sc/card.php index b4a21e198de..12cd2a0aa0e 100644 --- a/htdocs/compta/payment_sc/card.php +++ b/htdocs/compta/payment_sc/card.php @@ -146,7 +146,6 @@ dol_fiche_head($head, $hselected, $langs->trans("PaymentSocialContribution"), -1 if ($action == 'delete') { print $form->formconfirm('card.php?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); - } /* diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 7b93966aa8b..9d2b828b3eb 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -247,7 +247,6 @@ class BonPrelevement extends CommonObject dol_syslog(get_class($this)."::addline Error -2"); $result = -2; } - } return $result; @@ -515,7 +514,6 @@ class BonPrelevement extends CommonObject dol_syslog(get_class($this)."::set_infocredit Update lines Error"); $error++; } - } else { @@ -1058,10 +1056,8 @@ class BonPrelevement extends CommonObject $error++; dol_syslog(__METHOD__."::Update Orders::Error=".$this->db->error(), LOG_ERR); } - } } - } if (!$error) diff --git a/htdocs/compta/prelevement/class/rejetprelevement.class.php b/htdocs/compta/prelevement/class/rejetprelevement.class.php index 6e3cfe499a8..ebe76a6aab3 100644 --- a/htdocs/compta/prelevement/class/rejetprelevement.class.php +++ b/htdocs/compta/prelevement/class/rejetprelevement.class.php @@ -175,7 +175,6 @@ class RejetPrelevement $error++; dol_syslog("RejetPrelevement::Create Error payment validation"); } - } //Tag invoice as unpaid dol_syslog("RejetPrelevement::Create set_unpaid fac ".$fac->ref); diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index 3dccc0ff912..dff5ab39f3d 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -161,7 +161,6 @@ if ($nb) { } else { print '' . $langs->trans("CreateAll") . "\n"; } - } else { diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php index df71dcb3f31..a53db70544b 100644 --- a/htdocs/compta/prelevement/factures.php +++ b/htdocs/compta/prelevement/factures.php @@ -134,7 +134,6 @@ if ($prev_id > 0 || $ref) print ''; dol_fiche_end(); - } else { diff --git a/htdocs/compta/prelevement/fiche-rejet.php b/htdocs/compta/prelevement/fiche-rejet.php index 3819c145851..7cb862389d7 100644 --- a/htdocs/compta/prelevement/fiche-rejet.php +++ b/htdocs/compta/prelevement/fiche-rejet.php @@ -135,7 +135,6 @@ if ($prev_id > 0 || $ref) print ''; dol_fiche_end(); - } else { diff --git a/htdocs/compta/prelevement/fiche-stat.php b/htdocs/compta/prelevement/fiche-stat.php index a3a1d06e322..731bc1dc81d 100644 --- a/htdocs/compta/prelevement/fiche-stat.php +++ b/htdocs/compta/prelevement/fiche-stat.php @@ -132,7 +132,6 @@ if ($prev_id > 0 || $ref) print ''; dol_fiche_end(); - } else { diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php index 8dd1c87069a..30cc21ae977 100644 --- a/htdocs/compta/prelevement/ligne.php +++ b/htdocs/compta/prelevement/ligne.php @@ -89,7 +89,6 @@ if ($action == 'confirm_rejet') header("Location: ligne.php?id=".$id); exit; } - } else { diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index 5fc58955b60..1e2719eac81 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -688,7 +688,6 @@ if (! empty($conf->expensereport->enabled) && ($modecompta == 'CREANCES-DETTES' $column='p.date_valid'; if (! empty($date_start) && ! empty($date_end)) $sql.= " AND ".$column." >= '".$db->idate($date_start)."' AND ".$column." <= '".$db->idate($date_end)."'"; - } elseif ($modecompta == 'RECETTES-DEPENSES') { $sql = "SELECT date_format(pe.datep,'%Y-%m') as dm, sum(p.total_ht) as amount_ht,sum(p.total_ttc) as amount_ttc"; $sql.= " FROM ".MAIN_DB_PREFIX."expensereport as p"; @@ -721,7 +720,6 @@ if (! empty($conf->expensereport->enabled) && ($modecompta == 'CREANCES-DETTES' if (! isset($decaiss_ttc[$obj->dm])) $decaiss_ttc[$obj->dm]=0; $decaiss_ttc[$obj->dm] += $obj->amount_ttc; - } } } @@ -729,7 +727,6 @@ if (! empty($conf->expensereport->enabled) && ($modecompta == 'CREANCES-DETTES' { dol_print_error($db); } - } elseif ($modecompta == 'BOOKKEEPING') { // Nothing from this table diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php index 4da78cb492d..0be0f4f3694 100644 --- a/htdocs/compta/salaries/class/paymentsalary.class.php +++ b/htdocs/compta/salaries/class/paymentsalary.class.php @@ -487,7 +487,6 @@ class PaymentSalary extends CommonObject $result=$this->call_trigger('PAYMENT_SALARY_CREATE',$user); if ($result < 0) $error++; // End call triggers - } else $error++; diff --git a/htdocs/compta/salaries/document.php b/htdocs/compta/salaries/document.php index 59ca8389193..1059c765df3 100644 --- a/htdocs/compta/salaries/document.php +++ b/htdocs/compta/salaries/document.php @@ -127,7 +127,6 @@ if ($object->id) $permission = $user->rights->salaries->write; $param = '&id=' . $object->id; include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php'; - } else { diff --git a/htdocs/compta/sociales/class/cchargesociales.class.php b/htdocs/compta/sociales/class/cchargesociales.class.php index a8f5c430691..710bea7def2 100644 --- a/htdocs/compta/sociales/class/cchargesociales.class.php +++ b/htdocs/compta/sociales/class/cchargesociales.class.php @@ -201,8 +201,6 @@ class Cchargesociales $this->fk_pays = $obj->fk_pays; $this->module = $obj->module; $this->accountancy_code = $obj->accountancy_code; - - } $this->db->free($resql); diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index e44d02f83e2..cca5a4d7dd2 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -368,7 +368,6 @@ class ChargeSociales extends CommonObject { return 0; } - } else { @@ -627,7 +626,6 @@ class ChargeSociales extends CommonObject } $this->db->free($result); - } else { diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php index b6ff4a49337..d3c265150d4 100644 --- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php +++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php @@ -195,7 +195,6 @@ class PaymentSocialContribution extends CommonObject { $error++; } - } $result = $this->call_trigger('PAYMENTSOCIALCONTRIBUTION_CREATE',$user); diff --git a/htdocs/compta/stats/byratecountry.php b/htdocs/compta/stats/byratecountry.php index 5c9366037ed..99d6bb8b49d 100644 --- a/htdocs/compta/stats/byratecountry.php +++ b/htdocs/compta/stats/byratecountry.php @@ -322,7 +322,6 @@ if ($resql) { } print '' . price($totalpermonth['total']) . ''; print ''; - } else { print $db->lasterror(); // Show last sql error } @@ -406,7 +405,6 @@ if ($resql2) { print $db->lasterror(); // Show last sql error } print "\n"; - } else { // $modecompta != 'CREANCES-DETTES' // "Calculation of part of each product for accountancy in this mode is not possible. When a partial payment (for example 5 euros) is done on an diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index 309737111f5..fb53989fe74 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -313,7 +313,6 @@ if ($result) { $catotal_ht+=$obj->amount; $catotal+=$obj->amount_ttc; $i++; - } } else { dol_print_error($db); diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index c78e0d8dd7a..33d48de8bfc 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -800,7 +800,6 @@ class Tva extends CommonObject } $this->db->free($result); - } else { diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index babc7e1453a..a43127c9a32 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -1113,7 +1113,6 @@ else else $text.=$langs->trans("UserWillBeInternalUser"); } print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("CreateDolibarrLogin"),$text,"confirm_create_user",$formquestion,'yes'); - } $linkback = ''.$langs->trans("BackToList").''; @@ -1282,7 +1281,6 @@ else } print ""; - } } diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index b5d17676d8d..b1d83abac77 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -1246,7 +1246,6 @@ class Contact extends CommonObject { if ($statut==0 || $statut==5) return img_picto($langs->trans('Disabled'),'statut5', 'class="pictostatus"').' '.$langs->trans('Disabled'); elseif ($statut==1 || $statut==4) return img_picto($langs->trans('Enabled'),'statut4', 'class="pictostatus"').' '.$langs->trans('Enabled'); - } elseif ($mode == 3) { diff --git a/htdocs/contrat/class/api_contracts.class.php b/htdocs/contrat/class/api_contracts.class.php index 04252433824..35ec5842e4b 100644 --- a/htdocs/contrat/class/api_contracts.class.php +++ b/htdocs/contrat/class/api_contracts.class.php @@ -287,7 +287,6 @@ class Contracts extends DolibarrApi if ($updateRes > 0) { return $updateRes; - } return false; } @@ -673,7 +672,6 @@ class Contracts extends DolibarrApi if (!isset($data[$field])) throw new RestException(400, "$field field missing"); $contrat[$field] = $data[$field]; - } return $contrat; } diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 7e0c2d13ca5..8d2194bb60a 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -2006,7 +2006,6 @@ class Contrat extends CommonObject } $this->db->free($result); - } else { @@ -2476,7 +2475,6 @@ class Contrat extends CommonObject if ($reshook < 0) $error ++; } - } unset($this->context['createfromclone']); @@ -2860,7 +2858,6 @@ class ContratLigne extends CommonObjectLine $marginInfos = getMarginInfos($obj->subprice, $obj->remise_percent, $obj->tva_tx, $obj->localtax1_tx, $obj->localtax2_tx, $this->fk_fournprice, $obj->pa_ht); $this->pa_ht = $marginInfos[0]; $this->fk_unit = $obj->fk_unit; - } $this->db->free($resql); diff --git a/htdocs/contrat/contact.php b/htdocs/contrat/contact.php index f34eb1b5bdb..b659aa01aab 100644 --- a/htdocs/contrat/contact.php +++ b/htdocs/contrat/contact.php @@ -240,7 +240,6 @@ if ($id > 0 || ! empty($ref)) // Contacts lines include DOL_DOCUMENT_ROOT.'/core/tpl/contacts.tpl.php'; - } else { print "ErrorRecordNotFound"; } diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php index 4b7a9b4faf5..cd98f787ff6 100644 --- a/htdocs/contrat/document.php +++ b/htdocs/contrat/document.php @@ -192,7 +192,6 @@ if ($object->id) $permtoedit = $user->rights->contrat->creer; $param = '&id=' . $object->id; include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php'; - } else { diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index f348cab8234..c0404b5cf3f 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -279,7 +279,6 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire) print ''; //$tot_ttc+=$obj->total_ttc; $i++; - } } else @@ -365,7 +364,6 @@ if ($result) $db->free($result); print ""; - } else { @@ -444,7 +442,6 @@ if ($resql) $db->free(); print ""; - } else { @@ -523,7 +520,6 @@ if ($resql) $db->free(); print ""; - } else { @@ -603,7 +599,6 @@ if ($resql) $db->free(); print ""; - } else { diff --git a/htdocs/contrat/note.php b/htdocs/contrat/note.php index a5ea40e146c..ec93d112ef4 100644 --- a/htdocs/contrat/note.php +++ b/htdocs/contrat/note.php @@ -177,7 +177,6 @@ if ($id > 0 || ! empty($ref)) include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; dol_fiche_end(); - } diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index 153c5ca9364..0715a78495e 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -496,5 +496,4 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO dol_syslog('Failed to read data of object id='.$object->id.' element='.$object->element); $action = 'presend'; } - } diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php index a1fafa80559..749f81f1197 100644 --- a/htdocs/core/ajax/ajaxdirtree.php +++ b/htdocs/core/ajax/ajaxdirtree.php @@ -487,7 +487,6 @@ function treeOutputForAbsoluteDir($sqltree, $selecteddir, $fullpathselecteddir, } echo "\n"; - } } else print "PermissionDenied"; diff --git a/htdocs/core/ajax/check_notifications.php b/htdocs/core/ajax/check_notifications.php index 642dc1038d9..a5c73655bab 100644 --- a/htdocs/core/ajax/check_notifications.php +++ b/htdocs/core/ajax/check_notifications.php @@ -113,7 +113,6 @@ if ($time >= $_SESSION['auto_check_events_not_before']) { dol_syslog("Error sql = ".$db->lasterror(), LOG_ERR); } - } print json_encode($eventfound); diff --git a/htdocs/core/ajax/price.php b/htdocs/core/ajax/price.php index 453fdc7bc82..86073a5a409 100644 --- a/htdocs/core/ajax/price.php +++ b/htdocs/core/ajax/price.php @@ -52,7 +52,6 @@ if (! empty($output) && isset($amount) && isset($tva_tx)) $price = price2num($amount * (1 + ($tva_tx/100)), 'MU'); $return['price_ht'] = $amount; $return['price_ttc'] = (isset($price) && $price != '' ? price($price) : ''); - } else if ($output == 'price_ht') { diff --git a/htdocs/core/boxes/box_actions.php b/htdocs/core/boxes/box_actions.php index 9bcfb002bb6..05bbdba3831 100644 --- a/htdocs/core/boxes/box_actions.php +++ b/htdocs/core/boxes/box_actions.php @@ -232,7 +232,6 @@ class box_actions extends ModeleBoxes } } $out.= ''; - } $out.= ''; if ($actioncejour) diff --git a/htdocs/core/boxes/box_factures.php b/htdocs/core/boxes/box_factures.php index e281fbe5c60..36c472cfc22 100644 --- a/htdocs/core/boxes/box_factures.php +++ b/htdocs/core/boxes/box_factures.php @@ -193,7 +193,6 @@ class box_factures extends ModeleBoxes 'text' => ($db->error().' sql='.$sql), ); } - } else { $this->info_box_contents[0][0] = array( 'td' => 'align="left" class="nohover opacitymedium"', diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php index c22163779a8..fd0b4e593c0 100644 --- a/htdocs/core/boxes/box_graph_invoices_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_permonth.php @@ -258,7 +258,6 @@ class box_graph_invoices_permonth extends ModeleBoxes { $this->info_box_contents[0][0] = array('tr'=>'class="oddeven nohover"', 'td' => 'align="left" class="nohover"', 'maxlength'=>500, 'text' => $mesg); } - } else { $this->info_box_contents[0][0] = array( diff --git a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php index a7f504b2d01..f13b19259c9 100644 --- a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php @@ -257,7 +257,6 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes 'maxlength'=>500, 'text' => $mesg); } - } else { $this->info_box_contents[0][0] = array( diff --git a/htdocs/core/boxes/box_graph_orders_permonth.php b/htdocs/core/boxes/box_graph_orders_permonth.php index 329fef77fba..fefa90c5fea 100644 --- a/htdocs/core/boxes/box_graph_orders_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_permonth.php @@ -256,7 +256,6 @@ class box_graph_orders_permonth extends ModeleBoxes 'maxlength'=>500, 'text' => $mesg); } - } else { $this->info_box_contents[0][0] = array( diff --git a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php index de962149cdf..e388d226fd2 100644 --- a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php @@ -255,7 +255,6 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes 'maxlength'=>500, 'text' => $mesg); } - } else { $this->info_box_contents[0][0] = array( diff --git a/htdocs/core/boxes/box_graph_propales_permonth.php b/htdocs/core/boxes/box_graph_propales_permonth.php index c19235c2fb2..f28b0ec2c99 100644 --- a/htdocs/core/boxes/box_graph_propales_permonth.php +++ b/htdocs/core/boxes/box_graph_propales_permonth.php @@ -259,7 +259,6 @@ class box_graph_propales_permonth extends ModeleBoxes 'maxlength'=>500, 'text' => $mesg); } - } else { $this->info_box_contents[0][0] = array( diff --git a/htdocs/core/boxes/box_services_expired.php b/htdocs/core/boxes/box_services_expired.php index c23e9940377..ed62e127816 100644 --- a/htdocs/core/boxes/box_services_expired.php +++ b/htdocs/core/boxes/box_services_expired.php @@ -167,8 +167,6 @@ class box_services_expired extends ModeleBoxes 'maxlength'=>500, 'text' => ($db->error().' sql='.$sql)); } - - } else { diff --git a/htdocs/core/class/comment.class.php b/htdocs/core/class/comment.class.php index 161ce438e29..b731eb77169 100644 --- a/htdocs/core/class/comment.class.php +++ b/htdocs/core/class/comment.class.php @@ -360,7 +360,6 @@ class Comment extends CommonObject $error++; $this->errors[]="Error ".$this->db->lasterror(); return -1; } - } return count($this->comments); diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 4729e11ff85..aa318a48bcc 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -1925,7 +1925,6 @@ abstract class CommonObject dol_syslog(get_class($this).'::setMulticurrencyRate no updateline defined', LOG_DEBUG); break; } - } } @@ -2815,7 +2814,6 @@ abstract class CommonObject $this->total_ttc -= $diff; $total_tva_by_vats[$obj->vatrate] -= $diff; $total_ttc_by_vats[$obj->vatrate] -= $diff; - } } @@ -4630,7 +4628,6 @@ abstract class CommonObject dol_print_error($this->db, "Error generating document for ".__CLASS__.". Error: ".$obj->error, $obj->errors); return -1; } - } else { @@ -5777,7 +5774,6 @@ abstract class CommonObject } $data[$obj->rowid]=$labeltoshow; - } else { if (! $notrans) { $translabel = $langs->trans($obj->{$InfoFieldList[1]}); @@ -5806,7 +5802,6 @@ abstract class CommonObject $this->db->free($resql); $out=$form->multiselectarray($keyprefix.$key.$keysuffix, $data, $value_arr, '', 0, '', 0, '100%'); - } else { print 'Error in request ' . $sql . ' ' . $this->db->lasterror() . '. Check setup of extra parameters.
'; } @@ -6186,7 +6181,6 @@ abstract class CommonObject } } $value='
    '.implode(' ', $toprint).'
'; - } else { dol_syslog(get_class($this) . '::showOutputField error ' . $this->db->lasterror(), LOG_WARNING); } diff --git a/htdocs/core/class/ctyperesource.class.php b/htdocs/core/class/ctyperesource.class.php index 297e48a940b..f4e74128747 100644 --- a/htdocs/core/class/ctyperesource.class.php +++ b/htdocs/core/class/ctyperesource.class.php @@ -188,8 +188,6 @@ class Ctyperesource $this->code = $obj->code; $this->label = $obj->label; $this->active = $obj->active; - - } // Retrieve all extrafields for invoice @@ -269,8 +267,6 @@ class Ctyperesource $line->code = $obj->code; $line->label = $obj->label; $line->active = $obj->active; - - } $this->db->free($resql); diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index ad7b900b033..1cf347af6a3 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -1108,7 +1108,6 @@ class DolGraph //$this->stringtoshow.=', shadowSize: 20'."\n"; TODO Uncommet this $this->stringtoshow.='});'."\n"; $this->stringtoshow.='}'."\n"; - } $this->stringtoshow.='plotWithOptions_'.$tag.'();'."\n"; diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php index 8734c4126e7..f38afc67807 100644 --- a/htdocs/core/class/dolreceiptprinter.class.php +++ b/htdocs/core/class/dolreceiptprinter.class.php @@ -484,7 +484,6 @@ class dolReceiptPrinter extends Escpos $this->printer->cut(); //print '
'.print_r($this->connector, true).'
'; $this->printer->close(); - } catch (Exception $e) { $this->errors[] = $e->getMessage(); $error++; @@ -621,7 +620,6 @@ class dolReceiptPrinter extends Escpos // uncomment next line to see content sent to printer //print '
'.print_r($this->connector, true).'
'; $this->printer->close(); - } return $error; } diff --git a/htdocs/core/class/emailsenderprofile.class.php b/htdocs/core/class/emailsenderprofile.class.php index c5304fec31c..b30f79f0bba 100644 --- a/htdocs/core/class/emailsenderprofile.class.php +++ b/htdocs/core/class/emailsenderprofile.class.php @@ -413,7 +413,6 @@ class EmailSenderProfile extends CommonObject } $this->db->free($result); - } else { diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 3f5b515e725..9ebdbd22836 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1392,7 +1392,6 @@ class ExtraFields } $data[$obj->rowid]=$labeltoshow; - } else { if (! $notrans) { $translabel = $langs->trans($obj->{$InfoFieldList[1]}); @@ -1421,7 +1420,6 @@ class ExtraFields $this->db->free($resql); $out=$form->multiselectarray($keyprefix.$key.$keysuffix, $data, $value_arr, '', 0, '', 0, '100%'); - } else { print 'Error in request ' . $sql . ' ' . $this->db->lasterror() . '. Check setup of extra parameters.
'; } @@ -1715,7 +1713,6 @@ class ExtraFields } } $value='
    '.implode(' ', $toprint).'
'; - } else { dol_syslog(get_class($this) . '::showOutputField error ' . $this->db->lasterror(), LOG_WARNING); } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d42d1dde48f..c30dcec6e01 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4685,7 +4685,6 @@ class Form $out.= ''; } } - } $out.= ''; @@ -6958,7 +6957,6 @@ class Form $ret.=''; $ret.=''; } - } else dol_print_error('','Call of showphoto with wrong parameters modulepart='.$modulepart); diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index bfc67880a96..34f0b9ab750 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -718,7 +718,6 @@ class FormFile $reshook = $hookmanager->executeHooks('formBuilddocOptions',$parameters,$GLOBALS['object']); $out.= $hookmanager->resPrint; } - } // Get list of files @@ -848,7 +847,6 @@ class FormFile { $out.=''.$langs->trans("None").''."\n"; } - } if ($headershown) diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index f79e9eea53d..d2800ce1906 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -1212,7 +1212,6 @@ class FormOther } $boxlistb.= "\n"; - } return array('selectboxlist'=>count($boxactivated)?$selectboxlist:'', 'boxactivated'=>$boxactivated, 'boxlista'=>$boxlista, 'boxlistb'=>$boxlistb); diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index 344b8050b65..08917a8d3a3 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -519,12 +519,10 @@ class Notify if ($obj->type_target == 'touserid') { $sql = "INSERT INTO ".MAIN_DB_PREFIX."notify (daten, fk_action, fk_soc, fk_user, type, objet_type, type_target, objet_id, email)"; $sql.= " VALUES ('".$this->db->idate(dol_now())."', ".$notifcodedefid.", ".($object->socid?$object->socid:'null').", ".$obj->cid.", '".$obj->type."', '".$object_type."', '".$obj->type_target."', ".$object->id.", '".$this->db->escape($obj->email)."')"; - } else { $sql = "INSERT INTO ".MAIN_DB_PREFIX."notify (daten, fk_action, fk_soc, fk_contact, type, objet_type, type_target, objet_id, email)"; $sql.= " VALUES ('".$this->db->idate(dol_now())."', ".$notifcodedefid.", ".($object->socid?$object->socid:'null').", ".$obj->cid.", '".$obj->type."', '".$object_type."', '".$obj->type_target."', ".$object->id.", '".$this->db->escape($obj->email)."')"; - } if (! $this->db->query($sql)) { diff --git a/htdocs/core/class/rssparser.class.php b/htdocs/core/class/rssparser.class.php index bad8d7ffdca..fd37476a26e 100644 --- a/htdocs/core/class/rssparser.class.php +++ b/htdocs/core/class/rssparser.class.php @@ -545,8 +545,6 @@ class RssParser } $this->incontent = $el; - - } // if inside an Atom content construct (e.g. content or summary) field treat tags as text @@ -734,7 +732,6 @@ class RssParser elseif ($this->inchannel) { $this->concat($this->channel[ $el ], $text); } - } } } @@ -759,7 +756,6 @@ function xml2php($xml) foreach($value->attributes() as $ak=>$av) { $child[$ak] = (string) $av; - } //Let see if the new child is not in the array diff --git a/htdocs/core/class/utils.class.php b/htdocs/core/class/utils.class.php index 7904f485d6a..e3b151f9874 100644 --- a/htdocs/core/class/utils.class.php +++ b/htdocs/core/class/utils.class.php @@ -343,7 +343,6 @@ class Utils elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i',$read)) $ok=1; } pclose($handlein); - } diff --git a/htdocs/core/db/mssql.class.php b/htdocs/core/db/mssql.class.php index dd1553ec12f..a8483ec1401 100644 --- a/htdocs/core/db/mssql.class.php +++ b/htdocs/core/db/mssql.class.php @@ -374,7 +374,6 @@ class DoliDBMssql extends DoliDB $query="ALTER TABLE [".$matches[1]."] ADD CONSTRAINT [".$matches[2]."] PRIMARY KEY CLUSTERED (".$matches[3].")"; } } - } if ($type=="auto" || $type='ddl') @@ -416,7 +415,6 @@ class DoliDBMssql extends DoliDB $sql='SET IDENTITY_INSERT ['.trim($matches[1]).'] ON;'; @mssql_query($sql, $this->db); $post_query='SET IDENTITY_INSERT ['.trim($matches[1]).'] OFF;'; - } } //print ""; diff --git a/htdocs/core/db/sqlite3.class.php b/htdocs/core/db/sqlite3.class.php index 6babfd881d4..97e799a2b69 100644 --- a/htdocs/core/db/sqlite3.class.php +++ b/htdocs/core/db/sqlite3.class.php @@ -260,7 +260,6 @@ class DoliDBSqlite3 extends DoliDB // Pour l'instant les contraintes ne sont pas créées dol_syslog(get_class().'::query line emptied'); $line = 'SELECT 0;'; - } //if (preg_match('/rowid\s+.*\s+PRIMARY\s+KEY,/i', $line)) { @@ -445,7 +444,6 @@ class DoliDBSqlite3 extends DoliDB // dummy statement $query="SELECT 0"; - } else { $query=$this->convertSQLFromMysql($query,$type); } diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 4014adfc272..f92fd56a87b 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -1233,7 +1233,6 @@ function activateModulesRequiredByCountry($country_code) setEventMessages($objMod->automatic_activation[$country_code], null, 'warnings'); } - } else dol_syslog("Module ".get_class($objMod)." not qualified"); } diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 46e3922a0d0..fe9d15c8322 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -634,7 +634,6 @@ function getFormeJuridiqueLabel($code) { return $langs->trans("NotDefined"); } - } } diff --git a/htdocs/core/lib/emailing.lib.php b/htdocs/core/lib/emailing.lib.php index d9cad7f1c1e..06ceb2c96b0 100644 --- a/htdocs/core/lib/emailing.lib.php +++ b/htdocs/core/lib/emailing.lib.php @@ -46,7 +46,6 @@ function emailing_prepare_head(Mailing $object) if ($object->nbemail > 0) $head[$h][1].= ' '.$object->nbemail.''; $head[$h][2] = 'targets'; $h++; - } if (! empty($conf->global->EMAILING_USE_ADVANCED_SELECTOR)) diff --git a/htdocs/core/lib/fichinter.lib.php b/htdocs/core/lib/fichinter.lib.php index e55aaeb7516..20e257eee2f 100644 --- a/htdocs/core/lib/fichinter.lib.php +++ b/htdocs/core/lib/fichinter.lib.php @@ -76,7 +76,6 @@ function fichinter_prepare_head($object) foreach($resources as $resource_obj) { $linked_resources = $object->getElementResources('fichinter',$object->id,$resource_obj); - } } } diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 7897041ebbf..1a114c62a01 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -781,7 +781,6 @@ function dolCopyDir($srcfile, $destfile, $newmask, $overwriteifexists, $arrayrep $result=$tmpresult; } if ($result < 0) break; - } } closedir($dir_handle); diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 7888338cdc2..9efc66030d2 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1223,7 +1223,6 @@ function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $pi $outmore.=''.$links[$i][1].''."\n"; else $outmore.=''.$links[$i][1].''."\n"; - } else if (! empty($links[$i][1])) { @@ -3932,7 +3931,6 @@ function dol_print_error($db='',$error='',$errors=null) $out.='> '.$langs->transnoentities("RequestLastAccessInError").":\n".($db->lastqueryerror()?$db->lastqueryerror():$langs->transnoentities("ErrorNoRequestInError"))."\n"; $out.='> '.$langs->transnoentities("ReturnCodeLastAccessInError").":\n".($db->lasterrno()?$db->lasterrno():$langs->transnoentities("ErrorNoRequestInError"))."\n"; $out.='> '.$langs->transnoentities("InformationLastAccessInError").":\n".($db->lasterror()?$db->lasterror():$langs->transnoentities("ErrorNoRequestInError"))."\n"; - } $syslog.=", sql=".$db->lastquery(); $syslog.=", db_error=".$db->lasterror(); @@ -4994,7 +4992,6 @@ function getLocalTaxesFromRate($vatrate, $local, $buyer, $seller, $firstparamisi else { return array($obj->localtax1_type, get_localtax($vatrate, 1, $buyer, $seller), $obj->localtax2_type, get_localtax($vatrate, 2, $buyer, $seller), $obj->accountancy_code_sell,$obj->accountancy_code_buy); - } } @@ -5116,8 +5113,6 @@ function get_product_localtax_for_country($idprod, $local, $thirdparty_seller) else { // TODO Read default product vat according to countrycode and product - - } } @@ -5600,7 +5595,6 @@ function dolGetFirstLineOfText($text, $nboflines=1) { $firstline=preg_replace('/]*>.*$/s','',$text); // The s pattern modifier means the . can match newline characters $firstline=preg_replace('/]*>.*$/s','',$firstline); // The s pattern modifier means the . can match newline characters - } else { diff --git a/htdocs/core/lib/xcal.lib.php b/htdocs/core/lib/xcal.lib.php index 3f09bd3410a..10d68475c97 100644 --- a/htdocs/core/lib/xcal.lib.php +++ b/htdocs/core/lib/xcal.lib.php @@ -263,7 +263,6 @@ function build_calfile($format,$title,$desc,$events_array,$outputfile) $comment ['enddate'] = $enddate; fwrite($calfileh,"COMMENT:" . serialize ($comment) . "\n"); */ - } } diff --git a/htdocs/core/login/functions_ldap.php b/htdocs/core/login/functions_ldap.php index 6e13d55171c..4587dbae11b 100644 --- a/htdocs/core/login/functions_ldap.php +++ b/htdocs/core/login/functions_ldap.php @@ -203,7 +203,6 @@ function check_user_password_ldap($usertotest,$passwordtotest,$entitytotest) } unset($usertmp); } - } if ($result == 1) { diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 562ed99a020..968048a15aa 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -626,7 +626,6 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu->add("/user/group/list.php?leftmenu=users", $langs->trans("ListOfGroups"), 2, (($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin) && !(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE)); } } - } @@ -807,7 +806,6 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu->add("/fichinter/card-red.php?leftmenu=ficheinter", $langs->trans("ModelList"), 1, $user->rights->ficheinter->lire, '', '', '', 203); $newmenu->add("/fichinter/stats/index.php?leftmenu=ficheinter", $langs->trans("Statistics"), 1, $user->rights->fournisseur->commande->lire); } - } @@ -1242,7 +1240,6 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if (preg_match('/checks/',$leftmenu)) $newmenu->add("/compta/paiement/cheque/card.php?leftmenu=checks_bis&action=new&mainmenu=bank",$langs->trans("NewChequeDeposit"),1,$user->rights->banque->cheque); if (preg_match('/checks/',$leftmenu)) $newmenu->add("/compta/paiement/cheque/list.php?leftmenu=checks_bis&mainmenu=bank",$langs->trans("List"),1,$user->rights->banque->cheque); } - } /* @@ -1349,7 +1346,6 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if ($usemenuhider || empty($leftmenu) || $leftmenu=="sendings") $newmenu->add("/expedition/list.php?leftmenu=sendings&viewstatut=2", $langs->trans("StatusSendingProcessedShort"), 2, $user->rights->expedition->lire); $newmenu->add("/expedition/stats/index.php?leftmenu=sendings", $langs->trans("Statistics"), 1, $user->rights->expedition->lire); } - } /* @@ -1571,7 +1567,6 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu->add("/adherents/type.php?leftmenu=setup&mainmenu=members&action=create",$langs->trans("New"),1,$user->rights->adherent->configurer); $newmenu->add("/adherents/type.php?leftmenu=setup&mainmenu=members",$langs->trans("List"),1,$user->rights->adherent->configurer); } - } // Add personalized menus and modules menus @@ -1631,7 +1626,6 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $i++; } } - } // Build final $menu_array = $menu_array_before +$newmenu->liste + $menu_array_after diff --git a/htdocs/core/menus/standard/eldy_menu.php b/htdocs/core/menus/standard/eldy_menu.php index fa6e1b3084d..543dbd111bb 100644 --- a/htdocs/core/menus/standard/eldy_menu.php +++ b/htdocs/core/menus/standard/eldy_menu.php @@ -315,8 +315,6 @@ class MenuManager } print ''."\n"; } - - } //var_dump($submenu); print ''; diff --git a/htdocs/core/menus/standard/empty.php b/htdocs/core/menus/standard/empty.php index 172b6c483c5..4d7296b276b 100644 --- a/htdocs/core/menus/standard/empty.php +++ b/htdocs/core/menus/standard/empty.php @@ -311,8 +311,6 @@ class MenuManager } print ''."\n"; } - - } //var_dump($submenu); print ''; diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 9f94288809d..dfaaa6b26b4 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -1175,7 +1175,6 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it dol_syslog(get_class($this)."::insert_boxes", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) $err++; - } if (! $err && ! preg_match('/newboxdefonly/',$option)) { @@ -1384,7 +1383,6 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $resql=$this->db->query($sql); if (! $resql) $err++; - } if (! $err) @@ -1739,7 +1737,6 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it break; } else dol_syslog(get_class($this)."::insert_permissions record already exists", LOG_INFO); - } $this->db->free($resqlinsert); @@ -1791,7 +1788,6 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $user->clearrights(); $user->getrights(); } - } $this->db->free($resql); } diff --git a/htdocs/core/modules/cheque/modules_chequereceipts.php b/htdocs/core/modules/cheque/modules_chequereceipts.php index 9af073267ae..f2841a7ec8e 100644 --- a/htdocs/core/modules/cheque/modules_chequereceipts.php +++ b/htdocs/core/modules/cheque/modules_chequereceipts.php @@ -209,7 +209,6 @@ function chequereceipt_pdf_create($db, $id, $message, $modele, $outputlangs) dol_print_error($db,"chequereceipt_pdf_create Error: ".$obj->error); return -1; } - } else { diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index ad77e9bea32..6047caa55b3 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -967,7 +967,6 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); - } } } diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 1c85adddfcc..0bf4b91365e 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -402,7 +402,6 @@ class pdf_eratosthene extends ModelePDFCommandes if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); $height_note=$posyafter-$tab_top_newpage; $pdf->Rect($this->marge_gauche, $tab_top_newpage-1, $tab_width, $height_note+1); - } else // No pagebreak { @@ -424,7 +423,6 @@ class pdf_eratosthene extends ModelePDFCommandes $posyafter = $tab_top_newpage; } - } $tab_height = $tab_height - $height_note; @@ -1028,7 +1026,6 @@ class pdf_eratosthene extends ModelePDFCommandes $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); - } } } diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index 5c663e61348..daa8d67e5d1 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -730,7 +730,6 @@ class pdf_rouget extends ModelePdfExpedition $pdf->SetXY($this->posxtotalht, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxtotalht, $tab2_hl, price($object->total_ht, 0, $outputlangs), 0, 'C', 1); - } // Total Weight @@ -834,7 +833,6 @@ class pdf_rouget extends ModelePdfExpedition $pdf->SetXY($this->posxtotalht-1, $tab_top+1); $pdf->MultiCell(($this->page_largeur - $this->marge_droite - $this->posxtotalht), 2, $outputlangs->transnoentities("TotalHT"),'','C'); } - } } diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index f05c19885da..d98801ab7e2 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -479,7 +479,6 @@ class pdf_standard extends ModeleExpenseReport $pagenb++; if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); } - } // Show square diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index c4d69424cb2..797b48865c6 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -1202,7 +1202,6 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); - } } } @@ -1225,7 +1224,6 @@ class pdf_crabe extends ModelePDFFactures $this->tva[$tvakey]=$tvaval * $coef_fix_tva; } } - } foreach($this->tva as $tvakey => $tvaval) @@ -1516,9 +1514,7 @@ class pdf_crabe extends ModelePDFFactures { $pdf->MultiCell($this->postotalht-$this->posxprogress,2, $outputlangs->transnoentities("Progress"),'','C'); } - } - } if($conf->global->PRODUCT_USE_UNITS) { diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index d03d60f50fe..439f81ab02e 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -487,7 +487,6 @@ class pdf_sponge extends ModelePDFFactures if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); $height_note=$posyafter-$tab_top_newpage; $pdf->Rect($this->marge_gauche, $tab_top_newpage-1, $tab_width, $height_note+1); - } else // No pagebreak { @@ -509,7 +508,6 @@ class pdf_sponge extends ModelePDFFactures $posyafter = $tab_top_newpage; } - } $tab_height = $tab_height - $height_note; @@ -787,7 +785,6 @@ class pdf_sponge extends ModelePDFFactures $pagenb++; if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); } - } // Show square @@ -1268,7 +1265,6 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); - } } } @@ -1291,7 +1287,6 @@ class pdf_sponge extends ModelePDFFactures $this->tva[$tvakey]=$tvaval * $coef_fix_tva; } } - } foreach($this->tva as $tvakey => $tvaval) diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index 34bff81e55c..6b2e480db86 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -466,7 +466,6 @@ class ImportCsv extends ModeleImports } } } - } elseif ($objimport->array_import_convertvalue[0][$val]['rule']=='zeroifnull') { diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index 2c37caa5d40..f8b6aa99a82 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -493,7 +493,6 @@ class ImportXlsx extends ModeleImports } } } - } elseif ($objimport->array_import_convertvalue[0][$val]['rule']=='zeroifnull') { diff --git a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php index 4f6f3c4ecdb..91bd5127c1f 100644 --- a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php +++ b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php @@ -69,7 +69,6 @@ class mailing_thirdparties_services_expired extends MailingTargets $i++; $this->arrayofproducts[$i]=$obj->ref; } - } else { diff --git a/htdocs/core/modules/modStock.class.php b/htdocs/core/modules/modStock.class.php index d4f79f1efcf..01b4e9d4474 100644 --- a/htdocs/core/modules/modStock.class.php +++ b/htdocs/core/modules/modStock.class.php @@ -173,7 +173,6 @@ class modStock extends DolibarrModules $this->rights[9][3] = 0; // Permission by default for new user (0/1) $this->rights[9][4] = 'inventory_advance'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) $this->rights[9][5] = 'changePMP'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) - } // Main menu entries diff --git a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php index a350f643e9e..bc5da5e306b 100644 --- a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php @@ -1144,7 +1144,6 @@ class doc_generic_project_odt extends ModelePDFProjects } $listlines->merge(); } - } } $odfHandler->mergeSegment($listlines); diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index 7df62bec482..46f0fdacbbb 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -720,7 +720,6 @@ class doc_generic_task_odt extends ModelePDFTask //$listlines->merge(); $odfHandler->mergeSegment($listtasksfiles); - } catch(OdfException $e) { diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index adb52867a36..8c2dfd21a89 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -1146,7 +1146,6 @@ class pdf_azur extends ModelePDFPropales $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); - } } } diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index e43734039ca..464bef3da96 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -446,7 +446,6 @@ class pdf_cyan extends ModelePDFPropales if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); $height_note=$posyafter-$tab_top_newpage; $pdf->Rect($this->marge_gauche, $tab_top_newpage-1, $tab_width, $height_note+1); - } else // No pagebreak { @@ -468,7 +467,6 @@ class pdf_cyan extends ModelePDFPropales $posyafter = $tab_top_newpage; } - } $tab_height = $tab_height - $height_note; @@ -1183,7 +1181,6 @@ class pdf_cyan extends ModelePDFPropales $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); - } } } diff --git a/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php b/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php index d051c173c6d..0ecf7d7ef38 100644 --- a/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php +++ b/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php @@ -117,7 +117,6 @@ class modGeneratePassStandard extends ModeleGenPassword $password .= $char; $i++; } - } // done! diff --git a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php index 2fd86069d01..3c0d62be848 100644 --- a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php @@ -713,7 +713,6 @@ class pdf_stdmovement extends ModelePDFMovement // Total Qty $pdf->SetXY($this->postotalht, $curY); $pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalht, 3, $totalunit, 0, 'R', 0); - } else { diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index e7d47f67bda..dec36d5adbd 100644 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -243,7 +243,6 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir); return 0; } - } if (file_exists($dir)) diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index 8478fd70e89..d869b5dd72d 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -291,7 +291,6 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir); return 0; } - } if (file_exists($dir)) diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php index 31097dd8c34..544a1040c9f 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -997,7 +997,6 @@ class pdf_aurore extends ModelePDFSupplierProposal $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); - } } } diff --git a/htdocs/core/tpl/card_presend.tpl.php b/htdocs/core/tpl/card_presend.tpl.php index 4a4301c5a5f..0d1fd84923c 100644 --- a/htdocs/core/tpl/card_presend.tpl.php +++ b/htdocs/core/tpl/card_presend.tpl.php @@ -169,7 +169,6 @@ if ($action == 'presend') $formmail->withtouser = $listeuser; $formmail->withtoccuser = $listeuser; } - } $formmail->withto = GETPOST('sendto') ? GETPOST('sendto') : $liste; diff --git a/htdocs/core/tpl/resource_view.tpl.php b/htdocs/core/tpl/resource_view.tpl.php index aff342191cb..59491c01b6f 100644 --- a/htdocs/core/tpl/resource_view.tpl.php +++ b/htdocs/core/tpl/resource_view.tpl.php @@ -98,7 +98,6 @@ if( (array) $linked_resources && count($linked_resources) > 0) print ''; } } - } else { print '
'; diff --git a/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php b/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php index cb03315496a..8282a09a43d 100644 --- a/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php +++ b/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php @@ -200,7 +200,6 @@ class InterfaceStripe if ($action == 'COMPANYPAYMENTMODE_MODIFY' && $object->type == 'card') { // For creation of credit card, we do not create in Stripe automatically - } if ($action == 'COMPANYPAYMENTMODE_MODIFY' && $object->type == 'card') { dol_syslog("Trigger '" . $this->name . "' for action '$action' launched by " . __FILE__ . ". id=" . $object->id); diff --git a/htdocs/cron/card.php b/htdocs/cron/card.php index 2d4b74a3b5a..152657e216a 100644 --- a/htdocs/cron/card.php +++ b/htdocs/cron/card.php @@ -546,7 +546,6 @@ if (($action=="create") || ($action=="edit")) print ""; print "
\n"; - } else { diff --git a/htdocs/datapolicy/admin/setup.php b/htdocs/datapolicy/admin/setup.php index 777fa6cb893..8e92e1e6231 100644 --- a/htdocs/datapolicy/admin/setup.php +++ b/htdocs/datapolicy/admin/setup.php @@ -159,7 +159,6 @@ if ($action == 'edit') print ''; print ''; } - } print ''; @@ -185,7 +184,6 @@ else print $form->textwithpicto($langs->trans($key),$langs->trans('DATAPOLICY_Tooltip_SETUP')); print '' . ($conf->global->$key == '' ? $langs->trans('None') : $valTab[$conf->global->$key]) . ''; } - } print ''; diff --git a/htdocs/datapolicy/class/datapolicy.class.php b/htdocs/datapolicy/class/datapolicy.class.php index 3bebdff9302..4914d248490 100644 --- a/htdocs/datapolicy/class/datapolicy.class.php +++ b/htdocs/datapolicy/class/datapolicy.class.php @@ -204,7 +204,6 @@ Class DataPolicy extends Contact $resultmasssend .= $langs->trans("MailSent") . ': ' . $sendto . "
"; $contact->array_options['options_datapolicy_send'] = date('Y-m-d', time()); $contact->update($contact->id); - } else { dol_print_error($db); } @@ -348,7 +347,6 @@ Class DataPolicy extends Contact $resultmasssend .= $langs->trans("MailSent") . ': ' . $sendto . "
"; $adherent->array_options['options_datapolicy_send'] = date('Y-m-d', time()); $adherent->update($user); - } else { dol_print_error($db); } diff --git a/htdocs/datapolicy/class/datapolicycron.class.php b/htdocs/datapolicy/class/datapolicycron.class.php index f6de8b9b498..ab4b55b35dc 100644 --- a/htdocs/datapolicy/class/datapolicycron.class.php +++ b/htdocs/datapolicy/class/datapolicycron.class.php @@ -488,14 +488,12 @@ class DataPolicyCron $ret = $object->delete(); } } - } $i++; } } } - } return true; } diff --git a/htdocs/datapolicy/mailing.php b/htdocs/datapolicy/mailing.php index d65b2bdced4..e3f38b269be 100644 --- a/htdocs/datapolicy/mailing.php +++ b/htdocs/datapolicy/mailing.php @@ -31,8 +31,6 @@ if(!empty($idcontact)){ $contact = new Contact($db); $contact->fetch($idcontact); DataPolicy::sendMailDataPolicyContact($contact); - - }else{ $contacts = new DataPolicy($db); diff --git a/htdocs/don/card.php b/htdocs/don/card.php index d9542dcaaf0..38465de95ca 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -375,7 +375,6 @@ if ($action == 'create') print ''; } print '' . "\n"; - } // Date diff --git a/htdocs/don/document.php b/htdocs/don/document.php index 177b2b82d8b..01aab513a6a 100644 --- a/htdocs/don/document.php +++ b/htdocs/don/document.php @@ -184,7 +184,6 @@ if ($object->id) $permtoedit = $user->rights->don->creer; $param = '&id=' . $object->id; include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php'; - } else { diff --git a/htdocs/don/payment/card.php b/htdocs/don/payment/card.php index dde03cb461d..1c3a60e7e78 100644 --- a/htdocs/don/payment/card.php +++ b/htdocs/don/payment/card.php @@ -133,7 +133,6 @@ dol_fiche_head($head, $hselected, $langs->trans("DonationPayment"), -1, 'payment if ($action == 'delete') { print $form->formconfirm('card.php?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); - } /* @@ -143,7 +142,6 @@ if ($action == 'valide') { $facid = GETPOST('facid','int'); print $form->formconfirm('card.php?id='.$object->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); - } diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index 9038b74cb2a..d3fdd115ffa 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -680,7 +680,6 @@ class EcmDirectory // extends CommonObject } } $i++; - } } else diff --git a/htdocs/ecm/dir_add_card.php b/htdocs/ecm/dir_add_card.php index 5dab56b29a0..922c06f0cc2 100644 --- a/htdocs/ecm/dir_add_card.php +++ b/htdocs/ecm/dir_add_card.php @@ -290,7 +290,6 @@ if (empty($action) || $action == 'delete_section') if ($action == 'delete_section') { print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.$section, $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection',$ecmdir->label), 'confirm_deletesection'); - } // Construit fiche rubrique diff --git a/htdocs/ecm/dir_card.php b/htdocs/ecm/dir_card.php index 982fa045d32..7c3473117fc 100644 --- a/htdocs/ecm/dir_card.php +++ b/htdocs/ecm/dir_card.php @@ -271,7 +271,6 @@ if ($action == 'update' && ! GETPOST('cancel','alpha')) $upload_dir = $conf->medias->multidir_output[$conf->entity].'/'.$relativepath; $section = $relativepath; } - } } diff --git a/htdocs/ecm/file_card.php b/htdocs/ecm/file_card.php index b1b45141f4f..959a4bc5b8d 100644 --- a/htdocs/ecm/file_card.php +++ b/htdocs/ecm/file_card.php @@ -390,7 +390,6 @@ if ($action == 'edit') if ($action == 'delete_file') { print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.urlencode($section), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile',$urlfile), 'confirm_deletefile', '', 1, 1); - } if ($action != 'edit') diff --git a/htdocs/ecm/index_auto.php b/htdocs/ecm/index_auto.php index 382312e4434..ea5e5c13ff2 100644 --- a/htdocs/ecm/index_auto.php +++ b/htdocs/ecm/index_auto.php @@ -343,7 +343,6 @@ dol_fiche_head($head, 'index_auto', $langs->trans("ECMArea").' - '.$langs->trans if ($action == 'delete' && empty($conf->use_javascript_ajax)) { print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.$section.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile','','',1); - } // Start container of all panels diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 69deecdf4c0..292bf5e1de8 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -316,7 +316,6 @@ if (empty($reshook)) unset($_POST["options_" . $key]); } } - } //var_dump($batch_line[2]); @@ -859,7 +858,6 @@ if (empty($reshook)) $mode='emailfromshipment'; $trackid='shi'.$object->id; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; - } @@ -1421,7 +1419,6 @@ if ($action == 'create') print ''; print '('.$stock.')'; - } else { @@ -1522,7 +1519,6 @@ if ($action == 'create') } } } - } if ($subj == 0) // Line not shown yet, we show it { @@ -1669,13 +1665,11 @@ else if ($id || $ref) } $formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('ValidateSending'),$text,'confirm_valid','',0,1); - } // Confirm cancelation if ($action == 'annuler') { $formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('CancelSending'),$langs->trans("ConfirmCancelSending",$object->ref),'confirm_cancel','',0,1); - } // Call Hook formConfirm @@ -1826,7 +1820,6 @@ else if ($id || $ref) print ' '; print ' '; print ''; - } else { @@ -1864,7 +1857,6 @@ else if ($id || $ref) print ' '; print ' '; print ''; - } else { @@ -2536,7 +2528,6 @@ else if ($id || $ref) { print ''.$langs->trans("Delete").''; } - } print ''; diff --git a/htdocs/expedition/class/api_shipments.class.php b/htdocs/expedition/class/api_shipments.class.php index 109b847fc62..834c0bf2bda 100644 --- a/htdocs/expedition/class/api_shipments.class.php +++ b/htdocs/expedition/class/api_shipments.class.php @@ -661,7 +661,6 @@ class Shipments extends DolibarrApi if (!isset($data[$field])) throw new RestException(400, "$field field missing"); $shipment[$field] = $data[$field]; - } return $shipment; } diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 77df09ee276..751516fc18d 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -383,7 +383,6 @@ class Expedition extends CommonObject $this->db->rollback(); return -1*$error; } - } else { @@ -760,7 +759,6 @@ class Expedition extends CommonObject $this->error=$this->db->error(); return -2; } - } // Change status of order to "shipment in process" @@ -2129,7 +2127,6 @@ class Expedition extends CommonObject if ($result < 0) { $error++; } - } else { $error++; $this->errors[]=$this->db->lasterror; @@ -2256,7 +2253,6 @@ class Expedition extends CommonObject $error++; } } - } else { $error++; $this->errors[]=$this->db->lasterror(); diff --git a/htdocs/expedition/contact.php b/htdocs/expedition/contact.php index acc2b5e1142..ce31e760b7f 100644 --- a/htdocs/expedition/contact.php +++ b/htdocs/expedition/contact.php @@ -265,7 +265,6 @@ if ($id > 0 || ! empty($ref)) $res=@include dol_buildpath($reldir.'/contacts.tpl.php'); if ($res) break; } - } // End of page diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index 327a9394b77..c3632ca57fd 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -160,7 +160,6 @@ if (empty($reshook)) setEventMessages($langs->trans('TooManyRecordForMassAction',$maxformassaction), null, 'errors'); $error++; } - } diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index 33e1dd97f7b..920b5508e59 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -215,7 +215,6 @@ if (empty($reshook)) } include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; - } /* @@ -257,7 +256,6 @@ if ($id > 0 || ! empty($ref)) if ($action == 'cloture') { $formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=".$id,$langs->trans("CloseShipment"),$langs->trans("ConfirmCloseShipment"),"confirm_cloture"); - } // Call Hook formConfirm @@ -908,7 +906,6 @@ if ($id > 0 || ! empty($ref)) print ''; $somethingshown=1; - } else { diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index d877ad00b2f..7174e42f363 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -1160,7 +1160,6 @@ if (empty($reshook)) unset($fk_projet); unset($date); - } else { setEventMessages($object->error, $object->errors, 'errors'); } @@ -1552,7 +1551,6 @@ else $userfee->fetch($user->id); print $userfee->getNomUrl(-1); print ''; - } // Other attributes @@ -2225,17 +2223,13 @@ else print ''; dol_fiche_end(); - } // end edit or not edit - } // end of if result else { dol_print_error($db); } - } //fin si id > 0 - } /* @@ -2449,7 +2443,6 @@ if ($action != 'presend') $somethingshown = $formactions->showactions($object, 'expensereport', null); print ''; - } // Presend form diff --git a/htdocs/expensereport/class/api_expensereports.class.php b/htdocs/expensereport/class/api_expensereports.class.php index 80c22fb961a..e6475665fb8 100644 --- a/htdocs/expensereport/class/api_expensereports.class.php +++ b/htdocs/expensereport/class/api_expensereports.class.php @@ -522,7 +522,6 @@ class ExpenseReports extends DolibarrApi if (!isset($data[$field])) throw new RestException(400, "$field field missing"); $expensereport[$field] = $data[$field]; - } return $expensereport; } diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 6cc7b13ee7c..2b343dd0074 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -719,7 +719,6 @@ class ExpenseReport extends CommonObject $auser->fetch($obj->fk_user_approve); $this->user_approve = $auser; } - } $this->db->free($resql); } @@ -891,7 +890,6 @@ class ExpenseReport extends CommonObject print ''.$langs->trans("TotalTTC").' : '.price($total_TTC).''; print ' '; print ''; - } else { diff --git a/htdocs/expensereport/class/paymentexpensereport.class.php b/htdocs/expensereport/class/paymentexpensereport.class.php index 35f1fef7b5b..605affed253 100644 --- a/htdocs/expensereport/class/paymentexpensereport.class.php +++ b/htdocs/expensereport/class/paymentexpensereport.class.php @@ -165,7 +165,6 @@ class PaymentExpenseReport extends CommonObject { $error++; } - } if ($totalamount != 0 && ! $error) diff --git a/htdocs/expensereport/document.php b/htdocs/expensereport/document.php index 16db5311028..6cfb3a2f7bc 100644 --- a/htdocs/expensereport/document.php +++ b/htdocs/expensereport/document.php @@ -132,7 +132,6 @@ if ($object->id) $permtoedit = $user->rights->expensereport->creer; $param = '&id=' . $object->id; include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php'; - } else { diff --git a/htdocs/expensereport/export_csv.php b/htdocs/expensereport/export_csv.php index f018a23e478..3a104ca77b4 100644 --- a/htdocs/expensereport/export_csv.php +++ b/htdocs/expensereport/export_csv.php @@ -60,7 +60,6 @@ if($num < 1) { $insert.= ")"; $req = $db->query($insert); - } @@ -176,7 +175,6 @@ if (isset($_POST['action'])) $ligne.= "--->, {$objet2->rowid}, {$objet2->libelle}, {$objet2->comments}, {$objet2->total_ht}, {$objet2->total_tva}, {$objet2->total_ttc}\n"; } } - } $ligne = $outputlangs->convToOutputCharset($ligne); @@ -185,11 +183,9 @@ if (isset($_POST['action'])) fclose($open); print 'TĂ©lĂ©charger le fichier expensereport-'.$dateselected.'.csv'; - } else { print ''.$langs->trans('NoTripsToExportCSV').''; - } } } diff --git a/htdocs/expensereport/index.php b/htdocs/expensereport/index.php index 758dd89afe2..9a947b8596e 100644 --- a/htdocs/expensereport/index.php +++ b/htdocs/expensereport/index.php @@ -219,7 +219,6 @@ if ($result) $i++; } - } else { diff --git a/htdocs/expensereport/payment/card.php b/htdocs/expensereport/payment/card.php index 88272072ada..f75a0f8bb31 100644 --- a/htdocs/expensereport/payment/card.php +++ b/htdocs/expensereport/payment/card.php @@ -129,7 +129,6 @@ dol_fiche_head($head, 'payment', $langs->trans("ExpenseReportPayment"), -1, 'pay if ($action == 'delete') { print $form->formconfirm('card.php?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); - } /* @@ -139,7 +138,6 @@ if ($action == 'valide') { $facid = $_GET['facid']; print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); - } $linkback = ''; diff --git a/htdocs/expensereport/payment/payment.php b/htdocs/expensereport/payment/payment.php index 5136dff3cce..046bb522ae2 100644 --- a/htdocs/expensereport/payment/payment.php +++ b/htdocs/expensereport/payment/payment.php @@ -150,7 +150,6 @@ if ($action == 'add_payment') $error++; } } - } if (! $error) diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index 6d65418be3c..f0060ffd029 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -208,7 +208,6 @@ if ($action=='selectfield') // Selection of field at step 2 setEventMessages($warnings, null, 'warnings'); } - } if ($action=='unselectfield') { @@ -683,7 +682,6 @@ if ($step == 2 && $datatoexport) } print ''; - } if ($step == 3 && $datatoexport) @@ -858,7 +856,6 @@ if ($step == 3 && $datatoexport) // il n'est pas obligatoire de filtrer les champs print ''.$langs->trans("NextStep").''; print ''; - } if ($step == 4 && $datatoexport) @@ -1162,7 +1159,6 @@ if ($step == 5 && $datatoexport) if ($action == 'remove_file') { print $form->formconfirm($_SERVER["PHP_SELF"].'?step=5&datatoexport='.$datatoexport.'&file='.urlencode(GETPOST("file")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); - } print '
'; diff --git a/htdocs/fichinter/card-rec.php b/htdocs/fichinter/card-rec.php index 66f693858c9..0113f7fbea6 100644 --- a/htdocs/fichinter/card-rec.php +++ b/htdocs/fichinter/card-rec.php @@ -420,7 +420,6 @@ if ($action == 'create') { $i++; } $db->free($result); - } else print $db->error(); print ""; @@ -439,7 +438,6 @@ if ($action == 'create') { } else dol_print_error('', "Error, no invoice ".$object->id); - } elseif ($action == 'selsocforcreatefrommodel') { print load_fiche_titre($langs->trans("CreateRepeatableIntervention"), '', 'title_commercial.png'); dol_fiche_head(''); @@ -574,11 +572,9 @@ if ($action == 'create') { print $contratstatic->getNomUrl(0, '', 1); } else print " "; - } print ''; print ''; - } print ""; print '
'; @@ -775,7 +771,6 @@ if ($action == 'create') { print ''; } else print $langs->trans("ErrorRecordNotFound"); - } else { /* * List mode diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 75866d586f6..5896a5c5723 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -378,10 +378,8 @@ if (empty($reshook)) $error++; break; } - } } - } else { @@ -1099,7 +1097,6 @@ if ($action == 'create') print ''; } - } else if ($id > 0 || ! empty($ref)) { @@ -1471,8 +1468,6 @@ else if ($id > 0 || ! empty($ref)) $line->fetch_optionals(); print $line->showOptionals($extrafieldsline, 'view', array('style'=>$bc[$var], 'colspan'=>5)); - - } // Line in update mode @@ -1519,8 +1514,6 @@ else if ($id > 0 || ! empty($ref)) $line->fetch_optionals(); print $line->showOptionals($extrafieldsline, 'edit', array('style'=>$bc[$var], 'colspan'=>5)); - - } $i++; @@ -1711,7 +1704,6 @@ else if ($id > 0 || ! empty($ref)) print ''; } - } } } diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index d8be14c298a..05a139e2a9a 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -882,7 +882,6 @@ class Fichinter extends CommonObject $muser->fetch($obj->fk_user_modification); $this->user_modification = $muser; } - } $this->db->free($resql); } diff --git a/htdocs/fichinter/contact.php b/htdocs/fichinter/contact.php index d3b2ea6f78e..b69aa5952fa 100644 --- a/htdocs/fichinter/contact.php +++ b/htdocs/fichinter/contact.php @@ -185,7 +185,6 @@ if ($id > 0 || ! empty($ref)) $res=@include dol_buildpath($reldir.'/contacts.tpl.php'); if ($res) break; } - } diff --git a/htdocs/fichinter/document.php b/htdocs/fichinter/document.php index d52ed81da48..42273785a61 100644 --- a/htdocs/fichinter/document.php +++ b/htdocs/fichinter/document.php @@ -168,7 +168,6 @@ if ($object->id) $permtoedit = $user->rights->ficheinter->creer; $param = '&id=' . $object->id; include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php'; - } else { diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index ce9665cc6c8..ced75842606 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -2132,7 +2132,6 @@ class CommandeFournisseur extends CommonOrder $this->errors[]='ErrorCantSetReceptionToTotalDoneWithReceptionToApprove'; dol_syslog('ErrorCantSetReceptionToTotalDoneWithReceptionToApprove', LOG_DEBUG); } - } if (! $error && ! empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS_NEED_APPROVE) && ($type == 'tot')) // Accept to move to reception done, only if status of all line are ok (refuse denied) { @@ -3088,7 +3087,6 @@ class CommandeFournisseur extends CommonOrder { $close++; } - } } @@ -3112,8 +3110,6 @@ class CommandeFournisseur extends CommonOrder } return 4; } - - } else {//all the products are not received @@ -3123,7 +3119,6 @@ class CommandeFournisseur extends CommonOrder } return 4; } - } else { diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index 2bcdce36b3c..c7b5d00c797 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -279,8 +279,6 @@ class CommandeFournisseurDispatch extends CommonObject $this->batch = $obj->batch; $this->eatby = $this->db->jdate($obj->eatby); $this->sellby = $this->db->jdate($obj->sellby); - - } $this->db->free($resql); diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index f4c37a1113c..58230038fcc 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -680,7 +680,6 @@ class FactureFournisseur extends CommonInvoice $this->error=$this->db->lasterror(); return -3; } - } else { @@ -3152,7 +3151,6 @@ class SupplierInvoiceLine extends CommonObjectLine $this->db->commit(); return $this->id; - } else { diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index fcf7332dbd0..a366faa0400 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -262,7 +262,6 @@ class PaiementFourn extends Paiement $this->error=$this->db->lasterror(); $error++; } - } else { diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 134856112d4..70fcaf004fb 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -221,7 +221,6 @@ if (empty($reshook)) //$newstatus=3; // Submited // TODO If there is at least one reception, we can set to Received->Received partially $newstatus=4; // Received partially - } else if ($object->statut == 6) $newstatus=2; // Canceled->Approved else if ($object->statut == 7) $newstatus=3; // Canceled->Process running @@ -700,7 +699,6 @@ if (empty($reshook)) dol_print_error($db,$object->error); exit; } - } // Remove a product line @@ -1443,7 +1441,6 @@ if ($action=='create') // Object source contacts list $srccontactslist = $objectsrc->liste_contact(- 1, 'external', 1); - } else { @@ -1700,7 +1697,6 @@ elseif (! empty($object->id)) if ($action == 'delete') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 2); - } // Clone confirmation @@ -1712,7 +1708,6 @@ elseif (! empty($object->id)) ); // Paiement incomplet. On demande si motif = escompte ou autre $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneOrder'),$langs->trans('ConfirmCloneOrder',$object->ref),'confirm_clone',$formquestion,'yes',1); - } // Confirmation de la validation @@ -1791,14 +1786,12 @@ elseif (! empty($object->id)) if ($action == 'refuse') { $formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=$object->id",$langs->trans("DenyingThisOrder"),$langs->trans("ConfirmDenyingThisOrder",$object->ref),"confirm_refuse", '', 0, 1); - } // Confirmation de l'annulation if ($action == 'cancel') { $formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=$object->id",$langs->trans("Cancel"),$langs->trans("ConfirmCancelThisOrder",$object->ref),"confirm_cancel", '', 0, 1); - } // Confirmation de l'envoi de la commande @@ -1806,7 +1799,6 @@ elseif (! empty($object->id)) { $date_com = dol_mktime(GETPOST('rehour'),GETPOST('remin'),GETPOST('resec'),GETPOST("remonth"),GETPOST("reday"),GETPOST("reyear")); $formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id."&datecommande=".$date_com."&methode=".$_POST["methodecommande"]."&comment=".urlencode($_POST["comment"]), $langs->trans("MakeOrder"),$langs->trans("ConfirmMakeOrder",dol_print_date($date_com,'day')),"confirm_commande",'',0,2); - } // Confirmation to delete line @@ -2449,7 +2441,6 @@ elseif (! empty($object->id)) { print ''.$langs->trans("Delete").''; } - } print ""; @@ -2724,7 +2715,6 @@ elseif (! empty($object->id)) } } } - } elseif ($user_status_code == "PERMISSION_DENIED") { diff --git a/htdocs/fourn/commande/contact.php b/htdocs/fourn/commande/contact.php index 85739bdb6ef..c69c92ead29 100644 --- a/htdocs/fourn/commande/contact.php +++ b/htdocs/fourn/commande/contact.php @@ -192,7 +192,6 @@ if ($id > 0 || ! empty($ref)) // Contacts lines include DOL_DOCUMENT_ROOT.'/core/tpl/contacts.tpl.php'; - } else { diff --git a/htdocs/fourn/commande/document.php b/htdocs/fourn/commande/document.php index 8aa4da9c307..eb299d6a94d 100644 --- a/htdocs/fourn/commande/document.php +++ b/htdocs/fourn/commande/document.php @@ -175,7 +175,6 @@ if ($object->id > 0) $permtoedit = $user->rights->fournisseur->commande->creer; $param = '&id=' . $object->id; include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php'; - } else { diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 06857526731..7158d7b2c0e 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -263,7 +263,6 @@ if (empty($reshook)) $res = $object->create($user); if($res > 0) $nb_bills_created++; - } if ($object->id > 0) diff --git a/htdocs/fourn/commande/orderstoinvoice.php b/htdocs/fourn/commande/orderstoinvoice.php index 9b9743f201f..5456627384e 100644 --- a/htdocs/fourn/commande/orderstoinvoice.php +++ b/htdocs/fourn/commande/orderstoinvoice.php @@ -261,7 +261,6 @@ if (($action == 'create' || $action == 'add') && ! $error) { $error++; break; } - } } @@ -270,7 +269,6 @@ if (($action == 'create' || $action == 'add') && ! $error) { header('Location: ' . DOL_URL_ROOT . '/fourn/facture/card.php?facid=' . $id); exit(); } - } else { $db->rollback(); $action = 'create'; diff --git a/htdocs/fourn/contact.php b/htdocs/fourn/contact.php index a6adb0bad27..3225ce63714 100644 --- a/htdocs/fourn/contact.php +++ b/htdocs/fourn/contact.php @@ -123,7 +123,6 @@ if ($result) } print ""; $db->free($result); - } else { diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index af7f21f3628..9df540da197 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -525,7 +525,6 @@ if (empty($reshook)) { $error++; } - } if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE || $object->type == FactureFournisseur::TYPE_DEPOSIT) { @@ -543,7 +542,6 @@ if (empty($reshook)) break; } } - } if (empty($error)) @@ -757,7 +755,6 @@ if (empty($reshook)) $object->update_price(1); } - } if(GETPOST('invoiceAvoirWithPaymentRestAmount', 'int')==1 && $id>0) @@ -1669,7 +1666,6 @@ if ($action == 'create') // Replicate extrafields $objectsrc->fetch_optionals($originid); $object->array_options = $objectsrc->array_options; - } } else @@ -2257,7 +2253,6 @@ else } $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, 1, 1); - } // Confirmation edit (back to draft) @@ -2293,27 +2288,23 @@ else ); } $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('UnvalidateBill'), $langs->trans('ConfirmUnvalidateBill', $object->ref), 'confirm_edit', $formquestion, 1, 1); - } // Confirmation set paid if ($action == 'paid') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', 0, 1); - } // Confirmation de la suppression de la facture fournisseur if ($action == 'delete') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBill'), $langs->trans('ConfirmDeleteBill'), 'confirm_delete', '', 0, 1); - } if ($action == 'deletepaiement') { $payment_id = GETPOST('paiement_id'); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&paiement_id='.$payment_id, $langs->trans('DeletePayment'), $langs->trans('ConfirmDeletePayment'), 'confirm_delete_paiement', '', 0, 1); - } // Confirmation to delete line diff --git a/htdocs/fourn/facture/contact.php b/htdocs/fourn/facture/contact.php index cb17be828ca..58e5630c0d6 100644 --- a/htdocs/fourn/facture/contact.php +++ b/htdocs/fourn/facture/contact.php @@ -266,7 +266,6 @@ if ($id > 0 || ! empty($ref)) // Contacts lines include DOL_DOCUMENT_ROOT.'/core/tpl/contacts.tpl.php'; - } else { diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index 4239331d0a6..d38a7992bd8 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -157,7 +157,6 @@ if ($object->id > 0) if ($action == 'delete') { print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); - } print ''; diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php index 2e14a5187e4..4582f403b02 100644 --- a/htdocs/fourn/facture/impayees.php +++ b/htdocs/fourn/facture/impayees.php @@ -294,7 +294,6 @@ if ($user->rights->fournisseur->facture->lire) { dol_print_error($db); } - } // End of page diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 3fa525415bb..e1bd120b0b4 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -1132,7 +1132,6 @@ if ($resql) else print ''; } print ''; - } } diff --git a/htdocs/fourn/paiement/card.php b/htdocs/fourn/paiement/card.php index 22b3e307ab3..9cc5fb27b84 100644 --- a/htdocs/fourn/paiement/card.php +++ b/htdocs/fourn/paiement/card.php @@ -166,7 +166,6 @@ if ($result > 0) if ($action == 'delete') { print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete'); - } /* @@ -175,7 +174,6 @@ if ($result > 0) if ($action == 'valide') { print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide'); - } $linkback = '' . $langs->trans("BackToList") . ''; @@ -345,7 +343,6 @@ if ($result > 0) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->fournisseur->supplier_invoice_advance->validate))) { print ''.$langs->trans('Valid').''; - } } } diff --git a/htdocs/ftp/index.php b/htdocs/ftp/index.php index 7c9527f3a9a..64b9fb0a8ea 100644 --- a/htdocs/ftp/index.php +++ b/htdocs/ftp/index.php @@ -235,7 +235,6 @@ if ($_POST["const"] && $_POST["delete"] && $_POST["delete"] == $langs->trans("De $action=''; } } - } else { @@ -339,7 +338,6 @@ if ($action == 'download') { setEventMessages($langs->transnoentitiesnoconv('FailedToGetFile',$remotefile), null, 'errors'); } - } else { @@ -408,7 +406,6 @@ else if ($action == 'delete') { print $form->formconfirm($_SERVER["PHP_SELF"].'?numero_ftp='.$numero_ftp.'§ion='.urlencode($_REQUEST["section"]).'&file='.urlencode($_GET["file"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile','','',1); - } // Confirmation de la suppression d'une ligne categorie @@ -610,7 +607,6 @@ else $i++; $nbofentries++; } - } print "
"; @@ -808,7 +804,6 @@ function ftp_isdir($connect_id,$dir) { ftp_cdup($connect_id); return 1; - } else { diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index be365c52351..db5189ceac2 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -741,7 +741,6 @@ if ($action == 'confirm_cancel' && GETPOST('confirm') == 'yes') } } } - } @@ -1342,23 +1341,19 @@ else print ''; } - } else { print '
'; print $langs->trans('ErrorUserViewCP'); print '

'; print '
'; } - } else { print '
'; print $langs->trans('ErrorIDFicheCP'); print '

'; print '
'; } - } - } // End of page diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index a888a4919a6..9b42655fe5f 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -1468,7 +1468,6 @@ class Holiday extends CommonObject $this->error="Error ".$this->db->lasterror(); return -1; } - } else { @@ -1510,7 +1509,6 @@ class Holiday extends CommonObject return -1; } } - } else { // Si faux donc return array diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index fcd5cc9d8b0..d4abba41c02 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -605,7 +605,6 @@ elseif (! empty($holiday->holiday) && !empty($mysoc->country_id)) print ''; print ''."\n"; - } } diff --git a/htdocs/holiday/month_report.php b/htdocs/holiday/month_report.php index e9b98deb1f9..53fab6a825f 100644 --- a/htdocs/holiday/month_report.php +++ b/htdocs/holiday/month_report.php @@ -189,7 +189,6 @@ else print '' . dol_escape_htmltag(dolGetFirstLineOfText($obj->description)) . ''; print ''; } - } print ''; print ''; diff --git a/htdocs/holiday/view_log.php b/htdocs/holiday/view_log.php index c9cc2e6c16f..124d26baf92 100644 --- a/htdocs/holiday/view_log.php +++ b/htdocs/holiday/view_log.php @@ -124,7 +124,6 @@ foreach($cp->logs as $logs_CP) print ''.price2num($logs_CP['prev_solde'],5).' '.$langs->trans('days').''; print ''.price2num($logs_CP['new_solde'],5).' '.$langs->trans('days').''; print ''."\n"; - } if ($log_holiday == '2') diff --git a/htdocs/hrm/admin/admin_establishment.php b/htdocs/hrm/admin/admin_establishment.php index f7ebef5e623..5b15c1fb8bc 100644 --- a/htdocs/hrm/admin/admin_establishment.php +++ b/htdocs/hrm/admin/admin_establishment.php @@ -124,7 +124,6 @@ if ($result) $i++; } - } else { diff --git a/htdocs/hrm/establishment/card.php b/htdocs/hrm/establishment/card.php index 56a6c20176a..d7f591da027 100644 --- a/htdocs/hrm/establishment/card.php +++ b/htdocs/hrm/establishment/card.php @@ -334,7 +334,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if ($action == 'delete') { print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteEstablishment"),$langs->trans("ConfirmDeleteEstablishment"),"confirm_delete"); - } diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php index 6d1e16433cf..45d10d16d8b 100644 --- a/htdocs/hrm/index.php +++ b/htdocs/hrm/index.php @@ -236,7 +236,6 @@ if (! empty($conf->holiday->enabled) && $user->rights->holiday->read) $i++; } - } else { @@ -309,7 +308,6 @@ if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire) $i++; } - } else { @@ -382,7 +380,6 @@ if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire $i++; } - } else { diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index a9c1fc2317a..54aaa8a60a5 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -488,7 +488,6 @@ if ($step == 3 && $datatoimport) if ($action == 'delete') { print $form->formconfirm($_SERVER["PHP_SELF"].'?urlfile='.urlencode(GETPOST('urlfile')).'&step=3'.$param, $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); - } print '
'; @@ -662,7 +661,6 @@ if ($step == 4 && $datatoimport) header("Location: ".$_SERVER["PHP_SELF"].'?step=3'.$param.'&filetoimport='.urlencode($relativepath)); exit; } - } if (GETPOST('update')) { @@ -1162,7 +1160,6 @@ if ($step == 4 && $datatoimport) print ''; print ''; } - } @@ -1609,7 +1606,6 @@ if ($step == 5 && $datatoimport) print ''.$langs->trans("RunImportFile").''; } print ''; - } print ''; diff --git a/htdocs/install/check.php b/htdocs/install/check.php index f220978e4db..c2eb06bffb7 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -568,9 +568,7 @@ else print ''."\n"; print ''; } - } - } print ''; print ' '.$langs->trans("Link").''; - } print ''; diff --git a/htdocs/printing/admin/printing.php b/htdocs/printing/admin/printing.php index 529ad7e33ec..c4b2bb12111 100644 --- a/htdocs/printing/admin/printing.php +++ b/htdocs/printing/admin/printing.php @@ -313,7 +313,6 @@ if ($mode == 'test' && $user->admin) else { print $langs->trans('PleaseConfigureDriverfromList'); } - } else { print $langs->trans('PleaseSelectaDriverfromList'); } @@ -357,7 +356,6 @@ if ($mode == 'userconf' && $user->admin) print ''; dol_fiche_end(); - } // End of page diff --git a/htdocs/product/admin/price_rules.php b/htdocs/product/admin/price_rules.php index e0faaaf83e5..730a8fd31f2 100644 --- a/htdocs/product/admin/price_rules.php +++ b/htdocs/product/admin/price_rules.php @@ -92,7 +92,6 @@ if ($_POST) { setEventMessages($langs->trans('ErrorSavingChanges'), null, 'errors'); } } - } setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php index 2cdb5c1ca52..45f938431c3 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -127,7 +127,6 @@ if ($action == 'other') $res = dolibarr_set_const($db, $rule, 0, 'chaine', 0, '', $conf->entity); } } - } $value = GETPOST('PRODUIT_SOUSPRODUITS','alpha'); diff --git a/htdocs/product/admin/product_tools.php b/htdocs/product/admin/product_tools.php index a153e9f1ab6..b0c62c81d4f 100644 --- a/htdocs/product/admin/product_tools.php +++ b/htdocs/product/admin/product_tools.php @@ -267,7 +267,6 @@ if ($action == 'convert') { setEventMessages($langs->trans("Error"), null, 'errors'); } - } } diff --git a/htdocs/product/card.php b/htdocs/product/card.php index d51a4fa494c..31d2d7509c9 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -477,7 +477,6 @@ if (empty($reshook)) $action = 'edit'; } } - } } @@ -1943,7 +1942,6 @@ else dol_fiche_end(); } - } else if ($action != 'create') { diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 44222dc3c9e..805d5d214a2 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -2387,7 +2387,6 @@ class Product extends CommonObject $this->stats_commande['nb']+=$pFather->stats_commande['nb']; $this->stats_commande['rows']+=$pFather->stats_commande['rows']; $this->stats_commande['qty']+=$pFather->stats_commande['qty'] * $qtyCoef; - } } } @@ -3552,7 +3551,6 @@ class Product extends CommonObject dol_print_error($this->db); return -1; } - } else { return false; } @@ -4856,7 +4854,6 @@ class Product extends CommonObject } $this->db->free($result); - } else { diff --git a/htdocs/product/class/propalmergepdfproduct.class.php b/htdocs/product/class/propalmergepdfproduct.class.php index f2aabb86876..b5d2d639ae4 100644 --- a/htdocs/product/class/propalmergepdfproduct.class.php +++ b/htdocs/product/class/propalmergepdfproduct.class.php @@ -207,8 +207,6 @@ class Propalmergepdfproduct extends CommonObject $this->datec = $this->db->jdate($obj->datec); $this->tms = $this->db->jdate($obj->tms); $this->import_key = $obj->import_key; - - } $this->db->free($resql); @@ -283,11 +281,7 @@ class Propalmergepdfproduct extends CommonObject }else { $this->lines[$obj->file_name]=$line; } - - } - - } $this->db->free($resql); diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index 5f91a0e369e..d2ef4210e9c 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -407,7 +407,6 @@ if ($id > 0 || ! empty($ref)) { print ''; print ''; - } else{ print ''.$nb_of_subproduct.''; @@ -634,7 +633,6 @@ if ($id > 0 || ! empty($ref)) } $i++; } - } else { diff --git a/htdocs/product/document.php b/htdocs/product/document.php index 0b5b7fa6f16..d0bc7b3f9be 100644 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -113,7 +113,6 @@ if (empty($reshook)) // Action submit/delete file/link include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; - } if ($action=='filemerge') diff --git a/htdocs/product/index.php b/htdocs/product/index.php index 71cf2636661..2089193e208 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -152,7 +152,6 @@ if (! empty($conf->product->enabled)) $statProducts.= ''; $statProducts.= ''.$langs->trans("ProductsOnSellAndOnBuy").''.round($prodser[0][3]).''; $statProducts.= ""; - } if (! empty($conf->service->enabled)) { @@ -168,7 +167,6 @@ if (! empty($conf->service->enabled)) $statServices.= ''; $statServices.= ''.$langs->trans("ServicesOnSellAndOnBuy").''.round($prodser[1][3]).''; $statServices.= ""; - } $total=0; if ($type == '0') diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php index 39df52a8208..1bc98d32d93 100644 --- a/htdocs/product/inventory/class/inventory.class.php +++ b/htdocs/product/inventory/class/inventory.class.php @@ -477,7 +477,6 @@ class Inventory extends CommonObject } $this->db->free($result); - } else { diff --git a/htdocs/product/inventory/tpl/inventory.tpl.php b/htdocs/product/inventory/tpl/inventory.tpl.php index 1946e63918d..30dc02a17d6 100644 --- a/htdocs/product/inventory/tpl/inventory.tpl.php +++ b/htdocs/product/inventory/tpl/inventory.tpl.php @@ -165,7 +165,6 @@ if (empty($conf) || ! is_object($conf)) global->PRODUIT_MULTIPRICES) || ! empty($conf->global->PRODUI else print vatrate($object->tva_tx . ($object->tva_npr ? '*' : ''), true);*/ print ''; } - } else { @@ -1410,7 +1409,6 @@ if ($action == 'edit_price' && $object->getRights()->creer) print '   '; print ''; print ''; - } } diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index 27ac0c4d522..662873b7cf8 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -317,7 +317,6 @@ if ($resql) foreach($warehouses_list as &$wh) { print_liste_field_titre($wh['label'], '', '','','','align="right"'); } - } } if ($virtualdiffersfromphysical) print_liste_field_titre("VirtualStock",$_SERVER["PHP_SELF"], "",$param,"",'align="right"',$sortfield,$sortorder); @@ -395,7 +394,6 @@ if ($resql) print ''; $db->free($resql); - } else { diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php index 518a19d8407..24aa1864a02 100644 --- a/htdocs/product/reassortlot.php +++ b/htdocs/product/reassortlot.php @@ -421,7 +421,6 @@ if ($resql) print ''; $db->free($resql); - } else { diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index b24a37c4fe2..25e22faabcc 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -332,7 +332,6 @@ else print ''.$langs->trans("ParentWarehouse").''; print $e->getNomUrl(3); print ''; - } // Description @@ -567,7 +566,6 @@ else print ' '; print ' '; print ''; - } else { @@ -658,7 +656,6 @@ else print ''; print ''; - } } } diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index b2a78a9cd3e..3f298aed85d 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -416,11 +416,9 @@ class Entrepot extends CommonObject $this->date_creation = $this->db->jdate($obj->datec); $this->date_modification = $this->db->jdate($obj->datem); - } $this->db->free($result); - } else { diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php index 395c192311f..7991477e146 100644 --- a/htdocs/product/stock/class/mouvementstock.class.php +++ b/htdocs/product/stock/class/mouvementstock.class.php @@ -469,7 +469,6 @@ class MouvementStock extends CommonObject { $fk_product_stock = $this->db->last_insert_id(MAIN_DB_PREFIX."product_stock"); } - } // Update detail stock for batch product diff --git a/htdocs/product/stock/class/productstockentrepot.class.php b/htdocs/product/stock/class/productstockentrepot.class.php index 740afcb5f04..aaae328de48 100644 --- a/htdocs/product/stock/class/productstockentrepot.class.php +++ b/htdocs/product/stock/class/productstockentrepot.class.php @@ -202,8 +202,6 @@ class ProductStockEntrepot extends CommonObject $this->seuil_stock_alerte = $obj->seuil_stock_alerte; $this->desiredstock = $obj->desiredstock; $this->import_key = $obj->import_key; - - } // Retreive all extrafield diff --git a/htdocs/product/stock/index.php b/htdocs/product/stock/index.php index 20054d8896b..c85f40ef9c2 100644 --- a/htdocs/product/stock/index.php +++ b/htdocs/product/stock/index.php @@ -97,7 +97,6 @@ if ($result) $i++; } $db->free($result); - } print ""; } diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 07b4f5dcac3..beb3135d9f4 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -88,7 +88,6 @@ $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); if ($id > 0 || ! empty($ref)) { $result = $object->fetch($id, $ref); - } if(empty($id) && !empty($object->id)) $id = $object->id; @@ -144,7 +143,6 @@ if ($action == 'addlimitstockwarehouse' && !empty($user->rights->produit->creer) $pse->seuil_stock_alerte = $seuil_stock_alerte; $pse->desiredstock = $desiredstock; if($pse->update($user) > 0) setEventMessages($langs->trans('ProductStockWarehouseUpdated'), null, 'mesgs'); - } else { // Create @@ -153,14 +151,11 @@ if ($action == 'addlimitstockwarehouse' && !empty($user->rights->produit->creer) $pse->seuil_stock_alerte = GETPOST('seuil_stock_alerte'); $pse->desiredstock = GETPOST('desiredstock'); if($pse->create($user) > 0) setEventMessages($langs->trans('ProductStockWarehouseCreated'), null, 'mesgs'); - } - } header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; - } if($action == 'delete_productstockwarehouse' && !empty($user->rights->produit->creer)) @@ -171,7 +166,6 @@ if($action == 'delete_productstockwarehouse' && !empty($user->rights->produit->c if($pse->delete($user) > 0) setEventMessages($langs->trans('ProductStockWarehouseDeleted'), null, 'mesgs'); $action = ''; - } // Set stock limit @@ -799,7 +793,6 @@ if (empty($reshook)) print ''; } - } @@ -927,7 +920,6 @@ if (! $variants) { } } $i++; - } } else dol_print_error($db); diff --git a/htdocs/product/stock/productlot_card.php b/htdocs/product/stock/productlot_card.php index 5ee52ce337a..f72a28dbc90 100644 --- a/htdocs/product/stock/productlot_card.php +++ b/htdocs/product/stock/productlot_card.php @@ -256,7 +256,6 @@ if (empty($reshook)) $upload_dir = $conf->productbatch->multidir_output[$conf->entity]; $permissioncreate = $usercancreate; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; - } @@ -414,7 +413,6 @@ if (empty($action)) $somethingshown=$formfile->numoffiles; print ''; - } // End of page diff --git a/htdocs/product/stock/productlot_document.php b/htdocs/product/stock/productlot_document.php index 6a3925c4a55..1ce4f9ba224 100644 --- a/htdocs/product/stock/productlot_document.php +++ b/htdocs/product/stock/productlot_document.php @@ -95,7 +95,6 @@ if (empty($reshook)) // Action submit/delete file/link include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; - } $permtoedit = $user->rights->produit->creer; @@ -156,8 +155,6 @@ if ($object->id) $permission = ( $user->rights->produit->creer ); $param = '&id=' . $object->id; include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php'; - - } else { diff --git a/htdocs/product/stock/valo.php b/htdocs/product/stock/valo.php index 4e3a245060c..09524c5066a 100644 --- a/htdocs/product/stock/valo.php +++ b/htdocs/product/stock/valo.php @@ -128,7 +128,6 @@ if ($result) print ''.price(price2num($totalsell,'MT'),1,$langs,0,0,-1,$conf->currency).''; print ' '; print "\n"; - } $db->free($result); @@ -150,7 +149,6 @@ if ($result) $url=DOL_URL_ROOT.'/viewimage.php?modulepart=graph_stock&file='.$file; print '
'; } - } else { diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php index 4c344786553..9f18f644e4c 100644 --- a/htdocs/product/traduction.php +++ b/htdocs/product/traduction.php @@ -276,7 +276,6 @@ if ($action == 'edit') print ''; print ''; - } else if ($action != 'add') { diff --git a/htdocs/projet/activity/index.php b/htdocs/projet/activity/index.php index 2ed1bb1498f..e43700287cb 100644 --- a/htdocs/projet/activity/index.php +++ b/htdocs/projet/activity/index.php @@ -325,7 +325,6 @@ if (! empty($conf->global->PROJECT_TASK_TIME_MONTH)) print ''; print ''.convertSecondToTime($row->nb, 'allhourmin').''; print "\n"; - } $db->free($resql); } @@ -376,7 +375,6 @@ if (! empty($conf->global->PROJECT_TASK_TIME_YEAR)) print ''; print ''.convertSecondToTime($row->nb, 'allhourmin').''; print "\n"; - } $db->free($resql); } @@ -570,7 +568,6 @@ if (empty($conf->global->PROJECT_HIDE_TASKS) && ! empty($conf->global->PROJECT_S { dol_print_error($db); } - } diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index e2632fe244e..7aaa6805189 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -333,7 +333,6 @@ if (empty($reshook)) if (GETPOST('socid','int') > 0) $object->fetch_thirdparty(GETPOST('socid','int')); else unset($object->thirdparty); } - } // Build doc diff --git a/htdocs/projet/class/api_projects.class.php b/htdocs/projet/class/api_projects.class.php index 6deacab7204..a1f2ce6d26c 100644 --- a/htdocs/projet/class/api_projects.class.php +++ b/htdocs/projet/class/api_projects.class.php @@ -598,7 +598,6 @@ class Projects extends DolibarrApi if (!isset($data[$field])) throw new RestException(400, "$field field missing"); $object[$field] = $data[$field]; - } return $object; } diff --git a/htdocs/projet/class/api_tasks.class.php b/htdocs/projet/class/api_tasks.class.php index 294c0f0faae..050e7313e95 100644 --- a/htdocs/projet/class/api_tasks.class.php +++ b/htdocs/projet/class/api_tasks.class.php @@ -610,7 +610,6 @@ class Tasks extends DolibarrApi if (!isset($data[$field])) throw new RestException(400, "$field field missing"); $object[$field] = $data[$field]; - } return $object; } diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index eaf1ad6ea67..ab47079c9d0 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -1501,7 +1501,6 @@ class Project extends CommonObject $tab_conv_child_parent[$tasktoclone->id] = $new_task_id; } } - } //Parse all clone node to be sure to update new parent @@ -1959,7 +1958,6 @@ class Project extends CommonObject } $this->db->free($result); - } else { diff --git a/htdocs/projet/class/projectstats.class.php b/htdocs/projet/class/projectstats.class.php index 472fb26eaf0..9766935d4d0 100644 --- a/htdocs/projet/class/projectstats.class.php +++ b/htdocs/projet/class/projectstats.class.php @@ -498,7 +498,6 @@ class ProjectStats extends Stats } else { $res[$key]=array($total_row[0],0); } - } // var_dump($res);print '
'; return $res; diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index a4ef7965851..c5a7a334eb0 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -1568,7 +1568,6 @@ class Task extends CommonObject { $clone_task->date_end = $now + $clone_task->date_end - $orign_project_dt_start; } - } if (!$clone_prog) diff --git a/htdocs/projet/document.php b/htdocs/projet/document.php index e585acd7d85..af9f7c2d8fc 100644 --- a/htdocs/projet/document.php +++ b/htdocs/projet/document.php @@ -152,7 +152,6 @@ if ($object->id > 0) $permission = ($userWrite > 0); $permtoedit = ($userWrite > 0); include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php'; - } else { diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 489c5d04be4..2c64826853c 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -489,7 +489,6 @@ $resHook = $hookmanager->executeHooks('completeListOfReferent', $parameters, $ob if(!empty($hookmanager->resArray)) { $listofreferent = array_merge($listofreferent, $hookmanager->resArray); - } if ($action=="addelement") diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index a93fac0edbd..5a13b16560d 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -888,7 +888,6 @@ while ($i < min($num,$limit)) if (! $i) $totalarray['nbfield']++; print "\n"; - } $i++; diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index bffe5f4a373..d9fcc8b642a 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -524,7 +524,6 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third print ''; print ''; - } else if ($id > 0 || ! empty($ref)) { diff --git a/htdocs/projet/tasks/comment.php b/htdocs/projet/tasks/comment.php index 19ba461fbe4..ba54b35a59e 100644 --- a/htdocs/projet/tasks/comment.php +++ b/htdocs/projet/tasks/comment.php @@ -275,7 +275,6 @@ if ($id > 0 || ! empty($ref)) // Include comment tpl view include DOL_DOCUMENT_ROOT . '/core/tpl/bloc_comment.tpl.php'; - } } diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php index 3272c43ad10..d86c8b469ae 100644 --- a/htdocs/projet/tasks/contact.php +++ b/htdocs/projet/tasks/contact.php @@ -518,7 +518,6 @@ if ($id > 0 || ! empty($ref)) } } print ""; - } else { diff --git a/htdocs/public/cron/cron_run_jobs.php b/htdocs/public/cron/cron_run_jobs.php index 320a8e3895a..df207e87d85 100644 --- a/htdocs/public/cron/cron_run_jobs.php +++ b/htdocs/public/cron/cron_run_jobs.php @@ -169,7 +169,6 @@ if (is_array($qualifiedjobs) && (count($qualifiedjobs)>0)) dol_syslog("cron_run_jobs.php::reprogram_jobs Error".$cronjob->error, LOG_ERR); exit; } - } } echo "Result: ".($nbofjobs)." jobs - ".($nbofjobslaunchedok+$nbofjobslaunchedko)." launched = ".$nbofjobslaunchedok." OK + ".$nbofjobslaunchedko." KO"; diff --git a/htdocs/public/donations/donateurs_code.php b/htdocs/public/donations/donateurs_code.php index 9f03f9e293e..86db4b089aa 100644 --- a/htdocs/public/donations/donateurs_code.php +++ b/htdocs/public/donations/donateurs_code.php @@ -99,7 +99,6 @@ if ($resql) $i++; } print ""; - } else { diff --git a/htdocs/public/emailing/mailing-read.php b/htdocs/public/emailing/mailing-read.php index 23511974137..0b79f656450 100644 --- a/htdocs/public/emailing/mailing-read.php +++ b/htdocs/public/emailing/mailing-read.php @@ -86,7 +86,6 @@ if (! empty($tag)) dol_syslog("public/emailing/mailing-read.php : Mail read contact : ".$sql, LOG_DEBUG); $resql=$db->query($sql); - } $db->close(); diff --git a/htdocs/public/members/public_card.php b/htdocs/public/members/public_card.php index eda1aaf2c68..bc8fd0cde17 100644 --- a/htdocs/public/members/public_card.php +++ b/htdocs/public/members/public_card.php @@ -113,7 +113,6 @@ if ($id > 0) print ''; } - } diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php index e8db916ad91..277cd1ada78 100644 --- a/htdocs/public/onlinesign/newonlinesign.php +++ b/htdocs/public/onlinesign/newonlinesign.php @@ -120,7 +120,6 @@ $creditor = $mysoc->name; if ($action == 'dosign') { // TODO - } @@ -256,8 +255,6 @@ if ($source == 'proposal') print ''; print ''; print ''."\n"; - - } diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 47cdc8bb31e..0975186eb03 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -620,7 +620,6 @@ if ($action == 'charge' && ! empty($conf->stripe->enabled)) header("Location: ".$urlok); exit; } - } diff --git a/htdocs/public/stripe/ipn.php b/htdocs/public/stripe/ipn.php index e1b160541b2..45fd6489f92 100644 --- a/htdocs/public/stripe/ipn.php +++ b/htdocs/public/stripe/ipn.php @@ -234,28 +234,23 @@ elseif ($event->type == 'payout.paid') { elseif ($event->type == 'charge.succeeded') { //TODO: create fees - } elseif ($event->type == 'customer.source.created') { //TODO: save customer's source - } elseif ($event->type == 'customer.source.updated') { //TODO: update customer's source - } elseif ($event->type == 'customer.source.delete') { //TODO: delete customer's source - } elseif ($event->type == 'charge.failed') { $subject = 'Your payment has been received: '.$event->data->object->id.''; $headers = 'From: "'.$conf->global->MAIN_INFO_SOCIETE_MAIL.'" <'.$conf->global->MAIN_INFO_SOCIETE_MAIL.'>'; - } elseif (($event->type == 'source.chargeable') && ($event->data->object->type == 'three_d_secure') && ($event->data->object->three_d_secure->authenticated==true)) { diff --git a/htdocs/resource/card.php b/htdocs/resource/card.php index 5ba98ae9f69..49cad87e990 100644 --- a/htdocs/resource/card.php +++ b/htdocs/resource/card.php @@ -171,7 +171,6 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); $error++; } - } else { diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index c6e25c4d837..ad3355e3972 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -384,7 +384,6 @@ class Dolresource extends CommonObject if($obj->element_id && $obj->element_type) { $this->objelement = fetchObjectByElement($obj->element_id,$obj->element_type); } - } $this->db->free($resql); @@ -646,7 +645,6 @@ class Dolresource extends CommonObject if($obj->element_id && $obj->element_type) $line->objelement = fetchObjectByElement($obj->element_id,$obj->element_type); $this->lines[] = $line; - } $this->db->free($resql); } diff --git a/htdocs/resource/document.php b/htdocs/resource/document.php index 6a32ba9f645..85ec5b96c79 100644 --- a/htdocs/resource/document.php +++ b/htdocs/resource/document.php @@ -135,7 +135,6 @@ if ($object->id) $permission = $user->rights->resource->write; include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php'; - } else { diff --git a/htdocs/resource/element_resource.php b/htdocs/resource/element_resource.php index adbd8eec87f..a83e37bc0b4 100644 --- a/htdocs/resource/element_resource.php +++ b/htdocs/resource/element_resource.php @@ -462,7 +462,6 @@ else if(file_exists(dol_buildpath($path.'/core/tpl/resource_'.$element_prop['element'].'_view.tpl.php'))) { $res=@include dol_buildpath($path.'/core/tpl/resource_'.$element_prop['element'].'_view.tpl.php'); - } else { diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php index 49a9538e225..0166b6a233a 100644 --- a/htdocs/societe/admin/societe.php +++ b/htdocs/societe/admin/societe.php @@ -788,7 +788,6 @@ if (!empty($conf->global->SOCIETE_ADD_REF_IN_LIST)) { print ''; print img_picto($langs->trans("Activated"),'switch_on'); - } else { @@ -806,7 +805,6 @@ if (!empty($conf->global->COMPANY_SHOW_ADDRESS_SELECTLIST)) { print ''; print img_picto($langs->trans("Activated"),'switch_on'); - } else { @@ -826,7 +824,6 @@ if (!empty($conf->global->SOCIETE_ASK_FOR_SHIPPING_METHOD)) { print ''; print img_picto($langs->trans("Activated"),'switch_on'); - } else { @@ -845,7 +842,6 @@ if (!empty($conf->global->SOCIETE_DISABLE_PROSPECTSCUSTOMERS)) { print ''; print img_picto($langs->trans("Activated"),'switch_on'); - } else { diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index 2577f5bed5d..92d009db604 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -258,7 +258,6 @@ abstract class ActionsCardCommon $this->tpl['localtax'].= ''; } } - } else { diff --git a/htdocs/societe/canvas/company/actions_card_company.class.php b/htdocs/societe/canvas/company/actions_card_company.class.php index 3e18b7944f2..09172f1ea5a 100644 --- a/htdocs/societe/canvas/company/actions_card_company.class.php +++ b/htdocs/societe/canvas/company/actions_card_company.class.php @@ -181,7 +181,6 @@ class ActionsCardCompany extends ActionsCardCommon { $this->tpl['tva_intra'] = $s; } - } else { diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 1fbabc01462..e20e37e5cdc 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -371,7 +371,6 @@ if (empty($reshook)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Supplier")), null, 'errors'); $error++; - } if (! $error) @@ -1377,7 +1376,6 @@ else print ''.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).''; print $form->selectyesno('localtax2assuj_value',(isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2)?$conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2:0),1); print ''; - } elseif($mysoc->localtax1_assuj=="1") { @@ -1973,7 +1971,6 @@ else print ''; } print ''; - } elseif($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj!="1") { @@ -1986,7 +1983,6 @@ else print ''; } print ''; - } elseif($mysoc->localtax2_assuj=="1" && $mysoc->localtax1_assuj!="1") { @@ -2380,7 +2376,6 @@ else print ''.$object->localtax1_value.''; } print ''; - } } elseif($mysoc->localtax2_assuj=="1" && $mysoc->localtax1_assuj!="1") @@ -2403,7 +2398,6 @@ else print ''.$object->localtax2_value.''; } print ''; - } } } @@ -2729,7 +2723,6 @@ else $trackid = 'thi'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; - } } diff --git a/htdocs/societe/class/address.class.php b/htdocs/societe/class/address.class.php index 63b23d42f9e..4f9915a844c 100644 --- a/htdocs/societe/class/address.class.php +++ b/htdocs/societe/class/address.class.php @@ -138,7 +138,6 @@ class Address $this->db->rollback(); return -2; } - } else { @@ -496,7 +495,6 @@ class Address } $this->db->free($result); - } else { diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index 365073726bc..42d1d616852 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -1070,7 +1070,6 @@ class Thirdparties extends DolibarrApi foreach($account as $key => $value) if(in_array($key, $fields)){ $object[$key] = $value; - } $returnAccounts[] = $object; } @@ -1332,7 +1331,6 @@ class Thirdparties extends DolibarrApi foreach($account as $key => $value) if(in_array($key, $fields)){ $object[$key] = $value; - } $returnAccounts[] = $object; } diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index 3a3b9126b7b..73210ade104 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -184,7 +184,6 @@ class CompanyBankAccount extends Account { return 1; } - } else { diff --git a/htdocs/societe/class/companypaymentmode.class.php b/htdocs/societe/class/companypaymentmode.class.php index 83303a3a41d..73242c9aa32 100644 --- a/htdocs/societe/class/companypaymentmode.class.php +++ b/htdocs/societe/class/companypaymentmode.class.php @@ -561,7 +561,6 @@ class CompanyPaymentMode extends CommonObject } $this->db->free($result); - } else { diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index c91593b079f..758b91aaec9 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -611,7 +611,6 @@ class Societe extends CommonObject $this->db->rollback(); return $result; } - } else { @@ -1001,7 +1000,6 @@ class Societe extends CommonObject $sql .=",localtax1_value =".$this->localtax1_value; } else $sql .=",localtax1_value =0.000"; - } else $sql .=",localtax1_value =0.000"; @@ -1012,7 +1010,6 @@ class Societe extends CommonObject $sql .=",localtax2_value =".$this->localtax2_value; } else $sql .=",localtax2_value =0.000"; - } else $sql .=",localtax2_value =0.000"; @@ -3177,7 +3174,6 @@ class Societe extends CommonObject } $this->db->free($result); - } else { diff --git a/htdocs/societe/class/societeaccount.class.php b/htdocs/societe/class/societeaccount.class.php index de228c576b5..78f934ecf2f 100644 --- a/htdocs/societe/class/societeaccount.class.php +++ b/htdocs/societe/class/societeaccount.class.php @@ -518,7 +518,6 @@ class SocieteAccount extends CommonObject } $this->db->free($result); - } else { diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index b74b66a1a44..3a3fb8507c9 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -554,7 +554,6 @@ if ($sql_select) { print (! empty($objp->description) && $objp->description!=$objp->product_label)?'
'.dol_htmlentitiesbr($objp->description):''; } - } else { if (! empty($objp->label) || ! empty($objp->description)) diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php index 0fbc4368a87..a9b280a3f47 100644 --- a/htdocs/societe/price.php +++ b/htdocs/societe/price.php @@ -609,7 +609,6 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print ""; print ""; - } } diff --git a/htdocs/stripe/charge.php b/htdocs/stripe/charge.php index 0f26bf0e11a..73c1f7b86c8 100644 --- a/htdocs/stripe/charge.php +++ b/htdocs/stripe/charge.php @@ -221,7 +221,6 @@ if (!$rowid) } elseif ($charge->paid=='1'){ print img_picto($langs->trans("".$charge->status.""),'statut4'); - } else { $label="Message: ".$charge->failure_message."
"; $label.="Réseau: ".$charge->outcome->network_status."
"; diff --git a/htdocs/stripe/class/actions_stripe.class.php b/htdocs/stripe/class/actions_stripe.class.php index f3c76be9d35..a74b2d52eef 100644 --- a/htdocs/stripe/class/actions_stripe.class.php +++ b/htdocs/stripe/class/actions_stripe.class.php @@ -109,7 +109,6 @@ class ActionsStripeconnect $this->resprints.= $langs->trans("NoStripe"); } $this->resprints.= ''; - } elseif (is_object($object) && $object->element == 'member'){ $this->resprints.= ''; diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php index 0e9c3cbb4a8..d8e7168e5c0 100644 --- a/htdocs/stripe/class/stripe.class.php +++ b/htdocs/stripe/class/stripe.class.php @@ -284,7 +284,6 @@ class Stripe extends CommonObject $this->error = $e->getMessage(); dol_syslog($this->error, LOG_WARNING); } - } elseif ($createifnotlinkedtostripe) { diff --git a/htdocs/stripe/payment.php b/htdocs/stripe/payment.php index fbf9784a6b3..9a7ecfd5470 100644 --- a/htdocs/stripe/payment.php +++ b/htdocs/stripe/payment.php @@ -350,7 +350,6 @@ if (empty($reshook)) $facture->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); } - } if (! $error) diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 2f765c6c75f..248165727cf 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1303,7 +1303,6 @@ if ($action == 'create') print ''; } - } else { /* * Show object in view mode diff --git a/htdocs/supplier_proposal/class/api_supplier_proposals.class.php b/htdocs/supplier_proposal/class/api_supplier_proposals.class.php index 3d10c47f6a1..fd490902049 100644 --- a/htdocs/supplier_proposal/class/api_supplier_proposals.class.php +++ b/htdocs/supplier_proposal/class/api_supplier_proposals.class.php @@ -185,7 +185,6 @@ class Supplierproposals extends DolibarrApi if (!isset($data[$field])) throw new RestException(400, "$field field missing"); $propal[$field] = $data[$field]; - } return $propal; } diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index adc2c8643ac..a05d0485aaf 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -1730,7 +1730,6 @@ class SupplierProposal extends CommonObject { $result = $this->updateOrCreatePriceFournisseur($user); } - } if ($statut == 4) { @@ -2138,11 +2137,8 @@ class SupplierProposal extends CommonObject $cluser->fetch($obj->fk_user_cloture); $this->user_cloture = $cluser; } - - } $this->db->free($result); - } else { diff --git a/htdocs/supplier_proposal/contact.php b/htdocs/supplier_proposal/contact.php index 7be0dcbc78a..881fae4d1a7 100644 --- a/htdocs/supplier_proposal/contact.php +++ b/htdocs/supplier_proposal/contact.php @@ -193,7 +193,6 @@ if ($id > 0 || ! empty($ref)) // Contacts lines include DOL_DOCUMENT_ROOT.'/core/tpl/contacts.tpl.php'; - } else { diff --git a/htdocs/ticket/list.php b/htdocs/ticket/list.php index b1fb2d31cef..1b43d0054b7 100644 --- a/htdocs/ticket/list.php +++ b/htdocs/ticket/list.php @@ -409,7 +409,6 @@ if ($projectid > 0) { dol_fiche_end(); $object = $savobject; - } else { print "ErrorRecordNotFound"; } diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 6a8e0d4f14a..a87438eda95 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -696,7 +696,6 @@ if ($action == 'create' || $action == 'adduserldap') } $liste[$key] = $label; } - } else { @@ -2593,7 +2592,6 @@ else if (! empty($conf->ldap->enabled) && ! empty($object->ldap_sid)) $ldap->close(); } - } if (! empty($conf->api->enabled) && ! empty($conf->use_javascript_ajax)) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index d2afacce54a..d1a8cae636b 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -870,7 +870,6 @@ class User extends CommonObject // if we have already define a subperm like this $this->rights->$module->level1->level2 with llx_user_rights, we don't want override level1 because the level2 can be not define on user group if (!is_object($this->rights->$module->$perms)) $this->rights->$module->$perms = 1; } - } $i++; } @@ -2671,7 +2670,6 @@ class User extends CommonObject } $this->db->free($result); - } else { diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php index 6719d6ca120..918d8c394ca 100644 --- a/htdocs/user/clicktodial.php +++ b/htdocs/user/clicktodial.php @@ -213,7 +213,6 @@ if ($id > 0) } print "\n"; - } // End of page diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 521b0e4022e..e0e6935bc48 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -316,7 +316,6 @@ if ($action == 'edit') print '     '; print ''; print ''; - } else { @@ -403,7 +402,6 @@ else } print ''; - } if ($action == 'edit') diff --git a/htdocs/variants/admin/admin.php b/htdocs/variants/admin/admin.php index 0110d9db789..43700b281c7 100644 --- a/htdocs/variants/admin/admin.php +++ b/htdocs/variants/admin/admin.php @@ -41,7 +41,6 @@ if ($_POST) { } else { setEventMessages($langs->trans('CoreErrorMessage'), null, 'errors'); } - } $title = $langs->trans('ModuleSetup').' '.$langs->trans('ProductAttributes'); diff --git a/htdocs/variants/card.php b/htdocs/variants/card.php index 8cb4e13b33e..1f04e5edb87 100644 --- a/htdocs/variants/card.php +++ b/htdocs/variants/card.php @@ -88,7 +88,6 @@ if ($_POST) { header('Location: '.dol_buildpath('/variants/card.php?id='.$object->id, 2)); exit(); } - } if ($confirm == 'yes') { diff --git a/htdocs/variants/class/ProductCombination.class.php b/htdocs/variants/class/ProductCombination.class.php index a0aed832eac..ef9ec4997f3 100644 --- a/htdocs/variants/class/ProductCombination.class.php +++ b/htdocs/variants/class/ProductCombination.class.php @@ -736,7 +736,6 @@ WHERE c.fk_product_parent = ".(int) $productid." AND p.tosell = 1"; } $i++; } - } return $label; } diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index fb23921be25..79076e8ac50 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -210,12 +210,10 @@ if ($_POST) { } else { setEventMessages($langs->trans('CoreErrorMessage'), null, 'errors'); } - } else { $db->commit(); setEventMessages($langs->trans('RecordSaved'), null, 'mesgs'); } - } elseif ($valueid > 0) { @@ -286,11 +284,9 @@ if ($action === 'confirm_deletecombination') { setEventMessages($langs->trans('ErrorCopyProductCombinations'), null, 'errors'); } } - } else { setEventMessages($langs->trans('ErrorDestinationProductNotFound'), null, 'errors'); } - } diff --git a/htdocs/variants/generator.php b/htdocs/variants/generator.php index afed5c98b16..420c90147ea 100644 --- a/htdocs/variants/generator.php +++ b/htdocs/variants/generator.php @@ -123,7 +123,6 @@ if ($_POST) { } $db->rollback(); - } else { setEventMessages($langs->trans('ErrorFieldsRequired'), null, 'errors'); } diff --git a/htdocs/webservices/server_actioncomm.php b/htdocs/webservices/server_actioncomm.php index 6a581b2ca0d..a9edcb0557a 100644 --- a/htdocs/webservices/server_actioncomm.php +++ b/htdocs/webservices/server_actioncomm.php @@ -378,7 +378,6 @@ function getListActionCommType($authentication) $objectresp = array( 'result'=>array('result_code'=>'OK', 'result_label'=>''), 'actioncommtypes'=>$resultarray); - } else { diff --git a/htdocs/webservices/server_category.php b/htdocs/webservices/server_category.php index 685579c6674..a941c2aceff 100644 --- a/htdocs/webservices/server_category.php +++ b/htdocs/webservices/server_category.php @@ -250,9 +250,7 @@ function getCategory($authentication,$id) 'dir' => $pdir, 'photos' => $fille->liste_photos($dir,$nbmax=10) ); - } - } // Create diff --git a/htdocs/webservices/server_invoice.php b/htdocs/webservices/server_invoice.php index aed031fa9ca..03931701659 100644 --- a/htdocs/webservices/server_invoice.php +++ b/htdocs/webservices/server_invoice.php @@ -635,7 +635,6 @@ function createInvoice($authentication,$invoice) $errorlabel=$new_invoice->error; dol_syslog("Function: createInvoice error while creating".$errorlabel); } - } if ($error) @@ -707,7 +706,6 @@ function createInvoiceFromOrder($authentication,$id_order='', $ref_order='', $re $error++; dol_syslog("Webservice server_invoice:: invoice creation from order failed", LOG_ERR); } - } } else diff --git a/htdocs/webservices/server_order.php b/htdocs/webservices/server_order.php index 8cbe54e0b29..d41b2880210 100644 --- a/htdocs/webservices/server_order.php +++ b/htdocs/webservices/server_order.php @@ -749,7 +749,6 @@ function createOrder($authentication,$order) { dol_syslog("Webservice server_order:: order creation failed", LOG_ERR); $error++; - } if ($order['status'] == 1) // We want order to have status validated @@ -777,7 +776,6 @@ function createOrder($authentication,$order) $errorcode='KO'; $errorlabel=$newobject->error; } - } if ($error) @@ -831,7 +829,6 @@ function validOrder($authentication,$id='',$id_warehouse=0) // Define output language $outputlangs = $langs; $order->generateDocument($order->modelpdf, $outputlangs); - } else { @@ -848,7 +845,6 @@ function validOrder($authentication,$id='',$id_warehouse=0) $errorcode='KO'; $errorlabel=$newobject->error; } - } else { @@ -857,7 +853,6 @@ function validOrder($authentication,$id='',$id_warehouse=0) $errorcode='KO'; $errorlabel=$newobject->error; } - } if ($error) @@ -926,7 +921,6 @@ function updateOrder($authentication,$order) // Define output language $outputlangs = $langs; $object->generateDocument($order->modelpdf, $outputlangs); - } } if ($order['status'] == 0) $result=$object->set_reopen($fuser); diff --git a/htdocs/webservices/server_productorservice.php b/htdocs/webservices/server_productorservice.php index 2154d2d8557..1e301350063 100644 --- a/htdocs/webservices/server_productorservice.php +++ b/htdocs/webservices/server_productorservice.php @@ -617,7 +617,6 @@ function createProductOrService($authentication,$product) $errorcode='KO'; $errorlabel=$newobject->error; } - } if ($error) @@ -806,7 +805,6 @@ function updateProductOrService($authentication,$product) $errorcode='KO'; $errorlabel=$newobject->error; } - } if ($error) @@ -1105,7 +1103,6 @@ function getProductsForCategory($authentication,$id,$lang='') $iProduct++; } - } // Retour @@ -1113,14 +1110,12 @@ function getProductsForCategory($authentication,$id,$lang='') 'result'=>array('result_code'=>'OK', 'result_label'=>''), 'products'=> $products ); - } else { $errorcode='NORECORDS_FOR_ASSOCIATION'; $errorlabel='No products associated'.$sql; $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); dol_syslog("getProductsForCategory:: ".$c->error, LOG_DEBUG); - } } else diff --git a/htdocs/webservices/server_thirdparty.php b/htdocs/webservices/server_thirdparty.php index c2236368d18..7f0b590ee9a 100644 --- a/htdocs/webservices/server_thirdparty.php +++ b/htdocs/webservices/server_thirdparty.php @@ -816,7 +816,6 @@ function deleteThirdParty($authentication,$id='',$ref='',$ref_ext='') { $error++; $errorcode='NOT_FOUND'; $errorlabel='Object not found for id='.$id.' nor ref='.$ref.' nor ref_ext='.$ref_ext; - } } else diff --git a/htdocs/webservices/server_user.php b/htdocs/webservices/server_user.php index ab2d18427ff..81702c55456 100644 --- a/htdocs/webservices/server_user.php +++ b/htdocs/webservices/server_user.php @@ -733,7 +733,6 @@ function setUserPassword($authentication,$shortuser) $error++; $errorcode='NOT_FOUND'; $errorlabel='User not found'; } - } else { diff --git a/htdocs/website/index.php b/htdocs/website/index.php index f2bf4ad1888..4f969851ad4 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -1543,7 +1543,6 @@ if ($action == 'importsiteconfirm') } } } - } } @@ -2659,7 +2658,6 @@ if ($action == 'editfile' || $action == 'file_manager') include DOL_DOCUMENT_ROOT.'/core/tpl/filemanager.tpl.php'; print ''; - } if ($action == 'editmenu') diff --git a/scripts/cron/cron_run_jobs.php b/scripts/cron/cron_run_jobs.php index 8ffefa0ca9a..6104cec3b55 100755 --- a/scripts/cron/cron_run_jobs.php +++ b/scripts/cron/cron_run_jobs.php @@ -223,7 +223,6 @@ if (is_array($qualifiedjobs) && (count($qualifiedjobs)>0)) dol_syslog("cron_run_jobs.php::reprogram_jobs Error ".$cronjob->error, LOG_ERR); exit(-1); } - } else { diff --git a/scripts/emailings/mailing-send.php b/scripts/emailings/mailing-send.php index 95b06f187e8..c36e7ea1cc3 100755 --- a/scripts/emailings/mailing-send.php +++ b/scripts/emailings/mailing-send.php @@ -64,7 +64,6 @@ print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n"; if ($conf->global->MAILING_LIMIT_SENDBYCLI == '-1') { - } $user = new User($db); @@ -329,7 +328,6 @@ if ($resql) if (!empty($conf->global->MAILING_DELAY)) { sleep($conf->global->MAILING_DELAY); } - } } else diff --git a/scripts/members/sync_members_ldap2dolibarr.php b/scripts/members/sync_members_ldap2dolibarr.php index 3e6eaaa4281..d7d4fbdeaaf 100755 --- a/scripts/members/sync_members_ldap2dolibarr.php +++ b/scripts/members/sync_members_ldap2dolibarr.php @@ -299,7 +299,6 @@ if ($result >= 0) //print "yy".dol_print_date($datelast)."\n"; $crowid=$member->subscription($datelast, $pricelast, 0); } - } if (! $error || $forcecommit) diff --git a/scripts/product/migrate_picture_path.php b/scripts/product/migrate_picture_path.php index 69322b2f350..eee15cdb7fa 100755 --- a/scripts/product/migrate_picture_path.php +++ b/scripts/product/migrate_picture_path.php @@ -140,7 +140,6 @@ function migrate_product_photospath($product) { dol_move($origin.'/'.$file, $destin.'/'.$file); } - } } } diff --git a/test/phpunit/CodingSqlTest.php b/test/phpunit/CodingSqlTest.php index c2b620b639b..349e19a1072 100644 --- a/test/phpunit/CodingSqlTest.php +++ b/test/phpunit/CodingSqlTest.php @@ -185,19 +185,16 @@ class CodingSqlTest extends PHPUnit_Framework_TestCase if ($dir == DOL_DOCUMENT_ROOT.'/install/mysql/migration') { // Test for migration files only - } elseif ($dir == DOL_DOCUMENT_ROOT.'/install/mysql/data') { // Test for data files only - } else { if (preg_match('/\.key\.sql$/',$file)) { // Test for key files only - } else {