From ee6fadd0d57dd74c8ecfa52f6f18c530c6928486 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?=
Date: Thu, 21 May 2020 01:41:27 +0200
Subject: [PATCH] add new rule
---
dev/tools/dolibarr-postgres2mysql.php | 21 +-
dev/translation/autotranslator.class.php | 19 +-
dev/translation/sanity_check_en_langfiles.php | 6 +-
dev/translation/strip_language_file.php | 9 +-
htdocs/admin/agenda.php | 6 +-
htdocs/admin/agenda_extsites.php | 9 +-
htdocs/admin/agenda_other.php | 30 +-
htdocs/admin/agenda_reminder.php | 12 +-
htdocs/admin/agenda_xcal.php | 3 +-
htdocs/admin/bank.php | 12 +-
htdocs/admin/barcode.php | 15 +-
htdocs/admin/bom.php | 33 +-
htdocs/admin/boxes.php | 15 +-
htdocs/admin/chequereceipts.php | 12 +-
htdocs/admin/clicktodial.php | 6 +-
htdocs/admin/commande.php | 48 +-
htdocs/admin/company.php | 42 +-
htdocs/admin/compta.php | 3 +-
htdocs/admin/confexped.php | 3 +-
htdocs/admin/const.php | 21 +-
htdocs/admin/contract.php | 30 +-
htdocs/admin/dav.php | 9 +-
htdocs/admin/debugbar.php | 3 +-
htdocs/admin/defaultvalues.php | 24 +-
htdocs/admin/delais.php | 3 +-
htdocs/admin/dict.php | 42 +-
.../class/PSWebServiceLibrary.class.php | 22 +-
.../admin/dolistore/class/dolistore.class.php | 6 +-
htdocs/admin/ecm.php | 9 +-
htdocs/admin/emailcollector_card.php | 30 +-
htdocs/admin/emailcollector_list.php | 3 +-
htdocs/admin/expedition.php | 27 +-
htdocs/admin/expensereport.php | 30 +-
htdocs/admin/expensereport_ik.php | 3 +-
htdocs/admin/expensereport_rules.php | 27 +-
htdocs/admin/external_rss.php | 21 +-
htdocs/admin/facture.php | 48 +-
htdocs/admin/fckeditor.php | 9 +-
htdocs/admin/fichinter.php | 36 +-
htdocs/admin/geoipmaxmind.php | 6 +-
htdocs/admin/holiday.php | 30 +-
htdocs/admin/ihm.php | 6 +-
htdocs/admin/ldap.php | 21 +-
htdocs/admin/ldap_contacts.php | 9 +-
htdocs/admin/ldap_groups.php | 9 +-
htdocs/admin/ldap_members.php | 9 +-
htdocs/admin/ldap_members_types.php | 9 +-
htdocs/admin/ldap_users.php | 15 +-
htdocs/admin/limits.php | 9 +-
htdocs/admin/livraison.php | 30 +-
htdocs/admin/loan.php | 6 +-
htdocs/admin/mailing.php | 3 +-
htdocs/admin/mailman.php | 15 +-
htdocs/admin/mails.php | 42 +-
htdocs/admin/mails_emailing.php | 39 +-
htdocs/admin/mails_senderprofile_list.php | 3 +-
htdocs/admin/mails_templates.php | 45 +-
htdocs/admin/menus.php | 3 +-
htdocs/admin/menus/edit.php | 30 +-
htdocs/admin/menus/index.php | 6 +-
htdocs/admin/menus/other.php | 3 +-
htdocs/admin/modulehelp.php | 18 +-
htdocs/admin/modules.php | 65 +-
htdocs/admin/mrp.php | 33 +-
htdocs/admin/multicurrency.php | 9 +-
htdocs/admin/notification.php | 9 +-
htdocs/admin/oauth.php | 3 +-
htdocs/admin/oauthlogintokens.php | 15 +-
htdocs/admin/payment.php | 6 +-
htdocs/admin/pdf.php | 3 +-
htdocs/admin/perms.php | 3 +-
htdocs/admin/prelevement.php | 3 +-
htdocs/admin/propal.php | 48 +-
htdocs/admin/receiptprinter.php | 6 +-
htdocs/admin/reception_setup.php | 24 +-
htdocs/admin/resource.php | 3 +-
htdocs/admin/security.php | 24 +-
htdocs/admin/security_other.php | 21 +-
htdocs/admin/sms.php | 9 +-
htdocs/admin/socialnetworks.php | 6 +-
htdocs/admin/spip.php | 6 +-
htdocs/admin/stock.php | 30 +-
htdocs/admin/supplier_invoice.php | 27 +-
htdocs/admin/supplier_order.php | 36 +-
htdocs/admin/supplier_payment.php | 21 +-
htdocs/admin/supplier_proposal.php | 45 +-
htdocs/admin/syslog.php | 6 +-
htdocs/admin/system/about.php | 3 +-
htdocs/admin/system/constall.php | 6 +-
htdocs/admin/system/database-tables.php | 6 +-
htdocs/admin/system/database.php | 3 +-
htdocs/admin/system/dbtable.php | 3 +-
htdocs/admin/system/dolibarr.php | 18 +-
htdocs/admin/system/filecheck.php | 33 +-
htdocs/admin/system/modules.php | 9 +-
htdocs/admin/system/perf.php | 36 +-
htdocs/admin/system/phpinfo.php | 21 +-
htdocs/admin/system/xdebug.php | 6 +-
htdocs/admin/taxes.php | 18 +-
htdocs/admin/ticket.php | 3 +-
htdocs/admin/ticket_public.php | 3 +-
htdocs/admin/tools/dolibarr_export.php | 17 +-
htdocs/admin/tools/dolibarr_import.php | 3 +-
htdocs/admin/tools/export.php | 3 +-
htdocs/admin/tools/export_files.php | 3 +-
htdocs/admin/tools/listevents.php | 6 +-
htdocs/admin/tools/listsessions.php | 6 +-
htdocs/admin/tools/update.php | 6 +-
htdocs/admin/translation.php | 30 +-
htdocs/admin/user.php | 33 +-
htdocs/admin/usergroup.php | 18 +-
htdocs/admin/website.php | 24 +-
htdocs/admin/website_options.php | 3 +-
htdocs/admin/workflow.php | 9 +-
htdocs/api/admin/index.php | 12 +-
htdocs/api/class/api.class.php | 3 +-
htdocs/api/class/api_access.class.php | 3 +-
htdocs/api/class/api_login.class.php | 3 +-
htdocs/api/class/api_setup.class.php | 33 +-
htdocs/api/index.php | 3 +-
htdocs/asset/admin/setup.php | 3 +-
htdocs/asset/card.php | 6 +-
htdocs/asset/class/asset.class.php | 3 +-
htdocs/asset/class/asset_type.class.php | 24 +-
htdocs/asset/document.php | 3 +-
htdocs/asset/list.php | 3 +-
htdocs/asset/type.php | 18 +-
htdocs/asterisk/cidlookup.php | 3 +-
htdocs/asterisk/wrapper.php | 6 +-
htdocs/barcode/codeinit.php | 15 +-
htdocs/barcode/printsheet.php | 3 +-
htdocs/blockedlog/admin/blockedlog.php | 6 +-
htdocs/blockedlog/admin/blockedlog_list.php | 24 +-
htdocs/blockedlog/ajax/block-info.php | 3 +-
htdocs/blockedlog/class/authority.class.php | 15 +-
htdocs/blockedlog/class/blockedlog.class.php | 20 +-
htdocs/bom/bom_agenda.php | 6 +-
htdocs/bom/bom_card.php | 15 +-
htdocs/bom/bom_document.php | 3 +-
htdocs/bom/bom_list.php | 15 +-
htdocs/bom/class/api_boms.class.php | 3 +-
htdocs/bom/class/bom.class.php | 21 +-
htdocs/bom/tpl/objectline_create.tpl.php | 3 +-
htdocs/bookmarks/admin/bookmark.php | 3 +-
htdocs/bookmarks/bookmarks.lib.php | 6 +-
htdocs/bookmarks/card.php | 18 +-
htdocs/bookmarks/class/bookmark.class.php | 15 +-
htdocs/bookmarks/list.php | 12 +-
htdocs/cashdesk/admin/cashdesk.php | 9 +-
htdocs/cashdesk/affContenu.php | 6 +-
htdocs/cashdesk/class/Auth.class.php | 3 +-
htdocs/cashdesk/class/Facturation.class.php | 18 +-
htdocs/cashdesk/facturation.php | 12 +-
htdocs/cashdesk/facturation_dhtml.php | 6 +-
htdocs/cashdesk/facturation_verif.php | 15 +-
htdocs/cashdesk/index.php | 6 +-
htdocs/cashdesk/index_verif.php | 6 +-
htdocs/cashdesk/tpl/liste_articles.tpl.php | 3 +-
htdocs/cashdesk/tpl/validation1.tpl.php | 3 +-
htdocs/cashdesk/validation_verif.php | 18 +-
htdocs/comm/action/card.php | 66 +-
htdocs/comm/action/class/actioncomm.class.php | 69 +-
.../comm/action/class/cactioncomm.class.php | 9 +-
htdocs/comm/action/class/ical.class.php | 9 +-
htdocs/comm/action/document.php | 6 +-
htdocs/comm/action/index.php | 82 +-
htdocs/comm/action/list.php | 21 +-
htdocs/comm/action/pertype.php | 36 +-
htdocs/comm/action/peruser.php | 42 +-
htdocs/comm/action/rapport/index.php | 3 +-
htdocs/comm/card.php | 54 +-
htdocs/comm/contact.php | 3 +-
htdocs/comm/index.php | 36 +-
htdocs/comm/mailing/advtargetemailing.php | 3 +-
htdocs/comm/mailing/card.php | 99 +-
htdocs/comm/mailing/cibles.php | 39 +-
.../mailing/class/advtargetemailing.class.php | 21 +-
.../html.formadvtargetemailing.class.php | 6 +-
htdocs/comm/mailing/class/mailing.class.php | 39 +-
htdocs/comm/mailing/index.php | 9 +-
htdocs/comm/mailing/list.php | 9 +-
htdocs/comm/multiprix.php | 3 +-
htdocs/comm/propal/card.php | 45 +-
.../comm/propal/class/api_proposals.class.php | 6 +-
htdocs/comm/propal/class/propal.class.php | 200 +-
htdocs/comm/propal/contact.php | 12 +-
htdocs/comm/propal/document.php | 3 +-
htdocs/comm/propal/index.php | 6 +-
htdocs/comm/propal/list.php | 15 +-
htdocs/comm/propal/stats/index.php | 9 +-
htdocs/comm/prospect/index.php | 3 +-
htdocs/comm/prospect/recap-prospect.php | 3 +-
htdocs/comm/recap-client.php | 3 +-
htdocs/comm/remise.php | 18 +-
htdocs/comm/remx.php | 60 +-
htdocs/commande/card.php | 63 +-
htdocs/commande/class/api_orders.class.php | 3 +-
htdocs/commande/class/commande.class.php | 200 +-
htdocs/commande/contact.php | 12 +-
htdocs/commande/customer.php | 3 +-
htdocs/commande/document.php | 6 +-
htdocs/commande/index.php | 6 +-
htdocs/commande/list.php | 9 +-
htdocs/commande/orderstoinvoice.php | 27 +-
htdocs/commande/stats/index.php | 9 +-
htdocs/core/actions_addupdatedelete.inc.php | 41 +-
htdocs/core/actions_builddoc.inc.php | 6 +-
htdocs/core/actions_comments.inc.php | 9 +-
htdocs/core/actions_extrafields.inc.php | 33 +-
htdocs/core/actions_fetchobject.inc.php | 3 +-
htdocs/core/actions_linkedfiles.inc.php | 17 +-
htdocs/core/actions_massactions.inc.php | 78 +-
htdocs/core/actions_sendmails.inc.php | 15 +-
htdocs/core/actions_setmoduleoptions.inc.php | 9 +-
htdocs/core/ajax/ajaxdirpreview.php | 14 +-
htdocs/core/ajax/ajaxdirtree.php | 2 +-
htdocs/core/ajax/check_notifications.php | 6 +-
htdocs/core/ajax/loadinplace.php | 6 +-
htdocs/core/ajax/saveinplace.php | 15 +-
htdocs/core/ajax/vatrates.php | 3 +-
htdocs/core/ajax/ziptown.php | 5 +-
htdocs/core/boxes/box_actions.php | 3 +-
htdocs/core/boxes/box_activity.php | 3 +-
htdocs/core/boxes/box_bookmarks.php | 3 +-
htdocs/core/boxes/box_external_rss.php | 3 +-
htdocs/core/boxes/box_factures_imp.php | 3 +-
htdocs/core/boxes/box_ficheinter.php | 6 +-
.../boxes/box_graph_invoices_permonth.php | 12 +-
.../box_graph_invoices_supplier_permonth.php | 12 +-
.../core/boxes/box_graph_orders_permonth.php | 12 +-
.../box_graph_orders_supplier_permonth.php | 12 +-
.../boxes/box_graph_product_distribution.php | 6 +-
.../boxes/box_graph_propales_permonth.php | 12 +-
htdocs/core/boxes/box_produits.php | 3 +-
.../core/boxes/box_produits_alerte_stock.php | 6 +-
htdocs/core/boxes/box_project.php | 3 +-
htdocs/core/boxes/box_services_contracts.php | 6 +-
htdocs/core/boxes/box_services_expired.php | 6 +-
htdocs/core/boxes/box_supplier_orders.php | 3 +-
...box_supplier_orders_awaiting_reception.php | 3 +-
htdocs/core/boxes/modules_boxes.php | 9 +-
htdocs/core/class/CMailFile.class.php | 51 +-
htdocs/core/class/CSMSFile.class.php | 15 +-
htdocs/core/class/ccountry.class.php | 12 +-
htdocs/core/class/comment.class.php | 9 +-
.../core/class/commondocgenerator.class.php | 5 +-
htdocs/core/class/commoninvoice.class.php | 39 +-
htdocs/core/class/commonobject.class.php | 383 +--
htdocs/core/class/commonobjectline.class.php | 3 +-
htdocs/core/class/conf.class.php | 3 +-
htdocs/core/class/coreobject.class.php | 33 +-
htdocs/core/class/cstate.class.php | 9 +-
htdocs/core/class/ctypent.class.php | 12 +-
htdocs/core/class/cunits.class.php | 24 +-
htdocs/core/class/discount.class.php | 51 +-
htdocs/core/class/dolgeoip.class.php | 18 +-
htdocs/core/class/dolgraph.class.php | 33 +-
.../core/class/emailsenderprofile.class.php | 3 +-
htdocs/core/class/evalmath.class.php | 6 +-
htdocs/core/class/events.class.php | 6 +-
htdocs/core/class/extrafields.class.php | 88 +-
htdocs/core/class/extralanguages.class.php | 37 +-
htdocs/core/class/fileupload.class.php | 9 +-
htdocs/core/class/fiscalyear.class.php | 18 +-
htdocs/core/class/hookmanager.class.php | 3 +-
htdocs/core/class/html.form.class.php | 398 +--
.../core/class/html.formaccounting.class.php | 18 +-
htdocs/core/class/html.formactions.class.php | 12 +-
htdocs/core/class/html.formadmin.class.php | 12 +-
htdocs/core/class/html.formcompany.class.php | 36 +-
htdocs/core/class/html.formcontract.class.php | 12 +-
htdocs/core/class/html.formfile.class.php | 138 +-
.../class/html.formintervention.class.php | 12 +-
htdocs/core/class/html.formmail.class.php | 54 +-
htdocs/core/class/html.formmargin.class.php | 3 +-
htdocs/core/class/html.formother.class.php | 56 +-
htdocs/core/class/html.formprojet.class.php | 36 +-
htdocs/core/class/html.formpropal.class.php | 9 +-
htdocs/core/class/html.formsms.class.php | 30 +-
.../class/html.formsocialcontrib.class.php | 9 +-
htdocs/core/class/html.formwebsite.class.php | 18 +-
htdocs/core/class/infobox.class.php | 20 +-
htdocs/core/class/interfaces.class.php | 15 +-
htdocs/core/class/ldap.class.php | 92 +-
htdocs/core/class/lessc.class.php | 2663 +++++++++--------
htdocs/core/class/link.class.php | 18 +-
htdocs/core/class/menubase.class.php | 21 +-
htdocs/core/class/notify.class.php | 30 +-
htdocs/core/class/openid.class.php | 12 +-
htdocs/core/class/rssparser.class.php | 36 +-
htdocs/core/class/smtps.class.php | 51 +-
htdocs/core/class/stats.class.php | 21 +-
htdocs/core/class/translate.class.php | 17 +-
htdocs/core/class/utils.class.php | 44 +-
htdocs/core/commonfieldsinexport.inc.php | 3 +-
htdocs/core/datepicker.php | 18 +-
htdocs/core/db/DoliDB.class.php | 17 +-
htdocs/core/db/mssql.class.php | 57 +-
htdocs/core/db/mysqli.class.php | 27 +-
htdocs/core/db/pgsql.class.php | 24 +-
htdocs/core/db/sqlite3.class.php | 15 +-
htdocs/core/extrafieldsinexport.inc.php | 3 +-
.../filemanagerdol/connectors/php/basexml.php | 6 +-
.../connectors/php/commands.php | 24 +-
.../core/filemanagerdol/connectors/php/io.php | 12 +-
.../filemanagerdol/connectors/php/util.php | 6 +-
htdocs/core/get_info.php | 5 +-
htdocs/core/get_menudiv.php | 2 +-
htdocs/core/lib/admin.lib.php | 63 +-
htdocs/core/lib/agenda.lib.php | 6 +-
htdocs/core/lib/ajax.lib.php | 3 +-
htdocs/core/lib/bank.lib.php | 3 +-
htdocs/core/lib/barcode.lib.php | 9 +-
htdocs/core/lib/company.lib.php | 39 +-
htdocs/core/lib/cron.lib.php | 3 +-
htdocs/core/lib/date.lib.php | 33 +-
htdocs/core/lib/doc.lib.php | 9 +-
htdocs/core/lib/doleditor.lib.php | 3 +-
htdocs/core/lib/ecm.lib.php | 3 +-
htdocs/core/lib/files.lib.php | 101 +-
htdocs/core/lib/format_cards.lib.php | 3 +-
htdocs/core/lib/functions.lib.php | 247 +-
htdocs/core/lib/functions2.lib.php | 68 +-
htdocs/core/lib/functionsnumtoword.lib.php | 3 +-
htdocs/core/lib/geturl.lib.php | 12 +-
htdocs/core/lib/images.lib.php | 12 +-
htdocs/core/lib/invoice2.lib.php | 6 +-
htdocs/core/lib/json.lib.php | 8 +-
htdocs/core/lib/ldap.lib.php | 3 +-
htdocs/core/lib/memory.lib.php | 18 +-
htdocs/core/lib/modulebuilder.lib.php | 15 +-
htdocs/core/lib/parsemd.lib.php | 3 +-
htdocs/core/lib/payments.lib.php | 15 +-
htdocs/core/lib/pdf.lib.php | 52 +-
htdocs/core/lib/price.lib.php | 20 +-
htdocs/core/lib/product.lib.php | 3 +-
htdocs/core/lib/project.lib.php | 27 +-
htdocs/core/lib/security.lib.php | 18 +-
htdocs/core/lib/security2.lib.php | 23 +-
htdocs/core/lib/sendings.lib.php | 12 +-
htdocs/core/lib/signature.lib.php | 6 +-
htdocs/core/lib/tax.lib.php | 33 +-
htdocs/core/lib/ticket.lib.php | 21 +-
htdocs/core/lib/treeview.lib.php | 9 +-
htdocs/core/lib/usergroups.lib.php | 105 +-
htdocs/core/lib/website.lib.php | 47 +-
htdocs/core/lib/xcal.lib.php | 9 +-
htdocs/core/login/functions_dolibarr.php | 12 +-
htdocs/core/login/functions_ldap.php | 6 +-
htdocs/core/login/functions_openid.php | 6 +-
htdocs/core/menus/standard/auguria.lib.php | 12 +-
htdocs/core/menus/standard/auguria_menu.php | 26 +-
htdocs/core/menus/standard/eldy.lib.php | 18 +-
htdocs/core/menus/standard/eldy_menu.php | 26 +-
htdocs/core/menus/standard/empty.php | 20 +-
htdocs/core/modules/DolibarrModules.class.php | 89 +-
htdocs/core/modules/action/modules_action.php | 9 +-
htdocs/core/modules/action/rapport.pdf.php | 3 +-
.../core/modules/bank/doc/pdf_ban.modules.php | 15 +-
.../bank/doc/pdf_sepamandate.modules.php | 15 +-
.../barcode/mod_barcode_product_standard.php | 18 +-
.../bom/doc/doc_generic_bom_odt.modules.php | 20 +-
htdocs/core/modules/bom/mod_bom_standard.php | 3 +-
.../modules/cheque/mod_chequereceipt_mint.php | 3 +-
.../modules/cheque/modules_chequereceipts.php | 9 +-
.../doc/doc_generic_order_odt.modules.php | 20 +-
.../commande/doc/pdf_einstein.modules.php | 38 +-
.../commande/doc/pdf_eratosthene.modules.php | 53 +-
.../modules/commande/mod_commande_marbre.php | 3 +-
.../doc/doc_generic_contract_odt.modules.php | 20 +-
.../contract/doc/pdf_strato.modules.php | 32 +-
.../modules/contract/mod_contract_serpis.php | 3 +-
.../modules/dons/html_cerfafr.modules.php | 30 +-
.../doc/doc_generic_shipment_odt.modules.php | 25 +-
.../expedition/doc/pdf_espadon.modules.php | 53 +-
.../expedition/doc/pdf_merou.modules.php | 30 +-
.../expedition/doc/pdf_rouget.modules.php | 50 +-
.../expedition/mod_expedition_safor.php | 3 +-
.../doc/pdf_standard.modules.php | 38 +-
.../expensereport/mod_expensereport_jade.php | 3 +-
.../modules/export/export_csv.modules.php | 6 +-
.../export/export_excel2007new.modules.php | 12 +-
.../doc/doc_generic_invoice_odt.modules.php | 17 +-
.../modules/facture/doc/pdf_crabe.modules.php | 47 +-
.../facture/doc/pdf_sponge.modules.php | 59 +-
.../core/modules/facture/mod_facture_mars.php | 3 +-
.../modules/facture/mod_facture_terre.php | 3 +-
.../fichinter/doc/pdf_soleil.modules.php | 29 +-
htdocs/core/modules/fichinter/mod_pacific.php | 3 +-
.../modules/fichinter/modules_fichinter.php | 9 +-
.../modules/holiday/mod_holiday_madonna.php | 3 +-
.../modules/import/import_csv.modules.php | 50 +-
.../modules/import/import_xlsx.modules.php | 41 +-
.../livraison/doc/pdf_typhon.modules.php | 32 +-
.../modules/livraison/mod_livraison_jade.php | 3 +-
.../mailings/advthirdparties.modules.php | 9 +-
.../modules/mailings/contacts1.modules.php | 12 +-
.../core/modules/mailings/fraise.modules.php | 9 +-
.../modules/mailings/modules_mailings.php | 6 +-
.../core/modules/mailings/pomme.modules.php | 3 +-
.../modules/mailings/thirdparties.modules.php | 15 +-
.../thirdparties_services_expired.modules.php | 6 +-
.../modules/mailings/xinputfile.modules.php | 11 +-
.../modules/mailings/xinputuser.modules.php | 6 +-
.../modules/member/doc/pdf_standard.class.php | 19 +-
htdocs/core/modules/member/modules_cards.php | 9 +-
htdocs/core/modules/modAgenda.class.php | 3 +-
htdocs/core/modules/modBlockedLog.class.php | 3 +-
.../mrp/doc/doc_generic_mo_odt.modules.php | 20 +-
htdocs/core/modules/mrp/mod_mo_standard.php | 3 +-
.../modules/oauth/github_oauthcallback.php | 3 +-
.../modules/oauth/google_oauthcallback.php | 3 +-
.../oauth/stripelive_oauthcallback.php | 3 +-
.../oauth/stripetest_oauthcallback.php | 3 +-
.../modules/payment/mod_payment_cicada.php | 3 +-
.../modules/printing/printgcp.modules.php | 15 +-
.../modules/printing/printipp.modules.php | 6 +-
.../doc/pdf_standardlabel.class.php | 10 +-
.../printsheet/doc/pdf_tcpdflabel.class.php | 10 +-
.../modules/printsheet/modules_labels.php | 9 +-
.../doc/doc_generic_product_odt.modules.php | 20 +-
.../product/doc/pdf_standard.modules.php | 18 +-
.../product/mod_codeproduct_elephant.php | 9 +-
.../modules/product/modules_product.class.php | 3 +-
.../doc/doc_generic_project_odt.modules.php | 47 +-
.../project/doc/pdf_baleine.modules.php | 29 +-
.../project/doc/pdf_beluga.modules.php | 26 +-
.../project/doc/pdf_timespent.modules.php | 29 +-
.../modules/project/mod_project_simple.php | 6 +-
.../task/doc/doc_generic_task_odt.modules.php | 29 +-
.../modules/project/task/mod_task_simple.php | 6 +-
.../doc/doc_generic_proposal_odt.modules.php | 20 +-
.../modules/propale/doc/pdf_azur.modules.php | 53 +-
.../modules/propale/doc/pdf_cyan.modules.php | 56 +-
.../modules/propale/mod_propale_marbre.php | 6 +-
.../modules/rapport/pdf_paiement.class.php | 9 +-
.../doc/doc_generic_reception_odt.modules.php | 23 +-
.../reception/doc/pdf_squille.modules.php | 47 +-
.../modules/reception/mod_reception_beryl.php | 3 +-
.../societe/doc/doc_generic_odt.modules.php | 17 +-
.../societe/mod_codeclient_elephant.php | 9 +-
.../modules/societe/mod_codeclient_monkey.php | 24 +-
.../societe/mod_codecompta_aquarium.php | 12 +-
.../societe/mod_codecompta_digitaria.php | 15 +-
.../modules/societe/modules_societe.class.php | 3 +-
.../doc/doc_generic_stock_odt.modules.php | 20 +-
.../stock/doc/pdf_standard.modules.php | 47 +-
.../stock/doc/pdf_stdmovement.modules.php | 53 +-
.../doc/pdf_canelle.modules.php | 35 +-
.../mod_facture_fournisseur_cactus.php | 3 +-
...doc_generic_supplier_order_odt.modules.php | 23 +-
.../supplier_order/doc/pdf_cornas.modules.php | 50 +-
.../doc/pdf_muscadet.modules.php | 47 +-
.../mod_commande_fournisseur_muguet.php | 3 +-
.../doc/pdf_standard.modules.php | 32 +-
.../mod_supplier_payment_bronan.php | 3 +-
..._generic_supplier_proposal_odt.modules.php | 23 +-
.../doc/pdf_aurore.modules.php | 47 +-
.../mod_supplier_proposal_marbre.php | 6 +-
.../core/modules/syslog/mod_syslog_file.php | 3 +-
.../core/modules/syslog/mod_syslog_syslog.php | 3 +-
.../user/doc/doc_generic_user_odt.modules.php | 14 +-
.../doc/doc_generic_usergroup_odt.modules.php | 23 +-
htdocs/core/photos_resize.php | 17 +-
htdocs/core/search.php | 3 +-
htdocs/core/search_page.php | 3 +-
.../core/tpl/admin_extrafields_edit.tpl.php | 3 +-
.../core/tpl/admin_extrafields_view.tpl.php | 3 +-
htdocs/core/tpl/bloc_comment.tpl.php | 6 +-
htdocs/core/tpl/card_presend.tpl.php | 9 +-
htdocs/core/tpl/contacts.tpl.php | 3 +-
.../tpl/extrafields_list_print_fields.tpl.php | 3 +-
.../tpl/extrafields_list_search_input.tpl.php | 3 +-
.../tpl/extrafields_list_search_title.tpl.php | 3 +-
htdocs/core/tpl/extrafields_view.tpl.php | 9 +-
htdocs/core/tpl/filemanager.tpl.php | 5 +-
htdocs/core/tpl/list_print_total.tpl.php | 3 +-
htdocs/core/tpl/login.tpl.php | 3 +-
htdocs/core/tpl/massactions_pre.tpl.php | 6 +-
htdocs/core/tpl/object_discounts.tpl.php | 3 +-
htdocs/core/tpl/objectline_create.tpl.php | 21 +-
htdocs/core/tpl/objectline_edit.tpl.php | 6 +-
htdocs/core/tpl/objectline_view.tpl.php | 12 +-
htdocs/core/tpl/resource_view.tpl.php | 3 +-
.../interface_20_all_Logevents.class.php | 3 +-
...terface_50_modAgenda_ActionsAuto.class.php | 14 +-
..._modBlockedlog_ActionsBlockedLog.class.php | 3 +-
...odMailmanspip_Mailmanspipsynchro.class.php | 18 +-
...terface_50_modTicket_TicketEmail.class.php | 3 +-
.../interface_80_modStripe_Stripe.class.php | 3 +-
htdocs/core/website.inc.php | 3 +-
htdocs/stripe/admin/stripe.php | 18 +-
htdocs/stripe/charge.php | 12 +-
htdocs/stripe/class/actions_stripe.class.php | 6 +-
htdocs/stripe/class/stripe.class.php | 36 +-
htdocs/stripe/config.php | 3 +-
htdocs/stripe/payout.php | 6 +-
htdocs/stripe/transaction.php | 6 +-
htdocs/supplier_proposal/card.php | 33 +-
.../class/supplier_proposal.class.php | 156 +-
htdocs/supplier_proposal/contact.php | 12 +-
htdocs/supplier_proposal/document.php | 3 +-
htdocs/supplier_proposal/index.php | 6 +-
htdocs/supplier_proposal/list.php | 6 +-
htdocs/support/inc.php | 6 +-
htdocs/takepos/admin/bar.php | 3 +-
htdocs/takepos/admin/orderprinters.php | 6 +-
htdocs/takepos/admin/receipt.php | 18 +-
htdocs/takepos/admin/setup.php | 6 +-
htdocs/takepos/admin/terminal.php | 9 +-
htdocs/takepos/ajax/ajax.php | 3 +-
htdocs/takepos/genimg/index.php | 6 +-
htdocs/takepos/index.php | 12 +-
htdocs/takepos/invoice.php | 36 +-
htdocs/takepos/pay.php | 6 +-
htdocs/takepos/phone.php | 3 +-
htdocs/takepos/reduction.php | 6 +-
htdocs/theme/eldy/global.inc.php | 6 +-
htdocs/theme/eldy/theme_vars.inc.php | 3 +-
htdocs/theme/md/style.css.php | 6 +-
htdocs/theme/md/theme_vars.inc.php | 3 +-
htdocs/ticket/agenda.php | 3 +-
htdocs/ticket/card.php | 3 +-
htdocs/ticket/class/actions_ticket.class.php | 3 +-
htdocs/ticket/class/ticket.class.php | 12 +-
htdocs/ticket/document.php | 3 +-
htdocs/ticket/list.php | 3 +-
htdocs/ticket/messaging.php | 3 +-
htdocs/ticket/stats/index.php | 9 +-
htdocs/user/bank.php | 18 +-
htdocs/user/card.php | 180 +-
htdocs/user/class/api_users.class.php | 6 +-
htdocs/user/class/user.class.php | 179 +-
htdocs/user/class/userbankaccount.class.php | 12 +-
htdocs/user/class/usergroup.class.php | 39 +-
htdocs/user/clicktodial.php | 8 +-
htdocs/user/document.php | 3 +-
htdocs/user/group/card.php | 36 +-
htdocs/user/group/ldap.php | 12 +-
htdocs/user/group/list.php | 6 +-
htdocs/user/group/perms.php | 9 +-
htdocs/user/hierarchy.php | 9 +-
htdocs/user/home.php | 15 +-
htdocs/user/ldap.php | 12 +-
htdocs/user/list.php | 6 +-
htdocs/user/note.php | 3 +-
htdocs/user/notify/card.php | 27 +-
htdocs/user/param_ihm.php | 9 +-
htdocs/user/passwordforgotten.php | 24 +-
htdocs/user/perms.php | 12 +-
htdocs/variants/combinations.php | 12 +-
htdocs/variants/create.php | 3 +-
htdocs/webservices/admin/index.php | 3 +-
htdocs/webservices/server_actioncomm.php | 15 +-
htdocs/webservices/server_category.php | 6 +-
htdocs/webservices/server_contact.php | 12 +-
htdocs/webservices/server_invoice.php | 21 +-
htdocs/webservices/server_order.php | 24 +-
htdocs/webservices/server_other.php | 3 +-
htdocs/webservices/server_payment.php | 3 +-
.../webservices/server_productorservice.php | 42 +-
htdocs/webservices/server_project.php | 15 +-
.../webservices/server_supplier_invoice.php | 9 +-
htdocs/webservices/server_thirdparty.php | 24 +-
htdocs/webservices/server_user.php | 42 +-
565 files changed, 5190 insertions(+), 8632 deletions(-)
diff --git a/dev/tools/dolibarr-postgres2mysql.php b/dev/tools/dolibarr-postgres2mysql.php
index f2794455ca3..c17a73dfe12 100644
--- a/dev/tools/dolibarr-postgres2mysql.php
+++ b/dev/tools/dolibarr-postgres2mysql.php
@@ -76,14 +76,12 @@ function getfieldname($l)
if (preg_match("/`(.*)`/", $l, $regs)) {
if ($regs[1])
return $regs[1];
- else
- return null;
+ else return null;
} // if its not in quotes, then it should (we hope!) be the first "word" on the line, up to the first space.
elseif (preg_match("/([^\ ]*)/", trim($l), $regs)) {
if ($regs[1])
return $regs[1];
- else
- return null;
+ else return null;
}
}
@@ -102,8 +100,7 @@ function formatsize($s)
return sprintf("%.1f", round($s / 1024, 1)) . "K";
elseif ($s < pow(2, 30))
return sprintf("%.1f", round($s / 1024 / 1024, 1)) . "M";
- else
- return sprintf("%.1f", round($s / 1024 / 1024 / 1024, 1)) . "G";
+ else return sprintf("%.1f", round($s / 1024 / 1024 / 1024, 1)) . "G";
}
/**
@@ -146,8 +143,7 @@ function pg2mysql_large($infilename, $outfilename)
if ($c % 2 != 0) {
if ($inquotes)
$inquotes = false;
- else
- $inquotes = true;
+ else $inquotes = true;
}
if ($linenum % 10000 == 0) {
@@ -329,8 +325,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
$num = $regs[1];
if ($num <= 255)
$line = preg_replace("/ character varying\([0-9]*\)/", " varchar($num)", $line);
- else
- $line = preg_replace("/ character varying\([0-9]*\)/", " text", $line);
+ else $line = preg_replace("/ character varying\([0-9]*\)/", " text", $line);
}
// character varying with no size, we will default to varchar(255)
if (preg_match("/ character varying/", $line)) {
@@ -352,8 +347,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
$num = $regs[1];
if ($num <= 255)
$line = preg_replace("/ character\([0-9]*\)/", " varchar($num)", $line);
- else
- $line = preg_replace("/ character\([0-9]*\)/", " text", $line);
+ else $line = preg_replace("/ character\([0-9]*\)/", " text", $line);
}
// timestamps
$line = str_replace(" timestamp with time zone", " datetime", $line);
@@ -465,8 +459,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
if ($c % 2 != 0) {
if ($inquotes)
$inquotes = false;
- else
- $inquotes = true;
+ else $inquotes = true;
// echo "inquotes=$inquotes\n";
}
} while (substr($lines[$linenumber], - 3, - 1) != ");" || $inquotes);
diff --git a/dev/translation/autotranslator.class.php b/dev/translation/autotranslator.class.php
index f9657482c86..b51515a42cb 100644
--- a/dev/translation/autotranslator.class.php
+++ b/dev/translation/autotranslator.class.php
@@ -77,7 +77,7 @@ class autoTranslator
$files = $this->getTranslationFilesArray($this->_refLang);
$counter = 1;
- foreach($files as $file)
+ foreach ($files as $file)
{
if ($this->_limittofile && $this->_limittofile != $file) continue;
$counter++;
@@ -94,7 +94,7 @@ class autoTranslator
// If we must process all languages
$arraytmp=dol_dir_list($this->_langDir, 'directories', 0);
- foreach($arraytmp as $dirtmp)
+ foreach ($arraytmp as $dirtmp)
{
if ($dirtmp['name'] === $this->_refLang) continue; // We discard source language
$tmppart=explode('_', $dirtmp['name']);
@@ -112,7 +112,7 @@ class autoTranslator
}
// Process translation of source file for each target languages
- foreach($targetlangs as $my_destlang)
+ foreach ($targetlangs as $my_destlang)
{
$this->_translatedFiles = array();
@@ -124,15 +124,14 @@ class autoTranslator
echo "File not found: " . $destPath . ". We generate it. \n";
$this->createTranslationFile($destPath, $my_destlang);
}
- else
- {
+ else {
echo "Updating file: " . $destPath . " \n";
}
// Translate lines
$fileContentDest = file($destPath, FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);
$newlines=0;
- foreach($fileContent as $line){
+ foreach ($fileContent as $line){
$key = $this->getLineKey($line);
$value = $this->getLineValue($line);
if ($key && $value)
@@ -167,7 +166,7 @@ class autoTranslator
fwrite($fp, "\n");
fwrite($fp, "// START - Lines generated via autotranslator.php tool (".$this->_time.").\n");
fwrite($fp, "// Reference language: ".$this->_refLang." -> ".$my_destlang."\n");
- foreach($this->_translatedFiles[$file] as $line) {
+ foreach ($this->_translatedFiles[$file] as $line) {
fwrite($fp, $line . "\n");
}
fwrite($fp, "// STOP - Lines generated via autotranslator.php tool (".$this->_time_end.").\n");
@@ -209,7 +208,7 @@ class autoTranslator
{
//print "key =".$key."\n";
- foreach($content as $line) {
+ foreach ($content as $line) {
$destKey = $this->getLineKey($line);
$destValue = $this->getLineValue($line);
// If translated return
@@ -273,8 +272,8 @@ class autoTranslator
private function getTranslationFilesArray($lang)
{
$dir = new DirectoryIterator($this->_langDir.$lang);
- while($dir->valid()) {
- if(!$dir->isDot() && $dir->isFile() && ! preg_match('/^\./', $dir->getFilename())) {
+ while ($dir->valid()) {
+ if (!$dir->isDot() && $dir->isFile() && ! preg_match('/^\./', $dir->getFilename())) {
$files[] = $dir->getFilename();
}
$dir->next();
diff --git a/dev/translation/sanity_check_en_langfiles.php b/dev/translation/sanity_check_en_langfiles.php
index f568ba2b04b..0268fc94ed8 100755
--- a/dev/translation/sanity_check_en_langfiles.php
+++ b/dev/translation/sanity_check_en_langfiles.php
@@ -360,16 +360,14 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
$unused[$value] = $line;
echo $line; // $trad contains the \n
}
- else
- {
+ else {
unset($output);
//print 'X'.$output.'Y';
}
}
if (empty($unused)) print "No string not used found.\n";
- else
- {
+ else {
$filetosave='/tmp/'.($argv[2]?$argv[2]:"").'notused.lang';
print "Strings in en_US that are never used are saved into file ".$filetosave.":\n";
file_put_contents($filetosave, implode("", $unused));
diff --git a/dev/translation/strip_language_file.php b/dev/translation/strip_language_file.php
index ce28ca5de63..5a94192b2bd 100755
--- a/dev/translation/strip_language_file.php
+++ b/dev/translation/strip_language_file.php
@@ -80,8 +80,8 @@ $aEnglish = array();
if ($filesToProcess == 'all')
{
$dir = new DirectoryIterator('htdocs/langs/'.$lPrimary);
- while($dir->valid()) {
- if(!$dir->isDot() && $dir->isFile() && ! preg_match('/^\./', $dir->getFilename())) {
+ while ($dir->valid()) {
+ if (!$dir->isDot() && $dir->isFile() && ! preg_match('/^\./', $dir->getFilename())) {
$files[] = $dir->getFilename();
}
$dir->next();
@@ -94,7 +94,7 @@ else $filesToProcess=explode(',', $filesToProcess);
// Loop on each file
-foreach($filesToProcess as $fileToProcess)
+foreach ($filesToProcess as $fileToProcess)
{
$lPrimaryFile = 'htdocs/langs/'.$lPrimary.'/'.$fileToProcess;
$lSecondaryFile = 'htdocs/langs/'.$lSecondary.'/'.$fileToProcess;
@@ -285,8 +285,7 @@ foreach($filesToProcess as $fileToProcess)
print "Key $key is redundant in file $lPrimaryFile (line: $cnt) - Already found into ".$fileFirstFound[$key]." (line: ".$lineFirstFound[$key].").\n";
continue;
}
- else
- {
+ else {
$fileFirstFound[$key] = $fileToProcess;
$lineFirstFound[$key] = $cnt;
}
diff --git a/htdocs/admin/agenda.php b/htdocs/admin/agenda.php
index b6231a45a10..52a1adc4fd2 100644
--- a/htdocs/admin/agenda.php
+++ b/htdocs/admin/agenda.php
@@ -62,8 +62,7 @@ if ($resql)
}
$db->free($resql);
}
-else
-{
+else {
dol_print_error($db);
}
@@ -108,8 +107,7 @@ if ($action == "save" && empty($cancel))
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
$db->commit();
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
$db->rollback();
}
diff --git a/htdocs/admin/agenda_extsites.php b/htdocs/admin/agenda_extsites.php
index 77113ff1e13..dd5d04732ff 100644
--- a/htdocs/admin/agenda_extsites.php
+++ b/htdocs/admin/agenda_extsites.php
@@ -108,8 +108,7 @@ if ($actionsave)
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
$db->rollback();
if (empty($errorsaved)) setEventMessages($langs->trans("Error"), null, 'errors');
}
@@ -163,14 +162,12 @@ if ($conf->use_javascript_ajax)
{
print ajax_constantonoff('AGENDA_DISABLE_EXT', array('enabled'=>array(0=>'.hideifnotset')), null, 1);
}
-else
-{
+else {
if (empty($conf->global->AGENDA_DISABLE_EXT))
{
print ''.img_picto($langs->trans("Enabled"), 'on').' ';
}
- else
- {
+ else {
print ''.img_picto($langs->trans("Disabled"), 'off').' ';
}
}
diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php
index c5b196146d5..a9e5bccd71b 100644
--- a/htdocs/admin/agenda_other.php
+++ b/htdocs/admin/agenda_other.php
@@ -60,8 +60,7 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg))
Header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -74,8 +73,7 @@ if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg))
Header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -121,14 +119,12 @@ elseif ($action == 'specimen') // For orders
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=action&file=SPECIMEN.pdf");
return;
}
- else
- {
+ else {
setEventMessages($module->error, $module->errors, 'errors');
dol_syslog($module->error, LOG_ERR);
}
}
- else
- {
+ else {
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
}
@@ -214,8 +210,7 @@ if ($resql)
$i++;
}
}
-else
-{
+else {
dol_print_error($db);
}
@@ -263,8 +258,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
$module = new $classname($db, $specimenthirdparty);
if (method_exists($module, 'info'))
print $module->info($langs);
- else
- print $module->description;
+ else print $module->description;
print "\n";
// Active
@@ -277,14 +271,12 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
print img_picto($langs->trans("Enabled"), 'switch_on');
print '';
}
- else
- {
+ else {
print img_picto($langs->trans("Enabled"), 'switch_on');
}
print "";
}
- else
- {
+ else {
print ''."\n";
print 'scandir.'&label='.urlencode($module->name).'&type=action">'.img_picto($langs->trans("Disabled"), 'switch_off').' ';
print " ";
@@ -296,8 +288,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
{
print img_picto($langs->trans("Default"), 'on');
}
- else
- {
+ else {
print 'scandir.'&label='.urlencode($module->name).'&type=action"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').' ';
}
print '';
@@ -347,8 +338,7 @@ if (empty($conf->global->AGENDA_USE_EVENT_TYPE))
{
print ''.img_picto($langs->trans("Disabled"), 'switch_off').' ';
}
-else
-{
+else {
print ''.img_picto($langs->trans("Enabled"), 'switch_on').' ';
}
print ''."\n";
diff --git a/htdocs/admin/agenda_reminder.php b/htdocs/admin/agenda_reminder.php
index 3d51bd3158c..d9b7ead6f2e 100644
--- a/htdocs/admin/agenda_reminder.php
+++ b/htdocs/admin/agenda_reminder.php
@@ -55,8 +55,7 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg))
Header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -69,8 +68,7 @@ if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg))
Header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -114,14 +112,12 @@ elseif ($action == 'specimen') // For orders
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=action&file=SPECIMEN.pdf");
return;
}
- else
- {
+ else {
setEventMessages($module->error, $module->errors, 'errors');
dol_syslog($module->error, LOG_ERR);
}
}
- else
- {
+ else {
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
}
diff --git a/htdocs/admin/agenda_xcal.php b/htdocs/admin/agenda_xcal.php
index 7df74ba6a9d..b6d0472c3af 100644
--- a/htdocs/admin/agenda_xcal.php
+++ b/htdocs/admin/agenda_xcal.php
@@ -55,8 +55,7 @@ if ($actionsave)
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
$db->rollback();
setEventMessages($langs->trans("SaveFailed"), null, 'errors');
}
diff --git a/htdocs/admin/bank.php b/htdocs/admin/bank.php
index b048dea9565..662dc517436 100644
--- a/htdocs/admin/bank.php
+++ b/htdocs/admin/bank.php
@@ -128,8 +128,7 @@ if ($actionsave)
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
$db->rollback();
if (empty($errorsaved)) setEventMessages($langs->trans("Error"), null, 'errors');
}
@@ -359,8 +358,7 @@ foreach ($dirmodels as $reldir) {
print "\n";
if (method_exists($module, 'info'))
print $module->info($langs);
- else
- print $module->description;
+ else print $module->description;
print ' ';
// Active
@@ -448,8 +446,7 @@ if ($conf->global->BANK_COLORIZE_MOVEMENT) {
print '';
print '';
}
-else
-{
+else {
print ''."\n";
print ''.img_picto($langs->trans("Disabled"), 'switch_off').' ';
print " ";
@@ -509,8 +506,7 @@ if ($conf->global->BANK_REPORT_LAST_NUM_RELEVE) {
print '';
print '';
}
-else
-{
+else {
print ''."\n";
print ''.img_picto($langs->trans("Disabled"), 'switch_off').' ';
print " ";
diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php
index e577942ab21..90a2525de05 100644
--- a/htdocs/admin/barcode.php
+++ b/htdocs/admin/barcode.php
@@ -81,8 +81,7 @@ elseif ($action == 'update')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -265,19 +264,16 @@ if ($resql)
//print $url;
print ' ';
}
- else
- {
+ else {
print $langs->trans("FormatNotSupportedByGenerator");
}
}
- else
- {
+ else {
print 'ErrorClassNotFoundInModule '.$classname.' '.$obj->coder;
}
}
}
- else
- {
+ else {
print $langs->trans("ChooseABarCode");
}
print '';
@@ -412,8 +408,7 @@ if ($conf->product->enabled)
print img_picto($langs->trans("Activated"), 'switch_on');
print '';
}
- else
- {
+ else {
print '';
print img_picto($langs->trans("Disabled"), 'switch_off');
print ' ';
diff --git a/htdocs/admin/bom.php b/htdocs/admin/bom.php
index 6d37def3187..26f3fe75858 100644
--- a/htdocs/admin/bom.php
+++ b/htdocs/admin/bom.php
@@ -58,8 +58,7 @@ if ($action == 'updateMask')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -96,14 +95,12 @@ elseif ($action == 'specimen')
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=bom&file=SPECIMEN.pdf");
return;
}
- else
- {
+ else {
setEventMessages($module->error, null, 'errors');
dol_syslog($module->error, LOG_ERR);
}
}
- else
- {
+ else {
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
}
@@ -161,8 +158,7 @@ elseif ($action == 'set_BOM_DRAFT_WATERMARK')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -179,8 +175,7 @@ elseif ($action == 'set_BOM_FREE_TEXT')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -262,8 +257,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Activated"), 'switch_on');
}
- else
- {
+ else {
print '';
print img_picto($langs->trans("Disabled"), 'switch_off');
print ' ';
@@ -328,8 +322,7 @@ if ($resql)
$i++;
}
}
-else
-{
+else {
dol_print_error($db);
}
@@ -399,8 +392,7 @@ foreach ($dirmodels as $reldir)
print '';
print '';
}
- else
- {
+ else {
print ''."\n";
print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').' ';
print " ";
@@ -412,8 +404,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Default"), 'on');
}
- else
- {
+ else {
print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').' ';
}
print '';
@@ -442,8 +433,7 @@ foreach ($dirmodels as $reldir)
{
print ''.img_object($langs->trans("Preview"), 'bill').' ';
}
- else
- {
+ else {
print img_object($langs->trans("PreviewNotAvailable"), 'generic');
}
print '';
@@ -489,8 +479,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
{
print '';
}
-else
-{
+else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
print $doleditor->Create();
diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php
index c6ff9e94749..46f91e8b366 100644
--- a/htdocs/admin/boxes.php
+++ b/htdocs/admin/boxes.php
@@ -84,8 +84,7 @@ if ($action == 'add') {
$i++;
}
}
- else
- {
+ else {
setEventMessages($db->lasterror(), null, 'errors');
$error++;
}
@@ -135,8 +134,7 @@ if ($action == 'add') {
$db->commit();
$action = '';
}
- else
- {
+ else {
$db->rollback();
}
}
@@ -205,8 +203,7 @@ if ($action == 'switch')
{
$db->commit();
}
- else
- {
+ else {
$db->rollback();
}
}
@@ -346,8 +343,7 @@ foreach ($boxtoadd as $box)
{
$logo = $box->boximg;
}
- else
- {
+ else {
$logo = preg_replace("/^object_/i", "", $box->boximg);
}
@@ -411,8 +407,7 @@ foreach ($boxactivated as $key => $box)
{
$logo = $box->boximg;
}
- else
- {
+ else {
$logo = preg_replace("/^object_/i", "", $box->boximg);
}
diff --git a/htdocs/admin/chequereceipts.php b/htdocs/admin/chequereceipts.php
index 8b5e7c433bf..397f289eaee 100644
--- a/htdocs/admin/chequereceipts.php
+++ b/htdocs/admin/chequereceipts.php
@@ -61,8 +61,7 @@ if ($action == 'updateMask')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -84,8 +83,7 @@ if ($action == 'set_BANK_CHEQUERECEIPT_FREE_TEXT')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -182,8 +180,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Activated"), 'switch_on');
}
- else
- {
+ else {
print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').' ';
}
print '';
@@ -260,8 +257,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
{
print '';
}
-else
-{
+else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
print $doleditor->Create();
diff --git a/htdocs/admin/clicktodial.php b/htdocs/admin/clicktodial.php
index 36205697e89..56f4f076e54 100644
--- a/htdocs/admin/clicktodial.php
+++ b/htdocs/admin/clicktodial.php
@@ -47,8 +47,7 @@ if ($action == 'setvalue' && $user->admin)
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -134,8 +133,7 @@ if (!empty($conf->global->CLICKTODIAL_URL))
{
print $langs->trans("LinkToTest", $user->login).': '.dol_print_phone($phonefortest, '', 0, 0, 'AC_TEL');
}
- else
- {
+ else {
$langs->load("errors");
print ''.$langs->trans("WarningClickToDialUserSetupNotComplete").'
';
}
diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php
index 76f04d94c15..f1f22203fa2 100644
--- a/htdocs/admin/commande.php
+++ b/htdocs/admin/commande.php
@@ -67,8 +67,7 @@ if ($action == 'updateMask')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -105,14 +104,12 @@ elseif ($action == 'specimen')
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=commande&file=SPECIMEN.pdf");
return;
}
- else
- {
+ else {
setEventMessages($module->error, null, 'errors');
dol_syslog($module->error, LOG_ERR);
}
}
- else
- {
+ else {
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
}
@@ -170,8 +167,7 @@ elseif ($action == 'set_COMMANDE_DRAFT_WATERMARK')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -188,8 +184,7 @@ elseif ($action == 'set_ORDER_FREE_TEXT')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -218,8 +213,7 @@ elseif ($action == 'setribchq')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -235,8 +229,7 @@ elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_ORDER')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -252,8 +245,7 @@ elseif ($action == 'set_WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -335,8 +327,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Activated"), 'switch_on');
}
- else
- {
+ else {
print '';
print img_picto($langs->trans("Disabled"), 'switch_off');
print ' ';
@@ -401,8 +392,7 @@ if ($resql)
$i++;
}
}
-else
-{
+else {
dol_print_error($db);
}
@@ -472,8 +462,7 @@ foreach ($dirmodels as $reldir)
print '';
print '';
}
- else
- {
+ else {
print ''."\n";
print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').' ';
print " ";
@@ -485,8 +474,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Default"), 'on');
}
- else
- {
+ else {
print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').' ';
}
print '';
@@ -520,8 +508,7 @@ foreach ($dirmodels as $reldir)
{
print ''.img_object($langs->trans("Preview"), 'bill').' ';
}
- else
- {
+ else {
print img_object($langs->trans("PreviewNotAvailable"), 'generic');
}
print '';
@@ -595,14 +582,12 @@ if (empty($conf->facture->enabled))
}
print "";
}
- else
- {
+ else {
print "".$langs->trans("NoActiveBankAccountDefined")." ";
}
}
}
- else
- {
+ else {
print ''.$langs->trans("BankModuleNotActive").' ';
}
}
@@ -682,8 +667,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
{
print '';
}
-else
-{
+else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
print $doleditor->Create();
diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php
index f33a3ea6f93..b5ae98378c9 100644
--- a/htdocs/admin/company.php
+++ b/htdocs/admin/company.php
@@ -85,8 +85,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha'))
$s = $mysoc->state_id.':'.$mysoc->state_code.':'.$mysoc->state_label;
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_STATE", $s, 'chaine', 0, '', $conf->entity);
}
- else
- {
+ else {
dolibarr_del_const($db, "MAIN_INFO_SOCIETE_STATE", $conf->entity);
}
@@ -165,14 +164,12 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha'))
$tmparray = explode(':', $result);
setEventMessages($langs->trans('ErrorFileIsInfectedWithAVirus', $tmparray[1]), null, 'errors');
}
- else
- {
+ else {
$error++;
setEventMessages($langs->trans("ErrorFailedToSaveFile"), null, 'errors');
}
}
- else
- {
+ else {
$error++;
$langs->load("errors");
setEventMessages($langs->trans("ErrorBadImageFormat"), null, 'errors');
@@ -229,8 +226,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha'))
{
dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX1", 0, 'chaine', 0, '', $conf->entity);
}
- else
- {
+ else {
dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX1", GETPOST('lt1', 'aZ09'), 'chaine', 0, '', $conf->entity);
}
dolibarr_set_const($db, "MAIN_INFO_LOCALTAX_CALC1", GETPOST("clt1", 'aZ09'), 'chaine', 0, '', $conf->entity);
@@ -241,8 +237,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha'))
{
dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX2", 0, 'chaine', 0, '', $conf->entity);
}
- else
- {
+ else {
dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX2", GETPOST('lt2', 'aZ09'), 'chaine', 0, '', $conf->entity);
}
dolibarr_set_const($db, "MAIN_INFO_LOCALTAX_CALC2", GETPOST("clt2", 'aZ09'), 'chaine', 0, '', $conf->entity);
@@ -252,8 +247,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha'))
{
$db->commit();
}
- else
- {
+ else {
$db->rollback();
}
@@ -302,16 +296,14 @@ if ($action == 'addthumb' || $action == 'addthumbsquarred') // Regenerate thumb
header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
- else
- {
+ else {
$error++;
$langs->load("errors");
setEventMessages($langs->trans("ErrorBadImageFormat"), null, 'errors');
dol_syslog($langs->transnoentities("ErrorBadImageFormat"), LOG_INFO);
}
}
- else
- {
+ else {
$error++;
$langs->load("errors");
setEventMessages($langs->trans("ErrorFileDoesNotExists", $_GET["file"]), null, 'errors');
@@ -583,8 +575,7 @@ if ($langs->transcountry("ProfId1", $mysoc->country_code) != '-')
{
print ' ';
}
- else
- {
+ else {
print $countrynotdefined;
}
print '';
@@ -598,8 +589,7 @@ if ($langs->transcountry("ProfId2", $mysoc->country_code) != '-')
{
print ' ';
}
- else
- {
+ else {
print $countrynotdefined;
}
print '';
@@ -613,8 +603,7 @@ if ($langs->transcountry("ProfId3", $mysoc->country_code) != '-')
{
print ' ';
}
- else
- {
+ else {
print $countrynotdefined;
}
print '';
@@ -628,8 +617,7 @@ if ($langs->transcountry("ProfId4", $mysoc->country_code) != '-')
{
print ' ';
}
- else
- {
+ else {
print $countrynotdefined;
}
print '';
@@ -643,8 +631,7 @@ if ($langs->transcountry("ProfId5", $mysoc->country_code) != '-')
{
print ' ';
}
- else
- {
+ else {
print $countrynotdefined;
}
print '';
@@ -658,8 +645,7 @@ if ($langs->transcountry("ProfId6", $mysoc->country_code) != '-')
{
print ' ';
}
- else
- {
+ else {
print $countrynotdefined;
}
print '';
diff --git a/htdocs/admin/compta.php b/htdocs/admin/compta.php
index 3ccc2a213ac..7c1c64369ad 100644
--- a/htdocs/admin/compta.php
+++ b/htdocs/admin/compta.php
@@ -102,8 +102,7 @@ if ($action == 'update')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
diff --git a/htdocs/admin/confexped.php b/htdocs/admin/confexped.php
index fd93b0fa83d..3f5cc1cd920 100644
--- a/htdocs/admin/confexped.php
+++ b/htdocs/admin/confexped.php
@@ -136,8 +136,7 @@ if (empty($conf->global->MAIN_SUBMODULE_LIVRAISON))
{
print ''.img_picto($langs->trans("Disabled"), 'switch_off').' ';
}
-else
-{
+else {
print ''.img_picto($langs->trans("Enabled"), 'switch_on').' ';
}
diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php
index bc22a2020fb..9da7fb10bbf 100644
--- a/htdocs/admin/const.php
+++ b/htdocs/admin/const.php
@@ -86,8 +86,7 @@ if ($action == 'add' || (GETPOST('add') && $action != 'update'))
$constvalue = "";
$constnote = "";
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -105,8 +104,7 @@ if (!empty($consts) && $action == 'update')
{
$nbmodified++;
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -127,8 +125,7 @@ if (!empty($consts) && $action == 'delete')
{
$nbdeleted++;
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -144,8 +141,7 @@ if ($action == 'delete')
{
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -231,8 +227,7 @@ if (!empty($conf->multicompany->enabled) && !$user->entity)
print '';
print '';
}
-else
-{
+else {
print ' ';
print ' ';
}
@@ -298,8 +293,7 @@ if ($result)
print ' ';
print '';
}
- else
- {
+ else {
print ' ';
print ' ';
}
@@ -308,8 +302,7 @@ if ($result)
{
print ' ';
}
- else
- {
+ else {
print ''.img_delete().' ';
}
diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php
index ae0c9c89b38..f3c50287107 100644
--- a/htdocs/admin/contract.php
+++ b/htdocs/admin/contract.php
@@ -63,8 +63,7 @@ if ($action == 'updateMask')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -101,14 +100,12 @@ elseif ($action == 'specimen') // For contract
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=contract&file=SPECIMEN.pdf");
return;
}
- else
- {
+ else {
setEventMessages($obj->error, $obj->errors, 'errors');
dol_syslog($obj->error, LOG_ERR);
}
}
- else
- {
+ else {
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
}
@@ -169,8 +166,7 @@ elseif ($action == 'set_other')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -252,8 +248,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Activated"), 'switch_on');
}
- else
- {
+ else {
print '';
print img_picto($langs->trans("Disabled"), 'switch_off');
print ' ';
@@ -317,8 +312,7 @@ if ($resql)
$i++;
}
}
-else
-{
+else {
dol_print_error($db);
}
@@ -388,8 +382,7 @@ foreach ($dirmodels as $reldir)
print '';
print ' ';
}
- else
- {
+ else {
print ''."\n";
print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').' ';
print " ";
@@ -401,8 +394,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Default"), 'on');
}
- else
- {
+ else {
print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').' ';
}
print '';
@@ -434,8 +426,7 @@ foreach ($dirmodels as $reldir)
{
print ''.img_object($langs->trans("Preview"), 'contract').' ';
}
- else
- {
+ else {
print img_object($langs->trans("PreviewNotAvailable"), 'generic');
}
print '';
@@ -483,8 +474,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
{
print '';
}
-else
-{
+else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
print $doleditor->Create();
diff --git a/htdocs/admin/dav.php b/htdocs/admin/dav.php
index bb7e82901f5..b7cb424d2cb 100644
--- a/htdocs/admin/dav.php
+++ b/htdocs/admin/dav.php
@@ -101,8 +101,7 @@ if ($action == 'edit')
{
print $form->selectyesno($key, $conf->global->$key, 1);
}
- else
- {
+ else {
print ' ';
}
print '';
@@ -117,8 +116,7 @@ if ($action == 'edit')
print '';
print ' ';
}
-else
-{
+else {
print '';
print ''.$langs->trans("Parameter").' '.$langs->trans("Value").' ';
@@ -141,8 +139,7 @@ else
{
print yn($conf->global->$key);
}
- else
- {
+ else {
print $conf->global->$key;
}
print '';
diff --git a/htdocs/admin/debugbar.php b/htdocs/admin/debugbar.php
index 926080cb9b5..dad99b2ab39 100644
--- a/htdocs/admin/debugbar.php
+++ b/htdocs/admin/debugbar.php
@@ -59,8 +59,7 @@ if ($action == 'set')
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
$db->rollback();
setEventMessages($error, null, 'errors');
}
diff --git a/htdocs/admin/defaultvalues.php b/htdocs/admin/defaultvalues.php
index 094c4a8dd7c..2622d5ca514 100644
--- a/htdocs/admin/defaultvalues.php
+++ b/htdocs/admin/defaultvalues.php
@@ -151,8 +151,7 @@ if (($action == 'add' || (GETPOST('add') && $action != 'update')) || GETPOST('ac
$defaultkey = '';
$defaultvalue = '';
}
- else
- {
+ else {
$db->rollback();
setEventMessages($db->lasterror(), null, 'errors');
$action = '';
@@ -170,8 +169,7 @@ if ($action == 'delete')
{
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -198,8 +196,7 @@ if (empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES))
$enabledisablehtml .= img_picto($langs->trans("Disabled"), 'switch_off');
$enabledisablehtml .= '';
}
-else
-{
+else {
// Button on, click to disable
$enabledisablehtml .= '';
$enabledisablehtml .= img_picto($langs->trans("Activated"), 'switch_on');
@@ -261,8 +258,7 @@ if ($mode != 'sortorder')
{
$textkey = $form->textwithpicto($langs->trans("Field"), $texthelp);
}
-else
-{
+else {
$texthelp = 'field or alias.field';
$textkey = $form->textwithpicto($langs->trans("Field"), $texthelp);
}
@@ -281,8 +277,7 @@ if ($mode != 'focus' && $mode != 'mandatory')
}
$textvalue = $form->textwithpicto($langs->trans("Value"), $texthelp, 1, 'help', '', 0, 2, 'subsitutiontooltip');
}
- else
- {
+ else {
$texthelp = 'ASC or DESC';
$textvalue = $form->textwithpicto($langs->trans("SortOrder"), $texthelp);
}
@@ -322,8 +317,7 @@ if (!empty($conf->multicompany->enabled) && !$user->entity)
print ' '; // We see environment, but to change it we must switch on other entity
print '';
}
-else
-{
+else {
print ' ';
print ' ';
print ' ';
@@ -394,8 +388,7 @@ if ($result)
print ' ';
print ''.img_delete().' ';
}
- else
- {
+ else {
print ' ';
print ' ';
print '
';
@@ -409,8 +402,7 @@ if ($result)
$i++;
}
}
-else
-{
+else {
dol_print_error($db);
}
diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php
index 3ee262b464a..26f2f87e2d5 100644
--- a/htdocs/admin/delais.php
+++ b/htdocs/admin/delais.php
@@ -250,8 +250,7 @@ if ($action == 'edit')
print '
';
}
-else
-{
+else {
/*
* Show parameters
*/
diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php
index cce441c4052..7ed84b59629 100644
--- a/htdocs/admin/dict.php
+++ b/htdocs/admin/dict.php
@@ -698,8 +698,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
{
$_POST["country"] = '';
}
- else
- {
+ else {
$ok = 0;
setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities("Country")), null, 'errors');
}
@@ -792,8 +791,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs');
$_POST = array('id'=>$id); // Clean $_POST array, we keep only
}
- else
- {
+ else {
if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
setEventMessages($langs->transnoentities("ErrorRecordAlreadyExists"), null, 'errors');
}
@@ -883,8 +881,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete
{
setEventMessages($langs->transnoentities("ErrorRecordIsUsedByChild"), null, 'errors');
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -1302,8 +1299,7 @@ if ($id)
print '';
$filterfound++;
}
- else
- {
+ else {
print '';
print ' ';
}
@@ -1439,8 +1435,7 @@ if ($id)
print ' ';
print '';
}
- else
- {
+ else {
$tmpaction = 'view';
$parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
$reshook = $hookmanager->executeHooks('viewDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
@@ -1479,8 +1474,7 @@ if ($id)
{
$valuetoshow = '-';
}
- else
- {
+ else {
$key = $langs->trans("Country".strtoupper($obj->country_code));
$valuetoshow = ($key != "Country".strtoupper($obj->country_code) ? $obj->country_code." - ".$key : $obj->country);
}
@@ -1605,15 +1599,13 @@ if ($id)
elseif ($fieldlist[$field] == 'localtax1_type') {
if ($obj->localtax1 != 0)
$valuetoshow = $localtax_typeList[$valuetoshow];
- else
- $valuetoshow = '';
+ else $valuetoshow = '';
$class = "center";
}
elseif ($fieldlist[$field] == 'localtax2_type') {
if ($obj->localtax2 != 0)
$valuetoshow = $localtax_typeList[$valuetoshow];
- else
- $valuetoshow = '';
+ else $valuetoshow = '';
$class = "center";
}
elseif ($fieldlist[$field] == 'taux') {
@@ -1709,8 +1701,7 @@ if ($id)
// Active
print '';
if ($canbedisabled) print ''.$actl[$obj->active].' ';
- else
- {
+ else {
if (in_array($obj->code, array('AC_OTH', 'AC_OTH_AUTO'))) print $langs->trans("AlwaysActive");
elseif (isset($obj->type) && in_array($obj->type, array('systemauto')) && empty($obj->active)) print $langs->trans("Deprecated");
elseif (isset($obj->type) && in_array($obj->type, array('system')) && !empty($obj->active) && $obj->code != 'AC_OTH') print $langs->trans("UsedOnlyWithTypeOption");
@@ -1747,8 +1738,7 @@ if ($id)
print '';
}
-else
-{
+else {
/*
* Show list of dictionary to show
*/
@@ -1782,8 +1772,7 @@ else
{
print ''.$langs->trans($tablib[$i]).' ';
}
- else
- {
+ else {
print $langs->trans($tablib[$i]);
}
print ' ';
@@ -1796,8 +1785,7 @@ else
print ''.$tabname[$i].' ';
$lastlineisempty = false;
}
- else
- {
+ else {
if (!$lastlineisempty)
{
$showemptyline = 1;
@@ -2003,8 +1991,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
$accountancy_account = (!empty($obj->$fieldname) ? $obj->$fieldname : 0);
print $formaccounting->select_account($accountancy_account, '.'.$fieldlist[$field], 1, '', 1, 1, 'maxwidth200 maxwidthonsmartphone');
}
- else
- {
+ else {
$fieldname = $fieldlist[$field];
print ' ';
}
@@ -2028,8 +2015,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
print $form->selectExpenseRanges($obj->fk_range);
print '';
}
- else
- {
+ else {
$fieldValue = isset($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:'';
if ($fieldlist[$field] == 'sortorder')
diff --git a/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php b/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php
index 3c735707c4a..6eaf1cf375a 100644
--- a/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php
+++ b/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php
@@ -136,8 +136,9 @@ class PrestaShopWebservice
{
if (isset($curl_params[$defkey]))
$curl_options[$defkey] = $curl_params[$defkey];
- else
+ else {
$curl_options[$defkey] = $defaultParams[$defkey];
+ }
}
foreach ($curl_params as $defkey => $defval)
if (!isset($curl_options[$defkey]))
@@ -237,8 +238,9 @@ class PrestaShopWebservice
}
return $xml;
}
- else
+ else {
throw new PrestaShopWebserviceException('HTTP response is empty');
+ }
}
/**
@@ -264,9 +266,7 @@ class PrestaShopWebservice
$url .= '&id_shop='.$options['id_shop'];
if (isset($options['id_group_shop']))
$url .= '&id_group_shop='.$options['id_group_shop'];
- }
- else
- {
+ } else {
throw new PrestaShopWebserviceException('Bad parameters given');
}
$request = self::executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => $xml));
@@ -323,9 +323,9 @@ class PrestaShopWebservice
$url_params[$k] = $options[$k];
if (count($url_params) > 0)
$url .= '?'.http_build_query($url_params);
- }
- else
+ } else {
throw new PrestaShopWebserviceException('Bad parameters given ');
+ }
$request = self::executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'GET'));
self::checkStatusCode($request['status_code']); // check the response validity
@@ -356,9 +356,9 @@ class PrestaShopWebservice
$url_params[$k] = $options[$k];
if (count($url_params) > 0)
$url .= '?'.http_build_query($url_params);
- }
- else
+ } else {
throw new PrestaShopWebserviceException('Bad parameters given');
+ }
$request = self::executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'HEAD', CURLOPT_NOBODY => true));
self::checkStatusCode($request['status_code']); // check the response validity
return $request['header'];
@@ -387,9 +387,9 @@ class PrestaShopWebservice
$url .= '&id_shop='.$options['id_shop'];
if (isset($options['id_group_shop']))
$url .= '&id_group_shop='.$options['id_group_shop'];
- }
- else
+ } else {
throw new PrestaShopWebserviceException('Bad parameters given');
+ }
$request = self::executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'PUT', CURLOPT_POSTFIELDS => $xml));
self::checkStatusCode($request['status_code']); // check the response validity
diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php
index a229f3c985d..1d764a849be 100644
--- a/htdocs/admin/dolistore/class/dolistore.class.php
+++ b/htdocs/admin/dolistore/class/dolistore.class.php
@@ -101,8 +101,7 @@ class Dolistore
$trace = $e->getTrace();
if ($trace[0]['args'][0] == 404) die('Bad ID');
elseif ($trace[0]['args'][0] == 401) die('Bad auth key');
- else
- {
+ else {
print 'Can not access to '.$conf->global->MAIN_MODULE_DOLISTORE_API_SRV.' ';
print $e->getMessage();
}
@@ -183,8 +182,7 @@ class Dolistore
$trace = $e->getTrace();
if ($trace[0]['args'][0] == 404) die('Bad ID');
elseif ($trace[0]['args'][0] == 401) die('Bad auth key');
- else
- {
+ else {
print 'Can not access to '.$conf->global->MAIN_MODULE_DOLISTORE_API_SRV.' ';
print $e->getMessage();
}
diff --git a/htdocs/admin/ecm.php b/htdocs/admin/ecm.php
index 0c348b25f60..b9af92dc8a5 100644
--- a/htdocs/admin/ecm.php
+++ b/htdocs/admin/ecm.php
@@ -42,8 +42,7 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg))
header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -56,8 +55,7 @@ if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg))
header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -94,8 +92,7 @@ if ($conf->use_javascript_ajax)
{
print ajax_constantonoff('ECM_AUTO_TREE_ENABLED');
}
-else
-{
+else {
if (empty($conf->global->ECM_AUTO_TREE_ENABLED))
{
print ''.img_picto($langs->trans("Disabled"), 'off').' ';
diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php
index 80161eaadc6..a554354420d 100644
--- a/htdocs/admin/emailcollector_card.php
+++ b/htdocs/admin/emailcollector_card.php
@@ -127,8 +127,7 @@ if (GETPOST('addfilter', 'alpha'))
{
$object->fetchFilters();
}
- else
- {
+ else {
setEventMessages($emailcollectorfilter->errors, $emailcollectorfilter->error, 'errors');
}
}
@@ -142,8 +141,7 @@ if ($action == 'deletefilter')
{
$object->fetchFilters();
}
- else
- {
+ else {
setEventMessages($emailcollectorfilter->errors, $emailcollectorfilter->error, 'errors');
}
}
@@ -163,8 +161,7 @@ if (GETPOST('addoperation', 'alpha'))
{
$object->fetchActions();
}
- else
- {
+ else {
setEventMessages($emailcollectoroperation->errors, $emailcollectoroperation->error, 'errors');
}
}
@@ -182,8 +179,7 @@ if ($action == 'updateoperation')
{
$object->fetchActions();
}
- else
- {
+ else {
setEventMessages($emailcollectoroperation->errors, $emailcollectoroperation->error, 'errors');
}
}
@@ -196,8 +192,7 @@ if ($action == 'deleteoperation')
{
$object->fetchActions();
}
- else
- {
+ else {
setEventMessages($emailcollectoroperation->errors, $emailcollectoroperation->error, 'errors');
}
}
@@ -212,8 +207,7 @@ if ($action == 'confirm_collect')
$debuginfo = $object->debuginfo;
setEventMessages($object->lastresult, null, 'mesgs');
}
- else
- {
+ else {
$debuginfo = $object->debuginfo;
setEventMessages($object->error, null, 'errors');
}
@@ -440,8 +434,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$morehtml .= $form->textwithpicto('', 'connect string '.$connectstringserver);
}
- else
- {
+ else {
$morehtml .= 'IMAP functions not available on your PHP';
}
@@ -449,8 +442,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
{
$morehtml .= 'Failed to open IMAP connection '.$connectstringsource;
}
- else
- {
+ else {
$morehtml .= imap_num_msg($connection);
}
@@ -582,8 +574,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if ($res)
$arrayoftypes = $hookmanager->resArray;
- else
- foreach ($hookmanager->resArray as $k=>$desc)
+ else foreach ($hookmanager->resArray as $k=>$desc)
$arrayoftypes[$k] = $desc;
@@ -626,8 +617,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print ' ';
print ' ';
}
- else
- {
+ else {
print $ruleaction['actionparam'];
}
print '';
diff --git a/htdocs/admin/emailcollector_list.php b/htdocs/admin/emailcollector_list.php
index f180cdf10cf..bb17bbdca05 100644
--- a/htdocs/admin/emailcollector_list.php
+++ b/htdocs/admin/emailcollector_list.php
@@ -242,8 +242,7 @@ if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords)
{
$num = $nbtotalofrecords;
}
-else
-{
+else {
$sql .= $db->plimit($limit + 1, $offset);
$resql = $db->query($sql);
diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php
index be9e7091300..cd9a2976e11 100644
--- a/htdocs/admin/expedition.php
+++ b/htdocs/admin/expedition.php
@@ -69,8 +69,7 @@ if ($action == 'updateMask')
{
if ($res > 0)
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
- else
- setEventMessages($langs->trans("Error"), null, 'errors');
+ else setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -130,14 +129,12 @@ elseif ($action == 'specimen')
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=expedition&file=SPECIMEN.pdf");
return;
}
- else
- {
+ else {
setEventMessages($module->error, $module->errors, 'errors');
dol_syslog($module->error, LOG_ERR);
}
}
- else
- {
+ else {
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
}
@@ -259,8 +256,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Activated"), 'switch_on');
}
- else
- {
+ else {
print 'scandir.'&label='.urlencode($module->name).'">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print ' ';
@@ -327,8 +323,7 @@ if ($resql)
$i++;
}
}
-else
-{
+else {
dol_print_error($db);
}
@@ -396,8 +391,7 @@ foreach ($dirmodels as $reldir)
print '';
print '';
}
- else
- {
+ else {
print ''."\n";
print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').' ';
print " ";
@@ -409,8 +403,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Default"), 'on');
}
- else
- {
+ else {
print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').' ';
}
print '';
@@ -439,8 +432,7 @@ foreach ($dirmodels as $reldir)
{
print 'scandir.'&label='.urlencode($module->name).'">'.img_object($langs->trans("Preview"), 'sending').' ';
}
- else
- {
+ else {
print img_object($langs->trans("PreviewNotAvailable"), 'generic');
}
print '';
@@ -487,8 +479,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
{
print '';
}
-else
-{
+else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
print $doleditor->Create();
diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php
index d076e77bf44..20f85dc6a29 100644
--- a/htdocs/admin/expensereport.php
+++ b/htdocs/admin/expensereport.php
@@ -64,8 +64,7 @@ if ($action == 'updateMask')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -104,14 +103,12 @@ elseif ($action == 'specimen') // For fiche inter
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=expensereport&file=SPECIMEN.pdf");
return;
}
- else
- {
+ else {
setEventMessages($module->error, $module->errors, 'errors');
dol_syslog($module->error, LOG_ERR);
}
}
- else
- {
+ else {
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
}
@@ -179,8 +176,7 @@ elseif ($action == 'setoptions')
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
$db->rollback();
setEventMessages($langs->trans("Error"), null, 'errors');
}
@@ -264,8 +260,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Activated"), 'switch_on');
}
- else
- {
+ else {
print '';
print img_picto($langs->trans("Disabled"), 'switch_off');
print ' ';
@@ -329,8 +324,7 @@ if ($resql)
$i++;
}
}
-else
-{
+else {
dol_print_error($db);
}
@@ -396,8 +390,7 @@ foreach ($dirmodels as $reldir)
print '';
print "";
}
- else
- {
+ else {
print ''."\n";
print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').' ';
print " ";
@@ -409,8 +402,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Default"), 'on');
}
- else
- {
+ else {
print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').' ';
}
print '';
@@ -435,8 +427,7 @@ foreach ($dirmodels as $reldir)
{
print ''.img_object($langs->trans("Preview"), 'intervention').' ';
}
- else
- {
+ else {
print img_object($langs->trans("PreviewNotAvailable"), 'generic');
}
print '';
@@ -485,8 +476,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
{
print '';
}
-else
-{
+else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
print $doleditor->Create();
diff --git a/htdocs/admin/expensereport_ik.php b/htdocs/admin/expensereport_ik.php
index 83bb28ca440..2b089335c40 100644
--- a/htdocs/admin/expensereport_ik.php
+++ b/htdocs/admin/expensereport_ik.php
@@ -162,8 +162,7 @@ foreach ($rangesbycateg as $fk_c_exp_tax_cat => $Tab)
echo ' ';
echo ' ';
}
- else
- {
+ else {
echo ''.img_edit().' ';
if (!empty($range->ik->id)) echo ''.img_delete().' ';
// TODO add delete link
diff --git a/htdocs/admin/expensereport_rules.php b/htdocs/admin/expensereport_rules.php
index a40e8d95520..0c99b4e4dda 100644
--- a/htdocs/admin/expensereport_rules.php
+++ b/htdocs/admin/expensereport_rules.php
@@ -229,8 +229,7 @@ foreach ($rules as $rule)
echo ''.$form->select_dolusers($object->fk_user, 'fk_user').'
';
echo ''.$form->select_dolgroups($object->fk_usergroup, 'fk_usergroup').'
';
}
- else
- {
+ else {
if ($rule->is_for_all > 0) echo $tab_apply['A'];
elseif ($rule->fk_usergroup > 0) echo $tab_apply['G'].' ('.$rule->getGroupLabel().')';
elseif ($rule->fk_user > 0) echo $tab_apply['U'].' ('.$rule->getUserName().')';
@@ -243,11 +242,9 @@ foreach ($rules as $rule)
{
echo $form->selectExpense($object->fk_c_type_fees, 'fk_c_type_fees', 0, 1, 1);
}
- else
- {
+ else {
if ($rule->fk_c_type_fees == -1) echo $langs->trans('AllExpenseReport');
- else
- {
+ else {
$key = getDictvalue(MAIN_DB_PREFIX.'c_type_fees', 'code', $rule->fk_c_type_fees, false, 'id');
if ($key != $langs->trans($key)) echo $langs->trans($key);
else echo $langs->trans(getDictvalue(MAIN_DB_PREFIX.'c_type_fees', 'label', $rule->fk_c_type_fees, false, 'id')); // TODO check to return trans of 'code'
@@ -261,8 +258,7 @@ foreach ($rules as $rule)
{
echo $form->selectarray('code_expense_rules_type', $tab_rules_type, $object->code_expense_rules_type, 0);
}
- else
- {
+ else {
echo $tab_rules_type[$rule->code_expense_rules_type];
}
echo '';
@@ -273,8 +269,7 @@ foreach ($rules as $rule)
{
print $form->selectDate(strtotime(date('Y-m-d', $object->dates)), 'start', '', '', 0, '', 1, 0);
}
- else
- {
+ else {
echo dol_print_date($rule->dates, 'day');
}
echo '';
@@ -285,8 +280,7 @@ foreach ($rules as $rule)
{
print $form->selectDate(strtotime(date('Y-m-d', $object->datee)), 'end', '', '', 0, '', 1, 0);
}
- else
- {
+ else {
echo dol_print_date($rule->datee, 'day');
}
echo '';
@@ -297,8 +291,7 @@ foreach ($rules as $rule)
{
echo ' '.$conf->currency;
}
- else
- {
+ else {
echo price($rule->amount, 0, $langs, 1, -1, -1, $conf->currency);
}
echo '';
@@ -309,8 +302,7 @@ foreach ($rules as $rule)
{
echo $form->selectyesno('restrictive', $object->restrictive, 1);
}
- else
- {
+ else {
echo yn($rule->restrictive, 1, 1);
}
echo '';
@@ -322,8 +314,7 @@ foreach ($rules as $rule)
echo ''.img_edit().' ';
echo ''.img_delete().' ';
}
- else
- {
+ else {
echo ' ';
echo ''.$langs->trans('Cancel').' ';
}
diff --git a/htdocs/admin/external_rss.php b/htdocs/admin/external_rss.php
index 8aa1a425778..eac6d7eb8e9 100644
--- a/htdocs/admin/external_rss.php
+++ b/htdocs/admin/external_rss.php
@@ -61,8 +61,7 @@ if ($result)
if ($reg[1] && $reg[1] > $lastexternalrss) $lastexternalrss = $reg[1];
}
}
-else
-{
+else {
dol_print_error($db);
}
@@ -93,8 +92,7 @@ if ($action == 'add' || GETPOST("modify"))
}
*/
}
- else
- {
+ else {
// Ajoute boite box_external_rss dans definition des boites
$sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes_def (file, note)";
$sql .= " VALUES ('box_external_rss.php','".$db->escape(GETPOST("norss", 'int').' ('.GETPOST($external_rss_title, 'alpha')).")')";
@@ -114,8 +112,7 @@ if ($action == 'add' || GETPOST("modify"))
header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
- else
- {
+ else {
$db->rollback();
dol_print_error($db);
}
@@ -162,8 +159,7 @@ if ($_POST["delete"])
$db->commit();
}
- else
- {
+ else {
$db->rollback();
dol_print_error($db, "sql=".$sql);
exit;
@@ -179,8 +175,7 @@ if ($_POST["delete"])
header("Location: external_rss.php");
exit;
}
- else
- {
+ else {
$db->rollback();
dol_print_error($db);
}
@@ -293,8 +288,7 @@ if ($resql)
{
print ''.$langs->trans("Online").'';
}
- else
- {
+ else {
print ''.$langs->trans("Offline");
$langs->load("errors");
if ($rssparser->error) print ' - '.$langs->trans($rssparser->error);
@@ -332,8 +326,7 @@ if ($resql)
$i++;
}
}
-else
-{
+else {
dol_print_error($db);
}
diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php
index 1a484ec8c7e..6c0c03b6dda 100644
--- a/htdocs/admin/facture.php
+++ b/htdocs/admin/facture.php
@@ -72,8 +72,7 @@ if ($action == 'updateMask')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -109,14 +108,12 @@ elseif ($action == 'specimen')
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=facture&file=SPECIMEN.pdf");
return;
}
- else
- {
+ else {
setEventMessages($module->error, $module->errors, 'errors');
dol_syslog($module->error, LOG_ERR);
}
}
- else
- {
+ else {
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
}
@@ -173,8 +170,7 @@ elseif ($action == 'setribchq')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -190,8 +186,7 @@ elseif ($action == 'set_FACTURE_DRAFT_WATERMARK')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -208,8 +203,7 @@ elseif ($action == 'set_INVOICE_FREE_TEXT')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -225,8 +219,7 @@ elseif ($action == 'setforcedate')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -248,8 +241,7 @@ elseif ($action == 'setDefaultPDFModulesByType')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -350,8 +342,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Activated"), 'switch_on');
}
- else
- {
+ else {
print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').' ';
}
print '';
@@ -463,8 +454,7 @@ if ($resql)
$i++;
}
}
-else
-{
+else {
dol_print_error($db);
}
@@ -535,8 +525,7 @@ foreach ($dirmodels as $reldir)
print '';
print '';
}
- else
- {
+ else {
print ' '."\n";
print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("SetAsDefault"), 'switch_off').' ';
print " ";
@@ -548,8 +537,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Default"), 'on');
}
- else
- {
+ else {
print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("SetAsDefault"), 'off').' ';
}
print '';
@@ -583,8 +571,7 @@ foreach ($dirmodels as $reldir)
{
print ''.img_object($langs->trans("Preview"), 'bill').' ';
}
- else
- {
+ else {
print img_object($langs->trans("PreviewNotAvailable"), 'generic');
}
print '';
@@ -691,14 +678,12 @@ if (!empty($conf->banque->enabled))
}
print "";
}
- else
- {
+ else {
print ''.$langs->trans("NoActiveBankAccountDefined").' ';
}
}
}
-else
-{
+else {
print $langs->trans("BankModuleNotActive");
}
print "";
@@ -777,8 +762,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
{
print '';
}
-else
-{
+else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
print $doleditor->Create();
diff --git a/htdocs/admin/fckeditor.php b/htdocs/admin/fckeditor.php
index 00995a302a5..9dfc2cff6d1 100644
--- a/htdocs/admin/fckeditor.php
+++ b/htdocs/admin/fckeditor.php
@@ -127,8 +127,7 @@ if (GETPOST('save', 'alpha'))
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -147,8 +146,7 @@ if (empty($conf->use_javascript_ajax))
{
setEventMessages(array($langs->trans("NotAvailable"), $langs->trans("JavascriptDisabled")), null, 'errors');
}
-else
-{
+else {
print '';
print '';
print ''.$langs->trans("ActivateFCKeditor").' ';
@@ -212,8 +210,7 @@ else
$editor = new DolEditor('formtestfield', isset($conf->global->FCKEDITOR_TEST) ? $conf->global->FCKEDITOR_TEST : 'Test', '', 200, $mode, 'In', true, $uselocalbrowser, 1, 120, 8, $readonly);
$editor->Create();
}
- else
- {
+ else {
print '';
print $conf->global->FCKEDITOR_TEST;
print '
';
diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php
index 055384c0084..602570194fd 100644
--- a/htdocs/admin/fichinter.php
+++ b/htdocs/admin/fichinter.php
@@ -64,8 +64,7 @@ if ($action == 'updateMask')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -102,14 +101,12 @@ elseif ($action == 'specimen') // For fiche inter
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=ficheinter&file=SPECIMEN.pdf");
return;
}
- else
- {
+ else {
setEventMessages($module->error, $module->errors, 'errors');
dol_syslog($module->error, LOG_ERR);
}
}
- else
- {
+ else {
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
}
@@ -167,8 +164,7 @@ elseif ($action == 'set_FICHINTER_FREE_TEXT')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -184,8 +180,7 @@ elseif ($action == 'set_FICHINTER_DRAFT_WATERMARK')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -201,8 +196,7 @@ elseif ($action == 'set_FICHINTER_PRINT_PRODUCTS')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
} elseif ($action == 'set_FICHINTER_USE_SERVICE_DURATION') {
@@ -325,8 +319,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Activated"), 'switch_on');
}
- else
- {
+ else {
print ''.img_picto($langs->trans("Disabled"), 'switch_off').' ';
}
print '';
@@ -389,8 +382,7 @@ if ($resql)
$i++;
}
}
-else
-{
+else {
dol_print_error($db);
}
@@ -458,8 +450,7 @@ foreach ($dirmodels as $reldir)
print '';
print "";
}
- else
- {
+ else {
print "\n";
print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').' ';
print " ";
@@ -471,8 +462,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Default"), 'on');
}
- else
- {
+ else {
print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').' ';
}
print '';
@@ -499,8 +489,7 @@ foreach ($dirmodels as $reldir)
{
print ''.img_object($langs->trans("Preview"), 'intervention').' ';
}
- else
- {
+ else {
print img_object($langs->trans("PreviewNotAvailable"), 'generic');
}
print '';
@@ -545,8 +534,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
{
print '';
}
-else
-{
+else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
print $doleditor->Create();
diff --git a/htdocs/admin/geoipmaxmind.php b/htdocs/admin/geoipmaxmind.php
index a661f3a8e9a..ba602c4b609 100644
--- a/htdocs/admin/geoipmaxmind.php
+++ b/htdocs/admin/geoipmaxmind.php
@@ -65,8 +65,7 @@ if ($action == 'set')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -183,8 +182,7 @@ if ($geoip)
if ($result) print $result;
else print $langs->trans("Error");
}
- else
- {
+ else {
print ' '.$ip.' -> ';
$result = dol_print_ip($ip, 1);
if ($result) print $result;
diff --git a/htdocs/admin/holiday.php b/htdocs/admin/holiday.php
index aafe01bf5bd..58f39e30ff2 100644
--- a/htdocs/admin/holiday.php
+++ b/htdocs/admin/holiday.php
@@ -65,8 +65,7 @@ if ($action == 'updateMask')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -103,14 +102,12 @@ elseif ($action == 'specimen') // For contract
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=holiday&file=SPECIMEN.pdf");
return;
}
- else
- {
+ else {
setEventMessages($obj->error, $obj->errors, 'errors');
dol_syslog($obj->error, LOG_ERR);
}
}
- else
- {
+ else {
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
}
@@ -171,8 +168,7 @@ elseif ($action == 'set_other')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -255,8 +251,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Activated"), 'switch_on');
}
- else
- {
+ else {
print '';
print img_picto($langs->trans("Disabled"), 'switch_off');
print ' ';
@@ -332,8 +327,7 @@ if ($resql)
$i++;
}
}
-else
-{
+else {
dol_print_error($db);
}
@@ -404,8 +398,7 @@ foreach ($dirmodels as $reldir)
print '';
print '';
}
- else
- {
+ else {
print ''."\n";
print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').' ';
print " ";
@@ -417,8 +410,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Default"), 'on');
}
- else
- {
+ else {
print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').' ';
}
print '';
@@ -450,8 +442,7 @@ foreach ($dirmodels as $reldir)
{
print ''.img_object($langs->trans("Preview"), 'contract').' ';
}
- else
- {
+ else {
print img_object($langs->trans("PreviewNotAvailable"), 'generic');
}
print '';
@@ -502,8 +493,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
{
print '';
}
-else
-{
+else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
print $doleditor->Create();
diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php
index 1b088f0c2b9..8df8a120c05 100644
--- a/htdocs/admin/ihm.php
+++ b/htdocs/admin/ihm.php
@@ -197,14 +197,12 @@ if ($action == 'update')
$tmparray = explode(':', $result);
setEventMessages($langs->trans('ErrorFileIsInfectedWithAVirus', $tmparray[1]), null, 'errors');
}
- else
- {
+ else {
$error++;
setEventMessages($langs->trans("ErrorFailedToSaveFile"), null, 'errors');
}
}
- else
- {
+ else {
$error++;
$langs->load("errors");
setEventMessages($langs->trans("ErrorBadImageFormat"), null, 'errors');
diff --git a/htdocs/admin/ldap.php b/htdocs/admin/ldap.php
index bd24e793374..33f1abb251f 100644
--- a/htdocs/admin/ldap.php
+++ b/htdocs/admin/ldap.php
@@ -77,8 +77,7 @@ if (empty($reshook))
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
$db->rollback();
dol_print_error($db);
}
@@ -215,8 +214,7 @@ if (!empty($conf->global->LDAP_SERVER_PORT))
{
print ' ';
}
-else
-{
+else {
print ' ';
}
print ''.$langs->trans("LDAPServerPortExample").' ';
@@ -249,8 +247,7 @@ if (!empty($conf->global->LDAP_ADMIN_PASS))
{
print ' '; // je le met en visible pour test
}
-else
-{
+else {
print ' ';
}
print ''.$langs->trans('Password').' (ex: secret) ';
@@ -296,8 +293,7 @@ if (function_exists("ldap_connect"))
print ''.$langs->trans("LDAPBindOK", $conf->global->LDAP_SERVER_HOST, $conf->global->LDAP_SERVER_PORT, $conf->global->LDAP_ADMIN_DN, preg_replace('/./i', '*', $conf->global->LDAP_ADMIN_PASS)).' ';
print ' ';
}
- else
- {
+ else {
print img_picto('', 'error').' ';
print ''.$langs->trans("LDAPBindKO", $conf->global->LDAP_SERVER_HOST, $conf->global->LDAP_SERVER_PORT, $conf->global->LDAP_ADMIN_DN, preg_replace('/./i', '*', $conf->global->LDAP_ADMIN_PASS)).' ';
print ' ';
@@ -305,8 +301,7 @@ if (function_exists("ldap_connect"))
print ' ';
}
}
- else
- {
+ else {
print img_picto('', 'warning').' ';
print ''.$langs->trans("LDAPNoUserOrPasswordProvidedAccessIsReadOnly").' ';
print ' ';
@@ -320,8 +315,7 @@ if (function_exists("ldap_connect"))
print ''.$langs->trans("LDAPSetupForVersion3").' ';
print ' ';
}
- else
- {
+ else {
print img_picto('', 'info').' ';
print ''.$langs->trans("LDAPSetupForVersion2").' ';
print ' ';
@@ -329,8 +323,7 @@ if (function_exists("ldap_connect"))
$unbind = $ldap->unbind();
}
- else
- {
+ else {
print img_picto('', 'error').' ';
print ''.$langs->trans("LDAPTCPConnectKO", $conf->global->LDAP_SERVER_HOST, $conf->global->LDAP_SERVER_PORT).' ';
print ' ';
diff --git a/htdocs/admin/ldap_contacts.php b/htdocs/admin/ldap_contacts.php
index 834bde4eea5..58eb04e595d 100644
--- a/htdocs/admin/ldap_contacts.php
+++ b/htdocs/admin/ldap_contacts.php
@@ -79,8 +79,7 @@ if ($action == 'setvalue' && $user->admin)
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
$db->rollback();
dol_print_error($db);
}
@@ -293,8 +292,7 @@ if (function_exists("ldap_connect"))
print img_picto('', 'info').' ';
print ''.$langs->trans("LDAPSynchroOK").' ';
}
- else
- {
+ else {
print img_picto('', 'error').' ';
print ''.$langs->trans("LDAPSynchroKOMayBePermissions");
print ': '.$ldap->error;
@@ -307,8 +305,7 @@ if (function_exists("ldap_connect"))
print nl2br($ldap->dump_content($dn, $info));
print "\n ";
}
- else
- {
+ else {
print img_picto('', 'error').' ';
print ''.$langs->trans("LDAPSynchroKO");
print ': '.$ldap->error;
diff --git a/htdocs/admin/ldap_groups.php b/htdocs/admin/ldap_groups.php
index fb49c947411..a301738db94 100644
--- a/htdocs/admin/ldap_groups.php
+++ b/htdocs/admin/ldap_groups.php
@@ -71,8 +71,7 @@ if ($action == 'setvalue' && $user->admin)
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
$db->rollback();
dol_print_error($db);
}
@@ -234,8 +233,7 @@ if (function_exists("ldap_connect"))
print img_picto('', 'info').' ';
print ''.$langs->trans("LDAPSynchroOK").' ';
}
- else
- {
+ else {
print img_picto('', 'error').' ';
print ''.$langs->trans("LDAPSynchroKOMayBePermissions");
print ': '.$ldap->error;
@@ -248,8 +246,7 @@ if (function_exists("ldap_connect"))
print nl2br($ldap->dump_content($dn, $info));
print "\n ";
}
- else
- {
+ else {
print img_picto('', 'error').' ';
print ''.$langs->trans("LDAPSynchroKO");
print ': '.$ldap->error;
diff --git a/htdocs/admin/ldap_members.php b/htdocs/admin/ldap_members.php
index f6fa74cb79d..eba84afe925 100644
--- a/htdocs/admin/ldap_members.php
+++ b/htdocs/admin/ldap_members.php
@@ -96,8 +96,7 @@ if ($action == 'setvalue' && $user->admin)
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
$db->rollback();
dol_print_error($db);
}
@@ -416,8 +415,7 @@ if (function_exists("ldap_connect"))
print img_picto('', 'info').' ';
print ''.$langs->trans("LDAPSynchroOK").' ';
}
- else
- {
+ else {
print img_picto('', 'error').' ';
print ''.$langs->trans("LDAPSynchroKOMayBePermissions");
print ': '.$ldap->error;
@@ -430,8 +428,7 @@ if (function_exists("ldap_connect"))
print nl2br($ldap->dump_content($dn, $info));
print "\n ";
}
- else
- {
+ else {
print img_picto('', 'error').' ';
print ''.$langs->trans("LDAPSynchroKO");
print ': '.$ldap->error;
diff --git a/htdocs/admin/ldap_members_types.php b/htdocs/admin/ldap_members_types.php
index 6628dd4d144..6913c477b38 100644
--- a/htdocs/admin/ldap_members_types.php
+++ b/htdocs/admin/ldap_members_types.php
@@ -69,8 +69,7 @@ if ($action == 'setvalue' && $user->admin)
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
$db->rollback();
dol_print_error($db);
}
@@ -216,8 +215,7 @@ if (function_exists("ldap_connect"))
print img_picto('', 'info').' ';
print ''.$langs->trans("LDAPSynchroOK").' ';
}
- else
- {
+ else {
print img_picto('', 'error').' ';
print ''.$langs->trans("LDAPSynchroKOMayBePermissions");
print ': '.$ldap->error;
@@ -230,8 +228,7 @@ if (function_exists("ldap_connect"))
print nl2br($ldap->dump_content($dn, $info));
print "\n ";
}
- else
- {
+ else {
print img_picto('', 'error').' ';
print ''.$langs->trans("LDAPSynchroKO");
print ': '.$ldap->error;
diff --git a/htdocs/admin/ldap_users.php b/htdocs/admin/ldap_users.php
index 7781cf45676..d0d3bb50d0d 100644
--- a/htdocs/admin/ldap_users.php
+++ b/htdocs/admin/ldap_users.php
@@ -90,8 +90,7 @@ if ($action == 'setvalue' && $user->admin)
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
$db->rollback();
dol_print_error($db);
}
@@ -396,8 +395,7 @@ if (function_exists("ldap_connect"))
print img_picto('', 'info').' ';
print ''.$langs->trans("LDAPSynchroOK").' ';
}
- else
- {
+ else {
print img_picto('', 'error').' ';
print ''.$langs->trans("LDAPSynchroKOMayBePermissions");
print ': '.$ldap->error;
@@ -410,8 +408,7 @@ if (function_exists("ldap_connect"))
print nl2br($ldap->dump_content($dn, $info));
print "\n ";
}
- else
- {
+ else {
print img_picto('', 'error').' ';
print ''.$langs->trans("LDAPSynchroKO");
print ': '.$ldap->error;
@@ -477,8 +474,7 @@ if (function_exists("ldap_connect"))
$liste[$key] = $label;
}
}
- else
- {
+ else {
setEventMessages($ldap->error, $ldap->errors, 'errors');
}
@@ -491,8 +487,7 @@ if (function_exists("ldap_connect"))
print "=> ".count($liste)." records \n";
print "\n ";
}
- else
- {
+ else {
print img_picto('', 'error').' ';
print ''.$langs->trans("LDAPSynchroKO");
print ': '.$ldap->error;
diff --git a/htdocs/admin/limits.php b/htdocs/admin/limits.php
index 0646c7f6d46..b03067bd581 100644
--- a/htdocs/admin/limits.php
+++ b/htdocs/admin/limits.php
@@ -163,8 +163,7 @@ if ($action == 'edit')
print '';
print ' ';
}
-else
-{
+else {
print '';
print ''.$langs->trans("Parameter").' '.$langs->trans("Value").' ';
@@ -204,8 +203,7 @@ if (empty($mysoc->country_code))
$warnpicto = img_warning($langs->trans("WarningMandatorySetupNotComplete"));
print ''.$warnpicto.' '.$langs->trans("WarningMandatorySetupNotComplete").' ';
}
-else
-{
+else {
// Show examples
print load_fiche_titre($langs->trans("ExamplesWithCurrentSetup"), '', '');
@@ -270,8 +268,7 @@ else
}
}
}
- else
- {
+ else {
// More examples if not specific vat rate found
// This example must be kept for test purpose with current value because value used (2/7, 10/3, and vat 0, 10)
// were calculated to show all possible cases of rounding. If we change this, examples becomes useless or show the same rounding rule.
diff --git a/htdocs/admin/livraison.php b/htdocs/admin/livraison.php
index 4cd8f4841e5..f6e3c0e63f9 100644
--- a/htdocs/admin/livraison.php
+++ b/htdocs/admin/livraison.php
@@ -64,8 +64,7 @@ if ($action == 'updateMask')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -81,8 +80,7 @@ if ($action == 'set_DELIVERY_FREE_TEXT')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -119,14 +117,12 @@ if ($action == 'specimen')
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=livraison&file=SPECIMEN.pdf");
return;
}
- else
- {
+ else {
setEventMessages($module->error, $module->errors, 'errors');
dol_syslog($module->error, LOG_ERR);
}
}
- else
- {
+ else {
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
}
@@ -250,8 +246,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Activated"), 'switch_on');
}
- else
- {
+ else {
print ''.img_picto($langs->trans("Disabled"), 'switch_off').' ';
}
print '';
@@ -317,8 +312,7 @@ if ($resql)
$i++;
}
}
-else
-{
+else {
dol_print_error($db);
}
@@ -384,8 +378,7 @@ foreach ($dirmodels as $reldir)
print '';
print "";
}
- else
- {
+ else {
print "\n";
print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').' ';
print " ";
@@ -397,8 +390,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Default"), 'on');
}
- else
- {
+ else {
print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').' ';
}
print '';
@@ -418,8 +410,7 @@ foreach ($dirmodels as $reldir)
{
print ''.img_object($langs->trans("Preview"), 'sending').' ';
}
- else
- {
+ else {
print img_object($langs->trans("PreviewNotAvailable"), 'generic');
}
print '';
@@ -463,8 +454,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
{
print '';
}
-else
-{
+else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
print $doleditor->Create();
diff --git a/htdocs/admin/loan.php b/htdocs/admin/loan.php
index 45202de342b..23cd1fd6bba 100644
--- a/htdocs/admin/loan.php
+++ b/htdocs/admin/loan.php
@@ -64,8 +64,7 @@ if ($action == 'update')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -108,8 +107,7 @@ foreach ($list as $key)
{
print $formaccounting->select_account($conf->global->$key, $key, 1, '', 1, 1);
}
- else
- {
+ else {
print ' ';
}
print '';
diff --git a/htdocs/admin/mailing.php b/htdocs/admin/mailing.php
index 921a4a6338c..020c1ef5241 100644
--- a/htdocs/admin/mailing.php
+++ b/htdocs/admin/mailing.php
@@ -66,8 +66,7 @@ if ($action == 'setvalue')
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
$db->rollback();
setEventMessages($langs->trans("Error"), null, 'errors');
}
diff --git a/htdocs/admin/mailman.php b/htdocs/admin/mailman.php
index 05c36128e8d..100b5cf3224 100644
--- a/htdocs/admin/mailman.php
+++ b/htdocs/admin/mailman.php
@@ -66,8 +66,7 @@ if ($action == 'update' || $action == 'add')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -100,8 +99,7 @@ if (($action == 'testsubscribe' || $action == 'testunsubscribe') && !empty($conf
$langs->load("errors");
setEventMessages($langs->trans("ErrorBadEMail", $email), null, 'errors');
}
- else
- {
+ else {
include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php';
$mailmanspip = new MailmanSpip($db);
@@ -119,8 +117,7 @@ if (($action == 'testsubscribe' || $action == 'testunsubscribe') && !empty($conf
$error++;
setEventMessages($mailmanspip->error, $mailmanspip->errors, 'errors');
}
- else
- {
+ else {
setEventMessages($langs->trans("MailmanCreationSuccess"), null);
}
}
@@ -132,8 +129,7 @@ if (($action == 'testsubscribe' || $action == 'testunsubscribe') && !empty($conf
$error++;
setEventMessages($mailmanspip->error, $mailmanspip->errors, 'errors');
}
- else
- {
+ else {
setEventMessages($langs->trans("MailmanDeletionSuccess"), null);
}
}
@@ -212,8 +208,7 @@ if (!empty($conf->global->ADHERENT_USE_MAILMAN))
print '';
}
-else
-{
+else {
dol_fiche_head($head, 'mailman', $langs->trans("Setup"), 0, 'user');
$link = '';
diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php
index 5502d44dae0..42ddb907b7d 100644
--- a/htdocs/admin/mails.php
+++ b/htdocs/admin/mails.php
@@ -170,8 +170,7 @@ if ($action == 'edit')
jQuery("#smtp_server_mess").show();
jQuery("#smtp_port_mess").show();';
}
- else
- {
+ else {
print '
jQuery("#MAIN_MAIL_SMTP_SERVER").prop("disabled", true);
jQuery("#MAIN_MAIL_SMTP_PORT").prop("disabled", true);
@@ -287,8 +286,7 @@ if ($action == 'edit')
{
print $form->selectarray('MAIN_MAIL_SENDMODE', $listofmethods, $conf->global->MAIN_MAIL_SENDMODE);
}
- else
- {
+ else {
$text = $listofmethods[$conf->global->MAIN_MAIL_SENDMODE];
if (empty($text)) $text = $langs->trans("Undefined");
$htmltext = $langs->trans("ContactSuperAdminForChange");
@@ -305,8 +303,7 @@ if ($action == 'edit')
print ' ';
print ''.$langs->trans("SeeLocalSendMailSetup").' ';
}
- else
- {
+ else {
$mainserver = (!empty($conf->global->MAIN_MAIL_SMTP_SERVER) ? $conf->global->MAIN_MAIL_SMTP_SERVER : '');
$smtpserver = ini_get('SMTP') ?ini_get('SMTP') : $langs->transnoentities("Undefined");
if ($linuxlike) print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike");
@@ -319,8 +316,7 @@ if ($action == 'edit')
print ' ';
print ''.$langs->trans("SeeLocalSendMailSetup").' ';
}
- else
- {
+ else {
$text = !empty($mainserver) ? $mainserver : $smtpserver;
$htmltext = $langs->trans("ContactSuperAdminForChange");
print $form->textwithpicto($text, $htmltext, 1, 'superadmin');
@@ -337,8 +333,7 @@ if ($action == 'edit')
print ' ';
print ''.$langs->trans("SeeLocalSendMailSetup").' ';
}
- else
- {
+ else {
$mainport = (!empty($conf->global->MAIN_MAIL_SMTP_PORT) ? $conf->global->MAIN_MAIL_SMTP_PORT : '');
$smtpport = ini_get('smtp_port') ?ini_get('smtp_port') : $langs->transnoentities("Undefined");
if ($linuxlike) print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike");
@@ -351,8 +346,7 @@ if ($action == 'edit')
print ' ';
print ''.$langs->trans("SeeLocalSendMailSetup").' ';
}
- else
- {
+ else {
$text = (!empty($mainport) ? $mainport : $smtpport);
$htmltext = $langs->trans("ContactSuperAdminForChange");
print $form->textwithpicto($text, $htmltext, 1, 'superadmin');
@@ -371,8 +365,7 @@ if ($action == 'edit')
{
print ' ';
}
- else
- {
+ else {
$htmltext = $langs->trans("ContactSuperAdminForChange");
print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_ID, $htmltext, 1, 'superadmin');
print ' ';
@@ -392,8 +385,7 @@ if ($action == 'edit')
{
print ' ';
}
- else
- {
+ else {
$htmltext = $langs->trans("ContactSuperAdminForChange");
print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_PW, $htmltext, 1, 'superadmin');
print ' ';
@@ -497,8 +489,7 @@ if ($action == 'edit')
print '';
}
-else
-{
+else {
dol_fiche_head($head, 'common', '', -1);
print ''.$langs->trans("EMailsDesc")." \n";
@@ -539,8 +530,7 @@ else
{
print ' '.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").' '.$langs->trans("SeeLocalSendMailSetup").' ';
}
- else
- {
+ else {
print ''.$langs->trans("MAIN_MAIL_SMTP_SERVER", ini_get('SMTP') ?ini_get('SMTP') : $langs->transnoentities("Undefined")).' '.(!empty($conf->global->MAIN_MAIL_SMTP_SERVER) ? $conf->global->MAIN_MAIL_SMTP_SERVER : '').' ';
}
@@ -549,8 +539,7 @@ else
{
print ''.$langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike").' '.$langs->trans("SeeLocalSendMailSetup").' ';
}
- else
- {
+ else {
print ''.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ?ini_get('smtp_port') : $langs->transnoentities("Undefined")).' '.(!empty($conf->global->MAIN_MAIL_SMTP_PORT) ? $conf->global->MAIN_MAIL_SMTP_PORT : '').' ';
}
@@ -699,8 +688,7 @@ else
print $conf->global->MAIN_MAIL_AUTOCOPY_TO;
if (!isValidEmail($conf->global->MAIN_MAIL_AUTOCOPY_TO)) print img_warning($langs->trans("ErrorBadEMail"));
}
- else
- {
+ else {
print ' ';
}
print '';
@@ -722,8 +710,7 @@ else
print ''.$langs->trans("DoTestServerAvailability").' ';
}
}
- else
- {
+ else {
print ''.$langs->trans("DoTestServerAvailability").' ';
}
@@ -795,8 +782,7 @@ else
$mail = new CMailFile('', '', '', '', array(), array(), array(), '', '', 0, '', '', '', '', $trackid, $sendcontext);
$result = $mail->check_server_port($server, $port);
if ($result) print ''.$langs->trans("ServerAvailableOnIPOrPort", $server, $port).'
';
- else
- {
+ else {
$errormsg = $langs->trans("ServerNotAvailableOnIPOrPort", $server, $port);
if ($mail->error) {
diff --git a/htdocs/admin/mails_emailing.php b/htdocs/admin/mails_emailing.php
index 84a0d2a0893..98c44f2b503 100644
--- a/htdocs/admin/mails_emailing.php
+++ b/htdocs/admin/mails_emailing.php
@@ -157,8 +157,7 @@ if ($action == 'edit')
jQuery("#smtp_port_mess").show();
';
}
- else
- {
+ else {
print '
jQuery("#MAIN_MAIL_SMTP_SERVER_EMAILING").prop("disabled", true);
jQuery("#MAIN_MAIL_SMTP_PORT_EMAILING").prop("disabled", true);
@@ -237,8 +236,7 @@ if ($action == 'edit')
{
print $form->selectarray('MAIN_MAIL_SENDMODE_EMAILING', $listofmethods, $conf->global->MAIN_MAIL_SENDMODE_EMAILING);
}
- else
- {
+ else {
$text = $listofmethods[$conf->global->MAIN_MAIL_SENDMODE_EMAILING];
if (empty($text)) $text = $langs->trans("Undefined");
$htmltext = $langs->trans("ContactSuperAdminForChange");
@@ -256,8 +254,7 @@ if ($action == 'edit')
print '';
print $langs->trans("SeeLocalSendMailSetup");
}
- else
- {
+ else {
$mainserver = (!empty($conf->global->MAIN_MAIL_SMTP_SERVER_EMAILING) ? $conf->global->MAIN_MAIL_SMTP_SERVER_EMAILING : '');
$smtpserver = ini_get('SMTP') ?ini_get('SMTP') : $langs->transnoentities("Undefined");
if ($linuxlike) print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike");
@@ -270,8 +267,7 @@ if ($action == 'edit')
print ' ';
print ''.$langs->trans("SeeLocalSendMailSetup").' ';
}
- else
- {
+ else {
$text = !empty($mainserver) ? $mainserver : $smtpserver;
$htmltext = $langs->trans("ContactSuperAdminForChange");
print $form->textwithpicto($text, $htmltext, 1, 'superadmin');
@@ -289,8 +285,7 @@ if ($action == 'edit')
print ' ';
print $langs->trans("SeeLocalSendMailSetup");
}
- else
- {
+ else {
$mainport = (!empty($conf->global->MAIN_MAIL_SMTP_PORT_EMAILING) ? $conf->global->MAIN_MAIL_SMTP_PORT_EMAILING : '');
$smtpport = ini_get('smtp_port') ?ini_get('smtp_port') : $langs->transnoentities("Undefined");
if ($linuxlike) print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike");
@@ -303,8 +298,7 @@ if ($action == 'edit')
print ' ';
print ''.$langs->trans("SeeLocalSendMailSetup").' ';
}
- else
- {
+ else {
$text = (!empty($mainport) ? $mainport : $smtpport);
$htmltext = $langs->trans("ContactSuperAdminForChange");
print $form->textwithpicto($text, $htmltext, 1, 'superadmin');
@@ -323,8 +317,7 @@ if ($action == 'edit')
{
print ' ';
}
- else
- {
+ else {
$htmltext = $langs->trans("ContactSuperAdminForChange");
print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_ID_EMAILING, $htmltext, 1, 'superadmin');
print ' ';
@@ -342,8 +335,7 @@ if ($action == 'edit')
{
print ' ';
}
- else
- {
+ else {
$htmltext = $langs->trans("ContactSuperAdminForChange");
print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_PW_EMAILING, $htmltext, 1, 'superadmin');
print ' ';
@@ -391,8 +383,7 @@ if ($action == 'edit')
print '';
}
-else
-{
+else {
dol_fiche_head($head, 'common_emailing', '', -1);
print ''.$langs->trans("EMailsDesc")." \n";
@@ -415,8 +406,7 @@ else
{
print ' '.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").' '.$langs->trans("SeeLocalSendMailSetup").' ';
}
- else
- {
+ else {
print ''.$langs->trans("MAIN_MAIL_SMTP_SERVER", ini_get('SMTP') ?ini_get('SMTP') : $langs->transnoentities("Undefined")).' '.(!empty($conf->global->MAIN_MAIL_SMTP_SERVER_EMAILING) ? $conf->global->MAIN_MAIL_SMTP_SERVER_EMAILING : '').' ';
}
@@ -425,8 +415,7 @@ else
{
print ''.$langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike").' '.$langs->trans("SeeLocalSendMailSetup").' ';
}
- else
- {
+ else {
print ''.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ?ini_get('smtp_port') : $langs->transnoentities("Undefined")).' '.(!empty($conf->global->MAIN_MAIL_SMTP_PORT_EMAILING) ? $conf->global->MAIN_MAIL_SMTP_PORT_EMAILING : '').' ';
}
@@ -507,8 +496,7 @@ else
print ''.$langs->trans("DoTestServerAvailability").' ';
}
}
- else
- {
+ else {
print ''.$langs->trans("DoTestServerAvailability").' ';
}
@@ -539,8 +527,7 @@ else
$result = $mail->check_server_port($server, $port);
if ($result) print ''.$langs->trans("ServerAvailableOnIPOrPort", $server, $port).'
';
- else
- {
+ else {
$errormsg = $langs->trans("ServerNotAvailableOnIPOrPort", $server, $port);
if ($mail->error) {
diff --git a/htdocs/admin/mails_senderprofile_list.php b/htdocs/admin/mails_senderprofile_list.php
index 1c50ebf0949..fd5f4e3b1a7 100644
--- a/htdocs/admin/mails_senderprofile_list.php
+++ b/htdocs/admin/mails_senderprofile_list.php
@@ -282,8 +282,7 @@ if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit
{
$num = $nbtotalofrecords;
}
-else
-{
+else {
if ($limit) $sql .= $db->plimit($limit + 1, $offset);
$resql = $db->query($sql);
diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php
index 37d1f903b4a..1dcc621095c 100644
--- a/htdocs/admin/mails_templates.php
+++ b/htdocs/admin/mails_templates.php
@@ -123,8 +123,7 @@ if (empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES))
$helpsubstitforlines .= $key.' -> '.$val.' ';
}
}
-else
-{
+else {
$tmp = FormMail::getAvailableSubstitKey('formemailwithlines');
$tmp['__(AnyTranslationKey)__'] = 'Translation';
$helpsubstit = $langs->trans("AvailableVariables").': ';
@@ -297,8 +296,7 @@ if (empty($reshook))
setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs');
$_POST = array('id'=>$id); // Clean $_POST array, we keep only id
}
- else
- {
+ else {
if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
setEventMessages($langs->transnoentities("ErrorRecordAlreadyExists"), null, 'errors');
}
@@ -356,8 +354,7 @@ if (empty($reshook))
{
setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($db->error(), null, 'errors');
}
}
@@ -377,8 +374,7 @@ if (empty($reshook))
{
setEventMessages($langs->transnoentities("ErrorRecordIsUsedByChild"), null, 'errors');
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -577,8 +573,7 @@ foreach ($fieldsforcontent as $tmpfieldlist)
elseif ($tmpfieldlist == 'joinfiles') {
print ' ';
}
- else
- {
+ else {
if ($context != 'hide') {
// print '';
$okforextended = true;
@@ -587,8 +582,7 @@ foreach ($fieldsforcontent as $tmpfieldlist)
$doleditor = new DolEditor($tmpfieldlist, (!empty($obj->{$tmpfieldlist}) ? $obj->{$tmpfieldlist} : ''), '', 120, 'dolibarr_mailings', 'In', 0, false, $okforextended, ROWS_4, '90%');
print $doleditor->Create(1);
}
- else
- print ' ';
+ else print ' ';
}
print '';
if ($tmpfieldlist == 'topic') {
@@ -802,8 +796,7 @@ if ($resql)
print "\n";
}
- else
- {
+ else {
$keyforobj = 'type_template';
if (!in_array($obj->$keyforobj, array_keys($elementList)))
{
@@ -989,15 +982,13 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
{
print $form->select_dolusers($obj->{$fieldlist[$field]}, 'fk_user', 1, null, 0, '', null, 0, 0, 1, '', 0, '', 'maxwidth200');
}
- else
- {
+ else {
if ($context == 'add') // I am not admin and we show the add form
{
print $user->getNomUrl(1); // Me
$forcedvalue = $user->id;
}
- else
- {
+ else {
if ($obj && !empty($obj->{$fieldlist[$field]}) && $obj->{$fieldlist[$field]} > 0)
{
$fuser = new User($db);
@@ -1005,8 +996,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
print $fuser->getNomUrl(1);
$forcedvalue = $fuser->id;
}
- else
- {
+ else {
$forcedvalue = $obj->{$fieldlist[$field]};
}
}
@@ -1024,8 +1014,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
if ($context == 'edit') $selectedlang = $obj->{$fieldlist[$field]};
print $formadmin->select_language($selectedlang, 'langcode', 0, null, 1, 0, 0, 'maxwidth150');
}
- else
- {
+ else {
if (!empty($obj->{$fieldlist[$field]}))
{
print $obj->{$fieldlist[$field]}.' - '.$langs->trans('Language_'.$obj->{$fieldlist[$field]});
@@ -1046,8 +1035,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
print ' ';
print $obj->{$fieldlist[$field]};
}
- else
- {
+ else {
print $form->selectarray('type_template', $elementList, (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:''), 1, 0, 0, '', 0, 0, 0, '', 'maxwidth150 maxwidth100onsmartphone');
}
print '';
@@ -1055,8 +1043,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
elseif ($context == 'add' && in_array($fieldlist[$field], array('topic', 'joinfiles', 'content', 'content_lines'))) continue;
elseif ($context == 'edit' && in_array($fieldlist[$field], array('topic', 'joinfiles', 'content', 'content_lines'))) continue;
elseif ($context == 'hide' && in_array($fieldlist[$field], array('topic', 'joinfiles', 'content', 'content_lines'))) continue;
- else
- {
+ else {
$size = ''; $class = ''; $classtd = '';
if ($fieldlist[$field] == 'code') $class = 'maxwidth100';
if ($fieldlist[$field] == 'label') $class = 'maxwidth100';
@@ -1073,14 +1060,12 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
{
print $form->selectyesno($fieldlist[$field], '1', 1);
}
- else
- {
+ else {
//print ' ';
print $form->selectyesno($fieldlist[$field], (isset($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:''), 1);
}
}
- else
- {
+ else {
print ' ';
}
print '';
diff --git a/htdocs/admin/menus.php b/htdocs/admin/menus.php
index 856ad50c28b..b66ab89075f 100644
--- a/htdocs/admin/menus.php
+++ b/htdocs/admin/menus.php
@@ -97,8 +97,7 @@ if ($action == 'update' && !$cancel)
{
$db->commit();
}
- else
- {
+ else {
$error++;
setEventMessages($langs->trans("FailedToInitializeMenu").' '.$key, null, 'errors');
$db->rollback();
diff --git a/htdocs/admin/menus/edit.php b/htdocs/admin/menus/edit.php
index ef58c1042d4..a059a76b40c 100644
--- a/htdocs/admin/menus/edit.php
+++ b/htdocs/admin/menus/edit.php
@@ -103,9 +103,7 @@ if ($action == 'update')
if (is_numeric(GETPOST('menuIdParent', 'alpha')))
{
$menu->fk_menu = GETPOST('menuIdParent', 'alpha');
- }
- else
- {
+ } else {
if (GETPOST('type', 'alpha') == 'top') $menu->fk_menu = 0;
else $menu->fk_menu = -1;
$menu->fk_mainmenu = $mainmenu;
@@ -116,14 +114,10 @@ if ($action == 'update')
if ($result > 0)
{
setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs');
- }
- else
- {
+ } else {
setEventMessages($menu->error, $menu->errors, 'errors');
}
- }
- else
- {
+ } else {
setEventMessages($menu->error, $menu->errors, 'errors');
}
$action = "edit";
@@ -131,8 +125,7 @@ if ($action == 'update')
header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".$menu_handler);
exit;
}
- else
- {
+ else {
header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".$menu_handler);
exit;
}
@@ -222,8 +215,7 @@ if ($action == 'add')
{
$menu->fk_menu = GETPOST('menuId', 'alpha', 3);
}
- else
- {
+ else {
if (GETPOST('type', 'alpha') == 'top') $menu->fk_menu = 0;
else $menu->fk_menu = -1;
$menu->fk_mainmenu = $mainmenu;
@@ -236,8 +228,7 @@ if ($action == 'add')
header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".GETPOST('menu_handler', 'aZ09'));
exit;
}
- else
- {
+ else {
$action = 'create';
setEventMessages($menu->error, $menu->errors, 'errors');
}
@@ -261,8 +252,7 @@ if ($action == 'confirm_delete' && $_POST["confirm"] == 'yes')
llxFooter();
exit;
}
- else
- {
+ else {
$this->db->rollback();
$reload = 0;
@@ -359,8 +349,7 @@ if ($action == 'create')
print $langs->trans('Left');
print ' ';
}
- else
- {
+ else {
print '';
print ' ';
print ''.$langs->trans('Top').' ';
@@ -382,8 +371,7 @@ if ($action == 'create')
{
print ''.$parent_rowid.' ';
}
- else
- {
+ else {
print ' ';
}
print ''.$langs->trans('DetailMenuIdParent');
diff --git a/htdocs/admin/menus/index.php b/htdocs/admin/menus/index.php
index 97f0246ac88..f27968d462d 100644
--- a/htdocs/admin/menus/index.php
+++ b/htdocs/admin/menus/index.php
@@ -192,8 +192,7 @@ elseif ($action == 'confirm_delete' && $confirm == 'yes')
header("Location: ".DOL_URL_ROOT.'/admin/menus/index.php?menu_handler='.$menu_handler);
exit;
}
- else
- {
+ else {
$db->rollback();
$reload = 0;
@@ -409,8 +408,7 @@ if ($conf->use_javascript_ajax)
print '';
}
-else
-{
+else {
$langs->load("errors");
setEventMessages($langs->trans("ErrorFeatureNeedJavascript"), null, 'errors');
}
diff --git a/htdocs/admin/menus/other.php b/htdocs/admin/menus/other.php
index ed35f48d90e..145ec566057 100644
--- a/htdocs/admin/menus/other.php
+++ b/htdocs/admin/menus/other.php
@@ -95,8 +95,7 @@ if (empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED))
{
print ''.img_picto($langs->trans("Disabled"), 'switch_off').' ';
}
-else
-{
+else {
print ''.img_picto($langs->trans("Enabled"), 'switch_on').' ';
}
print " ";
diff --git a/htdocs/admin/modulehelp.php b/htdocs/admin/modulehelp.php
index d5bf12f1061..7b64dd08bd0 100644
--- a/htdocs/admin/modulehelp.php
+++ b/htdocs/admin/modulehelp.php
@@ -105,8 +105,7 @@ foreach ($modulesdir as $dir)
continue;
}
- try
- {
+ try {
$res = include_once $dir.$file;
if (class_exists($modName))
{
@@ -141,8 +140,7 @@ foreach ($modulesdir as $dir)
{
$arrayofnatures['external_'.$publisher] = $langs->trans("External").' - '.$publisher;
}
- else
- {
+ else {
$arrayofnatures['external_'] = $langs->trans("External").' - '.$langs->trans("UnknownPublishers");
}
}
@@ -188,8 +186,7 @@ foreach ($modulesdir as $dir)
dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR);
}
}
- else
- {
+ else {
print "Warning bad descriptor file : ".$dir.$file." (Class ".$modName." not found into file) ";
}
}
@@ -202,8 +199,7 @@ foreach ($modulesdir as $dir)
}
closedir($handle);
}
- else
- {
+ else {
dol_syslog("htdocs/admin/modulehelp.php: Failed to open directory ".$dir.". See permission and open_basedir option.", LOG_WARNING);
}
}
@@ -332,8 +328,7 @@ if ($mode == 'desc')
$text .= $textexternal;
$text .= ' ';
}
- else
- {
+ else {
$text .= ''.$langs->trans("Origin").': '.$langs->trans("Core").' ';
}
@@ -450,8 +445,7 @@ if ($mode == 'feature')
{
$yesno = 'Yes';
}
- else
- {
+ else {
$yesno = 'No';
}
require_once DOL_DOCUMENT_ROOT.'/core/class/interfaces.class.php';
diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php
index c0f1991835b..dba149a2bb0 100644
--- a/htdocs/admin/modules.php
+++ b/htdocs/admin/modules.php
@@ -126,8 +126,7 @@ if ($action == 'install')
setEventMessages($langs->trans("ErrorModuleFileRequired"), null, 'warnings');
$error++;
}
- else
- {
+ else {
if (!$error && !preg_match('/\.zip$/i', $original_file))
{
$langs->load("errors");
@@ -174,8 +173,7 @@ if ($action == 'install')
setEventMessages($langs->trans($result['error'], $original_file), null, 'errors');
$error++;
}
- else
- {
+ else {
// Now we move the dir of the module
$modulename = preg_replace('/module_/', '', $original_file);
$modulename = preg_replace('/\-([0-9][0-9\.]*)\.zip$/i', '', $modulename);
@@ -231,8 +229,7 @@ if ($action == 'install')
}
}
}
- else
- {
+ else {
setEventMessages($langs->trans("ErrorFailToRenameFile", $_FILES['fileinstall']['tmp_name'], $newfile), null, 'errors');
$error++;
}
@@ -248,8 +245,7 @@ if ($action == 'set' && $user->admin)
{
$resarray = activateModule($value);
if (!empty($resarray['errors'])) setEventMessages('', $resarray['errors'], 'errors');
- else
- {
+ else {
//var_dump($resarray);exit;
if ($resarray['nbperms'] > 0)
{
@@ -341,8 +337,7 @@ foreach ($modulesdir as $dir)
continue;
}
- try
- {
+ try {
$res = include_once $dir.$file; // A class already exists in a different file will send a non catchable fatal error.
if (class_exists($modName))
{
@@ -376,8 +371,7 @@ foreach ($modulesdir as $dir)
{
$arrayofnatures['external_'.$publisher] = $langs->trans("External").' - '.$publisher;
}
- else
- {
+ else {
$arrayofnatures['external_'] = $langs->trans("External").' - '.$langs->trans("UnknownPublishers");
}
}
@@ -438,8 +432,7 @@ foreach ($modulesdir as $dir)
dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR);
}
}
- else
- {
+ else {
print "Warning bad descriptor file : ".$dir.$file." (Class ".$modName." not found into file) ";
}
}
@@ -452,8 +445,7 @@ foreach ($modulesdir as $dir)
}
closedir($handle);
}
- else
- {
+ else {
dol_syslog("htdocs/admin/modules.php: Failed to open directory ".$dir.". See permission and open_basedir option.", LOG_WARNING);
}
}
@@ -716,8 +708,7 @@ if ($mode == 'common' || $mode == 'commonkanban')
}
if (!empty($conf->multicompany->enabled) && $user->entity) $disableSetup++;
}
- else
- {
+ else {
if (!empty($objMod->warnings_unactivation[$mysoc->country_code]) && method_exists($objMod, 'alreadyUsed') && $objMod->alreadyUsed()) {
$codeenabledisable .= 'numero.'&module_position='.$module_position.'&action=reset_confirm&confirm_message_code='.$objMod->warnings_unactivation[$mysoc->country_code].'&value='.$modName.'&mode='.$mode.$param.'">';
$codeenabledisable .= img_picto($langs->trans("Activated"), 'switch_on');
@@ -752,15 +743,13 @@ if ($mode == 'common' || $mode == 'commonkanban')
$codetoconfig .= ' '.img_picto(ucfirst($page), "setup").' ';
// print ''.ucfirst($page).' ';
}
- else
- {
+ else {
if (preg_match('/^([^@]+)@([^@]+)$/i', $urlpage, $regs))
{
$urltouse = dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1);
$codetoconfig .= ''.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', false, 0, 0, '', 'fa-15').' ';
}
- else
- {
+ else {
$urltouse = $urlpage;
$codetoconfig .= ''.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', false, 0, 0, '', 'fa-15').' ';
}
@@ -771,17 +760,15 @@ if ($mode == 'common' || $mode == 'commonkanban')
{
$codetoconfig .= ''.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', false, 0, 0, '', 'fa-15').' ';
}
- else
- {
+ else {
$codetoconfig .= ''.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', false, 0, 0, '', 'fa-15').' ';
}
}
- else
- {
+ else {
$codetoconfig .= img_picto($langs->trans("NothingToSetup"), "setup", 'class="opacitytransp" style="padding-right: 6px"', false, 0, 0, '', 'fa-15');
}
}
- else // Module not yet activated
+ else // Module not yet activated
{
// Set $codeenabledisable
if (!empty($objMod->always_enabled))
@@ -792,8 +779,7 @@ if ($mode == 'common' || $mode == 'commonkanban')
{
$codeenabledisable .= $langs->trans("Disabled");
}
- else
- {
+ else {
// Module qualified for activation
$warningmessage = '';
if (!empty($arrayofwarnings[$modName]))
@@ -857,8 +843,7 @@ if ($mode == 'common' || $mode == 'commonkanban')
if (preg_match('/^\//i', $objMod->picto)) print img_picto($alttext, $objMod->picto, 'class="valignmiddle pictomodule paddingrightonly"', 1);
else print img_object($alttext, $objMod->picto, 'class="valignmiddle pictomodule paddingrightonly"');
}
- else
- {
+ else {
print img_object($alttext, 'generic', 'class="valignmiddle paddingrightonly"');
}
print ' '.$objMod->getName().' ';
@@ -1028,8 +1013,7 @@ if ($mode == 'deploy')
$message = info_admin($langs->trans("ConfFileMustContainCustom", DOL_DOCUMENT_ROOT.'/custom', DOL_DOCUMENT_ROOT));
$allowfromweb = -1;
}
- else
- {
+ else {
if ($dirins_ok)
{
if (!is_writable(dol_osencode($dirins)))
@@ -1039,15 +1023,13 @@ if ($mode == 'deploy')
$allowfromweb = 0;
}
}
- else
- {
+ else {
$message = info_admin($langs->trans("NotExistsDirect", $dirins).$langs->trans("InfDirAlt").$langs->trans("InfDirExample"));
$allowfromweb = 0;
}
}
}
- else
- {
+ else {
$message = info_admin($langs->trans("InstallModuleFromWebHasBeenDisabledByFile", $dolibarrdataroot.'/installmodules.lock'));
$allowfromweb = 0;
}
@@ -1068,8 +1050,7 @@ if ($mode == 'deploy')
{
//print $langs->trans("ThisIsProcessToFollow").' ';
}
- else
- {
+ else {
print $langs->trans("ThisIsAlternativeProcessToFollow").' ';
print ''.$langs->trans("StepNb", 1).' : ';
print $langs->trans("FindPackageFromWebSite", $fullurl).' ';
@@ -1150,8 +1131,7 @@ if ($mode == 'deploy')
print info_admin($langs->trans("ThisLimitIsDefinedInSetup", $max, $maxphptoshow, $maxphptoshowparam), 1);
}
}
- else
- {
+ else {
print ' ('.$langs->trans("UploadDisabled").')';
}
@@ -1162,8 +1142,7 @@ if ($mode == 'deploy')
print '';
}
- else
- {
+ else {
print $langs->trans("UnpackPackageInModulesRoot", $dirins).' ';
print ''.$langs->trans("StepNb", 4).' : ';
print $langs->trans("SetupIsReadyForUse").' ';
diff --git a/htdocs/admin/mrp.php b/htdocs/admin/mrp.php
index 9c59b5cf6da..ddf55993fd7 100644
--- a/htdocs/admin/mrp.php
+++ b/htdocs/admin/mrp.php
@@ -59,8 +59,7 @@ if ($action == 'updateMask')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -97,14 +96,12 @@ elseif ($action == 'specimen')
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=mrp&file=SPECIMEN.pdf");
return;
}
- else
- {
+ else {
setEventMessages($module->error, null, 'errors');
dol_syslog($module->error, LOG_ERR);
}
}
- else
- {
+ else {
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
}
@@ -162,8 +159,7 @@ elseif ($action == 'set_MRP_MO_DRAFT_WATERMARK')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -180,8 +176,7 @@ elseif ($action == 'set_MRP_MO_FREE_TEXT')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -263,8 +258,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Activated"), 'switch_on');
}
- else
- {
+ else {
print '';
print img_picto($langs->trans("Disabled"), 'switch_off');
print ' ';
@@ -329,8 +323,7 @@ if ($resql)
$i++;
}
}
-else
-{
+else {
dol_print_error($db);
}
@@ -400,8 +393,7 @@ foreach ($dirmodels as $reldir)
print '';
print '';
}
- else
- {
+ else {
print ''."\n";
print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').' ';
print " ";
@@ -413,8 +405,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Default"), 'on');
}
- else
- {
+ else {
print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').' ';
}
print '';
@@ -443,8 +434,7 @@ foreach ($dirmodels as $reldir)
{
print ''.img_object($langs->trans("Preview"), 'bill').' ';
}
- else
- {
+ else {
print img_object($langs->trans("PreviewNotAvailable"), 'generic');
}
print '';
@@ -490,8 +480,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
{
print '';
}
-else
-{
+else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
print $doleditor->Create();
diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php
index 4ba581398ee..1b912b27b5e 100644
--- a/htdocs/admin/multicurrency.php
+++ b/htdocs/admin/multicurrency.php
@@ -54,8 +54,7 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg))
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -67,8 +66,7 @@ if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg))
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -146,8 +144,7 @@ elseif ($action == 'setapilayer')
dolibarr_set_const($db, 'MULTICURRENCY_APP_SOURCE', GETPOST('MULTICURRENCY_APP_SOURCE', 'alpha'));
//dolibarr_set_const($db, 'MULTICURRENCY_ALTERNATE_SOURCE', GETPOST('MULTICURRENCY_ALTERNATE_SOURCE', 'alpha'));
}
- else
- {
+ else {
$result = MultiCurrency::syncRates($conf->global->MULTICURRENCY_APP_ID);
if ($result > 0) {
setEventMessages($langs->trans("CurrencyRateSyncSucceed"), null, "mesgs");
diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php
index ba92aa1ec21..859d36b7c36 100644
--- a/htdocs/admin/notification.php
+++ b/htdocs/admin/notification.php
@@ -85,8 +85,7 @@ if ($action == 'settemplates')
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
$db->rollback();
setEventMessages($langs->trans("Error"), null, 'errors');
@@ -107,8 +106,7 @@ if ($action == 'setvalue' && $user->admin)
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
$db->rollback();
setEventMessages($langs->trans("Error"), null, 'errors');
@@ -161,8 +159,7 @@ if ($action == 'setfixednotif' && $user->admin)
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
$db->rollback();
setEventMessages($langs->trans("Error"), null, 'errors');
diff --git a/htdocs/admin/oauth.php b/htdocs/admin/oauth.php
index 785a77ac043..85f9ebf0409 100644
--- a/htdocs/admin/oauth.php
+++ b/htdocs/admin/oauth.php
@@ -120,8 +120,7 @@ foreach ($list as $key)
print ' ';
print ' ';
}
- else
- {
+ else {
print '';
print ''.$langs->trans("UseTheFollowingUrlAsRedirectURI").' ';
print ''.$langs->trans("FeatureNotYetSupported").' ';
diff --git a/htdocs/admin/oauthlogintokens.php b/htdocs/admin/oauthlogintokens.php
index d8c65f9a2c5..f0d3c530b71 100644
--- a/htdocs/admin/oauthlogintokens.php
+++ b/htdocs/admin/oauthlogintokens.php
@@ -79,8 +79,7 @@ if ($action == 'setconst' && $user->admin)
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null);
}
- else
- {
+ else {
$db->rollback();
dol_print_error($db);
}
@@ -99,8 +98,7 @@ if ($action == 'setvalue' && $user->admin)
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null);
}
- else
- {
+ else {
$db->rollback();
dol_print_error($db);
}
@@ -179,8 +177,7 @@ if ($mode == 'setup' && $user->admin)
$urltodelete = '';
$urltocheckperms = '';
}
- else
- {
+ else {
$urltorenew = '';
$urltodelete = '';
$urltocheckperms = '';
@@ -194,8 +191,7 @@ if ($mode == 'setup' && $user->admin)
require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php';
// Dolibarr storage
$storage = new DoliStorage($db, $conf);
- try
- {
+ try {
$tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME);
}
catch (Exception $e)
@@ -226,8 +222,7 @@ if ($mode == 'setup' && $user->admin)
{
$expiredat = $langs->trans("Unknown");
}
- else
- {
+ else {
$expiredat = dol_print_date($endoflife, "dayhour");
}
}
diff --git a/htdocs/admin/payment.php b/htdocs/admin/payment.php
index a5b494b62e2..2873cf5d15f 100644
--- a/htdocs/admin/payment.php
+++ b/htdocs/admin/payment.php
@@ -57,8 +57,7 @@ if ($action == 'updateMask')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -184,8 +183,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Activated"), 'switch_on');
}
- else
- {
+ else {
print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').' ';
}
print '';
diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php
index 496a32923f7..ec4015f6e98 100644
--- a/htdocs/admin/pdf.php
+++ b/htdocs/admin/pdf.php
@@ -190,8 +190,7 @@ for ($i = 1; $i <= 6; $i++)
$pid = $langs->transcountry("ProfId".$i, $mysoc->country_code);
if ($pid == '-') $pid = false;
}
- else
- {
+ else {
$pid = img_warning().' '.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).' ';
}
if ($pid)
diff --git a/htdocs/admin/perms.php b/htdocs/admin/perms.php
index 0486edebeec..7dcaf0fba47 100644
--- a/htdocs/admin/perms.php
+++ b/htdocs/admin/perms.php
@@ -230,8 +230,7 @@ if ($result)
print img_picto($langs->trans("Active"), 'tick');
print '';
}
- else
- {
+ else {
print '';
print ''.img_edit_add().' ';
print ' ';
diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php
index e9795304ad3..b33b2396aa2 100644
--- a/htdocs/admin/prelevement.php
+++ b/htdocs/admin/prelevement.php
@@ -101,8 +101,7 @@ if ($action == "set")
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
$db->rollback();
setEventMessages($langs->trans("Error"), null, 'errors');
}
diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php
index 73703829b8c..f2c748b4ce2 100644
--- a/htdocs/admin/propal.php
+++ b/htdocs/admin/propal.php
@@ -64,8 +64,7 @@ if ($action == 'updateMask')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -101,14 +100,12 @@ elseif ($action == 'specimen')
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=propal&file=SPECIMEN.pdf");
return;
}
- else
- {
+ else {
setEventMessages($module->error, $module->errors, 'errors');
dol_syslog($module->error, LOG_ERR);
}
}
- else
- {
+ else {
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
}
@@ -127,8 +124,7 @@ elseif ($action == 'setribchq')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -143,8 +139,7 @@ elseif ($action == 'set_PROPALE_DRAFT_WATERMARK')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -160,8 +155,7 @@ elseif ($action == 'set_PROPOSAL_FREE_TEXT')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -175,8 +169,7 @@ elseif ($action == 'setdefaultduration')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -191,8 +184,7 @@ elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -311,8 +303,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Activated"), 'switch_on');
}
- else
- {
+ else {
print '';
print img_picto($langs->trans("Disabled"), 'switch_off');
print ' ';
@@ -377,8 +368,7 @@ if ($resql)
$i++;
}
}
-else
-{
+else {
dol_print_error($db);
}
@@ -449,8 +439,7 @@ foreach ($dirmodels as $reldir)
print '';
print '';
}
- else
- {
+ else {
print "\n";
print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').' ';
print " ";
@@ -462,8 +451,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Default"), 'on');
}
- else
- {
+ else {
print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').' ';
}
print '';
@@ -497,8 +485,7 @@ foreach ($dirmodels as $reldir)
{
print ''.img_object($langs->trans("Preview"), 'bill').' ';
}
- else
- {
+ else {
print img_object($langs->trans("PreviewNotAvailable"), 'generic');
}
print '';
@@ -572,14 +559,12 @@ if (empty($conf->facture->enabled))
}
print "";
}
- else
- {
+ else {
print "".$langs->trans("NoActiveBankAccountDefined")." ";
}
}
}
- else
- {
+ else {
print ''.$langs->trans("BankModuleNotActive").' ';
}
}
@@ -686,8 +671,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
{
print '';
}
-else
-{
+else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
print $doleditor->Create();
diff --git a/htdocs/admin/receiptprinter.php b/htdocs/admin/receiptprinter.php
index 8730f148c07..dc6aa5da33b 100644
--- a/htdocs/admin/receiptprinter.php
+++ b/htdocs/admin/receiptprinter.php
@@ -90,8 +90,7 @@ if ($action == 'addprinter' && $user->admin) {
$db->commit();
setEventMessages($langs->trans("PrinterAdded", $printername), null);
}
- else
- {
+ else {
$db->rollback();
dol_print_error($db);
}
@@ -116,8 +115,7 @@ if ($action == 'deleteprinter' && $user->admin) {
$db->commit();
setEventMessages($langs->trans("PrinterDeleted", $printername), null);
}
- else
- {
+ else {
$db->rollback();
dol_print_error($db);
}
diff --git a/htdocs/admin/reception_setup.php b/htdocs/admin/reception_setup.php
index 312038d3fcc..68f8f0e62ee 100644
--- a/htdocs/admin/reception_setup.php
+++ b/htdocs/admin/reception_setup.php
@@ -72,8 +72,7 @@ if ($action == 'updateMask')
{
if ($res > 0)
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
- else
- setEventMessages($langs->trans("Error"), null, 'errors');
+ else setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -133,14 +132,12 @@ elseif ($action == 'specimen')
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=reception&file=SPECIMEN.pdf");
return;
}
- else
- {
+ else {
setEventMessages($module->error, $module->errors, 'errors');
dol_syslog($module->error, LOG_ERR);
}
}
- else
- {
+ else {
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
}
@@ -264,8 +261,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Activated"), 'switch_on');
}
- else
- {
+ else {
print 'scandir.'&label='.urlencode($module->name).'">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print ' ';
@@ -332,8 +328,7 @@ if ($resql)
$i++;
}
}
-else
-{
+else {
dol_print_error($db);
}
@@ -402,8 +397,7 @@ foreach ($dirmodels as $reldir)
print '';
print '';
}
- else
- {
+ else {
print ''."\n";
print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').' ';
print " ";
@@ -415,8 +409,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Default"), 'on');
}
- else
- {
+ else {
print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').' ';
}
print '';
@@ -447,8 +440,7 @@ foreach ($dirmodels as $reldir)
{
print 'scandir.'&label='.urlencode($module->name).'">'.img_object($langs->trans("Preview"), 'reception').' ';
}
- else
- {
+ else {
print img_object($langs->trans("PreviewNotAvailable"), 'generic');
}
print '';
diff --git a/htdocs/admin/resource.php b/htdocs/admin/resource.php
index 3efdd05bdc7..04ff3861c7f 100644
--- a/htdocs/admin/resource.php
+++ b/htdocs/admin/resource.php
@@ -92,8 +92,7 @@ if (empty($conf->use_javascript_ajax))
print $langs->trans("NotAvailableWhenAjaxDisabled");
print '';
}
-else
-{
+else {
print '';
$arrval = array(
'0'=>$langs->trans("No"),
diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php
index d9d61673c5e..161b521337b 100644
--- a/htdocs/admin/security.php
+++ b/htdocs/admin/security.php
@@ -46,8 +46,7 @@ if ($action == 'setgeneraterule')
{
dol_print_error($db);
}
- else
- {
+ else {
header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
@@ -102,8 +101,7 @@ if ($action == 'activate_encrypt')
header("Location: security.php");
exit;
}
- else
- {
+ else {
$db->rollback();
dol_print_error($db, '');
}
@@ -132,8 +130,7 @@ if ($action == 'activate_encryptdbpassconf')
header("Location: security.php");
exit;
}
- else
- {
+ else {
setEventMessages($langs->trans('InstrucToEncodePass', dol_encode($dolibarr_main_db_pass)), null, 'warnings');
}
}
@@ -149,8 +146,7 @@ elseif ($action == 'disable_encryptdbpassconf')
header("Location: security.php");
exit;
}
- else
- {
+ else {
setEventMessages($langs->trans('InstrucToClearPass', $dolibarr_main_db_pass), null, 'warnings');
}
}
@@ -278,8 +274,7 @@ foreach ($arrayhandler as $key => $module)
{
print img_picto('', 'tick');
}
- else
- {
+ else {
print ''.$langs->trans("Activate").' ';
}
print " \n";
@@ -436,8 +431,7 @@ if (!empty($conf->global->DATABASE_PWD_ENCRYPTED))
//Do not allow "disable encryption" as passwords cannot be decrypted
print ''.$langs->trans("Disable").' ';
}
- else
- {
+ else {
print '-';
}
print "";
@@ -463,8 +457,7 @@ if (empty($dolibarr_main_db_pass) && empty($dolibarr_main_db_encrypted_pass))
$langs->load("errors");
print img_warning($langs->trans("WarningPassIsEmpty"));
}
-else
-{
+else {
if (empty($dolibarr_main_db_encrypted_pass))
{
print ''.$langs->trans("Activate").' ';
@@ -516,8 +509,7 @@ if (GETPOST('info', 'int') > 0)
{
print $langs->trans("Note: The function password_hash exists on your PHP")." \n";
}
- else
- {
+ else {
print $langs->trans("Note: The function password_hash does not exists on your PHP")." \n";
}
print 'MAIN_SECURITY_HASH_ALGO = '.$conf->global->MAIN_SECURITY_HASH_ALGO." \n";
diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php
index f642cd64182..b6674f00c5c 100644
--- a/htdocs/admin/security_other.php
+++ b/htdocs/admin/security_other.php
@@ -51,8 +51,7 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg))
Header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
- else
- {
+ else {
dol_print_error($db);
}
} elseif (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) {
@@ -62,8 +61,7 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg))
Header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -119,20 +117,17 @@ if (function_exists("imagecreatefrompng"))
{
print ajax_constantonoff('MAIN_SECURITY_ENABLECAPTCHA');
}
- else
- {
+ else {
if (empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA))
{
print ''.img_picto($langs->trans("Disabled"), 'off').' ';
}
- else
- {
+ else {
print ''.img_picto($langs->trans("Enabled"), 'on').' ';
}
}
}
-else
-{
+else {
$desc = $form->textwithpicto('', $langs->transnoentities("EnableGDLibraryDesc"), 1, 'warning');
print $desc;
}
@@ -146,14 +141,12 @@ if (!empty($conf->use_javascript_ajax))
{
print ajax_constantonoff('MAIN_USE_ADVANCED_PERMS');
}
-else
-{
+else {
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS))
{
print ''.img_picto($langs->trans("Disabled"), 'off').' ';
}
- else
- {
+ else {
print ''.img_picto($langs->trans("Enabled"), 'on').' ';
}
}
diff --git a/htdocs/admin/sms.php b/htdocs/admin/sms.php
index 09cc0debfd5..0745203f365 100644
--- a/htdocs/admin/sms.php
+++ b/htdocs/admin/sms.php
@@ -123,8 +123,7 @@ if ($action == 'send' && !$_POST['cancel'])
setEventMessages($langs->trans("SmsSuccessfulySent", $smsfrom, $sendto), null, 'mesgs');
setEventMessages($smsfile->error, $smsfile->errors, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("ResultKo"), null, 'errors');
setEventMessages($smsfile->error, $smsfile->errors, 'errors');
}
@@ -206,8 +205,7 @@ if ($action == 'edit')
print '';
print ' ';
}
-else
-{
+else {
if (!count($listofmethods)) print ''.$langs->trans("NoSmsEngine", '
DoliStore ').'
';
print '';
@@ -265,8 +263,7 @@ else
{
print ''.$langs->trans("DoTestSend").' ';
}
- else
- {
+ else {
print ''.$langs->trans("DoTestSend").' ';
}
print '';
diff --git a/htdocs/admin/socialnetworks.php b/htdocs/admin/socialnetworks.php
index d2a92aed9e8..fd4329b7023 100644
--- a/htdocs/admin/socialnetworks.php
+++ b/htdocs/admin/socialnetworks.php
@@ -49,8 +49,7 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg))
header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -63,8 +62,7 @@ if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg))
header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
- else
- {
+ else {
dol_print_error($db);
}
}
diff --git a/htdocs/admin/spip.php b/htdocs/admin/spip.php
index 2ed43e97efd..6c1d1837ea8 100644
--- a/htdocs/admin/spip.php
+++ b/htdocs/admin/spip.php
@@ -74,8 +74,7 @@ if ($action == 'update' || $action == 'add')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -154,8 +153,7 @@ if (!empty($conf->global->ADHERENT_USE_SPIP))
print '';
}
-else
-{
+else {
dol_fiche_head($head, 'spip', $langs->trans("Setup"), 0, 'user');
$link = '';
diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php
index 43e610c3052..d3b9061eecc 100644
--- a/htdocs/admin/stock.php
+++ b/htdocs/admin/stock.php
@@ -49,8 +49,7 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg))
header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -63,8 +62,7 @@ if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg))
header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -120,8 +118,7 @@ if (!empty($conf->facture->enabled))
print $form->selectarray("STOCK_CALCULATE_ON_BILL", $arrval, $conf->global->STOCK_CALCULATE_ON_BILL);
}
}
-else
-{
+else {
print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module30Name"));
}
print "\n\n";
@@ -140,8 +137,7 @@ if (!empty($conf->commande->enabled))
print $form->selectarray("STOCK_CALCULATE_ON_VALIDATE_ORDER", $arrval, $conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER);
}
}
-else
-{
+else {
print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module25Name"));
}
print "\n\n";
@@ -162,8 +158,7 @@ if (!empty($conf->expedition->enabled))
print $form->selectarray("STOCK_CALCULATE_ON_SHIPMENT", $arrval, $conf->global->STOCK_CALCULATE_ON_SHIPMENT);
}
}
-else
-{
+else {
print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module80Name"));
}
print "\n\n";
@@ -182,8 +177,7 @@ if (!empty($conf->expedition->enabled))
print $form->selectarray("STOCK_CALCULATE_ON_SHIPMENT_CLOSE", $arrval, $conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE);
}
}
-else
-{
+else {
print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module80Name"));
}
print "\n\n";
@@ -222,8 +216,7 @@ if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUP
print $form->selectarray("STOCK_CALCULATE_ON_SUPPLIER_BILL", $arrval, $conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL);
}
}
-else
-{
+else {
print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module40Name"));
}
print "\n\n";
@@ -243,8 +236,7 @@ if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUP
print $form->selectarray("STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER", $arrval, $conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER);
}
}
-else
-{
+else {
print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module40Name"));
}
print "\n\n";
@@ -280,8 +272,7 @@ if (!empty($conf->reception->enabled))
print "\n\n";
$found++;
}
-else
-{
+else {
print '';
print ''.$langs->trans("ReStockOnDispatchOrder").' ';
print '';
@@ -294,8 +285,7 @@ else
print $form->selectarray("STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER", $arrval, $conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER);
}
}
- else
- {
+ else {
print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module40Name"));
}
print " \n \n";
diff --git a/htdocs/admin/supplier_invoice.php b/htdocs/admin/supplier_invoice.php
index 977b99d0c99..c52f4296429 100644
--- a/htdocs/admin/supplier_invoice.php
+++ b/htdocs/admin/supplier_invoice.php
@@ -71,8 +71,7 @@ if ($action == 'updateMask')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -110,14 +109,12 @@ if ($action == 'specimen') // For invoices
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=facture_fournisseur&file=SPECIMEN.pdf");
return;
}
- else
- {
+ else {
setEventMessages($module->error, $module->errors, 'errors');
dol_syslog($module->error, LOG_ERR);
}
}
- else
- {
+ else {
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
}
@@ -186,8 +183,7 @@ if ($action == 'set_SUPPLIER_INVOICE_FREE_TEXT')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -273,8 +269,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Activated"), 'switch_on');
}
- else
- {
+ else {
print ' '.img_picto($langs->trans("Disabled"), 'switch_off').' ';
}
print '';
@@ -341,8 +336,7 @@ if ($resql)
$i++;
}
}
-else
-{
+else {
dol_print_error($db);
}
@@ -410,8 +404,7 @@ foreach ($dirmodels as $reldir)
}*/
print "";
}
- else
- {
+ else {
print ''."\n";
print 'scandir.'&label='.urlencode($module->name).'&type=invoice_supplier">'.img_picto($langs->trans("Disabled"), 'switch_off').' ';
print " ";
@@ -425,8 +418,7 @@ foreach ($dirmodels as $reldir)
// Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all
print 'scandir.'&label='.urlencode($module->name).'&type=invoice_supplier"" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').' ';
}
- else
- {
+ else {
print 'scandir.'&label='.urlencode($module->name).'&type=invoice_supplier"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').' ';
}
print '';
@@ -488,8 +480,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
{
print '';
}
-else
-{
+else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
print $doleditor->Create();
diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php
index db9b3e257f6..f282ee8d7ca 100644
--- a/htdocs/admin/supplier_order.php
+++ b/htdocs/admin/supplier_order.php
@@ -69,8 +69,7 @@ if ($action == 'updateMask')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -108,14 +107,12 @@ elseif ($action == 'specimen') // For orders
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=commande_fournisseur&file=SPECIMEN.pdf");
return;
}
- else
- {
+ else {
setEventMessages($module->error, $module->errors, 'errors');
dol_syslog($module->error, LOG_ERR);
}
}
- else
- {
+ else {
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
}
@@ -197,8 +194,7 @@ elseif ($action == 'set_SUPPLIER_ORDER_OTHER')
// Insert
$newmodule->insert_permissions(1);
}
- else
- {
+ else {
// Remove all rights with Permission1190
$newmodule->delete_permissions();
@@ -218,8 +214,7 @@ elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -305,8 +300,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Activated"), 'switch_on');
}
- else
- {
+ else {
print ''.img_picto($langs->trans("Disabled"), 'switch_off').' ';
}
print '';
@@ -371,8 +365,7 @@ if ($resql)
$i++;
}
}
-else
-{
+else {
dol_print_error($db);
}
@@ -430,14 +423,12 @@ foreach ($dirmodels as $reldir)
print img_picto($langs->trans("Enabled"), 'switch_on');
print '';
}
- else
- {
+ else {
print img_picto($langs->trans("Enabled"), 'switch_on');
}
print "";
}
- else
- {
+ else {
print ''."\n";
print 'scandir.'&label='.urlencode($module->name).'&type=order_supplier">'.img_picto($langs->trans("Disabled"), 'switch_off').' ';
print " ";
@@ -449,8 +440,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Default"), 'on');
}
- else
- {
+ else {
print 'scandir.'&label='.urlencode($module->name).'&type=order_supplier"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').' ';
}
print '';
@@ -554,8 +544,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
{
print '';
}
-else
-{
+else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
print $doleditor->Create();
@@ -573,8 +562,7 @@ if ($conf->reception->enabled)
{
print ''.$langs->trans("FeatureNotAvailableWithReceptionModule").' ';
}
-else
-{
+else {
if ($conf->use_javascript_ajax) {
print ajax_constantonoff('SUPPLIER_ORDER_USE_DISPATCH_STATUS');
} else {
diff --git a/htdocs/admin/supplier_payment.php b/htdocs/admin/supplier_payment.php
index 5d7a0d0b8d5..1c4cfd5905e 100644
--- a/htdocs/admin/supplier_payment.php
+++ b/htdocs/admin/supplier_payment.php
@@ -58,8 +58,7 @@ if ($action == 'updateMask')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}elseif ($action == 'setmod')
@@ -132,14 +131,12 @@ elseif ($action == 'specimen')
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=supplier_payment&file=SPECIMEN.pdf");
return;
}
- else
- {
+ else {
setEventMessages($module->error, $module->errors, 'errors');
dol_syslog($module->error, LOG_ERR);
}
}
- else
- {
+ else {
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
}
@@ -207,8 +204,7 @@ if ($resql)
$i++;
}
}
-else
-{
+else {
dol_print_error($db);
}
@@ -283,8 +279,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Activated"), 'switch_on');
}
- else
- {
+ else {
print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').' ';
}
print '';
@@ -399,8 +394,7 @@ foreach ($dirmodels as $reldir)
}*/
print "";
}
- else
- {
+ else {
print ''."\n";
print 'scandir.'&label='.urlencode($module->name).'&type=SUPPLIER_PAYMENT">'.img_picto($langs->trans("Disabled"), 'switch_off').' ';
print " ";
@@ -414,8 +408,7 @@ foreach ($dirmodels as $reldir)
// Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all
print 'scandir.'&label='.urlencode($module->name).'&type=SUPPLIER_PAYMENT"" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').' ';
}
- else
- {
+ else {
print 'scandir.'&label='.urlencode($module->name).'&type=SUPPLIER_PAYMENT"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').' ';
}
print '';
diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php
index c1007623a54..bb3454de4f7 100644
--- a/htdocs/admin/supplier_proposal.php
+++ b/htdocs/admin/supplier_proposal.php
@@ -61,8 +61,7 @@ if ($action == 'updateMask')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -99,14 +98,12 @@ if ($action == 'specimen')
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=supplier_proposal&file=SPECIMEN.pdf");
return;
}
- else
- {
+ else {
setEventMessages($module->error, null, 'errors');
dol_syslog($module->error, LOG_ERR);
}
}
- else
- {
+ else {
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
}
@@ -123,8 +120,7 @@ if ($action == 'set_SUPPLIER_PROPOSAL_DRAFT_WATERMARK')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -141,8 +137,7 @@ if ($action == 'set_SUPPLIER_PROPOSAL_FREE_TEXT')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -157,8 +152,7 @@ if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -279,8 +273,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Activated"), 'switch_on');
}
- else
- {
+ else {
print '';
print img_picto($langs->trans("Disabled"), 'switch_off');
print ' ';
@@ -344,8 +337,7 @@ if ($resql)
$i++;
}
}
-else
-{
+else {
dol_print_error($db);
}
@@ -415,8 +407,7 @@ foreach ($dirmodels as $reldir)
print '';
print '';
}
- else
- {
+ else {
print "\n";
print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').' ';
print " ";
@@ -428,8 +419,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Default"), 'on');
}
- else
- {
+ else {
print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').' ';
}
print '';
@@ -463,8 +453,7 @@ foreach ($dirmodels as $reldir)
{
print ''.img_object($langs->trans("Preview"), 'bill').' ';
}
- else
- {
+ else {
print img_object($langs->trans("PreviewNotAvailable"), 'generic');
}
print '';
@@ -512,8 +501,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
{
print '';
}
-else
-{
+else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
print $doleditor->Create();
@@ -544,21 +532,18 @@ if ($conf->banque->enabled)
{
print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL');
}
- else
- {
+ else {
if (empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL))
{
print ''.img_picto($langs->trans("Disabled"), 'switch_off').' ';
}
- else
- {
+ else {
print ''.img_picto($langs->trans("Enabled"), 'switch_on').' ';
}
}
print '';
}
-else
-{
+else {
print '';
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").' '.$langs->trans('NotAvailable').' ';
}
diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php
index 16b273cd6db..44143afb270 100644
--- a/htdocs/admin/syslog.php
+++ b/htdocs/admin/syslog.php
@@ -127,8 +127,7 @@ if ($action == 'set')
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
$db->rollback();
setEventMessages($error, $errors, 'errors');
}
@@ -156,8 +155,7 @@ if ($action == 'setlevel')
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
diff --git a/htdocs/admin/system/about.php b/htdocs/admin/system/about.php
index 3d0dddd6d10..db7559de17a 100644
--- a/htdocs/admin/system/about.php
+++ b/htdocs/admin/system/about.php
@@ -201,8 +201,7 @@ if ($showpromotemessage)
print $langs->trans("ExampleOfNewsMessageForMajorRelease", DOL_VERSION, DOL_VERSION);
print '';
}
- else
- {
+ else {
print $langs->trans("TitleExampleForMaintenanceRelease").': ';
print '
';
@@ -326,8 +321,7 @@ if (!$error && $xml)
$out .= ' '."\n";
$out .= "\n";
}
- else
- {
+ else {
$out .= ''.$langs->trans("None").' ';
}
$out .= '
';
@@ -381,8 +375,7 @@ if (!$error && $xml)
$out .= ' '."\n";
$out .= "\n";
}
- else
- {
+ else {
$out .= ''.$langs->trans("None").' ';
}
$out .= '
';
@@ -394,13 +387,11 @@ if (!$error && $xml)
{
setEventMessages($langs->trans("FileIntegrityIsStrictlyConformedWithReference"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($langs->trans("FileIntegritySomeFilesWereRemovedOrModified"), null, 'warnings');
}
}
- else
- {
+ else {
print 'Error: Failed to found dolibarr_htdocs_dir into XML file '.$xmlfile;
$error++;
}
@@ -434,15 +425,13 @@ if (!$error && $xml)
$resultcomment = 'FileIntegrityIsOkButFilesWereAdded';
$outcurrentchecksum = $checksumget.' - '.$langs->trans("FileIntegrityIsOkButFilesWereAdded").' ';
}
- else
- {
+ else {
$resultcode = 'ok';
$resultcomment = 'Success';
$outcurrentchecksum = ''.$checksumget.' ';
}
}
- else
- {
+ else {
$resultcode = 'error';
$resultcomment = 'Error';
$outcurrentchecksum = ''.$checksumget.' ';
diff --git a/htdocs/admin/system/modules.php b/htdocs/admin/system/modules.php
index 61de00287e9..786b8b7306c 100644
--- a/htdocs/admin/system/modules.php
+++ b/htdocs/admin/system/modules.php
@@ -70,8 +70,7 @@ foreach ($modulesdir as $dir)
// File duplicate
print "Warning duplicate file found : ".$file." (Found ".$dir.$file.", already found ".$modules_fullpath[$file].") ";
}
- else
- {
+ else {
// File to load
$res = include_once $dir.$file;
if (class_exists($modName))
@@ -90,8 +89,7 @@ foreach ($modulesdir as $dir)
dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR);
}
}
- else
- {
+ else {
print "Warning bad descriptor file : ".$dir.$file." (Class ".$modName." not found into file) ";
}
}
@@ -125,8 +123,7 @@ foreach ($sortorder as $numero=>$name)
if (preg_match('/^\//', $picto[$numero])) print img_picto($alt, $picto[$numero], 'width="14px"', 1);
else print img_object($alt, $picto[$numero], 'width="14px"');
}
- else
- {
+ else {
print img_object($alt, $picto[$numero], 'width="14px"');
}
print ' '.$modules[$numero]->getName();
diff --git a/htdocs/admin/system/perf.php b/htdocs/admin/system/perf.php
index dd77c41a673..2c6e20f0d22 100644
--- a/htdocs/admin/system/perf.php
+++ b/htdocs/admin/system/perf.php
@@ -63,8 +63,7 @@ print ' ';
print ''.$langs->trans("XDebug").' : ';
$test = !function_exists('xdebug_is_enabled');
if ($test) print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled");
-else
-{
+else {
print img_picto('', 'warning').' '.$langs->trans("ModuleActivated", $langs->transnoentities("XDebug"));
print ' - '.$langs->trans("MoreInformation").' XDebug admin page ';
}
@@ -75,8 +74,7 @@ print ' ';
print ''.$langs->trans("Syslog").' : ';
$test = empty($conf->syslog->enabled);
if ($test) print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled");
-else
-{
+else {
print img_picto('', 'warning').' '.$langs->trans("ModuleActivated", $langs->transnoentities("Syslog"));
//print ' '.$langs->trans("MoreInformation").' XDebug admin page ';
}
@@ -87,8 +85,7 @@ print ' ';
print ''.$langs->trans("DebugBar").' : ';
$test = empty($conf->debugbar->enabled);
if ($test) print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled");
-else
-{
+else {
print img_picto('', 'warning').' '.$langs->trans("ModuleActivated", $langs->transnoentities("DebugBar"));
//print ' '.$langs->trans("MoreInformation").' XDebug admin page ';
}
@@ -105,8 +102,7 @@ if ($test)
print img_picto('', 'tick.png').' '.$langs->trans("MemcachedAvailableAndSetup");
print ' '.$langs->trans("MoreInformation").' Memcached module admin page ';
}
- else
- {
+ else {
print img_picto('', 'warning').' '.$langs->trans("MemcachedModuleAvailableButNotSetup");
print ' Memcached module admin page ';
}
@@ -148,8 +144,7 @@ if (!$foundcache && $test)
$foundcache++;
print img_picto('', 'tick.png').' '.$langs->trans("APCInstalled");
}
- else
- {
+ else {
print img_picto('', 'warning').' '.$langs->trans("APCCacheInstalledButDisabled");
}
}
@@ -163,8 +158,7 @@ if (ini_get('opcache.preload'))
print ''.$langs->trans("PreloadOPCode").' : ';
print ini_get('opcache.preload');
}
-else
-{
+else {
print ' ';
print ''.$langs->trans("PreloadOPCode").' : ';
print $langs->trans("No");
@@ -469,8 +463,7 @@ if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli')
{
print img_picto('', 'tick.png').' '.$langs->trans("YouUseBestDriver", $conf->db->type);
}
- else
- {
+ else {
print img_picto('', 'warning.png').' '.$langs->trans("YouDoNotUseBestDriver", $conf->db->type, 'mysqli');
}
print ' ';
@@ -496,13 +489,11 @@ if ($resql)
{
print img_picto('', 'warning.png').' '.$langs->trans("YouHaveXObjectUseSearchOptim", $nb, $langs->transnoentitiesnoconv("ProductsOrServices"), 'PRODUCT_DONOTSEARCH_ANYWHERE');
}
- else
- {
+ else {
print img_picto('', 'tick.png').' '.$langs->trans("YouHaveXObjectAndSearchOptimOn", $nb, $langs->transnoentitiesnoconv("ProductsOrServices"));
}
}
- else
- {
+ else {
print img_picto('', 'tick.png').' '.$langs->trans("NbOfObjectIsLowerThanNoPb", $nb, $langs->transnoentitiesnoconv("ProductsOrServices"));
}
print ' ';
@@ -526,13 +517,11 @@ if ($resql)
{
print img_picto('', 'warning.png').' '.$langs->trans("YouHaveXObjectUseSearchOptim", $nb, $langs->transnoentitiesnoconv("ThirdParties"), 'COMPANY_DONOTSEARCH_ANYWHERE');
}
- else
- {
+ else {
print img_picto('', 'tick.png').' '.$langs->trans("YouHaveXObjectAndSearchOptimOn", $nb, $langs->transnoentitiesnoconv("ThirdParties"));
}
}
- else
- {
+ else {
print img_picto('', 'tick.png').' '.$langs->trans("NbOfObjectIsLowerThanNoPb", $nb, $langs->transnoentitiesnoconv("ThirdParties"));
}
print ' ';
@@ -546,8 +535,7 @@ if (!in_array($conf->browser->name, array('chrome', 'opera', 'safari', 'firefox'
{
print img_picto('', 'warning.png').' '.$langs->trans("BrowserIsKO", $conf->browser->name);
}
-else
-{
+else {
print img_picto('', 'tick.png').' '.$langs->trans("BrowserIsOK", $conf->browser->name);
}
print ' ';
diff --git a/htdocs/admin/system/phpinfo.php b/htdocs/admin/system/phpinfo.php
index 04439d11710..8015f16a572 100644
--- a/htdocs/admin/system/phpinfo.php
+++ b/htdocs/admin/system/phpinfo.php
@@ -90,8 +90,7 @@ elseif (versioncompare(versionphparray(), $arrayphpminversionwarning) < 0)
{
print ' '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionwarning));
}
-else
-{
+else {
print ' '.versiontostring(versionphparray());
}
@@ -103,8 +102,7 @@ if (!isset($_GET["testget"]) && !isset($_POST["testpost"]) && !isset($_GET["main
print ' '.$langs->trans("PHPSupportPOSTGETKo");
print ' ('.$langs->trans("Recheck").' )';
}
-else
-{
+else {
print ' '.$langs->trans("PHPSupportPOSTGETOk");
}
@@ -115,8 +113,7 @@ if (!function_exists("session_id"))
{
print ' '.$langs->trans("ErrorPHPDoesNotSupportSessions");
}
-else
-{
+else {
print ' '.$langs->trans("PHPSupportSessions");
}
@@ -127,8 +124,7 @@ if (!function_exists("utf8_encode"))
{
print ' '.$langs->trans("ErrorPHPDoesNotSupportUTF8");
}
-else
-{
+else {
print ' '.$langs->trans("PHPSupportUTF8");
}
@@ -229,8 +225,7 @@ foreach ($phparray as $key => $value)
print '';
print '';
}
- else
- {
+ else {
print '';
print ''.$keyparam.' ';
$i = 0;
@@ -346,8 +341,7 @@ function getTableColumn($name, array $list)
{
$html .= ' ';
}
- else
- {
+ else {
$html .= ' ';
}
@@ -382,8 +376,7 @@ function getTableColumnFunction(array $functions)
{
$html .= ' ';
}
- else
- {
+ else {
$html .= ' ';
}
diff --git a/htdocs/admin/system/xdebug.php b/htdocs/admin/system/xdebug.php
index 5e4e9eff82f..3358fb980fe 100644
--- a/htdocs/admin/system/xdebug.php
+++ b/htdocs/admin/system/xdebug.php
@@ -109,16 +109,14 @@ xdebug.auto_trace=0
Allow Remote debug=yes or prompt '."\n";
print " \n";
}
- else
- {
+ else {
print socket_strerror(socket_last_error());
echo "Failed to connect to address=".$address." port=".$port." \n";
echo "There is no Remote debug server at this address.\n";
}
socket_close($socket);
}
-else
-{
+else {
print "Can't test if PHPDebug is OK as PHP socket functions are not enabled.";
}
diff --git a/htdocs/admin/taxes.php b/htdocs/admin/taxes.php
index f9bb8f39641..1999fbab8f0 100644
--- a/htdocs/admin/taxes.php
+++ b/htdocs/admin/taxes.php
@@ -131,8 +131,7 @@ if (empty($mysoc->tva_assuj))
{
print $langs->trans("YourCompanyDoesNotUseVAT").' ';
}
-else
-{
+else {
print ' \n";
}
- else
- {
+ else {
$out .= ''.$langs->trans("None").' ';
}
$out .= '';
@@ -1710,8 +1704,7 @@ class Setup extends DolibarrApi
$out .= ' '."\n";
$out .= "\n";
}
- else
- {
+ else {
$out .= ''.$langs->trans("None").' ';
}
$out .= '';
@@ -1723,13 +1716,11 @@ class Setup extends DolibarrApi
{
//setEventMessages($langs->trans("FileIntegrityIsStrictlyConformedWithReference"), null, 'mesgs');
}
- else
- {
+ else {
//setEventMessages($langs->trans("FileIntegritySomeFilesWereRemovedOrModified"), null, 'warnings');
}
}
- else
- {
+ else {
throw new RestException(500, 'Error: Failed to found dolibarr_htdocs_dir into XML file '.$xmlfile);
}
@@ -1752,16 +1743,14 @@ class Setup extends DolibarrApi
//$outcurrentchecksum = $checksumget.' - '.$langs->trans("FileIntegrityIsOkButFilesWereAdded").' ';
$outcurrentchecksum = $checksumget;
}
- else
- {
+ else {
$resultcode = 'ok';
$resultcomment = 'Success';
//$outcurrentchecksum = ''.$checksumget.' ';
$outcurrentchecksum = $checksumget;
}
}
- else
- {
+ else {
$resultcode = 'error';
$resultcomment = 'Error';
//$outcurrentchecksum = ''.$checksumget.' ';
diff --git a/htdocs/api/index.php b/htdocs/api/index.php
index c5edbc74d66..fca0e027081 100644
--- a/htdocs/api/index.php
+++ b/htdocs/api/index.php
@@ -208,8 +208,7 @@ if (!empty($reg[1]) && $reg[1] == 'explorer' && ($reg[2] == '/swagger.json' || $
//dol_syslog("Found API by index.php: classname=".$classname." for module ".$dir." into ".$dir_part.$file_searched);
$listofapis[strtolower($classname)] = $classname;
}
- else
- {
+ else {
dol_syslog("We found an api_xxx file (".$file_searched.") but class ".$classname." does not exists after loading file", LOG_WARNING);
}
}
diff --git a/htdocs/asset/admin/setup.php b/htdocs/asset/admin/setup.php
index 752d569c7d1..12f5fb1fbc7 100644
--- a/htdocs/asset/admin/setup.php
+++ b/htdocs/asset/admin/setup.php
@@ -88,8 +88,7 @@ if ($action == 'edit')
print '';
print ' ';
}
-else
-{
+else {
print '';
print ''.$langs->trans("Parameter").' '.$langs->trans("Value").' ';
diff --git a/htdocs/asset/card.php b/htdocs/asset/card.php
index 110d662c9e8..fc42f0b00d6 100644
--- a/htdocs/asset/card.php
+++ b/htdocs/asset/card.php
@@ -315,8 +315,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
{
print 'id.'&action=edit">'.$langs->trans("Modify").' '."\n";
}
- else
- {
+ else {
print ''.$langs->trans('Modify').' '."\n";
}
@@ -324,8 +323,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
{
print 'id.'&action=delete">'.$langs->trans('Delete').' '."\n";
}
- else
- {
+ else {
print ''.$langs->trans('Delete').' '."\n";
}
}
diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php
index 7c9d91d79e7..1570fe438ad 100644
--- a/htdocs/asset/class/asset.class.php
+++ b/htdocs/asset/class/asset.class.php
@@ -470,8 +470,7 @@ class Asset extends CommonObject
$this->db->free($result);
}
- else
- {
+ else {
dol_print_error($this->db);
}
}
diff --git a/htdocs/asset/class/asset_type.class.php b/htdocs/asset/class/asset_type.class.php
index bfb0c7d073a..2e275ae1e65 100644
--- a/htdocs/asset/class/asset_type.class.php
+++ b/htdocs/asset/class/asset_type.class.php
@@ -155,15 +155,13 @@ class AssetType extends CommonObject
$this->db->commit();
return $this->id;
}
- else
- {
+ else {
dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR);
$this->db->rollback();
return -2;
}
}
- else
- {
+ else {
$this->error = $this->db->lasterror();
$this->db->rollback();
return -1;
@@ -224,15 +222,13 @@ class AssetType extends CommonObject
$this->db->commit();
return 1;
}
- else
- {
+ else {
$this->db->rollback();
dol_syslog(get_class($this)."::update ".$this->error, LOG_ERR);
return -$error;
}
}
- else
- {
+ else {
$this->error = $this->db->lasterror();
$this->db->rollback();
return -1;
@@ -264,8 +260,7 @@ class AssetType extends CommonObject
$this->db->commit();
return 1;
}
- else
- {
+ else {
$this->db->rollback();
$this->error = $this->db->lasterror();
return -1;
@@ -304,8 +299,7 @@ class AssetType extends CommonObject
return 1;
}
- else
- {
+ else {
$this->error = $this->db->lasterror();
return -1;
}
@@ -345,8 +339,7 @@ class AssetType extends CommonObject
}
}
}
- else
- {
+ else {
print $this->db->error();
}
return $assettypes;
@@ -401,8 +394,7 @@ class AssetType extends CommonObject
return $ret;
}
- else
- {
+ else {
$this->error = $this->db->lasterror();
return -1;
}
diff --git a/htdocs/asset/document.php b/htdocs/asset/document.php
index 4724173cd19..9b5294605ba 100644
--- a/htdocs/asset/document.php
+++ b/htdocs/asset/document.php
@@ -145,8 +145,7 @@ if ($object->id)
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
}
-else
-{
+else {
accessforbidden('', 0, 1);
}
diff --git a/htdocs/asset/list.php b/htdocs/asset/list.php
index 39fd0e0761d..da2a4d80b27 100644
--- a/htdocs/asset/list.php
+++ b/htdocs/asset/list.php
@@ -254,8 +254,7 @@ if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit
{
$num = $nbtotalofrecords;
}
-else
-{
+else {
if ($limit) $sql .= $db->plimit($limit + 1, $offset);
$resql = $db->query($sql);
diff --git a/htdocs/asset/type.php b/htdocs/asset/type.php
index 8df5ffe8c40..f9931a927b4 100644
--- a/htdocs/asset/type.php
+++ b/htdocs/asset/type.php
@@ -129,14 +129,12 @@ if ($action == 'add' && $user->rights->asset->write)
header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
- else
- {
+ else {
setEventMessages($object->error, $object->errors, 'errors');
$action = 'create';
}
}
- else
- {
+ else {
$action = 'create';
}
}
@@ -163,8 +161,7 @@ if ($action == 'update' && $user->rights->asset->write)
{
setEventMessages($langs->trans("AssetsTypeModified"), null, 'mesgs');
}
- else
- {
+ else {
setEventMessages($object->error, $object->errors, 'errors');
}
@@ -183,8 +180,7 @@ if ($action == 'confirm_delete' && $user->rights->asset->write)
header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
- else
- {
+ else {
setEventMessages($langs->trans("AssetsTypeCanNotBeDeleted"), null, 'errors');
$action = '';
}
@@ -308,8 +304,7 @@ if (!$rowid && $action != 'create' && $action != 'edit')
if ($user->rights->asset->write)
print 'rowid.'">'.img_edit().' ';
- else
- print ' ';
+ else print ' ';
print "";
$i++;
}
@@ -318,8 +313,7 @@ if (!$rowid && $action != 'create' && $action != 'edit')
print '';
}
- else
- {
+ else {
dol_print_error($db);
}
}
diff --git a/htdocs/asterisk/cidlookup.php b/htdocs/asterisk/cidlookup.php
index fd27abb6ceb..29cd34db6a8 100644
--- a/htdocs/asterisk/cidlookup.php
+++ b/htdocs/asterisk/cidlookup.php
@@ -68,8 +68,7 @@ if ($resql)
}
$db->free($resql);
}
-else
-{
+else {
dol_print_error($db, 'Error');
$found = 'Error';
}
diff --git a/htdocs/asterisk/wrapper.php b/htdocs/asterisk/wrapper.php
index 5facd5d1bbf..9f360294fc9 100644
--- a/htdocs/asterisk/wrapper.php
+++ b/htdocs/asterisk/wrapper.php
@@ -138,8 +138,7 @@ if ($resql)
}
$db->free($resql);
}
-else
-{
+else {
dol_print_error($db, 'Error');
$found = 'Error';
}
@@ -165,8 +164,7 @@ if (!empty($number))
dol_syslog($txt, LOG_ERR);
print '
'."\n";
diff --git a/htdocs/barcode/codeinit.php b/htdocs/barcode/codeinit.php
index d2afa5e6871..f77b50924e2 100644
--- a/htdocs/barcode/codeinit.php
+++ b/htdocs/barcode/codeinit.php
@@ -110,14 +110,12 @@ if ($action == 'initbarcodeproducts')
{
setEventMessages($langs->trans("AllBarcodeReset"), null, 'mesgs');
}
- else
- {
+ else {
$error++;
dol_print_error($db);
}
}
- else
- {
+ else {
$sql = "SELECT rowid, ref, fk_product_type";
$sql .= " FROM ".MAIN_DB_PREFIX."product";
$sql .= " WHERE barcode IS NULL or barcode = ''";
@@ -151,8 +149,7 @@ if ($action == 'initbarcodeproducts')
$i++;
}
}
- else
- {
+ else {
$error++;
dol_print_error($db);
}
@@ -168,8 +165,7 @@ if ($action == 'initbarcodeproducts')
//$db->rollback();
$db->commit();
}
- else
- {
+ else {
$db->rollback();
}
}
@@ -295,8 +291,7 @@ if ($conf->product->enabled || $conf->product->service)
print ''.(isset($modBarCodeProduct->name) ? $modBarCodeProduct->name : $modBarCodeProduct->nom).' - '.$langs->trans("NextValue").': '.$modBarCodeProduct->getNextValue($objproduct).' ';
$disabled = 0;
}
- else
- {
+ else {
$disabled = 1;
$titleno = $langs->trans("NoBarcodeNumberingTemplateDefined");
print ''.$langs->trans("NoBarcodeNumberingTemplateDefined").' ('.$langs->trans("ToGenerateCodeDefineAutomaticRuleFirst").' ) ';
diff --git a/htdocs/barcode/printsheet.php b/htdocs/barcode/printsheet.php
index 5cd988a5bed..7c692998723 100644
--- a/htdocs/barcode/printsheet.php
+++ b/htdocs/barcode/printsheet.php
@@ -162,8 +162,7 @@ if ($action == 'builddoc')
setEventMessages($module->error, null, 'errors');
}
}
- else
- {
+ else {
$error++;
setEventMessages("Error, encoding ".$encoding." is not supported by encoder ".$generator.'. You must choose another barcode type or install a barcode generation engine that support '.$encoding, null, 'errors');
}
diff --git a/htdocs/blockedlog/admin/blockedlog.php b/htdocs/blockedlog/admin/blockedlog.php
index 1ef35942d1e..0a649a380cf 100644
--- a/htdocs/blockedlog/admin/blockedlog.php
+++ b/htdocs/blockedlog/admin/blockedlog.php
@@ -52,8 +52,7 @@ if (preg_match('/set_(.*)/', $action, $reg))
header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -66,8 +65,7 @@ if (preg_match('/del_(.*)/', $action, $reg))
Header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
- else
- {
+ else {
dol_print_error($db);
}
}
diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php
index 66cc3b44848..10b14a29039 100644
--- a/htdocs/blockedlog/admin/blockedlog_list.php
+++ b/htdocs/blockedlog/admin/blockedlog_list.php
@@ -134,14 +134,12 @@ if ($action === 'downloadblockchain') {
$previoushash = $block_static->getPreviousHash(0, $obj->rowid);
$firstid = $obj->rowid;
}
- else
- { // If not data found for filter, we do not need previoushash neither firstid
+ else { // If not data found for filter, we do not need previoushash neither firstid
$previoushash = 'nodata';
$firstid = '';
}
}
- else
- {
+ else {
$error++;
setEventMessages($db->lasterror, null, 'errors');
}
@@ -212,8 +210,7 @@ if ($action === 'downloadblockchain') {
if ($loweridinerror > 0) $statusofrecordnote = 'ValidButFoundAPreviousKO';
else $statusofrecordnote = '';
}
- else
- {
+ else {
$statusofrecord = 'KO';
$statusofrecordnote = 'LineCorruptedOrNotMatchingPreviousOne';
$loweridinerror = $obj->rowid;
@@ -246,8 +243,7 @@ if ($action === 'downloadblockchain') {
exit;
}
- else
- {
+ else {
setEventMessages($db->lasterror, null, 'errors');
}
}
@@ -264,8 +260,7 @@ if (GETPOST('withtab', 'alpha'))
{
$title = $langs->trans("ModuleSetup").' '.$langs->trans('BlockedLog');
}
-else
-{
+else {
$title = $langs->trans("BrowseBlockedLog");
}
@@ -280,8 +275,7 @@ if (!is_array($blocks))
{
setEventMessages($langs->trans("TooManyRecordToScanRestrictFilters", $MAXLINES), null, 'errors');
}
- else
- {
+ else {
dol_print_error($block_static->db, $block_static->error, $block_static->errors);
exit;
}
@@ -441,8 +435,7 @@ 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
-{
+else {
// This is version that optimize the memory (but will not report errors that are outside the filter range)
$loweridinerror = 0;
$checkresult = array();
@@ -511,8 +504,7 @@ if (is_array($blocks))
if ($checkresult[$block->id]) print img_picto($langs->trans('OkCheckFingerprintValidityButChainIsKo'), 'statut4');
else print img_picto($langs->trans('KoCheckFingerprintValidity'), 'statut8');
}
- else
- {
+ else {
print img_picto($langs->trans('OkCheckFingerprintValidity'), 'statut4');
}
diff --git a/htdocs/blockedlog/ajax/block-info.php b/htdocs/blockedlog/ajax/block-info.php
index eaf1b17ed08..e2d588f1798 100644
--- a/htdocs/blockedlog/ajax/block-info.php
+++ b/htdocs/blockedlog/ajax/block-info.php
@@ -95,8 +95,7 @@ function formatObject($objtoshow, $prefix)
var_dump($val);*/
$s .= dol_print_date($val, 'dayhour');
}
- else
- {
+ else {
$s .= $val;
}
$s .= '';
diff --git a/htdocs/blockedlog/class/authority.class.php b/htdocs/blockedlog/class/authority.class.php
index 234aeceb2a6..95106bba4d2 100644
--- a/htdocs/blockedlog/class/authority.class.php
+++ b/htdocs/blockedlog/class/authority.class.php
@@ -180,14 +180,12 @@ class BlockedLogAuthority
return 1;
}
- else
- {
+ else {
$this->error = $langs->trans("RecordNotFound");
return 0;
}
}
- else
- {
+ else {
$this->error = $this->db->error();
return -1;
}
@@ -233,14 +231,12 @@ class BlockedLogAuthority
return $this->id;
}
- else
- {
+ else {
$this->db->rollback();
return -2;
}
}
- else
- {
+ else {
$this->error = $this->db->error();
$this->db->rollback();
return -1;
@@ -277,8 +273,7 @@ class BlockedLogAuthority
return 1;
}
- else
- {
+ else {
$this->error = $this->db->error();
$this->db->rollback();
return -1;
diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php
index be017f22600..0226486116b 100644
--- a/htdocs/blockedlog/class/blockedlog.class.php
+++ b/htdocs/blockedlog/class/blockedlog.class.php
@@ -303,8 +303,7 @@ class BlockedLog
if ($this->signature == '0000000000') {
return 'System to track events into unalterable logs were disabled after some recording were done. We saved a special Fingerprint to track the chain as broken. ';
}
- else
- {
+ else {
return 'System to track events into unalterable logs were disabled. This is possible because no record were done yet. ';
}
}
@@ -640,7 +639,7 @@ class BlockedLog
if (!empty($object->newref)) $this->object_data->ref = $object->newref;
}
- else // Generic case
+ else // Generic case
{
foreach ($object as $key=>$value)
{
@@ -714,14 +713,12 @@ class BlockedLog
return 1;
}
- else
- {
+ else {
$this->error = $langs->trans("RecordNotFound");
return 0;
}
}
- else
- {
+ else {
$this->error = $this->db->error();
return -1;
}
@@ -865,14 +862,12 @@ class BlockedLog
return $this->id;
}
- else
- {
+ else {
$this->db->rollback();
return -2;
}
}
- else
- {
+ else {
$this->error = $this->db->error();
$this->db->rollback();
return -1;
@@ -954,8 +949,7 @@ class BlockedLog
$previoussignature = $obj->signature;
}
}
- else
- {
+ else {
dol_print_error($this->db);
exit;
}
diff --git a/htdocs/bom/bom_agenda.php b/htdocs/bom/bom_agenda.php
index a5b66b9886f..68c09977cbd 100644
--- a/htdocs/bom/bom_agenda.php
+++ b/htdocs/bom/bom_agenda.php
@@ -46,8 +46,7 @@ if (GETPOST('actioncode', 'array'))
$actioncode = GETPOST('actioncode', 'array', 3);
if (!count($actioncode)) $actioncode = '0';
}
-else
-{
+else {
$actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT));
}
$search_agenda_label = GETPOST('search_agenda_label');
@@ -217,8 +216,7 @@ if ($object->id > 0)
{
print ''.$langs->trans("AddAction").' ';
}
- else
- {
+ else {
print ''.$langs->trans("AddAction").' ';
}
}
diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php
index 48e9c9d965a..f0f4a2f7b7d 100644
--- a/htdocs/bom/bom_card.php
+++ b/htdocs/bom/bom_card.php
@@ -177,8 +177,7 @@ if (empty($reshook))
setEventMessages($bomline->error, $bomline->errors, 'errors');
$action = '';
}
- else
- {
+ else {
unset($_POST['idprod']);
unset($_POST['qty']);
unset($_POST['qty_frozen']);
@@ -217,8 +216,7 @@ if (empty($reshook))
setEventMessages($bomline->error, $bomline->errors, 'errors');
$action = '';
}
- else
- {
+ else {
unset($_POST['idprod']);
unset($_POST['qty']);
unset($_POST['qty_frozen']);
@@ -621,8 +619,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
{
print 'id.'&action=edit">'.$langs->trans("Modify").' '."\n";
}
- else
- {
+ else {
print ''.$langs->trans('Modify').' '."\n";
}
}
@@ -636,8 +633,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
{
print ''.$langs->trans("Validate").' ';
}
- else
- {
+ else {
$langs->load("errors");
print ''.$langs->trans("Validate").' ';
}
@@ -689,8 +685,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
{
print 'id.'&action=delete">'.$langs->trans('Delete').' '."\n";
}
- else
- {
+ else {
print ''.$langs->trans('Delete').' '."\n";
}
}
diff --git a/htdocs/bom/bom_document.php b/htdocs/bom/bom_document.php
index a7dca41fff6..0a68c799171 100644
--- a/htdocs/bom/bom_document.php
+++ b/htdocs/bom/bom_document.php
@@ -142,8 +142,7 @@ if ($object->id)
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
}
-else
-{
+else {
accessforbidden('', 0, 1);
}
diff --git a/htdocs/bom/bom_list.php b/htdocs/bom/bom_list.php
index e2bafbecb48..2159564aeed 100644
--- a/htdocs/bom/bom_list.php
+++ b/htdocs/bom/bom_list.php
@@ -199,8 +199,7 @@ if (empty($reshook))
}
else $nbok++;
}
- else
- {
+ else {
setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
$error++;
break;
@@ -213,8 +212,7 @@ if (empty($reshook))
else setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs');
$db->commit();
}
- else
- {
+ else {
$db->rollback();
}
//var_dump($listofobjectthirdparties);exit;
@@ -254,8 +252,7 @@ if (empty($reshook))
}
else $nbok++;
}
- else
- {
+ else {
setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
$error++;
break;
@@ -268,8 +265,7 @@ if (empty($reshook))
else setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs');
$db->commit();
}
- else
- {
+ else {
$db->rollback();
}
//var_dump($listofobjectthirdparties);exit;
@@ -365,8 +361,7 @@ if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit
{
$num = $nbtotalofrecords;
}
-else
-{
+else {
if ($limit) $sql .= $db->plimit($limit + 1, $offset);
$resql = $db->query($sql);
diff --git a/htdocs/bom/class/api_boms.class.php b/htdocs/bom/class/api_boms.class.php
index d21d82b5ca9..995f2c29f3a 100644
--- a/htdocs/bom/class/api_boms.class.php
+++ b/htdocs/bom/class/api_boms.class.php
@@ -229,8 +229,7 @@ class Boms extends DolibarrApi
{
return $this->get($id);
}
- else
- {
+ else {
throw new RestException(500, $this->bom->error);
}
}
diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php
index 3e522b3c11f..c3e7faede2c 100644
--- a/htdocs/bom/class/bom.class.php
+++ b/htdocs/bom/class/bom.class.php
@@ -514,15 +514,13 @@ class BOM extends CommonObject
{
return $numref;
}
- else
- {
+ else {
$this->error = $obj->error;
//dol_print_error($this->db,get_class($this)."::getNextNumRef ".$obj->error);
return "";
}
}
- else
- {
+ else {
print $langs->trans("Error")." ".$langs->trans("Error_BOM_ADDON_NotDefined");
return "";
}
@@ -568,8 +566,7 @@ class BOM extends CommonObject
$this->fetch_product();
$num = $this->getNextNumRef($this->product);
}
- else
- {
+ else {
$num = $this->ref;
}
$this->newref = dol_sanitizeFileName($num);
@@ -651,8 +648,7 @@ class BOM extends CommonObject
$this->db->commit();
return 1;
}
- else
- {
+ else {
$this->db->rollback();
return -1;
}
@@ -896,8 +892,7 @@ class BOM extends CommonObject
$this->db->free($result);
}
- else
- {
+ else {
dol_print_error($this->db);
}
}
@@ -920,8 +915,7 @@ class BOM extends CommonObject
$this->errors = $this->errors;
return $result;
}
- else
- {
+ else {
$this->lines = $result;
return $this->lines;
}
@@ -1429,8 +1423,7 @@ class BOMLine extends CommonObjectLine
$this->db->free($result);
}
- else
- {
+ else {
dol_print_error($this->db);
}
}
diff --git a/htdocs/bom/tpl/objectline_create.tpl.php b/htdocs/bom/tpl/objectline_create.tpl.php
index eeffb625381..1019911b89f 100644
--- a/htdocs/bom/tpl/objectline_create.tpl.php
+++ b/htdocs/bom/tpl/objectline_create.tpl.php
@@ -100,8 +100,7 @@ if (!empty($conf->product->enabled) || !empty($conf->service->enabled))
// hide products in closed warehouse, but show products for internal transfer
$form->select_produits(GETPOST('idprod', 'int'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, 'warehouseopen,warehouseinternal', GETPOST('combinations', 'array'));
}
- else
- {
+ else {
$form->select_produits(GETPOST('idprod', 'int'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, '', GETPOST('combinations', 'array'));
}
diff --git a/htdocs/bookmarks/admin/bookmark.php b/htdocs/bookmarks/admin/bookmark.php
index bc0c0c37fc2..60e4a1b9756 100644
--- a/htdocs/bookmarks/admin/bookmark.php
+++ b/htdocs/bookmarks/admin/bookmark.php
@@ -45,8 +45,7 @@ if ($action == 'setvalue')
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
$db->rollback();
setEventMessages($langs->trans("Error"), null, 'errors');
}
diff --git a/htdocs/bookmarks/bookmarks.lib.php b/htdocs/bookmarks/bookmarks.lib.php
index 93283cab815..10452ddbd05 100644
--- a/htdocs/bookmarks/bookmarks.lib.php
+++ b/htdocs/bookmarks/bookmarks.lib.php
@@ -42,8 +42,7 @@ function printDropdownBookmarksList()
{
$url .= (dol_escape_htmltag($_SERVER["QUERY_STRING"]) ? '?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]) : '');
}
- else
- {
+ else {
global $sortfield, $sortorder;
$tmpurl = '';
// No urlencode, all param $url will be urlencoded later
@@ -123,8 +122,7 @@ function printDropdownBookmarksList()
$searchForm .= '';
}
}
- else
- {
+ else {
dol_print_error($db);
}
diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php
index 385dd506031..28ce42b6b70 100644
--- a/htdocs/bookmarks/card.php
+++ b/htdocs/bookmarks/card.php
@@ -101,22 +101,19 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update')
header("Location: ".$backtopage);
exit;
}
- else
- {
+ else {
if ($object->errno == 'DB_ERROR_RECORD_ALREADY_EXISTS')
{
$langs->load("errors");
setEventMessages($langs->transnoentities("WarningBookmarkAlreadyExists"), null, 'warnings');
}
- else
- {
+ else {
setEventMessages($object->error, $object->errors, 'errors');
}
$action = $invertedaction;
}
}
- else
- {
+ else {
$action = $invertedaction;
}
}
@@ -266,8 +263,7 @@ if ($id > 0 && !preg_match('/^add/i', $action))
$liste = array(1=>$langs->trans("OpenANewWindow"), 0=>$langs->trans("ReplaceWindow"));
print $form->selectarray('target', $liste, isset($_POST["target"]) ? $_POST["target"] : $object->target);
}
- else
- {
+ else {
if ($object->target == 0) print $langs->trans("ReplaceWindow");
if ($object->target == 1) print $langs->trans("OpenANewWindow");
}
@@ -278,16 +274,14 @@ if ($id > 0 && !preg_match('/^add/i', $action))
{
print img_picto('', 'user').' '.$form->select_dolusers(isset($_POST['userid']) ? $_POST['userid'] : ($object->fk_user ? $object->fk_user : ''), 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
}
- else
- {
+ else {
if ($object->fk_user > 0)
{
$fuser = new User($db);
$fuser->fetch($object->fk_user);
print $fuser->getNomUrl(1);
}
- else
- {
+ else {
print $langs->trans("Public");
}
}
diff --git a/htdocs/bookmarks/class/bookmark.class.php b/htdocs/bookmarks/class/bookmark.class.php
index 2667208fc44..3a00d38eedc 100644
--- a/htdocs/bookmarks/class/bookmark.class.php
+++ b/htdocs/bookmarks/class/bookmark.class.php
@@ -128,8 +128,7 @@ class Bookmark extends CommonObject
$this->db->free($resql);
return $this->id;
}
- else
- {
+ else {
dol_print_error($this->db);
return -1;
}
@@ -175,16 +174,14 @@ class Bookmark extends CommonObject
$this->db->commit();
return $id;
}
- else
- {
+ else {
$this->error = $this->db->lasterror();
$this->errno = $this->db->lasterrno();
$this->db->rollback();
return -2;
}
}
- else
- {
+ else {
$this->error = $this->db->lasterror();
$this->errno = $this->db->lasterrno();
$this->db->rollback();
@@ -219,8 +216,7 @@ class Bookmark extends CommonObject
{
return 1;
}
- else
- {
+ else {
$this->error = $this->db->lasterror();
return -1;
}
@@ -243,8 +239,7 @@ class Bookmark extends CommonObject
{
return 1;
}
- else
- {
+ else {
$this->error = $this->db->lasterror();
return -1;
}
diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php
index 5dd1718b263..ad944d93208 100644
--- a/htdocs/bookmarks/list.php
+++ b/htdocs/bookmarks/list.php
@@ -73,8 +73,7 @@ if ($action == 'delete')
header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
- else
- {
+ else {
setEventMessages($object->error, $object->errors, 'errors');
}
}
@@ -116,8 +115,7 @@ if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords)
{
$num = $nbtotalofrecords;
}
-else
-{
+else {
$sql .= $db->plimit($limit + 1, $offset);
$resql = $db->query($sql);
@@ -231,8 +229,7 @@ while ($i < min($num, $limit))
$tmpuser = $cacheOfUsers[$obj->fk_user];
print $tmpuser->getNomUrl(1);
}
- else
- {
+ else {
print $langs->trans("Public");
}
print "\n";
@@ -253,8 +250,7 @@ while ($i < min($num, $limit))
{
print 'rowid.'">'.img_delete().' ';
}
- else
- {
+ else {
print " ";
}
print "";
diff --git a/htdocs/cashdesk/admin/cashdesk.php b/htdocs/cashdesk/admin/cashdesk.php
index 7c72858387a..9542d0f2b48 100644
--- a/htdocs/cashdesk/admin/cashdesk.php
+++ b/htdocs/cashdesk/admin/cashdesk.php
@@ -69,8 +69,7 @@ if (GETPOST('action', 'alpha') == 'set')
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
- else
- {
+ else {
$db->rollback();
setEventMessages($langs->trans("Error"), null, 'errors');
}
@@ -150,8 +149,7 @@ if (!empty($conf->stock->enabled))
if (empty($conf->productbatch->enabled)) {
print $form->selectyesno('CASHDESK_NO_DECREASE_STOCK', $conf->global->CASHDESK_NO_DECREASE_STOCK, 1);
}
- else
- {
+ else {
if (!$conf->global->CASHDESK_NO_DECREASE_STOCK) {
$res = dolibarr_set_const($db, "CASHDESK_NO_DECREASE_STOCK", 1, 'chaine', 0, '', $conf->entity);
}
@@ -170,8 +168,7 @@ if (!empty($conf->stock->enabled))
print $formproduct->selectWarehouses($conf->global->CASHDESK_ID_WAREHOUSE, 'CASHDESK_ID_WAREHOUSE', '', 1, $disabled);
print ' ('.$langs->trans("Create").') ';
}
- else
- {
+ else {
print ''.$langs->trans("StockDecreaseForPointOfSaleDisabled").' ';
}
print '';
diff --git a/htdocs/cashdesk/affContenu.php b/htdocs/cashdesk/affContenu.php
index 41ba5ffcb39..bfad032c0b5 100644
--- a/htdocs/cashdesk/affContenu.php
+++ b/htdocs/cashdesk/affContenu.php
@@ -37,8 +37,7 @@ if (isset($_SESSION['serObjFacturation']))
$obj_facturation = unserialize($_SESSION['serObjFacturation']);
unset($_SESSION['serObjFacturation']);
}
-else
-{
+else {
// ... sinon, c'est une nouvelle vente
$obj_facturation = new Facturation();
}
@@ -73,8 +72,7 @@ if (in_array(
{
include $page.'.php';
}
-else
-{
+else {
dol_print_error('', 'menu param '.$page.' is not inside allowed list');
}
diff --git a/htdocs/cashdesk/class/Auth.class.php b/htdocs/cashdesk/class/Auth.class.php
index 164d229cf8d..f5de48aa3cb 100644
--- a/htdocs/cashdesk/class/Auth.class.php
+++ b/htdocs/cashdesk/class/Auth.class.php
@@ -130,8 +130,7 @@ class Auth
$this->passwd($aPasswd);
$ret = 0;
}
- else
- {
+ else {
$ret = -1;
}
}
diff --git a/htdocs/cashdesk/class/Facturation.class.php b/htdocs/cashdesk/class/Facturation.class.php
index 10573f9d917..a3c4f7e0a48 100644
--- a/htdocs/cashdesk/class/Facturation.class.php
+++ b/htdocs/cashdesk/class/Facturation.class.php
@@ -299,8 +299,7 @@ class Facturation
{
$this->id = null;
}
- else
- {
+ else {
$this->id = $aId;
}
}
@@ -322,8 +321,7 @@ class Facturation
{
$this->ref = null;
}
- else
- {
+ else {
$this->ref = $aRef;
}
}
@@ -344,8 +342,7 @@ class Facturation
{
$this->qte = null;
}
- else
- {
+ else {
$this->qte = $aQte;
}
}
@@ -367,8 +364,7 @@ class Facturation
{
$this->stock = null;
}
- else
- {
+ else {
$this->stock = $aStock;
}
}
@@ -390,8 +386,7 @@ class Facturation
{
$this->remise_percent = null;
}
- else
- {
+ else {
$this->remise_percent = $aRemisePercent;
}
}
@@ -587,8 +582,7 @@ class Facturation
{
$this->prix_total_ttc = null;
}
- else
- {
+ else {
$this->prix_total_ttc = $aTotalTtc;
}
}
diff --git a/htdocs/cashdesk/facturation.php b/htdocs/cashdesk/facturation.php
index 3c4a4dd6c7a..fd49ad952b4 100644
--- a/htdocs/cashdesk/facturation.php
+++ b/htdocs/cashdesk/facturation.php
@@ -81,8 +81,7 @@ if (GETPOST('filtre', 'alpha')) {
}
$db->free($resql);
}
- else
- {
+ else {
dol_print_error($db);
}
$tab_designations = $ret;
@@ -116,8 +115,7 @@ if (GETPOST('filtre', 'alpha')) {
}
$db->free($resql);
}
- else
- {
+ else {
dol_print_error($db);
}
$tab_designations = $ret;
@@ -131,8 +129,7 @@ if ($nbr_enreg > 1)
{
$top_liste_produits = '----- '.$conf_taille_listes.' '.$langs->transnoentitiesnoconv("CashDeskProducts").' '.$langs->trans("CashDeskOn").' '.$nbr_enreg.' -----';
}
- else
- {
+ else {
$top_liste_produits = '----- '.$nbr_enreg.' '.$langs->transnoentitiesnoconv("CashDeskProducts").' '.$langs->trans("CashDeskOn").' '.$nbr_enreg.' -----';
}
}
@@ -140,8 +137,7 @@ elseif ($nbr_enreg == 1)
{
$top_liste_produits = '----- 1 '.$langs->transnoentitiesnoconv("ProductFound").' -----';
}
-else
-{
+else {
$top_liste_produits = '----- '.$langs->transnoentitiesnoconv("NoProductFound").' -----';
}
diff --git a/htdocs/cashdesk/facturation_dhtml.php b/htdocs/cashdesk/facturation_dhtml.php
index 98ed2bf0173..0235c3dd788 100644
--- a/htdocs/cashdesk/facturation_dhtml.php
+++ b/htdocs/cashdesk/facturation_dhtml.php
@@ -56,8 +56,7 @@ if (dol_strlen($search) >= 0) // If search criteria is on char length at least
if (!empty($conf->barcode->enabled)) $sql .= " OR p.barcode LIKE '".$db->escape($search)."%'";
$sql .= ")";
}
- else
- {
+ else {
$sql .= " AND (p.ref LIKE '%".$db->escape($search)."%' OR p.label LIKE '%".$db->escape($search)."%'";
if (!empty($conf->barcode->enabled)) $sql .= " OR p.barcode LIKE '%".$db->escape($search)."%'";
$sql .= ")";
@@ -99,8 +98,7 @@ if (dol_strlen($search) >= 0) // If search criteria is on char length at least
print $resultat;
}
- else
- {
+ else {
$langs->load("cashdesk");
print '';
diff --git a/htdocs/cashdesk/facturation_verif.php b/htdocs/cashdesk/facturation_verif.php
index 6a7a9bae366..c92f1e31366 100644
--- a/htdocs/cashdesk/facturation_verif.php
+++ b/htdocs/cashdesk/facturation_verif.php
@@ -124,8 +124,7 @@ switch ($action)
if (empty($tva_tx)) $tva_npr = 0;
}
}
- else
- {
+ else {
setEventMessages($prodcustprice->error, $prodcustprice->errors, 'errors');
}
}
@@ -170,27 +169,23 @@ switch ($action)
$redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menutpl=facturation&filtre='.$filtre;
}
- else
- {
+ else {
$obj_facturation->raz();
if ($_POST['hdnSource'] == 'REF')
{
$redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menutpl=facturation&filtre='.$_POST['txtRef'];
}
- else
- {
+ else {
$redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menutpl=facturation';
}
}
}
- else
- {
+ else {
dol_print_error($db);
}
}
- else
- {
+ else {
$redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menutpl=facturation';
}
diff --git a/htdocs/cashdesk/index.php b/htdocs/cashdesk/index.php
index 6c74b268ec9..4038b130d63 100644
--- a/htdocs/cashdesk/index.php
+++ b/htdocs/cashdesk/index.php
@@ -76,8 +76,7 @@ if (!empty($mysoc->logo_small))
{
print ' ';
}
-else
-{
+else {
print ''.$mysoc->name.'
';
}
?>
@@ -204,8 +203,7 @@ if ($_GET['err'] < 0)
echo (' document.getElementById(\'frmLogin\').pwdPassword.focus();');
echo ('');
}
-else
-{
+else {
echo ('');
diff --git a/htdocs/cashdesk/index_verif.php b/htdocs/cashdesk/index_verif.php
index 251b3f2e997..0545c149dfa 100644
--- a/htdocs/cashdesk/index_verif.php
+++ b/htdocs/cashdesk/index_verif.php
@@ -117,13 +117,11 @@ if ($retour >= 0)
header('Location: '.DOL_URL_ROOT.'/cashdesk/affIndex.php?menutpl=facturation&id=NOUV');
exit;
}
- else
- {
+ else {
dol_print_error($db);
}
}
-else
-{
+else {
// Load translation files required by the page
$langs->loadLangs(array("other", "errors"));
$retour = $langs->trans("ErrorBadLoginPassword");
diff --git a/htdocs/cashdesk/tpl/liste_articles.tpl.php b/htdocs/cashdesk/tpl/liste_articles.tpl.php
index 6fffbd3ed52..bd73954f6a0 100644
--- a/htdocs/cashdesk/tpl/liste_articles.tpl.php
+++ b/htdocs/cashdesk/tpl/liste_articles.tpl.php
@@ -49,8 +49,7 @@ $tab = (!empty($_SESSION['poscart']) ? $_SESSION['poscart'] : array());
$tab_size = count($tab);
if ($tab_size <= 0) print ''.$langs->trans("NoArticle").'
';
-else
-{
+else {
for ($i = 0; $i < $tab_size; $i++)
{
echo (''."\n");
diff --git a/htdocs/cashdesk/tpl/validation1.tpl.php b/htdocs/cashdesk/tpl/validation1.tpl.php
index 3b38aba3159..d60d370172d 100644
--- a/htdocs/cashdesk/tpl/validation1.tpl.php
+++ b/htdocs/cashdesk/tpl/validation1.tpl.php
@@ -41,8 +41,7 @@ $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
-{
+else {
echo ('
'.$langs->trans("VAT").' '.$langs->trans("NoVAT").' ');
}
?>
diff --git a/htdocs/cashdesk/validation_verif.php b/htdocs/cashdesk/validation_verif.php
index bc67350bbf1..a7a938fd828 100644
--- a/htdocs/cashdesk/validation_verif.php
+++ b/htdocs/cashdesk/validation_verif.php
@@ -97,8 +97,7 @@ switch ($action)
$obj_facturation->montantRendu($encaisse - $total);
}
- else
- {
+ else {
//$txtDatePaiement=$_POST['txtDatePaiement'];
$datePaiement = dol_mktime(0, 0, 0, $_POST['txtDatePaiementmonth'], $_POST['txtDatePaiementday'], $_POST['txtDatePaiementyear']);
$txtDatePaiement = dol_print_date($datePaiement, 'dayrfc');
@@ -253,16 +252,14 @@ switch ($action)
}
}
}
- else
- {
+ else {
setEventMessages($invoice->error, $invoice->errors, 'errors');
$error++;
}
$id = $invoice->id;
}
- else
- {
+ else {
$resultcreate = $invoice->create($user, 0, 0);
if ($resultcreate > 0)
{
@@ -331,14 +328,12 @@ switch ($action)
}
}
}
- else
- {
+ else {
setEventMessages($invoice->error, $invoice->errors, 'errors');
$error++;
}
}
- else
- {
+ else {
setEventMessages($invoice->error, $invoice->errors, 'errors');
$error++;
}
@@ -350,8 +345,7 @@ switch ($action)
$db->commit();
$redirection = 'affIndex.php?menutpl=validation_ok&facid='.$id; // Ajout de l'id de la facture, pour l'inclure dans un lien pointant directement vers celle-ci dans Dolibarr
}
- else
- {
+ else {
$db->rollback();
$redirection = 'affIndex.php?facid='.$id.'&error=1&mesg=ErrorFailedToCreateInvoice'; // Ajout de l'id de la facture, pour l'inclure dans un lien pointant directement vers celle-ci dans Dolibarr
}
diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php
index 716e02ae678..8a4018a5458 100644
--- a/htdocs/comm/action/card.php
+++ b/htdocs/comm/action/card.php
@@ -173,8 +173,7 @@ if (empty($reshook) && $action == 'confirm_clone' && $confirm == 'yes')
{
setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors');
}
- else
- {
+ else {
if ($id > 0) {
//$object->fetch($id);
if (!empty($object->socpeopleassigned)) {
@@ -243,8 +242,7 @@ if (empty($reshook) && $action == 'add')
$action = 'create';
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors');
}
- else
- {
+ else {
$object->type_code = GETPOST('actioncode', 'aZ09');
}
@@ -263,8 +261,7 @@ if (empty($reshook) && $action == 'add')
{
$object->label = $langs->transnoentitiesnoconv("TaskRDVWith", $contact->getFullName($langs));
}
- else
- {
+ else {
if ($langs->trans("Action".$object->type_code) != "Action".$object->type_code)
{
$object->label = $langs->transnoentitiesnoconv("Action".$object->type_code)."\n";
@@ -394,14 +391,12 @@ if (empty($reshook) && $action == 'add')
{
header("Location: ".DOL_URL_ROOT.'/comm/action/card.php?id='.$idaction.($moreparam ? '&'.$moreparam : ''));
}
- else
- {
+ else {
header("Location: ".DOL_URL_ROOT.'/comm/action/index.php'.($moreparam ? '?'.$moreparam : ''));
}
exit;
}
- else
- {
+ else {
// If error
$db->rollback();
$langs->load("errors");
@@ -410,8 +405,7 @@ if (empty($reshook) && $action == 'add')
$action = 'create'; $donotclearsession = 1;
}
}
- else
- {
+ else {
$db->rollback();
setEventMessages($object->error, $object->errors, 'errors');
$action = 'create'; $donotclearsession = 1;
@@ -517,8 +511,7 @@ if (empty($reshook) && $action == 'update')
$action = 'edit';
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors');
}
- else
- {
+ else {
$result = $cactioncomm->fetch(GETPOST('actioncode', 'aZ09'));
}
if (empty($object->userownerid))
@@ -607,8 +600,7 @@ if (empty($reshook) && $action == 'update')
$db->commit();
}
- else
- {
+ else {
setEventMessages($object->error, $object->errors, 'errors');
$db->rollback();
}
@@ -646,8 +638,7 @@ if (empty($reshook) && $action == 'confirm_delete' && GETPOST("confirm") == 'yes
header("Location: index.php");
exit;
}
- else
- {
+ else {
setEventMessages($object->error, $object->errors, 'errors');
}
}
@@ -756,8 +747,7 @@ if (empty($reshook) && GETPOST('actionmove', 'alpha') == 'mupdate')
header("Location: ".$backtopage);
exit;
}
- else
- {
+ else {
$action = '';
}
}
@@ -957,8 +947,7 @@ if ($action == 'create')
$percent = -1;
if (isset($_GET['status']) || isset($_POST['status'])) $percent = GETPOST('status');
elseif (isset($_GET['percentage']) || isset($_POST['percentage'])) $percent = GETPOST('percentage');
- else
- {
+ else {
if (GETPOST('complete') == '0' || GETPOST("afaire") == 1) $percent = '0';
elseif (GETPOST('complete') == 100 || GETPOST("afaire") == 2) $percent = 100;
}
@@ -981,8 +970,7 @@ if ($action == 'create')
$listofuserid[$user->id]['transparency'] = GETPOSTISSET('transparency') ?GETPOST('transparency', 'alpha') : 1; // 1 by default at first init
$_SESSION['assignedtouser'] = json_encode($listofuserid);
}
- else
- {
+ else {
if (!empty($_SESSION['assignedtouser']))
{
$listofuserid = json_decode($_SESSION['assignedtouser'], true);
@@ -1035,8 +1023,7 @@ if ($action == 'create')
print $societe->getNomUrl(1);
print '
';
}
- else
- {
+ else {
$events = array();
$events[] = array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php?showempty=1', 1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled'));
//For external user force the company to user company
@@ -1266,8 +1253,7 @@ if ($id > 0)
{
$formactions->select_type_actions(GETPOST("actioncode", 'aZ09') ?GETPOST("actioncode", 'aZ09') : $object->type_code, "actioncode", "systemauto");
}
- else
- {
+ else {
print '
'.$langs->trans("Action".$object->type_code);
}
print '';
@@ -1398,8 +1384,7 @@ if ($id > 0)
}
$_SESSION['assignedtouser'] = json_encode($listofuserid);
}
- else
- {
+ else {
if (!empty($_SESSION['assignedtouser']))
{
$listofuserid = json_decode($_SESSION['assignedtouser'], true);
@@ -1523,8 +1508,7 @@ if ($id > 0)
print '';
}
- else
- {
+ else {
print '
';
print dolGetElementUrl($object->fk_element, $object->elementtype, 1);
print ' ';
@@ -1564,8 +1548,7 @@ if ($id > 0)
print '';
}
- else
- {
+ else {
dol_fiche_head($head, 'card', $langs->trans("Action"), -1, 'action');
@@ -1709,8 +1692,7 @@ if ($id > 0)
}
$_SESSION['assignedtouser'] = json_encode($listofuserid);
}
- else
- {
+ else {
if (!empty($_SESSION['assignedtouser']))
{
$listofuserid = json_decode($_SESSION['assignedtouser'], true);
@@ -1797,8 +1779,7 @@ if ($id > 0)
}
}
}
- else
- {
+ else {
print ''.$langs->trans("None").' ';
}
print ' ';
@@ -1856,8 +1837,7 @@ if ($id > 0)
{
print '
';
}
- else
- {
+ else {
print '
';
}
@@ -1866,8 +1846,7 @@ if ($id > 0)
{
print '
';
}
- else
- {
+ else {
print '
';
}
@@ -1876,8 +1855,7 @@ if ($id > 0)
{
print '
';
}
- else
- {
+ else {
print '
';
}
}
diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php
index 3c060ffdc39..2c21f311e5d 100644
--- a/htdocs/comm/action/class/actioncomm.class.php
+++ b/htdocs/comm/action/class/actioncomm.class.php
@@ -423,8 +423,7 @@ class ActionComm extends CommonObject
$this->error = 'Failed to get record with id '.$this->type_id.' code '.$this->type_code.' from dictionary "type of events"';
return -1;
}
- else
- {
+ else {
$this->error = $cactioncomm->error;
return -1;
}
@@ -579,14 +578,12 @@ class ActionComm extends CommonObject
$this->db->commit();
return $this->id;
}
- else
- {
+ else {
$this->db->rollback();
return -1;
}
}
- else
- {
+ else {
$this->db->rollback();
$this->error = $this->db->lasterror();
return -1;
@@ -651,8 +648,7 @@ class ActionComm extends CommonObject
$this->db->commit();
return $this->id;
}
- else
- {
+ else {
$this->db->rollback();
return -1;
}
@@ -767,8 +763,7 @@ class ActionComm extends CommonObject
}
$this->db->free($resql);
}
- else
- {
+ else {
$this->error = $this->db->lasterror();
return -1;
}
@@ -814,8 +809,7 @@ class ActionComm extends CommonObject
return 1;
}
- else
- {
+ else {
dol_print_error($this->db);
return -1;
}
@@ -869,8 +863,7 @@ class ActionComm extends CommonObject
return 1;
}
- else
- {
+ else {
dol_print_error($this->db);
return -1;
}
@@ -953,14 +946,12 @@ class ActionComm extends CommonObject
$this->db->commit();
return 1;
}
- else
- {
+ else {
$this->db->rollback();
return -2;
}
}
- else
- {
+ else {
$this->db->rollback();
$this->error = $this->db->lasterror();
return -1;
@@ -1107,15 +1098,13 @@ class ActionComm extends CommonObject
$this->db->commit();
return 1;
}
- else
- {
+ else {
$this->db->rollback();
dol_syslog(get_class($this)."::update ".join(',', $this->errors), LOG_ERR);
return -2;
}
}
- else
- {
+ else {
$this->db->rollback();
$this->error = $this->db->lasterror();
return -1;
@@ -1175,8 +1164,7 @@ class ActionComm extends CommonObject
$db->free($resql);
return $resarray;
}
- else
- {
+ else {
return $db->lasterror();
}
}
@@ -1236,8 +1224,7 @@ class ActionComm extends CommonObject
if (empty($load_state_board)) return $response;
else return 1;
}
- else
- {
+ else {
dol_print_error($this->db);
$this->error = $this->db->error();
return -1;
@@ -1288,8 +1275,7 @@ class ActionComm extends CommonObject
}
$this->db->free($result);
}
- else
- {
+ else {
dol_print_error($this->db);
}
}
@@ -1426,8 +1412,7 @@ class ActionComm extends CommonObject
$url = DOL_URL_ROOT.'/contact/perso.php?id='.$this->id;
elseif ($option == 'holiday')
$url = DOL_URL_ROOT.'/holiday/card.php?id='.$this->id;
- else
- $url = DOL_URL_ROOT.'/comm/action/card.php?id='.$this->id;
+ else $url = DOL_URL_ROOT.'/comm/action/card.php?id='.$this->id;
if ($option !== 'nolink')
{
// Add param to save lastsearch_values or not
@@ -1451,8 +1436,7 @@ class ActionComm extends CommonObject
if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) $libelle = $labeltype;
$libelleshort = '';
}
- else
- {
+ else {
$libelle = (empty($this->libelle) ? $label : $this->libelle.(($label && $label != $this->libelle) ? ' '.$label : ''));
if (!empty($conf->global->AGENDA_USE_EVENT_TYPE) && empty($libelle)) $libelle = $labeltype;
if ($maxlength < 0) $libelleshort = $this->ref;
@@ -1694,8 +1678,7 @@ class ActionComm extends CommonObject
$dateend = $this->db->jdate($obj->datep2)
- (empty($conf->global->AGENDA_EXPORT_FIX_TZ) ? 0 : ($conf->global->AGENDA_EXPORT_FIX_TZ * 3600));
}
- else
- {
+ else {
// use start date as fall-back to avoid import erros on empty end date
$dateend = $datestart;
}
@@ -1752,8 +1735,7 @@ class ActionComm extends CommonObject
$eventarray = $hookmanager->resArray;
}
}
- else
- {
+ else {
$this->error = $this->db->lasterror();
return -1;
}
@@ -1794,8 +1776,7 @@ class ActionComm extends CommonObject
$timestampStart = dol_stringtotime($obj->date_start." 12:00:00", 0);
$timestampEnd = dol_stringtotime($obj->date_end." 23:59:59", 0);
}
- else
- {
+ else {
$event['fulldayevent'] = true;
$timestampStart = dol_stringtotime($obj->date_start." 00:00:00", 0);
@@ -1830,8 +1811,7 @@ class ActionComm extends CommonObject
// 2 = leave wait for approval
$event['summary'] = $title." - ".$obj->lastname." (wait for approval)";
}
- else
- {
+ else {
// 3 = leave approved
$event['summary'] = $title." - ".$obj->lastname;
}
@@ -1857,8 +1837,7 @@ class ActionComm extends CommonObject
$desc = $more;
$desc .= ' ('.$mysoc->name.' - built by Dolibarr)';
}
- else
- {
+ else {
$title = 'Dolibarr actions '.$mysoc->name;
$desc = $langs->transnoentities('ListOfActions');
$desc .= ' ('.$mysoc->name.' - built by Dolibarr)';
@@ -1876,16 +1855,14 @@ class ActionComm extends CommonObject
if ($result >= 0)
{
if (dol_move($outputfiletmp, $outputfile, 0, 1)) $result = 1;
- else
- {
+ else {
$this->error = 'Failed to rename '.$outputfiletmp.' into '.$outputfile;
dol_syslog(get_class($this)."::build_exportfile ".$this->error, LOG_ERR);
dol_delete_file($outputfiletmp, 0, 1);
$result = -1;
}
}
- else
- {
+ else {
dol_syslog(get_class($this)."::build_exportfile build_xxxfile function fails to for format=".$format." outputfiletmp=".$outputfile, LOG_ERR);
dol_delete_file($outputfiletmp, 0, 1);
$langs->load("errors");
diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php
index c8041c4ea16..d3e4f93b5f7 100644
--- a/htdocs/comm/action/class/cactioncomm.class.php
+++ b/htdocs/comm/action/class/cactioncomm.class.php
@@ -105,14 +105,12 @@ class CActionComm
$this->db->free($resql);
return 1;
}
- else
- {
+ else {
$this->db->free($resql);
return 0;
}
}
- else
- {
+ else {
$this->error = $this->db->error();
return -1;
}
@@ -209,8 +207,7 @@ class CActionComm
if ($idorcode == 'code') $this->liste_array = $repcode;
return $this->liste_array;
}
- else
- {
+ else {
$this->error = $this->db->lasterror();
return -1;
}
diff --git a/htdocs/comm/action/class/ical.class.php b/htdocs/comm/action/class/ical.class.php
index e985b8ea09e..2b74c4793d9 100644
--- a/htdocs/comm/action/class/ical.class.php
+++ b/htdocs/comm/action/class/ical.class.php
@@ -187,8 +187,7 @@ class ICal
$tmpkey = $key;
$tmpvalue = $tmpvalue.preg_replace('/=$/', "", $value); // We must wait to have next line to have complete message
}
- else
- {
+ else {
$value = quotedPrintDecode(preg_replace('/^ENCODING=QUOTED-PRINTABLE:/i', '', $tmpvalue.$value));
}
} //$value=quotedPrintDecode($tmpvalue.$value);
@@ -237,8 +236,7 @@ class ICal
{
list($key, $value) = array($key, $value);
}
- else
- {
+ else {
list($key, $value) = $this->ical_dt_date($key, $value);
}
}
@@ -378,8 +376,7 @@ class ICal
usort($temp, array(&$this, "ical_dtstart_compare"));
return $temp;
}
- else
- {
+ else {
return false;
}
}
diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php
index 9e770f70a93..3bd141ca964 100644
--- a/htdocs/comm/action/document.php
+++ b/htdocs/comm/action/document.php
@@ -216,8 +216,7 @@ if ($object->id > 0)
}
$_SESSION['assignedtouser'] = json_encode($listofuserid);
}
- else
- {
+ else {
if (!empty($_SESSION['assignedtouser']))
{
$listofuserid = json_decode($_SESSION['assignedtouser'], true);
@@ -264,8 +263,7 @@ if ($object->id > 0)
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
}
-else
-{
+else {
print $langs->trans("ErrorUnknown");
}
diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php
index b480586bc6a..7b45b3f6ceb 100644
--- a/htdocs/comm/action/index.php
+++ b/htdocs/comm/action/index.php
@@ -96,8 +96,7 @@ if (GETPOST('search_actioncode', 'array'))
$actioncode = GETPOST('search_actioncode', 'array', 3);
if (!count($actioncode)) $actioncode = '0';
}
-else
-{
+else {
$actioncode = GETPOST("search_actioncode", "alpha", 3) ?GETPOST("search_actioncode", "alpha", 3) : (GETPOST("search_actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE));
}
if ($actioncode == '' && empty($actioncodearray)) $actioncode = (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE);
@@ -466,7 +465,7 @@ if (!empty($conf->use_javascript_ajax)) // If javascript on
$s = $hookmanager->resPrint;
}
}
-else // If javascript off
+else // If javascript off
{
$newparam = $param; // newparam is for birthday links
$newparam = preg_replace('/showbirthday=[0-1]/i', 'showbirthday='.(empty($showbirthday) ? 1 : 0), $newparam);
@@ -512,24 +511,20 @@ if (!empty($actioncode))
{
if ($actioncode == 'AC_NON_AUTO') $sql .= " AND ca.type != 'systemauto'";
elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " AND ca.type = 'systemauto'";
- else
- {
+ else {
if ($actioncode == 'AC_OTH') $sql .= " AND ca.type != 'systemauto'";
if ($actioncode == 'AC_OTH_AUTO') $sql .= " AND ca.type = 'systemauto'";
}
}
- else
- {
+ else {
if ($actioncode == 'AC_NON_AUTO') $sql .= " AND ca.type != 'systemauto'";
elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " AND ca.type = 'systemauto'";
- else
- {
+ else {
if (is_array($actioncode))
{
$sql .= " AND ca.code IN ('".implode("','", $actioncode)."')";
}
- else
- {
+ else {
$sql .= " AND ca.code IN ('".implode("','", explode(',', $actioncode))."')";
}
}
@@ -554,8 +549,7 @@ if ($action == 'show_day')
$sql .= " AND a.datep2 > '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."')";
$sql .= ')';
}
-else
-{
+else {
// To limit array
$sql .= " AND (";
$sql .= " (a.datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, 1, $year) - (60 * 60 * 24 * 7))."'"; // Start 7 days before
@@ -652,8 +646,7 @@ if ($resql)
{
// This record is out of visible range
}
- else
- {
+ else {
if ($event->date_start_in_calendar < $firstdaytoshow) $event->date_start_in_calendar = $firstdaytoshow;
if ($event->date_end_in_calendar >= $lastdaytoshow) $event->date_end_in_calendar = ($lastdaytoshow - 1);
@@ -666,8 +659,7 @@ if ($resql)
// Loop on each day covered by action to prepare an index to show on calendar
$loop = true; $j = 0;
$daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee);
- do
- {
+ do {
//if ($event->id==408) print 'daykey='.$daykey.' '.$event->datep.' '.$event->datef.'
';
$eventarray[$daykey][] = $event;
@@ -684,8 +676,7 @@ if ($resql)
$i++;
}
}
-else
-{
+else {
dol_print_error($db);
}
@@ -702,8 +693,7 @@ if ($showbirthday)
$sql .= ' AND MONTH(birthday) = '.$month;
$sql .= ' AND DAY(birthday) = '.$day;
}
- else
- {
+ else {
$sql .= ' AND MONTH(birthday) = '.$month;
}
$sql .= ' ORDER BY birthday';
@@ -741,8 +731,7 @@ if ($showbirthday)
$loop = true;
$daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee);
- do
- {
+ do {
$eventarray[$daykey][] = $event;
$daykey += 60 * 60 * 24;
if ($daykey > $event->date_end_in_calendar) $loop = false;
@@ -751,8 +740,7 @@ if ($showbirthday)
$i++;
}
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -822,8 +810,7 @@ if ($conf->global->AGENDA_SHOW_HOLIDAYS)
{
$event->label = $obj->lastname.' ('.$langs->trans("Afternoon").')';
}
- else
- {
+ else {
$event->label = $obj->lastname;
}
@@ -832,8 +819,7 @@ if ($conf->global->AGENDA_SHOW_HOLIDAYS)
$jour = date('d', $event->date_start_in_calendar);
$daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee);
- do
- {
+ do {
$eventarray[$daykey][] = $event;
$daykey += 60 * 60 * 24;
@@ -903,8 +889,7 @@ if (count($listofextcals))
// datecurstart and datecurend are now GMT date
//var_dump($datecurstart); var_dump($datecurend); exit;
}
- else
- {
+ else {
// Not a recongized record
dol_syslog("Found a not recognized repeatable record with unknown date start", LOG_ERR);
continue;
@@ -929,8 +914,7 @@ if (count($listofextcals))
$newevent['DTSTART;VALUE=DATE'] = dol_print_date($datecurstart, '%Y%m%d');
$newevent['DTEND;VALUE=DATE'] = dol_print_date($datecurend + 1, '%Y%m%d');
}
- else
- {
+ else {
$newevent['DTSTART'] = $datecurstart;
$newevent['DTEND'] = $datecurend;
}
@@ -1067,8 +1051,7 @@ if (count($listofextcals))
//print 'x'.$datestart.'-'.$dateend;exit;
// This record is out of visible range
}
- else
- {
+ else {
if ($event->date_start_in_calendar < $firstdaytoshow) $event->date_start_in_calendar = $firstdaytoshow;
if ($event->date_end_in_calendar >= $lastdaytoshow) $event->date_end_in_calendar = ($lastdaytoshow - 1);
@@ -1083,8 +1066,7 @@ if (count($listofextcals))
// daykey must be date that represent day box in calendar so must be a user time
$daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee);
$daykeygmt = dol_mktime(0, 0, 0, $mois, $jour, $annee, true, 0);
- do
- {
+ do {
//if ($event->fulldayevent) print dol_print_date($daykeygmt,'dayhour','gmt').'-'.dol_print_date($daykey,'dayhour','gmt').'-'.dol_print_date($event->date_end_in_calendar,'dayhour','gmt').' ';
$eventarray[$daykey][] = $event;
$daykey += 60 * 60 * 24; $daykeygmt += 60 * 60 * 24; // Add one day
@@ -1201,8 +1183,7 @@ if (empty($action) || $action == 'show_month') // View by month
echo " \n";
}
/* Show days after the current month (next month) */
- else
- {
+ else {
$style = 'cal_other_month';
if ($iter_day == 6) $style .= ' cal_other_month_right';
echo '
';
@@ -1275,7 +1256,7 @@ elseif ($action == 'show_week') // View by week
echo ' ';
echo ' ';
}
-else // View by day
+else // View by day
{
$newparam = $param; // newparam is for birthday links
$newparam = preg_replace('/action=show_month&?/i', '', $newparam);
@@ -1350,8 +1331,7 @@ else // View by day
print '';
}
- else
- {
+ else {
print ''; // You can use div-table-responsive-no-min if you dont need reserved height for your table
show_day_events($db, $day, $month, $year, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300, 0);
@@ -1490,8 +1470,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
{
$numbirthday++; $colorindex = 2; $cssclass = 'family_birthday unmovable'; $color = sprintf("%02x%02x%02x", $theme_datacolor[$colorindex][0], $theme_datacolor[$colorindex][1], $theme_datacolor[$colorindex][2]);
}
- else
- {
+ else {
$numother++;
$color = ($event->icalcolor ? $event->icalcolor : -1);
$cssclass = (!empty($event->icalname) ? 'family_ext'.md5($event->icalname) : 'family_other');
@@ -1516,8 +1495,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
{
$colorindex = $colorindexused[$idusertouse]; // Color already assigned to this user
}
- else
- {
+ else {
$colorindex = $nextindextouse;
$colorindexused[$idusertouse] = $colorindex;
if (!empty($theme_datacolor[$nextindextouse + 1])) $nextindextouse++; // Prepare to use next color
@@ -1580,8 +1558,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
{
print 'border: 2px solid #'.$colortouse.';';
}
- else
- {
+ else {
print 'background: #'.$colortouse.';';
print 'background: -webkit-gradient(linear, left top, left bottom, from(#'.dol_color_minus($colortouse, -3).'), to(#'.dol_color_minus($colortouse, -1).'));';
}
@@ -1649,8 +1626,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
$daterange .= dol_print_date($event->date_end_in_calendar, '%H:%M'); // Il faudrait utiliser ici tzuser, mais si on ne peut pas car qd on rentre un date dans fiche action, en input la conversion local->gmt se base sur le TZ server et non user
}
}
- else
- {
+ else {
if ($showinfo)
{
print $langs->trans("EventOnFullDay")." \n";
@@ -1755,8 +1731,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
print '
'."\n";
$i++;
}
- else
- {
+ else {
print 'global->AGENDA_DEFAULT_FILTER_TYPE) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE));
}
if ($actioncode == '' && empty($actioncodearray)) $actioncode = (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE);
@@ -279,24 +278,20 @@ if (!empty($actioncode))
{
if ($actioncode == 'AC_NON_AUTO') $sql .= " AND c.type != 'systemauto'";
elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " AND c.type = 'systemauto'";
- else
- {
+ else {
if ($actioncode == 'AC_OTH') $sql .= " AND c.type != 'systemauto'";
if ($actioncode == 'AC_OTH_AUTO') $sql .= " AND c.type = 'systemauto'";
}
}
- else
- {
+ else {
if ($actioncode == 'AC_NON_AUTO') $sql .= " AND c.type != 'systemauto'";
elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " AND c.type = 'systemauto'";
- else
- {
+ else {
if (is_array($actioncode))
{
$sql .= " AND c.code IN ('".implode("','", $actioncode)."')";
}
- else
- {
+ else {
$sql .= " AND c.code IN ('".implode("','", explode(',', $actioncode))."')";
}
}
@@ -699,8 +694,7 @@ if ($resql)
$contactstatic->country_id = $obj->country_id;
print $contactstatic->getNomUrl(1, '', 0);
}
- else
- {
+ else {
print " ";
}
print ' ';
@@ -751,8 +745,7 @@ if ($resql)
$db->free($resql);
}
-else
-{
+else {
dol_print_error($db);
}
diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php
index 6dfbc6c7f9c..bc859ba6d2d 100644
--- a/htdocs/comm/action/pertype.php
+++ b/htdocs/comm/action/pertype.php
@@ -94,8 +94,7 @@ if (GETPOST('actioncode', 'array'))
$actioncode = GETPOST('actioncode', 'array', 3);
if (!count($actioncode)) $actioncode = '0';
}
-else
-{
+else {
$actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode", "alpha") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE));
}
if ($actioncode == '' && empty($actioncodearray)) $actioncode = (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE);
@@ -372,18 +371,15 @@ if (!empty($actioncode))
{
if ($actioncode == 'AC_NON_AUTO') $sql .= " AND ca.type != 'systemauto'";
elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " AND ca.type = 'systemauto'";
- else
- {
+ else {
if ($actioncode == 'AC_OTH') $sql .= " AND ca.type != 'systemauto'";
if ($actioncode == 'AC_OTH_AUTO') $sql .= " AND ca.type = 'systemauto'";
}
}
- else
- {
+ else {
if ($actioncode == 'AC_NON_AUTO') $sql .= " AND ca.type != 'systemauto'";
elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " AND ca.type = 'systemauto'";
- else
- {
+ else {
$sql .= " AND ca.code IN ('".implode("','", explode(',', $actioncode))."')";
}
}
@@ -407,8 +403,7 @@ if ($action == 'show_day')
$sql .= " AND a.datep2 > '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."')";
$sql .= ')';
}
-else
-{
+else {
// To limit array
$sql .= " AND (";
$sql .= " (a.datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, 1, 1, $year) - (60 * 60 * 24 * 7))."'"; // Start 7 days before
@@ -491,8 +486,7 @@ if ($resql)
if ($datep2 != '' && $datep2 >= $datep) $event->date_end_in_calendar = $datep2;
else $event->date_end_in_calendar = $datep;
}
- else
- {
+ else {
$event->date_start_in_calendar = $datep;
if ($datep2 != '' && $datep2 >= $datep) $event->date_end_in_calendar = $datep2;
else $event->date_end_in_calendar = $datep;
@@ -510,8 +504,7 @@ if ($resql)
// This record is out of visible range
unset($event);
}
- else
- {
+ else {
//print $i.' - '.dol_print_date($this->date_start_in_calendar, 'dayhour').' - '.dol_print_date($this->date_end_in_calendar, 'dayhour').'
'."\n";
$event->fetch_userassigned(); // This load $event->userassigned
@@ -527,8 +520,7 @@ if ($resql)
// Loop on each day covered by action to prepare an index to show on calendar
$loop = true; $j = 0;
$daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee);
- do
- {
+ do {
//if ($event->id==408) print 'daykey='.$daykey.' '.$event->datep.' '.$event->datef.'
';
$eventarray[$daykey][] = $event;
@@ -545,8 +537,7 @@ if ($resql)
$i++;
}
}
-else
-{
+else {
dol_print_error($db);
}
@@ -827,8 +818,7 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s
{
$numbirthday++; $colorindex = 2; $cssclass = 'family_birthday unsortable'; $color = sprintf("%02x%02x%02x", $theme_datacolor[$colorindex][0], $theme_datacolor[$colorindex][1], $theme_datacolor[$colorindex][2]);
}
- else
- {
+ else {
$numother++; $cssclass = 'family_other';
if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) $color = $event->type_color;
}
@@ -841,8 +831,7 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s
{
$colorindex = $colorindexused[$idusertouse]; // Color already assigned to this user
}
- else
- {
+ else {
$colorindex = $nextindextouse;
$colorindexused[$idusertouse] = $colorindex;
if (!empty($theme_datacolor[$nextindextouse + 1])) $nextindextouse++; // Prepare to use next color
@@ -961,8 +950,7 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s
}
}
}
- else
- {
+ else {
$busy = $event->transparency;
$cases1[$h][$event->id]['busy'] = $busy;
$cases2[$h][$event->id]['busy'] = $busy;
diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php
index f2cce5c8023..da5020cef39 100644
--- a/htdocs/comm/action/peruser.php
+++ b/htdocs/comm/action/peruser.php
@@ -95,8 +95,7 @@ if (GETPOST('search_actioncode', 'array'))
$actioncode = GETPOST('search_actioncode', 'array', 3);
if (!count($actioncode)) $actioncode = '0';
}
-else
-{
+else {
$actioncode = GETPOST("search_actioncode", "alpha", 3) ?GETPOST("search_actioncode", "alpha", 3) : (GETPOST("search_actioncode", "alpha") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE));
}
if ($actioncode == '' && empty($actioncodearray)) $actioncode = (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE);
@@ -431,24 +430,20 @@ if (!empty($actioncode))
{
if ($actioncode == 'AC_NON_AUTO') $sql .= " AND ca.type != 'systemauto'";
elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " AND ca.type = 'systemauto'";
- else
- {
+ else {
if ($actioncode == 'AC_OTH') $sql .= " AND ca.type != 'systemauto'";
if ($actioncode == 'AC_OTH_AUTO') $sql .= " AND ca.type = 'systemauto'";
}
}
- else
- {
+ else {
if ($actioncode == 'AC_NON_AUTO') $sql .= " AND ca.type != 'systemauto'";
elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " AND ca.type = 'systemauto'";
- else
- {
+ else {
if (is_array($actioncode))
{
$sql .= " AND ca.code IN ('".implode("','", $actioncode)."')";
}
- else
- {
+ else {
$sql .= " AND ca.code IN ('".implode("','", explode(',', $actioncode))."')";
}
}
@@ -473,8 +468,7 @@ if ($action == 'show_day')
$sql .= " AND a.datep2 > '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."')";
$sql .= ')';
}
-else
-{
+else {
// To limit array
$sql .= " AND (";
$sql .= " (a.datep BETWEEN '".$db->idate($firstdaytoshow - (60 * 60 * 24 * 2))."'"; // Start 2 day before $firstdaytoshow
@@ -558,8 +552,7 @@ if ($resql)
if ($datep2 != '' && $datep2 >= $datep) $event->date_end_in_calendar = $datep2;
else $event->date_end_in_calendar = $datep;
}
- else
- {
+ else {
$event->date_start_in_calendar = $datep;
if ($datep2 != '' && $datep2 >= $datep) $event->date_end_in_calendar = $datep2;
else $event->date_end_in_calendar = $datep;
@@ -577,8 +570,7 @@ if ($resql)
// This record is out of visible range
unset($event);
}
- else
- {
+ else {
//print $i.' - '.dol_print_date($this->date_start_in_calendar, 'dayhour').' - '.dol_print_date($this->date_end_in_calendar, 'dayhour').'
'."\n";
$event->fetch_userassigned(); // This load $event->userassigned
@@ -594,8 +586,7 @@ if ($resql)
// Loop on each day covered by action to prepare an index to show on calendar
$loop = true; $j = 0;
$daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee);
- do
- {
+ do {
//if ($event->id==408) print 'daykey='.$daykey.' '.$event->datep.' '.$event->datef.'
';
$eventarray[$daykey][] = $event;
@@ -613,8 +604,7 @@ if ($resql)
}
$db->free($resql);
}
-else
-{
+else {
dol_print_error($db);
}
@@ -721,8 +711,7 @@ while ($currentdaytoshow < $lastdaytoshow) {
}
}
/* Use this list to have for all users */
- else
- {
+ else {
$sql = "SELECT u.rowid, u.lastname as lastname, u.firstname, u.statut, u.login, u.admin, u.entity";
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
if ($usergroup > 0) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ug ON u.rowid = ug.fk_user";
@@ -1011,8 +1000,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
{
$numbirthday++; $colorindex = 2; $cssclass = 'family_birthday unsortable'; $color = sprintf("%02x%02x%02x", $theme_datacolor[$colorindex][0], $theme_datacolor[$colorindex][1], $theme_datacolor[$colorindex][2]);
}
- else
- {
+ else {
$numother++;
$color = ($event->icalcolor ? $event->icalcolor : -1);
$cssclass = (!empty($event->icalname) ? 'family_ext'.md5($event->icalname) : 'family_other');
@@ -1039,8 +1027,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
{
$colorindex = $colorindexused[$idusertouse]; // Color already assigned to this user
}
- else
- {
+ else {
$colorindex = $nextindextouse;
$colorindexused[$idusertouse] = $colorindex;
if (!empty($theme_datacolor[$nextindextouse + 1])) $nextindextouse++; // Prepare to use next color
@@ -1159,8 +1146,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
}
}
}
- else
- {
+ else {
$busy = $event->transparency;
$cases1[$h][$event->id]['busy'] = $busy;
$cases2[$h][$event->id]['busy'] = $busy;
diff --git a/htdocs/comm/action/rapport/index.php b/htdocs/comm/action/rapport/index.php
index 82477d307fc..c3192f2286e 100644
--- a/htdocs/comm/action/rapport/index.php
+++ b/htdocs/comm/action/rapport/index.php
@@ -203,8 +203,7 @@ if ($resql)
$db->free($resql);
}
-else
-{
+else {
dol_print_error($db);
}
diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php
index 4ff16cd7c03..17eae67eb2e 100644
--- a/htdocs/comm/card.php
+++ b/htdocs/comm/card.php
@@ -331,8 +331,7 @@ if ($object->id > 0)
{
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->cond_reglement_id, 'cond_reglement_id', 1);
}
- else
- {
+ else {
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->cond_reglement_id, 'none');
}
print "";
@@ -350,8 +349,7 @@ if ($object->id > 0)
{
$form->form_modes_reglement($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->mode_reglement_id, 'mode_reglement_id', 'CRDT', 1, 1);
}
- else
- {
+ else {
$form->form_modes_reglement($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->mode_reglement_id, 'none');
}
print "";
@@ -371,8 +369,7 @@ if ($object->id > 0)
{
$form->formSelectAccount($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->fk_account, 'fk_account', 1);
}
- else
- {
+ else {
$form->formSelectAccount($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->fk_account, 'none');
}
print "";
@@ -479,8 +476,7 @@ if ($object->id > 0)
{
$form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->shipping_method_id, 'shipping_method_id', 1);
}
- else
- {
+ else {
$form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->shipping_method_id, 'none');
}
print "";
@@ -518,8 +514,7 @@ if ($object->id > 0)
$adh->ref = $adh->getFullName($langs);
print $adh->getNomUrl(1);
}
- else
- {
+ else {
print '
'.$langs->trans("ThirdpartyNotLinkedToMember").' ';
}
print '';
@@ -547,8 +542,7 @@ if ($object->id > 0)
{
$formcompany->form_prospect_level($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->fk_prospectlevel, 'prospect_level_id', 1);
}
- else
- {
+ else {
print $object->getLibProspLevel();
}
print "";
@@ -732,8 +726,7 @@ if ($object->id > 0)
print '
';
}
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -818,8 +811,7 @@ if ($object->id > 0)
print '';
}
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -961,8 +953,7 @@ if ($object->id > 0)
print '';
}
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -1022,8 +1013,7 @@ if ($object->id > 0)
print '';
}
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -1093,14 +1083,12 @@ if ($object->id > 0)
{
print ''.dol_print_date($db->jdate($objp->date_last_gen), 'day').' ';
}
- else
- {
+ else {
if ($objp->dc > 0)
{
print ''.dol_print_date($db->jdate($objp->dc), 'day').' ';
}
- else
- {
+ else {
print '!!! ';
}
}
@@ -1130,8 +1118,7 @@ if ($object->id > 0)
print '';
}
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -1195,8 +1182,7 @@ if ($object->id > 0)
{
print ''.dol_print_date($db->jdate($objp->df), 'day').' ';
}
- else
- {
+ else {
print '!!! ';
}
print '';
@@ -1222,8 +1208,7 @@ if ($object->id > 0)
print '';
}
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -1289,8 +1274,7 @@ if ($object->id > 0)
{
print '';
}
- else
- {
+ else {
$langs->load("bills");
$langs->load("orders");
@@ -1317,8 +1301,7 @@ if ($object->id > 0)
{
print '';
}
- else
- {
+ else {
print '';
}
}
@@ -1343,8 +1326,7 @@ if ($object->id > 0)
show_actions_done($conf, $langs, $db, $object);
}
}
-else
-{
+else {
$langs->load("errors");
print $langs->trans('ErrorRecordNotFound');
}
diff --git a/htdocs/comm/contact.php b/htdocs/comm/contact.php
index 8c9a63d97e2..da7248dbecb 100644
--- a/htdocs/comm/contact.php
+++ b/htdocs/comm/contact.php
@@ -171,8 +171,7 @@ if ($resql)
$db->free($resql);
}
-else
-{
+else {
dol_print_error($db);
}
diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php
index af5b4ac41a5..99eddda9cad 100644
--- a/htdocs/comm/index.php
+++ b/htdocs/comm/index.php
@@ -215,16 +215,14 @@ if (!empty($conf->propal->enabled) && $user->rights->propal->lire)
print ' '.$langs->trans("Total").' '.price($total)." ";
}
}
- else
- {
+ else {
print ''.$langs->trans("NoProposal").' ';
}
print " ";
$db->free($resql);
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -303,16 +301,14 @@ if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposa
print ''.$langs->trans("Total").' '.price($total)." ";
}
}
- else
- {
+ else {
print ''.$langs->trans("NoProposal").' ';
}
print " ";
$db->free($resql);
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -395,8 +391,7 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire)
print ''.$langs->trans("Total").' '.price($total)." ";
}
}
- else
- {
+ else {
print ''.$langs->trans("NoOrder").' ';
}
print "";
@@ -404,8 +399,7 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire)
$db->free($resql);
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -488,8 +482,7 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU
print ''.$langs->trans("Total").' '.price($total)." ";
}
}
- else
- {
+ else {
print ''.$langs->trans("NoSupplierOrder").' ';
}
print "";
@@ -571,8 +564,7 @@ if (!empty($conf->societe->enabled) && $user->rights->societe->lire)
$db->free($resql);
}
- else
- {
+ else {
print ''.$langs->trans("None").' ';
}
print "";
@@ -630,8 +622,7 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU
$i++;
}
}
- else
- {
+ else {
print ''.$langs->trans("None").' ';
}
print '';
@@ -718,8 +709,7 @@ if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire && 0) // TOD
print " ";
}
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -826,8 +816,7 @@ if (!empty($conf->propal->enabled) && $user->rights->propal->lire)
print " ";
}
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -934,8 +923,7 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire)
print " ";
}
}
- else
- {
+ else {
dol_print_error($db);
}
}
diff --git a/htdocs/comm/mailing/advtargetemailing.php b/htdocs/comm/mailing/advtargetemailing.php
index d4db9fc6ea9..d16c3e9e7da 100644
--- a/htdocs/comm/mailing/advtargetemailing.php
+++ b/htdocs/comm/mailing/advtargetemailing.php
@@ -88,8 +88,7 @@ if ($result < 0)
{
setEventMessages($advTarget->error, $advTarget->errors, 'errors');
}
-else
-{
+else {
if (!empty($advTarget->id)) {
$array_query = json_decode($advTarget->filtervalue, true);
}
diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php
index e3cb5a9ad97..1e7f5fa6385 100644
--- a/htdocs/comm/mailing/card.php
+++ b/htdocs/comm/mailing/card.php
@@ -94,16 +94,14 @@ if (empty($reshook))
{
setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors');
}
- else
- {
+ else {
$result = $object->createFromClone($user, $object->id, GETPOST("clone_content", 'alpha'), GETPOST("clone_receivers", 'alpha'));
if ($result > 0)
{
header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result);
exit;
}
- else
- {
+ else {
setEventMessages($object->error, $object->errors, 'errors');
}
}
@@ -126,8 +124,7 @@ if (empty($reshook))
setEventMessages($langs->trans("NotEnoughPermissions"), null, 'warnings');
$action = '';
}
- else
- {
+ else {
$upload_dir = $conf->mailing->dir_output."/".get_exdir($object->id, 2, 0, 1, $object, 'mailing');
if ($object->statut == 0)
@@ -236,8 +233,7 @@ if (empty($reshook))
$substitutionarray['__SECUREKEYPAYMENT_INVOICE__'] = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN, 2);
$substitutionarray['__SECUREKEYPAYMENT_CONTRACTLINE__'] = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN, 2);
}
- else
- {
+ else {
$substitutionarray['__SECUREKEYPAYMENT_MEMBER__'] = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'membersubscription'.$obj->source_id, 2);
$substitutionarray['__SECUREKEYPAYMENT_ORDER__'] = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'order'.$obj->source_id, 2);
$substitutionarray['__SECUREKEYPAYMENT_INVOICE__'] = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'invoice'.$obj->source_id, 2);
@@ -317,8 +313,7 @@ if (empty($reshook))
{
dol_print_error($db);
}
- else
- {
+ else {
//if cheack read is use then update prospect contact status
if (strpos($message, '__CHECK_READ__') !== false)
{
@@ -351,8 +346,7 @@ if (empty($reshook))
//test if CHECK READ change statut prospect contact
}
- else
- {
+ else {
// Mail failed
$nbko++;
@@ -370,8 +364,7 @@ if (empty($reshook))
$i++;
}
}
- else
- {
+ else {
setEventMessages($langs->transnoentitiesnoconv("NoMoreRecipientToSendTo"), null, 'mesgs');
}
@@ -382,15 +375,13 @@ if (empty($reshook))
if ($nbok > 0) setEventMessages($langs->transnoentitiesnoconv("EMailSentToNRecipients", $nbok), null, 'mesgs');
else setEventMessages($langs->transnoentitiesnoconv("EMailSentToNRecipients", $nbok), null, 'mesgs');
}
- else
- {
+ else {
if ($nbok >= $num)
{
$statut = 3; // Send to everybody
setEventMessages($langs->transnoentitiesnoconv("EMailSentToNRecipients", $nbok), null, 'mesgs');
}
- else
- {
+ else {
$statut = 2; // Status 'sent partially' (because not send to everybody)
setEventMessages($langs->transnoentitiesnoconv("EMailSentToNRecipients", $nbok), null, 'mesgs');
}
@@ -404,8 +395,7 @@ if (empty($reshook))
dol_print_error($db);
}
}
- else
- {
+ else {
dol_syslog($db->error());
dol_print_error($db);
}
@@ -473,8 +463,7 @@ if (empty($reshook))
setEventMessages($langs->trans("MailSuccessfulySent", $mailfile->getValidAddress($object->email_from, 2), $mailfile->getValidAddress($object->sendto, 2)), null, 'mesgs');
$action = '';
}
- else
- {
+ else {
setEventMessages($langs->trans("ResultKo").' '.$mailfile->error.' '.$result, null, 'errors');
$action = 'test';
}
@@ -612,8 +601,7 @@ if (empty($reshook))
setEventMessages($mesg, $mesgs, 'errors');
$action = "edit";
}
- else
- {
+ else {
$action = "edit";
}
}
@@ -628,8 +616,7 @@ if (empty($reshook))
header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
exit;
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -646,13 +633,11 @@ if (empty($reshook))
header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
exit;
}
- else
- {
+ else {
setEventMessages($object->error, $object->errors, 'errors');
}
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -676,14 +661,12 @@ if (empty($reshook))
header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
exit;
}
- else
- {
+ else {
setEventMessages($object->error, $object->errors, 'errors');
$db->rollback();
}
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -784,8 +767,7 @@ if ($action == 'create')
print '';
}
-else
-{
+else {
if ($object->id > 0)
{
$upload_dir = $conf->mailing->dir_output."/".get_exdir($object->id, 2, 0, 1, $object, 'mailing');
@@ -856,8 +838,7 @@ else
}
$_GET["action"] = '';
}
- else
- {
+ else {
if (!empty($conf->global->MAILING_LIMIT_WARNING_PHPMAIL) && $sendingmode == 'mail') setEventMessages($langs->transnoentitiesnoconv($conf->global->MAILING_LIMIT_WARNING_PHPMAIL), null, 'warnings');
if (!empty($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL) && $sendingmode != 'mail') setEventMessages($langs->transnoentitiesnoconv($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL), null, 'warnings');
@@ -940,8 +921,7 @@ else
{
$text .= $langs->trans('LimitSendingEmailing', $conf->global->MAILING_LIMIT_SENDBYWEB);
}
- else
- {
+ else {
$text .= $langs->trans('SendingFromWebInterfaceIsNotAllowed');
}
}
@@ -950,8 +930,7 @@ else
{
print $form->textwithpicto($nbemail, $text, 1, 'warning');
}
- else
- {
+ else {
print $nbemail;
}
}
@@ -999,8 +978,7 @@ else
{
print ''.$langs->trans("EditWithEditor").' ';
}
- else
- {
+ else {
print ''.$langs->trans("EditWithTextEditor").' ';
}
@@ -1013,8 +991,7 @@ else
{
print ''.$langs->trans("TestMailing").' ';
}
- else
- {
+ else {
print ''.$langs->trans("TestMailing").' ';
}
@@ -1028,8 +1005,7 @@ else
{
print ''.$langs->trans("ValidMailing").' ';
}
- else
- {
+ else {
print ''.$langs->trans("ValidMailing").' ';
}
}
@@ -1044,8 +1020,7 @@ else
{
print ''.$langs->trans("SendMailing").' ';
}
- else
- {
+ else {
print ''.$langs->trans("SendMailing").' ';
}
}
@@ -1061,8 +1036,7 @@ else
{
print ''.$langs->trans("ResetMailing").' ';
}
- else
- {
+ else {
print ''.$langs->trans("ResetMailing").' ';
}
}
@@ -1073,8 +1047,7 @@ else
{
print ''.$langs->trans("DeleteMailing").' ';
}
- else
- {
+ else {
print ''.$langs->trans("DeleteMailing").' ';
}
}
@@ -1154,8 +1127,7 @@ else
print ' ';
}
}
- else
- {
+ else {
print ''.$langs->trans("NoAttachedFiles").' ';
}
print '';
@@ -1182,8 +1154,7 @@ else
dol_fiche_end();
}
- else
- {
+ else {
/*
* Mailing en mode edition (CKeditor or HTML source)
*/
@@ -1230,8 +1201,7 @@ else
{
$text .= $langs->trans('LimitSendingEmailing', $conf->global->MAILING_LIMIT_SENDBYWEB);
}
- else
- {
+ else {
$text .= $langs->trans('SendingFromWebInterfaceIsNotAllowed');
}
}
@@ -1240,8 +1210,7 @@ else
{
print $form->textwithpicto($nbemail, $text, 1, 'warning');
}
- else
- {
+ else {
print $nbemail;
}
}
@@ -1316,8 +1285,7 @@ else
$out .= ' ';
}
}
- else
- {
+ else {
$out .= $langs->trans("NoAttachedFiles").' ';
}
// Add link to add file
@@ -1367,8 +1335,7 @@ else
print ' ';
}
}
- else
- {
+ else {
dol_print_error($db, $object->error);
}
}
diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php
index d8d9873b88b..e89a645cf20 100644
--- a/htdocs/comm/mailing/cibles.php
+++ b/htdocs/comm/mailing/cibles.php
@@ -161,8 +161,7 @@ if (GETPOST('exportcsv', 'int'))
exit;
}
- else
- {
+ else {
dol_print_error($db);
}
exit;
@@ -182,14 +181,12 @@ if ($action == 'delete')
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
}
- else
- {
+ else {
header("Location: list.php");
exit;
}
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -294,8 +291,7 @@ if ($object->fetch($id) >= 0)
{
$text .= $langs->trans('LimitSendingEmailing', $conf->global->MAILING_LIMIT_SENDBYWEB);
}
- else
- {
+ else {
$text .= $langs->trans('SendingFromWebInterfaceIsNotAllowed');
}
}
@@ -304,8 +300,7 @@ if ($object->fetch($id) >= 0)
{
print $form->textwithpicto($nbemail, $text, 1, 'warning');
}
- else
- {
+ else {
print $nbemail;
}
}
@@ -406,8 +401,7 @@ if ($object->fetch($id) >= 0)
print '