From e6f828cd8659144c3fcc848e022fc25c4de080c0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 24 May 2014 17:00:49 +0200 Subject: [PATCH 01/17] Link to Preferred Partners missing. --- htdocs/admin/system/about.php | 12 +++++++++--- htdocs/langs/en_US/admin.lang | 4 +++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/system/about.php b/htdocs/admin/system/about.php index 48b690a7198..1876c884d5d 100644 --- a/htdocs/admin/system/about.php +++ b/htdocs/admin/system/about.php @@ -113,14 +113,20 @@ print '
  • Google print ''; -print $langs->trans("OfficialWebHostingService").':'; -$url='http://wiki.dolibarr.org/index.php/Cloud_Solutions'; $title=$langs->trans('List'); +print $langs->trans("OtherResources").':'; +print ''; llxFooter(); $db->close(); -?> - - - - - - - - - - diff --git a/htdocs/admin/system/os.php b/htdocs/admin/system/os.php index 35645345426..669e8d84be9 100644 --- a/htdocs/admin/system/os.php +++ b/htdocs/admin/system/os.php @@ -51,4 +51,3 @@ print ''; llxFooter(); -?> diff --git a/htdocs/admin/system/phpinfo.php b/htdocs/admin/system/phpinfo.php index bbb2c60e51f..22fecdfd524 100644 --- a/htdocs/admin/system/phpinfo.php +++ b/htdocs/admin/system/phpinfo.php @@ -120,4 +120,3 @@ foreach($phparray as $key => $value) llxFooter(); $db->close(); -?> \ No newline at end of file diff --git a/htdocs/admin/system/web.php b/htdocs/admin/system/web.php index 159915ee456..6c2e36a3e8e 100644 --- a/htdocs/admin/system/web.php +++ b/htdocs/admin/system/web.php @@ -64,4 +64,3 @@ print ''; llxFooter(); $db->close(); -?> diff --git a/htdocs/admin/tools/listsessions.php b/htdocs/admin/tools/listsessions.php index 5f12b6c150f..cab2881ed16 100644 --- a/htdocs/admin/tools/listsessions.php +++ b/htdocs/admin/tools/listsessions.php @@ -214,4 +214,3 @@ print '
    '; llxFooter(); $db->close(); -?> \ No newline at end of file diff --git a/htdocs/cashdesk/class/Auth.class.php b/htdocs/cashdesk/class/Auth.class.php index ac8d58f93d1..33bbd094050 100644 --- a/htdocs/cashdesk/class/Auth.class.php +++ b/htdocs/cashdesk/class/Auth.class.php @@ -141,4 +141,3 @@ class Auth } -?> \ No newline at end of file diff --git a/htdocs/cashdesk/class/Facturation.class.php b/htdocs/cashdesk/class/Facturation.class.php index 292252c2716..b2bb87a0bb2 100644 --- a/htdocs/cashdesk/class/Facturation.class.php +++ b/htdocs/cashdesk/class/Facturation.class.php @@ -653,4 +653,3 @@ class Facturation } -?> diff --git a/htdocs/cashdesk/facturation_verif.php b/htdocs/cashdesk/facturation_verif.php index 3b65d7dd132..42e1c00f651 100644 --- a/htdocs/cashdesk/facturation_verif.php +++ b/htdocs/cashdesk/facturation_verif.php @@ -166,4 +166,3 @@ $_SESSION['serObjFacturation'] = serialize($obj_facturation); header('Location: '.$redirection); exit; -?> diff --git a/htdocs/cashdesk/index_verif.php b/htdocs/cashdesk/index_verif.php index 9f7e0332046..c96b4f2b6f1 100644 --- a/htdocs/cashdesk/index_verif.php +++ b/htdocs/cashdesk/index_verif.php @@ -142,4 +142,3 @@ else exit; } -?> \ No newline at end of file diff --git a/htdocs/cashdesk/validation.php b/htdocs/cashdesk/validation.php index d9cd286691c..289c864ca32 100644 --- a/htdocs/cashdesk/validation.php +++ b/htdocs/cashdesk/validation.php @@ -26,4 +26,3 @@ $form=new Form($db); // Affichage des templates require ('tpl/validation1.tpl.php'); -?> diff --git a/htdocs/comm/contact.php b/htdocs/comm/contact.php index 7f9d7ede440..279044ccf25 100644 --- a/htdocs/comm/contact.php +++ b/htdocs/comm/contact.php @@ -179,4 +179,3 @@ else llxFooter(); $db->close(); -?> \ No newline at end of file diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index ccd318c93fb..d224c20bc97 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -142,4 +142,3 @@ else llxFooter(); $db->close(); -?> diff --git a/htdocs/comm/prospect/list.php b/htdocs/comm/prospect/list.php index abd6564779f..58a384df6d0 100644 --- a/htdocs/comm/prospect/list.php +++ b/htdocs/comm/prospect/list.php @@ -466,4 +466,3 @@ else llxFooter(); $db->close(); -?> diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index 055d4a42787..e4b30a6e60d 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -224,4 +224,3 @@ if ($id > 0 || ! empty($ref)) $db->close(); llxFooter(); -?> \ No newline at end of file diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 5c2d6812302..27690ae7093 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -855,4 +855,3 @@ else llxFooter(); $db->close(); -?> diff --git a/htdocs/compta/facture/admin/facturedet_cust_extrafields.php b/htdocs/compta/facture/admin/facturedet_cust_extrafields.php index 5365cf2bee9..ccd208c7c6f 100644 --- a/htdocs/compta/facture/admin/facturedet_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facturedet_cust_extrafields.php @@ -156,4 +156,3 @@ if ($action == 'edit' && ! empty($attrname)) llxFooter(); $db->close(); -?> \ No newline at end of file diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php index 31a741d9dcf..60c47564743 100644 --- a/htdocs/compta/facture/document.php +++ b/htdocs/compta/facture/document.php @@ -166,4 +166,3 @@ else $db->close(); llxFooter(); -?> diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php index 097a89c3918..cc71b402060 100644 --- a/htdocs/compta/localtax/clients.php +++ b/htdocs/compta/localtax/clients.php @@ -310,4 +310,3 @@ print ''; $db->close(); llxFooter(); -?> diff --git a/htdocs/compta/salaries/index.php b/htdocs/compta/salaries/index.php index 5cee6ad4d82..c7ee207f853 100644 --- a/htdocs/compta/salaries/index.php +++ b/htdocs/compta/salaries/index.php @@ -179,4 +179,3 @@ else $db->close(); llxFooter(); -?> diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index eba0f8633a8..4187de7136c 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -1094,4 +1094,3 @@ class Contact extends CommonObject } } -?> diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index 86462d05fae..92ba03e9861 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -249,4 +249,3 @@ if ($action != 'edit') llxFooter(); $db->close(); -?> diff --git a/htdocs/contrat/info.php b/htdocs/contrat/info.php index 8764c53eea5..234f986a00c 100644 --- a/htdocs/contrat/info.php +++ b/htdocs/contrat/info.php @@ -58,4 +58,3 @@ print ''; $db->close(); llxFooter(); -?> diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index 8759af8a719..d1a64f6b256 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -253,4 +253,3 @@ if ($section) // Close db if mode is not noajax if ((! isset($mode) || $mode != 'noajax') && is_object($db)) $db->close(); -?> diff --git a/htdocs/core/ajax/bankconciliate.php b/htdocs/core/ajax/bankconciliate.php index dc0e5f092dc..855709f48e2 100644 --- a/htdocs/core/ajax/bankconciliate.php +++ b/htdocs/core/ajax/bankconciliate.php @@ -71,4 +71,3 @@ if (($user->rights->banque->modifier || $user->rights->banque->consolidate) && $ exit; } -?> diff --git a/htdocs/core/ajax/loadinplace.php b/htdocs/core/ajax/loadinplace.php index 025e7e9cb48..69a0bbc72c7 100644 --- a/htdocs/core/ajax/loadinplace.php +++ b/htdocs/core/ajax/loadinplace.php @@ -115,4 +115,3 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($ } } -?> diff --git a/htdocs/core/boxes/box_actions.php b/htdocs/core/boxes/box_actions.php index a1094a8274c..ff63927b526 100644 --- a/htdocs/core/boxes/box_actions.php +++ b/htdocs/core/boxes/box_actions.php @@ -156,4 +156,3 @@ class box_actions extends ModeleBoxes } -?> diff --git a/htdocs/core/class/antivir.class.php b/htdocs/core/class/antivir.class.php index 1ea2dddd557..68241cb4d62 100644 --- a/htdocs/core/class/antivir.class.php +++ b/htdocs/core/class/antivir.class.php @@ -165,4 +165,3 @@ class AntiVir } -?> \ No newline at end of file diff --git a/htdocs/core/class/canvas.class.php b/htdocs/core/class/canvas.class.php index 31419e64e9d..f51056b2551 100644 --- a/htdocs/core/class/canvas.class.php +++ b/htdocs/core/class/canvas.class.php @@ -198,4 +198,3 @@ class Canvas } } -?> diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 73aa3742206..16cab849514 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1184,4 +1184,3 @@ class FormFile } -?> diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 6567204232a..b99467c20f0 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -1164,4 +1164,3 @@ class FormOther } -?> diff --git a/htdocs/core/class/rssparser.class.php b/htdocs/core/class/rssparser.class.php index 06d26c94edf..80ca1b155b7 100644 --- a/htdocs/core/class/rssparser.class.php +++ b/htdocs/core/class/rssparser.class.php @@ -775,4 +775,3 @@ function xml2php($xml) } -?> diff --git a/htdocs/core/filemanagerdol/connectors/php/basexml.php b/htdocs/core/filemanagerdol/connectors/php/basexml.php index 84d2e04666a..439353b4e26 100644 --- a/htdocs/core/filemanagerdol/connectors/php/basexml.php +++ b/htdocs/core/filemanagerdol/connectors/php/basexml.php @@ -108,4 +108,3 @@ function SendErrorNode($number, $text) else echo '' ; } -?> diff --git a/htdocs/core/lib/barcode.lib.php b/htdocs/core/lib/barcode.lib.php index 83d161a20a0..bc0422a5fb4 100644 --- a/htdocs/core/lib/barcode.lib.php +++ b/htdocs/core/lib/barcode.lib.php @@ -416,4 +416,3 @@ function barcode_outimage($text, $bars, $scale = 1, $mode = "png", $total_y = 0, } } -?> diff --git a/htdocs/core/lib/contract.lib.php b/htdocs/core/lib/contract.lib.php index 37ab1f7881f..1086d4dcd14 100644 --- a/htdocs/core/lib/contract.lib.php +++ b/htdocs/core/lib/contract.lib.php @@ -119,4 +119,3 @@ function contract_admin_prepare_head() return $head; } -?> diff --git a/htdocs/core/lib/fichinter.lib.php b/htdocs/core/lib/fichinter.lib.php index b25bfe808f2..01d79cdcabe 100644 --- a/htdocs/core/lib/fichinter.lib.php +++ b/htdocs/core/lib/fichinter.lib.php @@ -134,4 +134,3 @@ function fichinter_admin_prepare_head() } -?> diff --git a/htdocs/core/lib/fourn.lib.php b/htdocs/core/lib/fourn.lib.php index a6981be8355..171eda67a90 100644 --- a/htdocs/core/lib/fourn.lib.php +++ b/htdocs/core/lib/fourn.lib.php @@ -198,4 +198,3 @@ function supplierorder_admin_prepare_head($object) } -?> \ No newline at end of file diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 91544d83485..a8609af05bd 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -4589,4 +4589,3 @@ function natural_search($fields, $value) return " AND " . ($end > 1? '(' : '') . $res; } -?> diff --git a/htdocs/core/lib/invoice2.lib.php b/htdocs/core/lib/invoice2.lib.php index 5eed1e8e2df..9309d083187 100644 --- a/htdocs/core/lib/invoice2.lib.php +++ b/htdocs/core/lib/invoice2.lib.php @@ -286,4 +286,3 @@ function rebuild_merge_pdf($db, $langs, $conf, $diroutputpdf, $newlangid, $filte else return $result; } -?> diff --git a/htdocs/core/lib/mailmanspip.lib.php b/htdocs/core/lib/mailmanspip.lib.php index eb57f4b6163..ce7f2927630 100644 --- a/htdocs/core/lib/mailmanspip.lib.php +++ b/htdocs/core/lib/mailmanspip.lib.php @@ -44,4 +44,3 @@ function mailmanspip_admin_prepare_head() ); } -?> \ No newline at end of file diff --git a/htdocs/core/lib/member.lib.php b/htdocs/core/lib/member.lib.php index 655efe5b61b..67b6794f3a3 100644 --- a/htdocs/core/lib/member.lib.php +++ b/htdocs/core/lib/member.lib.php @@ -205,4 +205,3 @@ function member_stats_prepare_head($object) return $head; } -?> diff --git a/htdocs/core/lib/tax.lib.php b/htdocs/core/lib/tax.lib.php index 35165597cff..a52aeb37345 100644 --- a/htdocs/core/lib/tax.lib.php +++ b/htdocs/core/lib/tax.lib.php @@ -588,4 +588,3 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction, return $list; } -?> \ No newline at end of file diff --git a/htdocs/core/lib/treeview.lib.php b/htdocs/core/lib/treeview.lib.php index 54093976a68..1bbf2e55e27 100644 --- a/htdocs/core/lib/treeview.lib.php +++ b/htdocs/core/lib/treeview.lib.php @@ -165,4 +165,3 @@ function tree_recur($tab, $pere, $rang, $iddivjstree='iddivjstree') if (empty($pere['rowid'])) print ''; } -?> \ No newline at end of file diff --git a/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php b/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php index 7b2b099b67c..96214f08d66 100644 --- a/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php +++ b/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php @@ -403,4 +403,3 @@ class BordereauChequeBlochet extends ModeleChequeReceipts } -?> diff --git a/htdocs/core/modules/commande/modules_commande.php b/htdocs/core/modules/commande/modules_commande.php index 5ddcc38e8d9..1146b1cc181 100644 --- a/htdocs/core/modules/commande/modules_commande.php +++ b/htdocs/core/modules/commande/modules_commande.php @@ -256,4 +256,3 @@ function commande_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0 return -1; } } -?> diff --git a/htdocs/core/modules/contract/mod_contract_serpis.php b/htdocs/core/modules/contract/mod_contract_serpis.php index a595fb5f59c..a07f3261133 100644 --- a/htdocs/core/modules/contract/mod_contract_serpis.php +++ b/htdocs/core/modules/contract/mod_contract_serpis.php @@ -144,4 +144,3 @@ class mod_contract_serpis extends ModelNumRefContracts } } -?> diff --git a/htdocs/core/modules/expedition/mod_expedition_safor.php b/htdocs/core/modules/expedition/mod_expedition_safor.php index 5fb3db1ddfe..ba779658051 100644 --- a/htdocs/core/modules/expedition/mod_expedition_safor.php +++ b/htdocs/core/modules/expedition/mod_expedition_safor.php @@ -143,4 +143,3 @@ class mod_expedition_safor extends ModelNumRefExpedition } } -?> diff --git a/htdocs/core/modules/facture/mod_facture_terre.php b/htdocs/core/modules/facture/mod_facture_terre.php index 220df75dc72..9a8b5feaed7 100644 --- a/htdocs/core/modules/facture/mod_facture_terre.php +++ b/htdocs/core/modules/facture/mod_facture_terre.php @@ -224,4 +224,3 @@ class mod_facture_terre extends ModeleNumRefFactures } -?> diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index 5e7c2141a0f..f2055e8d643 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -600,4 +600,3 @@ class pdf_soleil extends ModelePDFFicheinter } -?> diff --git a/htdocs/core/modules/fichinter/mod_pacific.php b/htdocs/core/modules/fichinter/mod_pacific.php index 3d0b15d0d09..65e5aa979b9 100644 --- a/htdocs/core/modules/fichinter/mod_pacific.php +++ b/htdocs/core/modules/fichinter/mod_pacific.php @@ -145,4 +145,3 @@ class mod_pacific extends ModeleNumRefFicheinter } -?> diff --git a/htdocs/core/modules/modImport.class.php b/htdocs/core/modules/modImport.class.php index cc05e0eba5e..3a371ecf2e7 100644 --- a/htdocs/core/modules/modImport.class.php +++ b/htdocs/core/modules/modImport.class.php @@ -117,4 +117,3 @@ class modImport extends DolibarrModules } } -?> diff --git a/htdocs/core/modules/modNotification.class.php b/htdocs/core/modules/modNotification.class.php index 6a5fb72c953..78e939f4048 100644 --- a/htdocs/core/modules/modNotification.class.php +++ b/htdocs/core/modules/modNotification.class.php @@ -107,4 +107,3 @@ class modNotification extends DolibarrModules } } -?> diff --git a/htdocs/core/modules/modPaypal.class.php b/htdocs/core/modules/modPaypal.class.php index 1e3645745da..8c1e0fe4797 100644 --- a/htdocs/core/modules/modPaypal.class.php +++ b/htdocs/core/modules/modPaypal.class.php @@ -199,4 +199,3 @@ class modPaypal extends DolibarrModules } -?> \ No newline at end of file diff --git a/htdocs/core/modules/modPrelevement.class.php b/htdocs/core/modules/modPrelevement.class.php index 21feb8c4a37..7bb5e748037 100644 --- a/htdocs/core/modules/modPrelevement.class.php +++ b/htdocs/core/modules/modPrelevement.class.php @@ -158,4 +158,3 @@ class modPrelevement extends DolibarrModules } } -?> diff --git a/htdocs/core/modules/product/mod_codeproduct_elephant.php b/htdocs/core/modules/product/mod_codeproduct_elephant.php index ea0b6144c91..3ab5fdb9e09 100644 --- a/htdocs/core/modules/product/mod_codeproduct_elephant.php +++ b/htdocs/core/modules/product/mod_codeproduct_elephant.php @@ -301,4 +301,3 @@ class mod_codeproduct_elephant extends ModeleProductCode } -?> diff --git a/htdocs/core/modules/project/modules_project.php b/htdocs/core/modules/project/modules_project.php index 6aae57c34d5..2595485eac1 100644 --- a/htdocs/core/modules/project/modules_project.php +++ b/htdocs/core/modules/project/modules_project.php @@ -247,4 +247,3 @@ function project_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, } } -?> \ No newline at end of file diff --git a/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php index 9525639dd9c..75b06755b80 100644 --- a/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php @@ -1037,4 +1037,3 @@ class doc_generic_project_odt extends ModelePDFProjects } } -?> diff --git a/htdocs/core/modules/project/task/modules_task.php b/htdocs/core/modules/project/task/modules_task.php index f9d10f90534..8aacc535b7e 100644 --- a/htdocs/core/modules/project/task/modules_task.php +++ b/htdocs/core/modules/project/task/modules_task.php @@ -248,4 +248,3 @@ function task_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, $h } } -?> diff --git a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php index 50982a8b1c7..f7e6b75adc2 100644 --- a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php +++ b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php @@ -258,4 +258,3 @@ function supplier_order_pdf_create($db, $object, $modele, $outputlangs, $hidedet } } -?> diff --git a/htdocs/expedition/contact.php b/htdocs/expedition/contact.php index 6cfd835925d..facca267160 100644 --- a/htdocs/expedition/contact.php +++ b/htdocs/expedition/contact.php @@ -252,4 +252,3 @@ if ($id > 0 || ! empty($ref)) llxFooter(); $db->close(); -?> \ No newline at end of file diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index f208c82b5d2..1fd33b29c53 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -1688,4 +1688,3 @@ else if ($id || $ref) llxFooter(); $db->close(); -?> diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index de0a8fe28a1..9b15d36ffe9 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -444,4 +444,3 @@ if ($db->connected) $db->close(); // Return code if ran from command line if ($ret) exit($ret); -?> diff --git a/htdocs/livraison/fiche.php b/htdocs/livraison/fiche.php index 49049a20783..c3b7e7da1c7 100644 --- a/htdocs/livraison/fiche.php +++ b/htdocs/livraison/fiche.php @@ -807,4 +807,3 @@ else llxFooter(); $db->close(); -?> diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index da7642e8df4..5d9babd0e89 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -247,4 +247,3 @@ if (! defined('MAIN_LABEL_MENTION_NPR') ) define('MAIN_LABEL_MENTION_NPR','NPR') // We force FPDF if (! empty($dolibarr_pdf_force_fpdf)) $conf->global->MAIN_USE_FPDF=$dolibarr_pdf_force_fpdf; -?> diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index c98993526f5..37c04e50a29 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -519,4 +519,3 @@ class Opensurveysondage extends CommonObject $this->sujet = trim($this->sujet); } } -?> diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index 4b0ca196639..d7cdaae62ac 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -193,4 +193,3 @@ print ''."\n"; llxFooter(); $db->close(); -?> \ No newline at end of file diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index bd0ff34073e..01bb969df20 100644 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -741,4 +741,3 @@ print ''."\n"; llxFooterSurvey(); $db->close(); -?> \ No newline at end of file diff --git a/htdocs/opensurvey/wizard/choix_date.php b/htdocs/opensurvey/wizard/choix_date.php index a7f788250eb..6e10e10778a 100644 --- a/htdocs/opensurvey/wizard/choix_date.php +++ b/htdocs/opensurvey/wizard/choix_date.php @@ -555,4 +555,3 @@ print ''."\n"; llxFooter(); $db->close(); -?> \ No newline at end of file diff --git a/htdocs/opensurvey/wizard/create_survey.php b/htdocs/opensurvey/wizard/create_survey.php index a1e08f25632..b63536247f5 100644 --- a/htdocs/opensurvey/wizard/create_survey.php +++ b/htdocs/opensurvey/wizard/create_survey.php @@ -199,4 +199,3 @@ print ''."\n"; llxFooter(); $db->close(); -?> diff --git a/htdocs/paypal/admin/paypal.php b/htdocs/paypal/admin/paypal.php index 89664230492..69b0664eb9d 100644 --- a/htdocs/paypal/admin/paypal.php +++ b/htdocs/paypal/admin/paypal.php @@ -386,4 +386,3 @@ if (! empty($conf->use_javascript_ajax)) llxFooter(); $db->close(); -?> diff --git a/htdocs/product/document.php b/htdocs/product/document.php index 0f88d80d34b..3e5417ae9e8 100644 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -153,4 +153,3 @@ else llxFooter(); $db->close(); -?> diff --git a/htdocs/product/stats/facture_fournisseur.php b/htdocs/product/stats/facture_fournisseur.php index fcf03068935..2a06c30a496 100644 --- a/htdocs/product/stats/facture_fournisseur.php +++ b/htdocs/product/stats/facture_fournisseur.php @@ -199,4 +199,3 @@ else llxFooter(); $db->close(); -?> diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php index 05be133ac00..a55673c62b0 100644 --- a/htdocs/product/stats/propal.php +++ b/htdocs/product/stats/propal.php @@ -186,4 +186,3 @@ else llxFooter(); $db->close(); -?> diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php index 00716b9df01..1498b12a033 100644 --- a/htdocs/product/stock/mouvement.php +++ b/htdocs/product/stock/mouvement.php @@ -569,4 +569,3 @@ llxFooter(); $db->close(); -?> diff --git a/htdocs/product/stock/valo.php b/htdocs/product/stock/valo.php index e2899e4e465..17e23fef009 100644 --- a/htdocs/product/stock/valo.php +++ b/htdocs/product/stock/valo.php @@ -162,4 +162,3 @@ else llxFooter(); $db->close(); -?> diff --git a/htdocs/projet/activity/index.php b/htdocs/projet/activity/index.php index 1a2f6603d1d..218e165a195 100644 --- a/htdocs/projet/activity/index.php +++ b/htdocs/projet/activity/index.php @@ -335,4 +335,3 @@ print ''; llxFooter(); $db->close(); -?> diff --git a/htdocs/projet/admin/project_extrafields.php b/htdocs/projet/admin/project_extrafields.php index 9ed4381103a..5707c6be640 100644 --- a/htdocs/projet/admin/project_extrafields.php +++ b/htdocs/projet/admin/project_extrafields.php @@ -150,4 +150,3 @@ if ($action == 'edit' && ! empty($attrname)) llxFooter(); $db->close(); -?> diff --git a/htdocs/projet/document.php b/htdocs/projet/document.php index c652c591ff7..d40682d7ce6 100644 --- a/htdocs/projet/document.php +++ b/htdocs/projet/document.php @@ -157,4 +157,3 @@ else llxFooter(); $db->close(); -?> diff --git a/htdocs/projet/jsgantt_language.js.php b/htdocs/projet/jsgantt_language.js.php index d7135e9ca0d..16b89fbebb3 100644 --- a/htdocs/projet/jsgantt_language.js.php +++ b/htdocs/projet/jsgantt_language.js.php @@ -73,4 +73,3 @@ i18n["Period"] = "transnoentities("Period") ?>"; close(); -?> diff --git a/htdocs/public/emailing/mailing-unsubscribe.php b/htdocs/public/emailing/mailing-unsubscribe.php index ec95078808c..0b11ec3642b 100644 --- a/htdocs/public/emailing/mailing-unsubscribe.php +++ b/htdocs/public/emailing/mailing-unsubscribe.php @@ -124,4 +124,3 @@ if (! empty($tag) && ($unsuscrib=='1')) } $db->close(); -?> diff --git a/htdocs/public/paybox/index.php b/htdocs/public/paybox/index.php index 08cbbd48176..0b7ad1c82e4 100644 --- a/htdocs/public/paybox/index.php +++ b/htdocs/public/paybox/index.php @@ -26,4 +26,3 @@ require '../../master.inc.php'; header("Location: ".DOL_URL_ROOT.'/public/error-404.php'); -?> diff --git a/htdocs/resource/add.php b/htdocs/resource/add.php index 5b127204185..fde152b6185 100755 --- a/htdocs/resource/add.php +++ b/htdocs/resource/add.php @@ -172,4 +172,3 @@ if ( !$action ) // End of page llxFooter(); $db->close(); -?> diff --git a/htdocs/resource/card.php b/htdocs/resource/card.php index 1ecf827fe39..38562557e3a 100755 --- a/htdocs/resource/card.php +++ b/htdocs/resource/card.php @@ -249,4 +249,3 @@ else { // End of page llxFooter(); $db->close(); -?> diff --git a/htdocs/resource/class/html.formresource.class.php b/htdocs/resource/class/html.formresource.class.php index cdeb11950eb..f618581aecd 100644 --- a/htdocs/resource/class/html.formresource.class.php +++ b/htdocs/resource/class/html.formresource.class.php @@ -201,4 +201,3 @@ class FormResource } -?> diff --git a/htdocs/resource/class/resource.class.php b/htdocs/resource/class/resource.class.php index 6b3f0d6d6ee..6edeef201fb 100644 --- a/htdocs/resource/class/resource.class.php +++ b/htdocs/resource/class/resource.class.php @@ -894,4 +894,3 @@ class Resource extends CommonObject return $result; } } -?> diff --git a/htdocs/societe/ajaxcountries.php b/htdocs/societe/ajaxcountries.php index 6b23b3290ce..78018a22035 100644 --- a/htdocs/societe/ajaxcountries.php +++ b/htdocs/societe/ajaxcountries.php @@ -76,4 +76,3 @@ if (! empty($country)) } } -?> \ No newline at end of file diff --git a/htdocs/societe/canvas/individual/actions_card_individual.class.php b/htdocs/societe/canvas/individual/actions_card_individual.class.php index d64adde4cb6..b8cb94a820b 100644 --- a/htdocs/societe/canvas/individual/actions_card_individual.class.php +++ b/htdocs/societe/canvas/individual/actions_card_individual.class.php @@ -141,4 +141,3 @@ class ActionsCardIndividual extends ActionsCardCommon } -?> \ No newline at end of file diff --git a/htdocs/societe/checkvat/checkVatPopup.php b/htdocs/societe/checkvat/checkVatPopup.php index 0fb2da5a053..20c9068d4f6 100644 --- a/htdocs/societe/checkvat/checkVatPopup.php +++ b/htdocs/societe/checkvat/checkVatPopup.php @@ -169,4 +169,3 @@ if ($messagetoshow) llxFooter(); -?> diff --git a/htdocs/societe/class/client.class.php b/htdocs/societe/class/client.class.php index 7c11b074e3b..27209c05abd 100644 --- a/htdocs/societe/class/client.class.php +++ b/htdocs/societe/class/client.class.php @@ -86,4 +86,3 @@ class Client extends Societe } } -?> diff --git a/htdocs/societe/notify/fiche.php b/htdocs/societe/notify/fiche.php index 04210617d3d..198739398a2 100644 --- a/htdocs/societe/notify/fiche.php +++ b/htdocs/societe/notify/fiche.php @@ -406,4 +406,3 @@ $db->close(); llxFooter(); -?> diff --git a/htdocs/support/inc.php b/htdocs/support/inc.php index 921a64963bf..58b9de1d38c 100644 --- a/htdocs/support/inc.php +++ b/htdocs/support/inc.php @@ -239,4 +239,3 @@ function pFooter($nonext=0,$setuplang='') print ''."\n"; } -?> diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php index b95374d800b..3dc3c14cc12 100644 --- a/htdocs/user/clicktodial.php +++ b/htdocs/user/clicktodial.php @@ -217,4 +217,3 @@ if ($id > 0) llxFooter(); $db->close(); -?> diff --git a/htdocs/webservices/server_category.php b/htdocs/webservices/server_category.php index 5e55dae8b18..1b85c677175 100644 --- a/htdocs/webservices/server_category.php +++ b/htdocs/webservices/server_category.php @@ -302,4 +302,3 @@ function getCategory($authentication,$id) // Return the results. $server->service($HTTP_RAW_POST_DATA); -?> diff --git a/scripts/company/export-contacts-xls-example.php b/scripts/company/export-contacts-xls-example.php index 55c1b04b400..bf55c4a2eaf 100755 --- a/scripts/company/export-contacts-xls-example.php +++ b/scripts/company/export-contacts-xls-example.php @@ -122,4 +122,3 @@ $objWriter->save($fname); print 'File '.$fname.' was generated.'."\n"; exit(0); -?> diff --git a/scripts/user/sync_users_ldap2dolibarr.php b/scripts/user/sync_users_ldap2dolibarr.php index 60cb1118c37..a1237b999cb 100755 --- a/scripts/user/sync_users_ldap2dolibarr.php +++ b/scripts/user/sync_users_ldap2dolibarr.php @@ -311,4 +311,3 @@ function dolValidElement($element) return (trim($element) != ''); } -?> diff --git a/test/phpunit/AllTests.php b/test/phpunit/AllTests.php index 339d8e50ede..d8dda85f2fc 100644 --- a/test/phpunit/AllTests.php +++ b/test/phpunit/AllTests.php @@ -196,4 +196,3 @@ class AllTests } } -?> diff --git a/test/phpunit/BuildDocTest.php b/test/phpunit/BuildDocTest.php index 89da06c559e..50f9598e79e 100644 --- a/test/phpunit/BuildDocTest.php +++ b/test/phpunit/BuildDocTest.php @@ -424,4 +424,3 @@ class BuildDocTest extends PHPUnit_Framework_TestCase return 0; } } -?> diff --git a/test/phpunit/CategorieTest.php b/test/phpunit/CategorieTest.php index ae3e92268df..bae2e989f24 100755 --- a/test/phpunit/CategorieTest.php +++ b/test/phpunit/CategorieTest.php @@ -336,4 +336,3 @@ class CategorieTest extends PHPUnit_Framework_TestCase } } -?> diff --git a/test/phpunit/ChargeSocialesTest.php b/test/phpunit/ChargeSocialesTest.php index 23df7ff09fd..69b1f93f776 100755 --- a/test/phpunit/ChargeSocialesTest.php +++ b/test/phpunit/ChargeSocialesTest.php @@ -239,4 +239,3 @@ class ChargeSocialesTest extends PHPUnit_Framework_TestCase } } -?> \ No newline at end of file diff --git a/test/phpunit/ContactTest.php b/test/phpunit/ContactTest.php index 27610daa16b..3c09df861f0 100755 --- a/test/phpunit/ContactTest.php +++ b/test/phpunit/ContactTest.php @@ -404,4 +404,3 @@ class ContactTest extends PHPUnit_Framework_TestCase return $localobjectadd->id; } } -?> diff --git a/test/phpunit/CoreTest.php b/test/phpunit/CoreTest.php index 2142f69e646..8d56b4a0b42 100755 --- a/test/phpunit/CoreTest.php +++ b/test/phpunit/CoreTest.php @@ -297,4 +297,3 @@ class CoreTest extends PHPUnit_Framework_TestCase $this->assertEquals($result,$expectedresult); } } -?> diff --git a/test/phpunit/DateLibTest.php b/test/phpunit/DateLibTest.php index 4d59ca7eb57..f5d9e7d0cc4 100644 --- a/test/phpunit/DateLibTest.php +++ b/test/phpunit/DateLibTest.php @@ -342,4 +342,3 @@ class DateLibTest extends PHPUnit_Framework_TestCase } } -?> diff --git a/test/phpunit/DiscountTest.php b/test/phpunit/DiscountTest.php index 80343da8083..d9f92c84bd1 100755 --- a/test/phpunit/DiscountTest.php +++ b/test/phpunit/DiscountTest.php @@ -187,4 +187,3 @@ class DiscountTest extends PHPUnit_Framework_TestCase return $result; } } -?> \ No newline at end of file diff --git a/test/phpunit/FactureFournisseurTest.php b/test/phpunit/FactureFournisseurTest.php index 2cacb073b60..a5855b37a37 100644 --- a/test/phpunit/FactureFournisseurTest.php +++ b/test/phpunit/FactureFournisseurTest.php @@ -265,4 +265,3 @@ class FactureFournisseurTest extends PHPUnit_Framework_TestCase } } -?> \ No newline at end of file diff --git a/test/phpunit/FactureTestRounding.php b/test/phpunit/FactureTestRounding.php index 6adeb71471d..d4bb8b9dff7 100644 --- a/test/phpunit/FactureTestRounding.php +++ b/test/phpunit/FactureTestRounding.php @@ -333,4 +333,3 @@ class FactureTestRounding extends PHPUnit_Framework_TestCase } } -?> diff --git a/test/phpunit/FilesLibTest.php b/test/phpunit/FilesLibTest.php index 21444d2a60a..0e011c96d2c 100644 --- a/test/phpunit/FilesLibTest.php +++ b/test/phpunit/FilesLibTest.php @@ -387,4 +387,3 @@ class FilesLibTest extends PHPUnit_Framework_TestCase $this->assertEquals(0,count($result)); } } -?> diff --git a/test/phpunit/Functions2LibTest.php b/test/phpunit/Functions2LibTest.php index e302e1858e7..8e4bfe7550f 100755 --- a/test/phpunit/Functions2LibTest.php +++ b/test/phpunit/Functions2LibTest.php @@ -155,4 +155,3 @@ class Functions2LibTest extends PHPUnit_Framework_TestCase } } -?> \ No newline at end of file diff --git a/test/phpunit/HolidayTest.php b/test/phpunit/HolidayTest.php index d9b0b54b5f7..e91305c21e2 100644 --- a/test/phpunit/HolidayTest.php +++ b/test/phpunit/HolidayTest.php @@ -290,4 +290,3 @@ class HolidayTest extends PHPUnit_Framework_TestCase } } -?> diff --git a/test/phpunit/ImportTest.php b/test/phpunit/ImportTest.php index af3b53a837e..4d9590e7a1d 100755 --- a/test/phpunit/ImportTest.php +++ b/test/phpunit/ImportTest.php @@ -134,4 +134,3 @@ class ImportTest extends PHPUnit_Framework_TestCase } } -?> diff --git a/test/phpunit/JsonLibTest.php b/test/phpunit/JsonLibTest.php index e5610981399..caceb6d0dc3 100755 --- a/test/phpunit/JsonLibTest.php +++ b/test/phpunit/JsonLibTest.php @@ -170,4 +170,3 @@ class JsonLibTest extends PHPUnit_Framework_TestCase } } -?> diff --git a/test/phpunit/LangTest.php b/test/phpunit/LangTest.php index 916f870d874..75bdc958c14 100755 --- a/test/phpunit/LangTest.php +++ b/test/phpunit/LangTest.php @@ -174,4 +174,3 @@ class LangTest extends PHPUnit_Framework_TestCase return; } } -?> diff --git a/test/phpunit/MarginsLibTest.php b/test/phpunit/MarginsLibTest.php index 79d8f021d47..7ae615e4934 100644 --- a/test/phpunit/MarginsLibTest.php +++ b/test/phpunit/MarginsLibTest.php @@ -148,4 +148,3 @@ class MarginsLibTest extends PHPUnit_Framework_TestCase } } -?> diff --git a/test/phpunit/NumberingModulesTest.php b/test/phpunit/NumberingModulesTest.php index 4b834bded69..a3788b309d1 100644 --- a/test/phpunit/NumberingModulesTest.php +++ b/test/phpunit/NumberingModulesTest.php @@ -545,4 +545,3 @@ class NumberingModulesTest extends PHPUnit_Framework_TestCase } } -?> diff --git a/test/phpunit/PdfDocTest.php b/test/phpunit/PdfDocTest.php index ee1a8bdf599..02d20a816a8 100755 --- a/test/phpunit/PdfDocTest.php +++ b/test/phpunit/PdfDocTest.php @@ -168,4 +168,3 @@ class PdfDocTest extends PHPUnit_Framework_TestCase $this->assertEquals($result,10.4); } } -?> diff --git a/test/phpunit/ProjectTest.php b/test/phpunit/ProjectTest.php index 9ed50eb2475..8b97f9fe8ea 100644 --- a/test/phpunit/ProjectTest.php +++ b/test/phpunit/ProjectTest.php @@ -233,4 +233,3 @@ class ProjectTest extends PHPUnit_Framework_TestCase } } -?> \ No newline at end of file diff --git a/test/phpunit/ScriptsTest.php b/test/phpunit/ScriptsTest.php index 73310291cf3..76d59c6705b 100755 --- a/test/phpunit/ScriptsTest.php +++ b/test/phpunit/ScriptsTest.php @@ -254,4 +254,3 @@ class ScriptsTest extends PHPUnit_Framework_TestCase return $result; } } -?> diff --git a/test/phpunit/SecurityTest.php b/test/phpunit/SecurityTest.php index e3717a7023f..0d92aee8b76 100755 --- a/test/phpunit/SecurityTest.php +++ b/test/phpunit/SecurityTest.php @@ -265,4 +265,3 @@ class SecurityTest extends PHPUnit_Framework_TestCase } } -?> \ No newline at end of file diff --git a/test/phpunit/UserGroupTest.php b/test/phpunit/UserGroupTest.php index 5ab1976506f..0e43b361e20 100644 --- a/test/phpunit/UserGroupTest.php +++ b/test/phpunit/UserGroupTest.php @@ -284,4 +284,3 @@ class UserGroupTest extends PHPUnit_Framework_TestCase } } -?> \ No newline at end of file diff --git a/test/phpunit/WebservicesOrdersTest.php b/test/phpunit/WebservicesOrdersTest.php index f2a47e2718a..d76fc784722 100755 --- a/test/phpunit/WebservicesOrdersTest.php +++ b/test/phpunit/WebservicesOrdersTest.php @@ -180,4 +180,3 @@ class WebservicesOrdersTest extends PHPUnit_Framework_TestCase } } -?> diff --git a/test/phpunit/WebservicesOtherTest.php b/test/phpunit/WebservicesOtherTest.php index b3462bb8ec9..1ea80beb4bf 100755 --- a/test/phpunit/WebservicesOtherTest.php +++ b/test/phpunit/WebservicesOtherTest.php @@ -213,4 +213,3 @@ class WebservicesOtherTest extends PHPUnit_Framework_TestCase } } -?> diff --git a/test/phpunit/WebservicesProductsTest.php b/test/phpunit/WebservicesProductsTest.php index 3ebeab4dfc0..a4ff7293091 100755 --- a/test/phpunit/WebservicesProductsTest.php +++ b/test/phpunit/WebservicesProductsTest.php @@ -321,4 +321,3 @@ class WebservicesProductsTest extends PHPUnit_Framework_TestCase } } -?> \ No newline at end of file diff --git a/test/phpunit/WebservicesUserTest.php b/test/phpunit/WebservicesUserTest.php index e5e5de6d1bd..e06b98d0921 100755 --- a/test/phpunit/WebservicesUserTest.php +++ b/test/phpunit/WebservicesUserTest.php @@ -212,4 +212,3 @@ class WebservicesUserTest extends PHPUnit_Framework_TestCase } } -?> diff --git a/test/phpunit/XCalLibTest.php b/test/phpunit/XCalLibTest.php index ab16d4e3cb6..6ec63912878 100644 --- a/test/phpunit/XCalLibTest.php +++ b/test/phpunit/XCalLibTest.php @@ -138,4 +138,3 @@ class XCalLibTest extends PHPUnit_Framework_TestCase } } -?> From 020c66253779bdcc2da70b023ab252d4333dc5ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Mon, 26 May 2014 13:54:03 +0200 Subject: [PATCH 12/17] Added a script to automatically remove PHP closing tag --- dev/rmphpclosingtag.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 dev/rmphpclosingtag.sh diff --git a/dev/rmphpclosingtag.sh b/dev/rmphpclosingtag.sh new file mode 100755 index 00000000000..ec755bc399b --- /dev/null +++ b/dev/rmphpclosingtag.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# vim:ft=sh:ts=3:sts=3:sw=3:et: + +### +# Strips the closing php tag `?>` and any following blank lines from the +# end of any PHP file in the current working directory and sub-directories. Files +# with non-whitespace characters following the closing tag will not be affected. +# +# Author: Bryan C. Geraghty +# Date: 2009-10-28 +# Source: http://bryan.ravensight.org/2010/07/remove-php-closing-tag/ +## + +FILES=$(pcregrep -rnM --include='^.*\.php$' '^\?\>(?=([\s\n]+)?$(?!\n))' .); + +for MATCH in $FILES; +do + FILE=`echo $MATCH | awk -F ':' '{print $1}'`; + TARGET=`echo $MATCH | awk -F ':' '{print $2}'`; + LINE_COUNT=`wc -l $FILE | awk -F " " '{print $1}'`; + echo "Removing lines ${TARGET} through ${LINE_COUNT} from file $FILE..."; + sed -i "${TARGET},${LINE_COUNT}d" $FILE; +done; From 4880aac45f4ed3b2d003c69a39c706ac9969e0da Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 26 May 2014 15:24:01 +0200 Subject: [PATCH 13/17] Fix: Regression --- htdocs/adherents/class/adherent_type.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index 9fbe5ea3d6a..e861af709b8 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -118,10 +118,12 @@ class AdherentType extends CommonObject $result = $this->db->query($sql); if ($result) { + $action='update'; + // Actions on extra fields (by external module or standard code) $hookmanager->initHooks(array('membertypedao')); $parameters=array('membertype'=>$this->id); - $reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,'update'); // Note that $action and $object may have been modified by some hooks + $reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks if (empty($reshook)) { if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used From 1557d8973fd0e969e33500ad1f561b8ef275205b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 26 May 2014 23:12:47 +0200 Subject: [PATCH 14/17] Fix: [ bug #1403 ] suppression d'une fiche produit impossible --- htdocs/core/lib/security.lib.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 6c1a51471fa..31e900f8e7e 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -311,7 +311,9 @@ function restrictedArea($user, $features, $objectid=0, $dbtablename='', $feature } } - //print "Delete access is ko"; + // If a or and at least one ok + if (preg_match('/\|/', $features) && $nbko < count($featuresarray)) $deleteok=1; + if (! $deleteok) accessforbidden(); //print "Delete access is ok"; } From 072aca0bd6fe3d64035c3e4fba8bbd01a5ea4ec6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 27 May 2014 00:26:53 +0200 Subject: [PATCH 15/17] License violation: Missing source on min file. --- .../plugins/tablednd/jquery.tablednd.0.6.js | 400 ++++++++++++++++++ 1 file changed, 400 insertions(+) create mode 100644 htdocs/includes/jquery/plugins/tablednd/jquery.tablednd.0.6.js diff --git a/htdocs/includes/jquery/plugins/tablednd/jquery.tablednd.0.6.js b/htdocs/includes/jquery/plugins/tablednd/jquery.tablednd.0.6.js new file mode 100644 index 00000000000..34f3c88232b --- /dev/null +++ b/htdocs/includes/jquery/plugins/tablednd/jquery.tablednd.0.6.js @@ -0,0 +1,400 @@ +/** + * TableDnD plug-in for JQuery, allows you to drag and drop table rows + * You can set up various options to control how the system will work + * Copyright (c) Denis Howlett + * Licensed like jQuery, see http://docs.jquery.com/License. + * + * Configuration options: + * + * onDragStyle + * This is the style that is assigned to the row during drag. There are limitations to the styles that can be + * associated with a row (such as you can't assign a border--well you can, but it won't be + * displayed). (So instead consider using onDragClass.) The CSS style to apply is specified as + * a map (as used in the jQuery css(...) function). + * onDropStyle + * This is the style that is assigned to the row when it is dropped. As for onDragStyle, there are limitations + * to what you can do. Also this replaces the original style, so again consider using onDragClass which + * is simply added and then removed on drop. + * onDragClass + * This class is added for the duration of the drag and then removed when the row is dropped. It is more + * flexible than using onDragStyle since it can be inherited by the row cells and other content. The default + * is class is tDnD_whileDrag. So to use the default, simply customise this CSS class in your + * stylesheet. + * onDrop + * Pass a function that will be called when the row is dropped. The function takes 2 parameters: the table + * and the row that was dropped. You can work out the new order of the rows by using + * table.rows. + * onDragStart + * Pass a function that will be called when the user starts dragging. The function takes 2 parameters: the + * table and the row which the user has started to drag. + * onAllowDrop + * Pass a function that will be called as a row is over another row. If the function returns true, allow + * dropping on that row, otherwise not. The function takes 2 parameters: the dragged row and the row under + * the cursor. It returns a boolean: true allows the drop, false doesn't allow it. + * scrollAmount + * This is the number of pixels to scroll if the user moves the mouse cursor to the top or bottom of the + * window. The page should automatically scroll up or down as appropriate (tested in IE6, IE7, Safari, FF2, + * FF3 beta + * dragHandle + * This is the name of a class that you assign to one or more cells in each row that is draggable. If you + * specify this class, then you are responsible for setting cursor: move in the CSS and only these cells + * will have the drag behaviour. If you do not specify a dragHandle, then you get the old behaviour where + * the whole row is draggable. + * + * Other ways to control behaviour: + * + * Add class="nodrop" to any rows for which you don't want to allow dropping, and class="nodrag" to any rows + * that you don't want to be draggable. + * + * Inside the onDrop method you can also call $.tableDnD.serialize() this returns a string of the form + * []=&[]= so that you can send this back to the server. The table must have + * an ID as must all the rows. + * + * Other methods: + * + * $("...").tableDnDUpdate() + * Will update all the matching tables, that is it will reapply the mousedown method to the rows (or handle cells). + * This is useful if you have updated the table rows using Ajax and you want to make the table draggable again. + * The table maintains the original configuration (so you don't have to specify it again). + * + * $("...").tableDnDSerialize() + * Will serialize and return the serialized string as above, but for each of the matching tables--so it can be + * called from anywhere and isn't dependent on the currentTable being set up correctly before calling + * + * Known problems: + * - Auto-scoll has some problems with IE7 (it scrolls even when it shouldn't), work-around: set scrollAmount to 0 + * + * Version 0.2: 2008-02-20 First public version + * Version 0.3: 2008-02-07 Added onDragStart option + * Made the scroll amount configurable (default is 5 as before) + * Version 0.4: 2008-03-15 Changed the noDrag/noDrop attributes to nodrag/nodrop classes + * Added onAllowDrop to control dropping + * Fixed a bug which meant that you couldn't set the scroll amount in both directions + * Added serialize method + * Version 0.5: 2008-05-16 Changed so that if you specify a dragHandle class it doesn't make the whole row + * draggable + * Improved the serialize method to use a default (and settable) regular expression. + * Added tableDnDupate() and tableDnDSerialize() to be called when you are outside the table + * Version 0.6: 2011-12-02 Added support for touch devices + */ +// Determine if this is a touch device +var hasTouch = 'ontouchstart' in document.documentElement, + startEvent = hasTouch ? 'touchstart' : 'mousedown', + moveEvent = hasTouch ? 'touchmove' : 'mousemove', + endEvent = hasTouch ? 'touchend' : 'mouseup'; + +jQuery.tableDnD = { + /** Keep hold of the current table being dragged */ + currentTable : null, + /** Keep hold of the current drag object if any */ + dragObject: null, + /** The current mouse offset */ + mouseOffset: null, + /** Remember the old value of Y so that we don't do too much processing */ + oldY: 0, + + + /** Actually build the structure */ + build: function(options) { + // Set up the defaults if any + + this.each(function() { + // This is bound to each matching table, set up the defaults and override with user options + this.tableDnDConfig = jQuery.extend({ + onDragStyle: null, + onDropStyle: null, + // Add in the default class for whileDragging + onDragClass: "tDnD_whileDrag", + onDrop: null, + onDragStart: null, + scrollAmount: 5, + + serializeRegexp: /[^\-]*$/, // The regular expression to use to trim row IDs + serializeParamName: null, // If you want to specify another parameter name instead of the table ID + dragHandle: null // If you give the name of a class here, then only Cells with this class will be draggable + }, options || {}); + // Now make the rows draggable + jQuery.tableDnD.makeDraggable(this); + }); + + // Don't break the chain + return this; + }, + + /** This function makes all the rows on the table draggable apart from those marked as "NoDrag" */ + makeDraggable: function(table) { + + var config = table.tableDnDConfig; + if (config.dragHandle) { + // We only need to add the event to the specified cells + var cells = jQuery("td."+table.tableDnDConfig.dragHandle, table); + cells.each(function() { + // The cell is bound to "this" + jQuery(this).bind(startEvent, function(ev) { + jQuery.tableDnD.initialiseDrag(this.parentNode, table, this, ev, config); + return false; + }); + }) + } else { + // For backwards compatibility, we add the event to the whole row + var rows = jQuery("tr", table); // get all the rows as a wrapped set + rows.each(function() { + // Iterate through each row, the row is bound to "this" + var row = jQuery(this); + if (! row.hasClass("nodrag")) { + row.bind(startEvent, function(ev) { + if (ev.target.tagName == "TD") { + jQuery.tableDnD.initialiseDrag(this, table, this, ev, config); + return false; + } + }).css("cursor", "move"); // Store the tableDnD object + } + }); + } + }, + + initialiseDrag: function(dragObject, table, target, evnt, config) { + jQuery.tableDnD.dragObject = dragObject; + jQuery.tableDnD.currentTable = table; + jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(target, evnt); + jQuery.tableDnD.originalOrder = jQuery.tableDnD.serialize(); + // Now we need to capture the mouse up and mouse move event + // We can use bind so that we don't interfere with other event handlers + jQuery(document) + .bind(moveEvent, jQuery.tableDnD.mousemove) + .bind(endEvent, jQuery.tableDnD.mouseup); + if (config.onDragStart) { + // Call the onDragStart method if there is one + config.onDragStart(table, target); + } + }, + + updateTables: function() { + this.each(function() { + // this is now bound to each matching table + if (this.tableDnDConfig) { + jQuery.tableDnD.makeDraggable(this); + } + }) + }, + + /** Get the mouse coordinates from the event (allowing for browser differences) */ + mouseCoords: function(ev){ + if(ev.pageX || ev.pageY){ + return {x:ev.pageX, y:ev.pageY}; + } + return { + x:ev.clientX + document.body.scrollLeft - document.body.clientLeft, + y:ev.clientY + document.body.scrollTop - document.body.clientTop + }; + }, + + /** Given a target element and a mouse event, get the mouse offset from that element. + To do this we need the element's position and the mouse position */ + getMouseOffset: function(target, ev) { + ev = ev || window.event; + + var docPos = this.getPosition(target); + var mousePos = this.mouseCoords(ev); + return {x:mousePos.x - docPos.x, y:mousePos.y - docPos.y}; + }, + + /** Get the position of an element by going up the DOM tree and adding up all the offsets */ + getPosition: function(e){ + var left = 0; + var top = 0; + /** Safari fix -- thanks to Luis Chato for this! */ + if (e.offsetHeight == 0) { + /** Safari 2 doesn't correctly grab the offsetTop of a table row + this is detailed here: + http://jacob.peargrove.com/blog/2006/technical/table-row-offsettop-bug-in-safari/ + the solution is likewise noted there, grab the offset of a table cell in the row - the firstChild. + note that firefox will return a text node as a first child, so designing a more thorough + solution may need to take that into account, for now this seems to work in firefox, safari, ie */ + e = e.firstChild; // a table cell + } + + while (e.offsetParent){ + left += e.offsetLeft; + top += e.offsetTop; + e = e.offsetParent; + } + + left += e.offsetLeft; + top += e.offsetTop; + + return {x:left, y:top}; + }, + + mousemove: function(ev) { + if (jQuery.tableDnD.dragObject == null) { + return; + } + if (ev.type == 'touchmove') { + // prevent touch device screen scrolling + event.preventDefault(); + } + + var dragObj = jQuery(jQuery.tableDnD.dragObject); + var config = jQuery.tableDnD.currentTable.tableDnDConfig; + var mousePos = jQuery.tableDnD.mouseCoords(ev); + var y = mousePos.y - jQuery.tableDnD.mouseOffset.y; + //auto scroll the window + var yOffset = window.pageYOffset; + if (document.all) { + // Windows version + //yOffset=document.body.scrollTop; + if (typeof document.compatMode != 'undefined' && + document.compatMode != 'BackCompat') { + yOffset = document.documentElement.scrollTop; + } + else if (typeof document.body != 'undefined') { + yOffset=document.body.scrollTop; + } + + } + + if (mousePos.y-yOffset < config.scrollAmount) { + window.scrollBy(0, -config.scrollAmount); + } else { + var windowHeight = window.innerHeight ? window.innerHeight + : document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight; + if (windowHeight-(mousePos.y-yOffset) < config.scrollAmount) { + window.scrollBy(0, config.scrollAmount); + } + } + + + if (y != jQuery.tableDnD.oldY) { + // work out if we're going up or down... + var movingDown = y > jQuery.tableDnD.oldY; + // update the old value + jQuery.tableDnD.oldY = y; + // update the style to show we're dragging + if (config.onDragClass) { + dragObj.addClass(config.onDragClass); + } else { + dragObj.css(config.onDragStyle); + } + // If we're over a row then move the dragged row to there so that the user sees the + // effect dynamically + var currentRow = jQuery.tableDnD.findDropTargetRow(dragObj, y); + if (currentRow) { + // TODO worry about what happens when there are multiple TBODIES + if (movingDown && jQuery.tableDnD.dragObject != currentRow) { + jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow.nextSibling); + } else if (! movingDown && jQuery.tableDnD.dragObject != currentRow) { + jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow); + } + } + } + + return false; + }, + + /** We're only worried about the y position really, because we can only move rows up and down */ + findDropTargetRow: function(draggedRow, y) { + var rows = jQuery.tableDnD.currentTable.rows; + for (var i=0; i rowY - rowHeight) && (y < (rowY + rowHeight))) { + // that's the row we're over + // If it's the same as the current row, ignore it + if (row == draggedRow) {return null;} + var config = jQuery.tableDnD.currentTable.tableDnDConfig; + if (config.onAllowDrop) { + if (config.onAllowDrop(draggedRow, row)) { + return row; + } else { + return null; + } + } else { + // If a row has nodrop class, then don't allow dropping (inspired by John Tarr and Famic) + var nodrop = jQuery(row).hasClass("nodrop"); + if (! nodrop) { + return row; + } else { + return null; + } + } + return row; + } + } + return null; + }, + + mouseup: function(e) { + if (jQuery.tableDnD.currentTable && jQuery.tableDnD.dragObject) { + // Unbind the event handlers + jQuery(document) + .unbind(moveEvent, jQuery.tableDnD.mousemove) + .unbind(endEvent, jQuery.tableDnD.mouseup); + var droppedRow = jQuery.tableDnD.dragObject; + var config = jQuery.tableDnD.currentTable.tableDnDConfig; + // If we have a dragObject, then we need to release it, + // The row will already have been moved to the right place so we just reset stuff + if (config.onDragClass) { + jQuery(droppedRow).removeClass(config.onDragClass); + } else { + jQuery(droppedRow).css(config.onDropStyle); + } + jQuery.tableDnD.dragObject = null; + var newOrder = jQuery.tableDnD.serialize(); + if (config.onDrop && (jQuery.tableDnD.originalOrder != newOrder)) { + // Call the onDrop method if there is one + config.onDrop(jQuery.tableDnD.currentTable, droppedRow); + } + jQuery.tableDnD.currentTable = null; // let go of the table too + } + }, + + serialize: function() { + if (jQuery.tableDnD.currentTable) { + return jQuery.tableDnD.serializeTable(jQuery.tableDnD.currentTable); + } else { + return "Error: No Table id set, you need to set an id on your table and every row"; + } + }, + + serializeTable: function(table) { + var result = ""; + var tableId = table.id; + var rows = table.rows; + for (var i=0; i 0) result += "&"; + var rowId = rows[i].id; + if (rowId && rowId && table.tableDnDConfig && table.tableDnDConfig.serializeRegexp) { + rowId = rowId.match(table.tableDnDConfig.serializeRegexp)[0]; + } + + result += tableId + '[]=' + rowId; + } + return result; + }, + + serializeTables: function() { + var result = ""; + this.each(function() { + // this is now bound to each matching table + result += jQuery.tableDnD.serializeTable(this); + }); + return result; + } + +}; + + +jQuery.fn.extend( + { + tableDnD : jQuery.tableDnD.build, + tableDnDUpdate : jQuery.tableDnD.updateTables, + tableDnDSerialize: jQuery.tableDnD.serializeTables + } +); \ No newline at end of file From 8dad341ed46a099c693b4d048329487d2c086c5b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 27 May 2014 00:57:34 +0200 Subject: [PATCH 16/17] Fix: css --- htdocs/theme/amarok/style.css.php | 8 ++++++++ htdocs/theme/auguria/style.css.php | 8 ++++++++ htdocs/theme/bureau2crea/style.css.php | 8 ++++++++ htdocs/theme/cameleo/style.css.php | 8 ++++++++ htdocs/theme/eldy/style.css.php | 9 ++++++++- 5 files changed, 40 insertions(+), 1 deletion(-) diff --git a/htdocs/theme/amarok/style.css.php b/htdocs/theme/amarok/style.css.php index 38df086e267..f47813271a8 100644 --- a/htdocs/theme/amarok/style.css.php +++ b/htdocs/theme/amarok/style.css.php @@ -2112,6 +2112,14 @@ div.jnotify-background { .sorting_desc { background: url('') no-repeat center right; } .sorting_asc_disabled { background: url('') no-repeat center right; } .sorting_desc_disabled { background: url('') no-repeat center right; } +.paginate_disabled_previous:hover, .paginate_enabled_previous:hover, .paginate_disabled_next:hover, .paginate_enabled_next:hover +{ + font-weight: normal; +} +.paginate_enabled_previous:hover, .paginate_enabled_next:hover +{ + text-decoration: underline !important; +} /* ============================================================================== */ diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php index a3b5150bb57..47e982404d2 100644 --- a/htdocs/theme/auguria/style.css.php +++ b/htdocs/theme/auguria/style.css.php @@ -2287,6 +2287,14 @@ div.ecmjqft { .sorting_desc { background: url('') no-repeat center right; } .sorting_asc_disabled { background: url('') no-repeat center right; } .sorting_desc_disabled { background: url('') no-repeat center right; } +.paginate_disabled_previous:hover, .paginate_enabled_previous:hover, .paginate_disabled_next:hover, .paginate_enabled_next:hover +{ + font-weight: normal; +} +.paginate_enabled_previous:hover, .paginate_enabled_next:hover +{ + text-decoration: underline !important; +} /* ============================================================================== */ diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php index 00bb6e62a14..ab50dae7ae9 100644 --- a/htdocs/theme/bureau2crea/style.css.php +++ b/htdocs/theme/bureau2crea/style.css.php @@ -2475,6 +2475,14 @@ div.ecmjqft { .sorting_desc { background: url('') no-repeat center right; } .sorting_asc_disabled { background: url('') no-repeat center right; } .sorting_desc_disabled { background: url('') no-repeat center right; } +.paginate_disabled_previous:hover, .paginate_enabled_previous:hover, .paginate_disabled_next:hover, .paginate_enabled_next:hover +{ + font-weight: normal; +} +.paginate_enabled_previous:hover, .paginate_enabled_next:hover +{ + text-decoration: underline !important; +} /* ============================================================================== */ diff --git a/htdocs/theme/cameleo/style.css.php b/htdocs/theme/cameleo/style.css.php index ff6e3696d33..285fcad6880 100644 --- a/htdocs/theme/cameleo/style.css.php +++ b/htdocs/theme/cameleo/style.css.php @@ -2370,6 +2370,14 @@ div.ecmjqft { .sorting_desc { background: url('') no-repeat center right; } .sorting_asc_disabled { background: url('') no-repeat center right; } .sorting_desc_disabled { background: url('') no-repeat center right; } +.paginate_disabled_previous:hover, .paginate_enabled_previous:hover, .paginate_disabled_next:hover, .paginate_enabled_next:hover +{ + font-weight: normal; +} +.paginate_enabled_previous:hover, .paginate_enabled_next:hover +{ + text-decoration: underline !important; +} /* ============================================================================== */ diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 2f2622cd9c1..a1bec8fe86c 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -2693,7 +2693,14 @@ div.dolEventError h1, div.dolEventError h2 { .sorting_desc { background: url('') no-repeat center right; } .sorting_asc_disabled { background: url('') no-repeat center right; } .sorting_desc_disabled { background: url('') no-repeat center right; } - +.paginate_disabled_previous:hover, .paginate_enabled_previous:hover, .paginate_disabled_next:hover, .paginate_enabled_next:hover +{ + font-weight: normal; +} +.paginate_enabled_previous:hover, .paginate_enabled_next:hover +{ + text-decoration: underline !important; +} /* For jquery plugin combobox */ /* Disable this. It breaks wrapping of boxes From baa573435bc3f41be84f2eb853849e68ff8daf1f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 27 May 2014 00:58:00 +0200 Subject: [PATCH 17/17] Fix: Exclude files from package with missing sources. --- build/makepack-dolibarr.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 62c6c60fc9c..973b0f65036 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -452,6 +452,7 @@ if ($nboftargetok) { $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/adapters`; # Keep this removal in case we embed libraries #$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/_source`; # _source must be kept into tarball + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/datatables/extras/TableTools/swf`; # Source of this flash is not available $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/samples`;