From cdc40ca76fe9ae6692b3a9ece00924fe5dd8921c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Thu, 17 Jul 2014 21:12:50 +0200 Subject: [PATCH 01/30] Optimized is_ip dolibarr function --- htdocs/core/lib/functions2.lib.php | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 4e9598d5e20..3f13e6dccaa 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -2,6 +2,7 @@ /* Copyright (C) 2008-2011 Laurent Destailleur * Copyright (C) 2008-2012 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) + * Copyright (C) 2014 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1370,13 +1371,18 @@ function getListOfModels($db,$type,$maxfilenamelength=0) */ function is_ip($ip) { - if (!preg_match("/^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/", $ip)) return 0; - if (sprintf("%u",ip2long($ip)) == sprintf("%u",ip2long('255.255.255.255'))) return 0; - if (sprintf("%u",ip2long('10.0.0.0')) <= sprintf("%u",ip2long($ip)) and sprintf("%u",ip2long($ip)) <= sprintf("%u",ip2long('10.255.255.255'))) return 2; - if (sprintf("%u",ip2long('172.16.0.0')) <= sprintf("%u",ip2long($ip)) and sprintf("%u",ip2long($ip)) <= sprintf("%u",ip2long('172.31.255.255'))) return 2; - if (sprintf("%u",ip2long('192.168.0.0')) <= sprintf("%u",ip2long($ip)) and sprintf("%u",ip2long($ip)) <= sprintf("%u",ip2long('192.168.255.255'))) return 2; - if (sprintf("%u",ip2long('169.254.0.0')) <= sprintf("%u",ip2long($ip)) and sprintf("%u",ip2long($ip)) <= sprintf("%u",ip2long('169.254.255.255'))) return 2; - return 1; + //First we test if it is a valid IPv4 + if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { + + //Then we test if it is not a private range + if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE)) { + return 1; + } + + return 2; + } + + return 0; } /** From 37d4d303b33d241ab54cc60bf22e6547dc4c54fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Thu, 17 Jul 2014 21:19:03 +0200 Subject: [PATCH 02/30] Updated is_ip comment and added a test for is_ip function --- htdocs/core/lib/functions2.lib.php | 6 ++---- test/phpunit/Functions2LibTest.php | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 3f13e6dccaa..294dbafa82e 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -1364,10 +1364,8 @@ function getListOfModels($db,$type,$maxfilenamelength=0) /** * This function evaluates a string that should be a valid IPv4 * - * @param string $ip IP Address - * @return It returns 0 if $ip is not a valid IPv4 - * It returns 1 if $ip is a valid IPv4 and is a public IP - * It returns 2 if $ip is a valid IPv4 and is a private lan IP + * @param string $ip IP Address + * @return int 0 if not valid, 1 if valid and public IP, 2 if valid and private range IP */ function is_ip($ip) { diff --git a/test/phpunit/Functions2LibTest.php b/test/phpunit/Functions2LibTest.php index 8e4bfe7550f..b59b9f3795c 100755 --- a/test/phpunit/Functions2LibTest.php +++ b/test/phpunit/Functions2LibTest.php @@ -154,4 +154,23 @@ class Functions2LibTest extends PHPUnit_Framework_TestCase $this->assertEquals(0,$result); } + /** + * is_ip + * + * @return void + */ + public function testIsIp() { + + //Test not valid IP + $result = is_ip('192.168.1.267'); + $this->assertEquals(0, $result); + + //Test private range IP + $result = is_ip('192.168.1.1'); + $this->assertEquals(2, $result); + + //Test public range IP + $result = is_ip('91.121.33.228'); + $this->assertEquals(1, $result); + } } From f0bfe46ebc371535adcb8ba09fa750712fbb3345 Mon Sep 17 00:00:00 2001 From: frederic34 Date: Mon, 21 Jul 2014 19:19:04 +0200 Subject: [PATCH 03/30] Update main.lang --- htdocs/langs/en_US/main.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 0f8851792b3..f5a964c5610 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -672,6 +672,7 @@ HelpCopyToClipboard=Use Ctrl+C to copy to clipboard SaveUploadedFileWithMask=Save file on server with name "%s" (otherwise "%s") OriginFileName=Original filename SetDemandReason=Set source +SetBankAccount=Define Bank Account ViewPrivateNote=View notes XMoreLines=%s line(s) hidden PublicUrl=Public URL From a01c985018fa3dd16c747ea1205f8e5b4dc6352c Mon Sep 17 00:00:00 2001 From: frederic34 Date: Mon, 21 Jul 2014 19:21:08 +0200 Subject: [PATCH 04/30] Update main.lang --- htdocs/langs/fr_FR/main.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index 09e16355dce..d309462c293 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -672,6 +672,7 @@ HelpCopyToClipboard=Utilisez Ctrl+C pour copier dans le presse-papier SaveUploadedFileWithMask=Sauver le fichier sur le serveur sous le nom "%s" (sinon "%s") OriginFileName=nom du fichier source SetDemandReason=Définir la source +SetBankAccount=Définir le compte bancaire ViewPrivateNote=Voir les notes XMoreLines=%s ligne(s) cachées PublicUrl=URL publique From 4f582609f42fd649ae74bd644bfa77014dded6c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Tue, 22 Jul 2014 04:24:08 +0200 Subject: [PATCH 05/30] Added formConfirm and doAction for supplier invoice card --- ChangeLog | 2 ++ htdocs/fourn/facture/fiche.php | 23 ++++++++++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index cc29d46bd26..d3a8088df85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -56,6 +56,8 @@ For developers: - LINEBILL_DELETE, LINK_DELETE, ORDER_SUPPLIER_DELETE, RESOURCE_DELETE trigger called before SQL delete - New: [ Task #1481 ] Add trigger BILL_SUPPLIER_UPDATE. - New: [ Task #1495 ] Add trigger LINECONTRACT_CREATE. +- New: Added hook "formConfirm" and "doActions" for supplier invoice card +- New: Added hook "doActions" for supplier order card WARNING: Following change may create regression for some external modules, but was necessary to make Dolibarr better: diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index d981f5b6afc..f017aef3c88 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -7,6 +7,7 @@ * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2013 Philippe Grand * Copyright (C) 2013 Florian Henry + * Copyright (C) 2014 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -85,6 +86,9 @@ $permissionnote=$user->rights->fournisseur->facture->creer; // Used by the inclu * Actions */ +$parameters=array('socid'=>$socid); +$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks + include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once // Action clone object @@ -1476,7 +1480,7 @@ else // Confirmation de la suppression d'une ligne produit if ($action == 'confirm_delete_line') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$_GET["lineid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_delete_line', '', 1, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$_GET["lineid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_delete_line', '', 1, 1); } // Clone confirmation @@ -1488,7 +1492,7 @@ else //array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1) ); // Paiement incomplet. On demande si motif = escompte ou autre - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneInvoice'),$langs->trans('ConfirmCloneInvoice',$object->ref),'confirm_clone',$formquestion,'yes', 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneInvoice'),$langs->trans('ConfirmCloneInvoice',$object->ref),'confirm_clone',$formquestion,'yes', 1); } // Confirmation de la validation @@ -1544,24 +1548,33 @@ else array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockIncrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1))); } - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, 1, 1, 240); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, 1, 1, 240); } // Confirmation set paid if ($action == 'paid') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', 0, 1); } // Confirmation de la suppression de la facture fournisseur if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBill'), $langs->trans('ConfirmDeleteBill'), 'confirm_delete', '', 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBill'), $langs->trans('ConfirmDeleteBill'), 'confirm_delete', '', 0, 1); } + if (! $formconfirm) + { + $parameters=array('lineid'=>$lineid); + $formconfirm=$hookmanager->executeHooks('formConfirm',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + } + + // Print form confirm + print $formconfirm; + /** * Invoice From c813077f82e7bed6eee51ca9974f80352f7f0367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Tue, 22 Jul 2014 04:25:44 +0200 Subject: [PATCH 06/30] Corrected indentation --- htdocs/fourn/facture/fiche.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index f017aef3c88..5507147496a 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -1566,11 +1566,10 @@ else } - if (! $formconfirm) - { - $parameters=array('lineid'=>$lineid); - $formconfirm=$hookmanager->executeHooks('formConfirm',$parameters,$object,$action); // Note that $action and $object may have been modified by hook - } + if (!$formconfirm) { + $parameters=array('lineid'=>$lineid); + $formconfirm=$hookmanager->executeHooks('formConfirm',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + } // Print form confirm print $formconfirm; From f5d1d1563b446e0d4a461364621b509cc035439a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Tue, 22 Jul 2014 04:27:41 +0200 Subject: [PATCH 07/30] Corrected indentation (again) --- htdocs/fourn/facture/fiche.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 5507147496a..df1cc8ee5d0 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -1480,7 +1480,7 @@ else // Confirmation de la suppression d'une ligne produit if ($action == 'confirm_delete_line') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$_GET["lineid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_delete_line', '', 1, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$_GET["lineid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_delete_line', '', 1, 1); } // Clone confirmation @@ -1492,7 +1492,7 @@ else //array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1) ); // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneInvoice'),$langs->trans('ConfirmCloneInvoice',$object->ref),'confirm_clone',$formquestion,'yes', 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneInvoice'),$langs->trans('ConfirmCloneInvoice',$object->ref),'confirm_clone',$formquestion,'yes', 1); } // Confirmation de la validation @@ -1548,21 +1548,21 @@ else array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockIncrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1))); } - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, 1, 1, 240); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, 1, 1, 240); } // Confirmation set paid if ($action == 'paid') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', 0, 1); } // Confirmation de la suppression de la facture fournisseur if ($action == 'delete') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBill'), $langs->trans('ConfirmDeleteBill'), 'confirm_delete', '', 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBill'), $langs->trans('ConfirmDeleteBill'), 'confirm_delete', '', 0, 1); } @@ -1572,7 +1572,7 @@ else } // Print form confirm - print $formconfirm; + print $formconfirm; /** From f3cbe1beac5771424b79c7dc9f3814460302a0b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Wed, 23 Jul 2014 06:20:17 +0200 Subject: [PATCH 08/30] Task #1511 and updated changelog --- ChangeLog | 2 +- htdocs/fourn/fiche.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d3a8088df85..057a46757b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -57,7 +57,7 @@ For developers: - New: [ Task #1481 ] Add trigger BILL_SUPPLIER_UPDATE. - New: [ Task #1495 ] Add trigger LINECONTRACT_CREATE. - New: Added hook "formConfirm" and "doActions" for supplier invoice card -- New: Added hook "doActions" for supplier order card +- New: [ task #1511, #1426 ] Added hook "doActions" for supplier card and supplier order card WARNING: Following change may create regression for some external modules, but was necessary to make Dolibarr better: diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php index 8d8faa7d532..11e505334cd 100644 --- a/htdocs/fourn/fiche.php +++ b/htdocs/fourn/fiche.php @@ -52,6 +52,9 @@ $object = new Fournisseur($db); * Action */ +$parameters=array('socid'=>$socid); +$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks + if ($action == 'setsupplieraccountancycode') { $result=$object->fetch($id); From 5ef626813c2a5bddaa4de65ba4f3b6a65f16fb9e Mon Sep 17 00:00:00 2001 From: frederic34 Date: Wed, 23 Jul 2014 09:49:58 +0200 Subject: [PATCH 09/30] Update html.form.class.php --- htdocs/core/class/html.form.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 010e023b285..25f708e8c37 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2512,7 +2512,7 @@ class Form require_once DOL_DOCUMENT_ROOT .'/compta/bank/class/account.class.php'; $bankstatic=new Account($this->db); $bankstatic->fetch($selected); - print $bankstatic->label.' ('.$bankstatic->currency_code.')'; + print $this->textwithpicto($bankstatic->label,$langs->trans("AccountCurrency").' '.$bankstatic->currency_code); } else { print " "; } From c28c6e578ea17dae0ec2518e26b62c6861da6a04 Mon Sep 17 00:00:00 2001 From: frederic34 Date: Wed, 23 Jul 2014 10:00:32 +0200 Subject: [PATCH 10/30] Update main.lang --- htdocs/langs/en_US/main.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index f5a964c5610..f2ef1727ef7 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -673,6 +673,7 @@ SaveUploadedFileWithMask=Save file on server with name "%s" (ot OriginFileName=Original filename SetDemandReason=Set source SetBankAccount=Define Bank Account +AccountCurrency=Account Currency ViewPrivateNote=View notes XMoreLines=%s line(s) hidden PublicUrl=Public URL From 5239620356e9194cee7b3dcbd0f02e04128dd8c3 Mon Sep 17 00:00:00 2001 From: frederic34 Date: Wed, 23 Jul 2014 10:02:33 +0200 Subject: [PATCH 11/30] Update main.lang --- htdocs/langs/fr_FR/main.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index d309462c293..d42b6f82873 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -673,6 +673,7 @@ SaveUploadedFileWithMask=Sauver le fichier sur le serveur sous le nom "% OriginFileName=nom du fichier source SetDemandReason=Définir la source SetBankAccount=Définir le compte bancaire +AccountCurrency=Devise du compte ViewPrivateNote=Voir les notes XMoreLines=%s ligne(s) cachées PublicUrl=URL publique From f96f8384e682b19d1669c3fd91e39eccd92234bf Mon Sep 17 00:00:00 2001 From: mika31 Date: Wed, 23 Jul 2014 20:23:37 +0200 Subject: [PATCH 12/30] Webservice thirdparty / sale representative Little patch to add capability to associate (one) sale representative on thirdparty creation. --- htdocs/webservices/server_thirdparty.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htdocs/webservices/server_thirdparty.php b/htdocs/webservices/server_thirdparty.php index 632a4c164e5..e5ae9a61e64 100644 --- a/htdocs/webservices/server_thirdparty.php +++ b/htdocs/webservices/server_thirdparty.php @@ -471,6 +471,11 @@ function createThirdParty($authentication,$thirdparty) if (! $error) { $db->commit(); + + // Patch to add capability to associate (one) sale representative + if($thirdparty['commid'] && $thirdparty['commid']>0) + $newobject->add_commercial($fuser, $thirdparty["commid"]); + $objectresp=array('result'=>array('result_code'=>'OK', 'result_label'=>''),'id'=>$newobject->id,'ref'=>$newobject->ref); } else From 304e9d2c8334098a60958a9038c4851a6d94b6e2 Mon Sep 17 00:00:00 2001 From: frederic34 Date: Thu, 24 Jul 2014 09:45:46 +0200 Subject: [PATCH 13/30] Update llx_c_shipment_mode.sql Update GLS tracking url --- htdocs/install/mysql/data/llx_c_shipment_mode.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/install/mysql/data/llx_c_shipment_mode.sql b/htdocs/install/mysql/data/llx_c_shipment_mode.sql index a54a392fac7..623c47a1697 100644 --- a/htdocs/install/mysql/data/llx_c_shipment_mode.sql +++ b/htdocs/install/mysql/data/llx_c_shipment_mode.sql @@ -35,5 +35,5 @@ INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (4,'LETTREMAX','Lettre Max','Courrier Suivi et Lettre Max','',0); INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (5,'UPS','UPS','United Parcel Service','http://wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber2=&InquiryNumber3=&tracknums_displayed=3&loc=fr_FR&TypeOfInquiryNumber=T&HTMLVersion=4.0&InquiryNumber22=&InquiryNumber32=&track=Track&Suivi.x=64&Suivi.y=7&Suivi=Valider&InquiryNumber1={TRACKID}',0); INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (6,'KIALA','KIALA','Relais Kiala','http://www.kiala.fr/tnt/delivery/{TRACKID}',0); -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (7,'GLS','GLS','General Logistics Systems','http://www.gls-group.eu/276-I-PORTAL-WEB/content/GLS/FR01/FR/5004.htm?txtAction=71000&txtRefNo={TRACKID}',0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (7,'GLS','GLS','General Logistics Systems','https://gls-group.eu/FR/fr/suivi-colis?match={TRACKID}',0); INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (8,'CHRONO','Chronopost','Chronopost','http://www.chronopost.fr/expedier/inputLTNumbersNoJahia.do?listeNumeros={TRACKID}',0); From 2b3bd260c6ce827367f5a93e045c377959381b0f Mon Sep 17 00:00:00 2001 From: frederic34 Date: Thu, 24 Jul 2014 10:26:11 +0200 Subject: [PATCH 14/30] Update llx_c_shipment_mode.sql --- htdocs/install/mysql/data/llx_c_shipment_mode.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/install/mysql/data/llx_c_shipment_mode.sql b/htdocs/install/mysql/data/llx_c_shipment_mode.sql index 623c47a1697..7bc3f8f590d 100644 --- a/htdocs/install/mysql/data/llx_c_shipment_mode.sql +++ b/htdocs/install/mysql/data/llx_c_shipment_mode.sql @@ -31,7 +31,7 @@ -- INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (1,'CATCH','Catch','Catch by client','',1); INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (2,'TRANS','Transporter','Generic transporter','',1); -INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (3,'COLSUI','Colissimo Suivi','Colissimo Suivi','',0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (3,'COLSUI','Colissimo Suivi','Colissimo Suivi','http://www.colissimo.fr/portail_colissimo/suivre.do?colispart={TRACKID}',0); INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (4,'LETTREMAX','Lettre Max','Courrier Suivi et Lettre Max','',0); INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (5,'UPS','UPS','United Parcel Service','http://wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber2=&InquiryNumber3=&tracknums_displayed=3&loc=fr_FR&TypeOfInquiryNumber=T&HTMLVersion=4.0&InquiryNumber22=&InquiryNumber32=&track=Track&Suivi.x=64&Suivi.y=7&Suivi=Valider&InquiryNumber1={TRACKID}',0); INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (6,'KIALA','KIALA','Relais Kiala','http://www.kiala.fr/tnt/delivery/{TRACKID}',0); From add5328d8f57630f771a313ba08d969355ac382c Mon Sep 17 00:00:00 2001 From: frederic34 Date: Thu, 24 Jul 2014 18:07:22 +0200 Subject: [PATCH 15/30] Update propal.php --- htdocs/comm/propal.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 64a3475572e..010c623cafb 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1978,10 +1978,10 @@ if ($action == 'create') { } // Bank Account - print ''; - print ''; + print '
'; + print '
'; if ($action != 'editbankaccount' && $user->rights->propal->creer) print ''; print '
'; print $langs->trans('BankAccount'); - print ''; + print 'id.'">'.img_edit($langs->trans('SetBankAccount'),1).'
'; From d61d4778fb2e228cf44cf62a83f12c123d7ba83d Mon Sep 17 00:00:00 2001 From: icfr Date: Fri, 25 Jul 2014 19:03:31 +0200 Subject: [PATCH 16/30] erreur de frappe --- htdocs/comm/mailing/fiche.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php index 6f2f5928925..d64d9188de8 100644 --- a/htdocs/comm/mailing/fiche.php +++ b/htdocs/comm/mailing/fiche.php @@ -481,7 +481,7 @@ if ($action == 'add') } // Action update description of emailing -if ($action == 'settitre' || $action == 'setemail_from' || $actino == 'setreplyto' || $action == 'setemail_errorsto') +if ($action == 'settitre' || $action == 'setemail_from' || $action == 'setreplyto' || $action == 'setemail_errorsto') { $upload_dir = $conf->mailing->dir_output . "/" . get_exdir($object->id,2,0,1); From df5d4795bfa6f75fae4f42813d83efda5a3a06af Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Fri, 25 Jul 2014 22:37:23 +0200 Subject: [PATCH 17/30] Fix on bugfix#1317, clean parameters missing Clean fk_parent before updating fk_parent --- htdocs/categories/class/categorie.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 915a1410933..88db4dbc47a 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -335,6 +335,9 @@ class Categorie extends CommonObject $error=0; + // Clean parameters + $this->fk_parent = ($this->fk_parent != "" ? intval($this->fk_parent) : 0); + dol_syslog(get_class($this)."::remove"); $this->db->begin(); From 289a2c6312932fffc3e5913c2bc4c110873241b2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Jul 2014 13:23:22 +0200 Subject: [PATCH 18/30] Maj readme --- build/debian/README.howto | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/build/debian/README.howto b/build/debian/README.howto index 6b6e71c4874..d0bdd4574f4 100644 --- a/build/debian/README.howto +++ b/build/debian/README.howto @@ -153,6 +153,7 @@ from origin/upstream and origin/pristine. * Into root dir, launch: > debian/get-orig-source.sh +If script fails with error Bad certificate, you can set "export PERL_LWP_SSL_VERIFY_HOSTNAME=0 " to solve this. * Staying into git root directory, run > git-import-orig -vv ../tcpdf_x.y.z+dfsg.orig.tar.xz @@ -162,7 +163,7 @@ Note: If there was errors solved manually, you may need to make a git commit * Add an entry into debian/changelog > dch -v x.y.z-dsfg-1 "My comment" will add entry. For example: dch -v x.y.z-dsfg-1 "New upstream release." for a new version -Then modify changelog to replace "unstable" with "UNRELEASED". +Then modify changelog to replace "version" or "unstable" with "UNRELEASED". Warning: Date must have format reported by "date -R" Warning: Name and email must match value into debian/control file (Entry added here is used by next step). @@ -228,8 +229,13 @@ from origin/upstream and origin/pristine. * If new upstream is available onto sourceforge, launch: > debian/get-orig-source.sh +If script fails with error Bad certificate, you can set "export PERL_LWP_SSL_VERIFY_HOSTNAME=0 " to solve this. -* Edit tgz file to remove ckeditor and phpexcel and rename file into +* Edit tgz file to remove +- ckeditor +- phpexcel +- tcpdf +And rename file into dolibarr-x.y.z+dsfgw.tgz (x.y.z = version, w start from 1 and is increased for each new import) @@ -244,7 +250,7 @@ Note: If there was errors solved manually after get-orig-sources.sh, you may nee * Add an entry into debian/changelog > dch -v x.y.z-w "My comment" will add entry. For example: dch -v x.y.z-w "New upstream release." for a new version (x.y.z = version, w start from 1 and increaed for each new import) -Then modify changelog to replace "unstable" with "UNRELEASED". +Then modify changelog to replace "version" or "unstable" with "UNRELEASED". Then check/modify also the user/date signature: - Date must have format reported by "date -R" - Name and email must match value into debian/control file (Entry added here is used by next step). From 8f6023ab5f40c6c0823350abee93a853a2fe988b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Jul 2014 14:07:37 +0200 Subject: [PATCH 19/30] Fix: phpunit test --- test/phpunit/Functions2LibTest.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/phpunit/Functions2LibTest.php b/test/phpunit/Functions2LibTest.php index ab792a10183..d6f9e10b865 100755 --- a/test/phpunit/Functions2LibTest.php +++ b/test/phpunit/Functions2LibTest.php @@ -130,7 +130,7 @@ class Functions2LibTest extends PHPUnit_Framework_TestCase } /** - * isValidMailDomain + * testIsValidMailDomain * * @return void */ @@ -140,7 +140,7 @@ class Functions2LibTest extends PHPUnit_Framework_TestCase } /** - * isValidURL + * testIsValidURL * * @return void */ @@ -155,7 +155,7 @@ class Functions2LibTest extends PHPUnit_Framework_TestCase } /** - * isIP + * testIsIP * * @return void */ @@ -171,6 +171,7 @@ class Functions2LibTest extends PHPUnit_Framework_TestCase print __METHOD__." for ".$ip." result=".$result."\n"; $this->assertEquals(1,$result,$ip); + // Private IP ranges $ip='10.0.0.0'; $result=is_ip($ip); print __METHOD__." for ".$ip." result=".$result."\n"; @@ -186,9 +187,12 @@ class Functions2LibTest extends PHPUnit_Framework_TestCase print __METHOD__." for ".$ip." result=".$result."\n"; $this->assertEquals(2,$result,$ip); + // Reserved IP range (not checked by is_ip function) + /* $ip='169.254.0.0'; $result=is_ip($ip); print __METHOD__." for ".$ip." result=".$result."\n"; $this->assertEquals(2,$result,$ip); + */ } } From 3b9cfea8c9e891845411d0b3b012394f76d2e2cf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Jul 2014 14:16:09 +0200 Subject: [PATCH 20/30] Better function is_ip --- htdocs/core/lib/functions2.lib.php | 15 ++++++++------- test/phpunit/Functions2LibTest.php | 14 +++++++------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 294dbafa82e..5bec87ea726 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -1365,19 +1365,20 @@ function getListOfModels($db,$type,$maxfilenamelength=0) * This function evaluates a string that should be a valid IPv4 * * @param string $ip IP Address - * @return int 0 if not valid, 1 if valid and public IP, 2 if valid and private range IP + * @return int 0 if not valid or reserved range, 1 if valid and public IP, 2 if valid and private range IP */ function is_ip($ip) { - //First we test if it is a valid IPv4 + // First we test if it is a valid IPv4 if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { - //Then we test if it is not a private range - if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE)) { - return 1; - } + // Then we test if it is a private range + if (! filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE)) return 2; - return 2; + // Then we test if it is a reserved range + if (! filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE)) return 0; + + return 1; } return 0; diff --git a/test/phpunit/Functions2LibTest.php b/test/phpunit/Functions2LibTest.php index d6f9e10b865..b5d98aea1b8 100755 --- a/test/phpunit/Functions2LibTest.php +++ b/test/phpunit/Functions2LibTest.php @@ -161,11 +161,18 @@ class Functions2LibTest extends PHPUnit_Framework_TestCase */ public function testIsIP() { + // Not valid $ip='a299.299.299.299'; $result=is_ip($ip); print __METHOD__." for ".$ip." result=".$result."\n"; $this->assertEquals(0,$result,$ip); + // Reserved IP range (not checked by is_ip function) + $ip='169.254.0.0'; + $result=is_ip($ip); + print __METHOD__." for ".$ip." result=".$result."\n"; + $this->assertEquals(0,$result,$ip); + $ip='1.2.3.4'; $result=is_ip($ip); print __METHOD__." for ".$ip." result=".$result."\n"; @@ -187,12 +194,5 @@ class Functions2LibTest extends PHPUnit_Framework_TestCase print __METHOD__." for ".$ip." result=".$result."\n"; $this->assertEquals(2,$result,$ip); - // Reserved IP range (not checked by is_ip function) - /* - $ip='169.254.0.0'; - $result=is_ip($ip); - print __METHOD__." for ".$ip." result=".$result."\n"; - $this->assertEquals(2,$result,$ip); - */ } } From 9ef3683acc4cf355b0428a30969ce993f08c4fdd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Jul 2014 15:07:30 +0200 Subject: [PATCH 21/30] I grouped rules by Standard (PEAR, Generic, Zend, ...) If a standard bring a rule that is duplicate than the other, we must keep it commented saying duplicate with. So at any time we know which rule we match for each standard. --- dev/codesniffer/ruleset.xml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/dev/codesniffer/ruleset.xml b/dev/codesniffer/ruleset.xml index 663dee5db38..6b498e7d167 100755 --- a/dev/codesniffer/ruleset.xml +++ b/dev/codesniffer/ruleset.xml @@ -11,10 +11,16 @@ + + + 0 + + + @@ -24,9 +30,6 @@ 0 - - - @@ -153,6 +156,10 @@ + + + + @@ -270,4 +277,10 @@ + + + + + + From 3d56c8ff6aefb9fdaa0376baf5307c6335b41b5b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Jul 2014 18:20:40 +0200 Subject: [PATCH 22/30] Fix: [ bug #1537 ] Difference between societe.nom and adherent.societ --- ChangeLog | 1 + htdocs/install/mysql/migration/3.6.0-3.7.0.sql | 4 ++++ htdocs/install/mysql/tables/llx_adherent.sql | 2 +- htdocs/install/mysql/tables/llx_societe.sql | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6b297afd531..a404a20169b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -43,6 +43,7 @@ For users: - Fix: [ bug #1501 ] DEPLACEMENT_CREATE trigger do not intercept trigger action - Fix: [ bug #1506, #1507 ] ECM trigger error problem - Fix: [ bug #1469 ] Triggers CONTACT_MODIFY and CONTACT_DELETE duplicates error message +- Fix: [ bug #1537 ] Difference between societe.nom and adherent.societe. - New: [ task #1204 ] add a External reference to contract For translators: diff --git a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql index 30e010431cc..b4d36e82a80 100644 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -122,3 +122,7 @@ create table llx_accounting_fiscalyear )ENGINE=innodb; ALTER TABLE llx_contrat ADD COLUMN ref_ext varchar(30) after ref; + + +ALTER TABLE llx_adherents MODIFY COLUMN societe VARCHAR(60); + diff --git a/htdocs/install/mysql/tables/llx_adherent.sql b/htdocs/install/mysql/tables/llx_adherent.sql index 6d5a4723462..c74b1bcaa3c 100644 --- a/htdocs/install/mysql/tables/llx_adherent.sql +++ b/htdocs/install/mysql/tables/llx_adherent.sql @@ -37,7 +37,7 @@ create table llx_adherent pass varchar(50), -- password fk_adherent_type integer NOT NULL, morphy varchar(3) NOT NULL, -- personne morale / personne physique - societe varchar(50), + societe varchar(60), -- company name (should be same lenght than societe.name) fk_soc integer NULL, -- Link to third party linked to member address text, zip varchar(30), diff --git a/htdocs/install/mysql/tables/llx_societe.sql b/htdocs/install/mysql/tables/llx_societe.sql index b7f91c2d1ef..bfe69b0d5f8 100644 --- a/htdocs/install/mysql/tables/llx_societe.sql +++ b/htdocs/install/mysql/tables/llx_societe.sql @@ -22,7 +22,7 @@ create table llx_societe ( rowid integer AUTO_INCREMENT PRIMARY KEY, - nom varchar(60), -- company reference name + nom varchar(60), -- company reference name (should be smae length than adherent.societe) entity integer DEFAULT 1 NOT NULL, -- multi company id ref_ext varchar(128), -- reference into an external system (not used by dolibarr) From b964f9e9e3b62cfd7868e037c8e82b5377f67aa8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 27 Jul 2014 14:13:25 +0200 Subject: [PATCH 23/30] New: Add info page about browser. Qual: Removed dedicated code to change top menu according to dol_optimize_smallscreen. We must use instead size of screen into css. --- ChangeLog | 1 + htdocs/admin/system/browser.php | 80 ++++++++++++++++++++++ htdocs/admin/system/dolibarr.php | 14 ++++ htdocs/core/class/html.formadmin.class.php | 2 +- htdocs/core/class/html.formother.class.php | 2 +- htdocs/core/lib/functions.lib.php | 7 +- htdocs/core/menus/init_menu_auguria.sql | 27 ++++---- htdocs/core/menus/standard/eldy.lib.php | 1 + htdocs/langs/en_US/admin.lang | 3 + htdocs/main.inc.php | 26 +++---- htdocs/theme/auguria/style.css.php | 9 +-- htdocs/theme/bureau2crea/style.css.php | 21 +++--- htdocs/theme/cameleo/style.css.php | 24 +++---- htdocs/theme/eldy/style.css.php | 32 ++++----- 14 files changed, 173 insertions(+), 76 deletions(-) create mode 100644 htdocs/admin/system/browser.php diff --git a/ChangeLog b/ChangeLog index a404a20169b..ce5f819bb6b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ English Dolibarr ChangeLog ***** ChangeLog for 3.7 compared to 3.6.* ***** For users: +- New: Add info page about browser. - New: Enable feature developed for 3.6 we forgot to enabled: Adding prefix on uploaded file names. - New: No more dependency between contract and service module. diff --git a/htdocs/admin/system/browser.php b/htdocs/admin/system/browser.php new file mode 100644 index 00000000000..2a97cf8e8eb --- /dev/null +++ b/htdocs/admin/system/browser.php @@ -0,0 +1,80 @@ + + * Copyright (C) 2007 Rodolphe Quiedeville + * Copyright (C) 2007-2012 Regis Houssin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/admin/system/browser.php + * \brief Page to show Dolibarr informations + */ + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; + +$langs->load("admin"); +$langs->load("install"); +$langs->load("other"); + +if (! $user->admin) + accessforbidden(); + + +/* + * View + */ + +$form=new Form($db); + +llxHeader(); + +print_fiche_titre($langs->trans("InfoBrowser"),'','setup'); + +$tmp=getBrowserInfo(); + +// Browser +$var=true; +print ''; +print ''."\n"; +$var=!$var; +print ''."\n"; +$var=!$var; +print ''."\n"; +$var=!$var; +print ''."\n"; +$var=!$var; +print ''."\n"; +$var=!$var; +print ''."\n"; +$var=!$var; +print ''."\n"; +$var=!$var; +print ''."\n"; +$var=!$var; +print ''."\n"; +$var=!$var; +print ''."\n"; +print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("UserAgent").''.$_SERVER['HTTP_USER_AGENT'].'
'.$langs->trans("BrowserName").''.$tmp['browsername'].'
'.$langs->trans("BrowserOS").''.$tmp['browseros'].'
'.$langs->trans("Version").''.$tmp['browserversion'].'
'.$langs->trans("Smartphone").' ?'.$tmp['phone'].'
'.$langs->trans("IPAddress").''.$_SERVER['REMOTE_ADDR'].'
'.$langs->trans("SessionName").''.session_name().'
'.$langs->trans("SessionId").''.session_id().'
'.$langs->trans("Screen").''; +print $_SESSION['dol_screenwidth'].' x '.$_SESSION['dol_screenheight']; +print '
'; +print '
'; + + + +llxFooter(); + +$db->close(); diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index fe9bde59cec..79d5e7cf0aa 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -90,6 +90,20 @@ $var=!$var; print ''.$langs->trans("CurrentMenuHandler").''; print $conf->standard_menu; print ''."\n"; +$var=!$var; +print ''.$langs->trans("Screen").''; +print $_SESSION['dol_screenwidth'].' x '.$_SESSION['dol_screenheight']; +print ''."\n"; +$var=!$var; +print ''.$langs->trans("Session").''; +$i=0; +foreach($_SESSION as $key => $val) +{ + if ($i > 0) print ', '; + print $key.' => '.$val; + $i++; +} +print ''."\n"; print ''; print '
'; diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php index f7a6154706f..042474781d7 100644 --- a/htdocs/core/class/html.formadmin.class.php +++ b/htdocs/core/class/html.formadmin.class.php @@ -180,7 +180,7 @@ class FormAdmin $newprefix=$tab[0]; if ($newprefix=='1' && ($conf->global->MAIN_FEATURES_LEVEL < 1)) continue; if ($newprefix=='2' && ($conf->global->MAIN_FEATURES_LEVEL < 2)) continue; - if (! empty($conf->browser->firefox) && $newprefix != $oldprefix) // Add separators + if ($newprefix != $oldprefix) // Add separators { // Affiche titre print ''; + if ($i > 0) print ''; print '