From 9a5b46330aef9e6a5ca80230183b2ec0bda91723 Mon Sep 17 00:00:00 2001 From: Alexis Algoud Date: Wed, 15 Jan 2014 14:49:22 +0100 Subject: [PATCH 1/5] Add right to export project in export tool As the right does not exist, the tool could never be exploited --- htdocs/core/modules/modProjet.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index a384a1a9739..fb7fa20533b 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -144,6 +144,13 @@ class modProjet extends DolibarrModules $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut $this->rights[$r][4] = 'supprimer'; + $r++; + $this->rights[$r][0] = 45; // id de la permission + $this->rights[$r][1] = "Exporter les projets"; // libelle de la permission + $this->rights[$r][2] = 'd'; // type de la permission (deprecie a ce jour) + $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut + $this->rights[$r][4] = 'export'; + $r++; $this->rights[$r][0] = 141; // id de la permission $this->rights[$r][1] = "Lire tous les projets et tâches (y compris prives qui ne me sont pas affectes)"; // libelle de la permission From 919a7cd4a616371aa31d141ba4022e098c478fde Mon Sep 17 00:00:00 2001 From: Peter Fontaine Date: Sun, 19 Jan 2014 14:21:11 +0100 Subject: [PATCH 2/5] Fix: add civilite_id field in contact when create new third party. --- htdocs/societe/class/societe.class.php | 1 + htdocs/societe/soc.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 941a5445ff1..4f00cef5f9f 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -303,6 +303,7 @@ class Societe extends CommonObject $contact->name = $this->name_bis; $contact->firstname = $this->firstname; + $contact->civilite_id = $this->civility_id; $contact->socid = $this->id; // fk_soc $contact->statut = 1; $contact->priv = 0; diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 5e1a6ed40d7..5b1cca98c77 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -118,7 +118,7 @@ if (empty($reshook)) $object->particulier = GETPOST("private"); $object->name = dolGetFirstLastname(GETPOST('firstname'),GETPOST('nom')?GETPOST('nom'):GETPOST('name')); - $object->civilite_id = GETPOST('civilite_id'); + $object->civility_id = GETPOST('civilite_id'); // Add non official properties $object->name_bis = GETPOST('name')?GETPOST('name'):GETPOST('nom'); $object->firstname = GETPOST('firstname'); From d7e111b3bda409038eaf1310e56277bbb79cc52f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 21 Jan 2014 12:53:27 +0100 Subject: [PATCH 3/5] Fix: Missing parent tables --- htdocs/product/class/product.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 715bbcbdba8..faa7223daea 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -36,7 +36,7 @@ class Product extends CommonObject public $element='product'; public $table_element='product'; public $fk_element='fk_product'; - protected $childtables=array('propaldet','commandedet','facturedet','contratdet'); // To test if we can delete object + protected $childtables=array('propaldet','commandedet','facturedet','contratdet','facture_fourn_det','commande_fournisseurdet'); // To test if we can delete object protected $isnolinkedbythird = 1; // No field fk_soc protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe From 46926aa6855eb3107c56afeaab0cd5ff8bd2cbd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o?= Date: Tue, 21 Jan 2014 00:54:26 +0100 Subject: [PATCH 4/5] Fix: modBarcode issue with blank list in conf (?) Custom DB prefix not working with barcode module ? Might help. --- htdocs/core/modules/modBarcode.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/modBarcode.class.php b/htdocs/core/modules/modBarcode.class.php index 856f4251e9c..0564adb762b 100644 --- a/htdocs/core/modules/modBarcode.class.php +++ b/htdocs/core/modules/modBarcode.class.php @@ -111,12 +111,12 @@ class modBarcode extends DolibarrModules $this->remove($options); $sql = array( - array('sql'=>"INSERT INTO llx_c_barcode_type (code, libelle, coder, example, entity) VALUES ('EAN8', 'EAN8', 0, '1234567', __ENTITY__)",'ignoreerror'=>1), - array('sql'=>"INSERT INTO llx_c_barcode_type (code, libelle, coder, example, entity) VALUES ('EAN13', 'EAN13', 0, '123456789012', __ENTITY__)",'ignoreerror'=>1), - array('sql'=>"INSERT INTO llx_c_barcode_type (code, libelle, coder, example, entity) VALUES ('UPC', 'UPC', 0, '123456789012', __ENTITY__)",'ignoreerror'=>1), - array('sql'=>"INSERT INTO llx_c_barcode_type (code, libelle, coder, example, entity) VALUES ('ISBN', 'ISBN', 0, '123456789', __ENTITY__)",'ignoreerror'=>1), - array('sql'=>"INSERT INTO llx_c_barcode_type (code, libelle, coder, example, entity) VALUES ('C39', 'Code 39', 0, '1234567890', __ENTITY__)",'ignoreerror'=>1), - array('sql'=>"INSERT INTO llx_c_barcode_type (code, libelle, coder, example, entity) VALUES ('C128', 'Code 128', 0, 'ABCD1234567890', __ENTITY__)",'ignoreerror'=>1) + array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('EAN8', 'EAN8', 0, '1234567', __ENTITY__)",'ignoreerror'=>1), + array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('EAN13', 'EAN13', 0, '123456789012', __ENTITY__)",'ignoreerror'=>1), + array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('UPC', 'UPC', 0, '123456789012', __ENTITY__)",'ignoreerror'=>1), + array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('ISBN', 'ISBN', 0, '123456789', __ENTITY__)",'ignoreerror'=>1), + array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('C39', 'Code 39', 0, '1234567890', __ENTITY__)",'ignoreerror'=>1), + array('sql'=>"INSERT INTO ".MAIN_DB_PREFIX."c_barcode_type (code, libelle, coder, example, entity) VALUES ('C128', 'Code 128', 0, 'ABCD1234567890', __ENTITY__)",'ignoreerror'=>1) ); return $this->_init($sql, $options); From 9341db3e86a75a3c9eb25389145cced770d44ed7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 22 Jan 2014 03:20:18 +0100 Subject: [PATCH 5/5] Fix: Missing id --- htdocs/comm/action/fiche.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 4f455d26dd2..0e8843579fe 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -626,7 +626,7 @@ if ($action == 'create') // Other attributes - $parameters=array(); + $parameters=array('id'=>$actioncomm->id); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$actioncomm,$action); // Note that $action and $object may have been modified by hook @@ -861,7 +861,7 @@ if ($id > 0) print ''; // Other attributes - $parameters=array('colspan' => ' colspan="3"', 'colspanvalue' => '3'); + $parameters=array('colspan'=>' colspan="3"', 'colspanvalue'=>'3', 'id'=>$act->id); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook if (empty($reshook) && ! empty($extrafields->attribute_label)) { @@ -1043,7 +1043,7 @@ if ($id > 0) print ''; // Other attributes - $parameters=array('colspan' => ' colspan="3"', 'colspanvalue' => '3'); + $parameters=array('colspan'=>' colspan="3"', 'colspanvalue'=>'3', 'id'=>$act->id); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook print '';