From abe53cad05dfb01e1a89808f4a0d231b30bc69b9 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Tue, 2 Jan 2018 09:36:37 +0100 Subject: [PATCH 1/7] fix #8004 --- htdocs/blockedlog/class/blockedlog.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index 47a02074dc3..46b212c30d8 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -795,6 +795,7 @@ class BlockedLog if (empty($conf->global->BLOCKEDLOG_ENTITY_FINGERPRINT)) { // creation of a unique fingerprint require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; $fingerprint = dol_hash(print_r($mysoc,true).getRandomPassword(1), '5'); From 320465aeb9938c5aec5bfb0457d22df688fd047e Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Tue, 2 Jan 2018 09:46:45 +0100 Subject: [PATCH 2/7] fix : #8003 --- htdocs/install/mysql/tables/llx_inventory.key.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/install/mysql/tables/llx_inventory.key.sql b/htdocs/install/mysql/tables/llx_inventory.key.sql index b6c41f8aef1..a20fe45fe56 100644 --- a/htdocs/install/mysql/tables/llx_inventory.key.sql +++ b/htdocs/install/mysql/tables/llx_inventory.key.sql @@ -20,4 +20,4 @@ ALTER TABLE llx_inventory ADD UNIQUE INDEX uk_inventory_ref (ref, entity); ALTER TABLE llx_inventory ADD INDEX idx_inventory_tms (tms); -ALTER TABLE llx_inventory ADD INDEX idx_inventory_datec (datec); +ALTER TABLE llx_inventory ADD INDEX idx_inventory_date_creation (date_creation); From 9180121999cf8247d759b5616a33944ef3898cf8 Mon Sep 17 00:00:00 2001 From: John Date: Tue, 2 Jan 2018 12:06:11 +0100 Subject: [PATCH 3/7] Fix extrafields transmition from supplier order lines to supplier invoice lines --- htdocs/fourn/facture/card.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 32379a18d60..bebcb86f3a7 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -679,6 +679,11 @@ if (empty($reshook)) $desc=($lines[$i]->desc?$lines[$i]->desc:$lines[$i]->libelle); $product_type=($lines[$i]->product_type?$lines[$i]->product_type:0); + // Extrafields + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) { + $lines[$i]->fetch_optionals($lines[$i]->rowid); + } + // Dates // TODO mutualiser $date_start=$lines[$i]->date_debut_prevue; From 7d824b3ef238124f11758b4744a891d92ba15b11 Mon Sep 17 00:00:00 2001 From: KHELIFA Date: Thu, 4 Jan 2018 15:05:11 +0100 Subject: [PATCH 4/7] Fix: Access rights for resource in multi-entities --- htdocs/core/lib/security.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index fa624a118f8..71fcdf33bb3 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -383,7 +383,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh if ($feature == 'project') $feature='projet'; if ($feature == 'task') $feature='projet_task'; - $check = array('adherent','banque','user','usergroup','produit','service','produit|service','categorie'); // Test on entity only (Objects with no link to company) + $check = array('adherent','banque','user','usergroup','produit','service','produit|service','categorie','resource'); // Test on entity only (Objects with no link to company) $checksoc = array('societe'); // Test for societe object $checkother = array('contact','agenda'); // Test on entity and link to third party. Allowed if link is empty (Ex: contacts...). $checkproject = array('projet','project'); // Test for project object From 41fec45daf7b3821f9039b281ae4ec7507f1c079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric?= <35066297+c3do@users.noreply.github.com> Date: Thu, 4 Jan 2018 16:23:25 +0100 Subject: [PATCH 5/7] Fix PHP notices adding empty($page) --- htdocs/accountancy/customer/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index 18a440f0e25..904c8668b94 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -73,7 +73,7 @@ $limit = GETPOST('limit','int')?GETPOST('limit', 'int'):(empty($conf->global->AC $sortfield = GETPOST('sortfield', 'alpha'); $sortorder = GETPOST('sortorder', 'alpha'); $page = GETPOST('page','int'); -if ($page < 0) { $page = 0; } +if (empty($page) || $page < 0) { $page = 0; } $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; @@ -505,4 +505,4 @@ jQuery(document).ready(function() { '; llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); From 777ed43e757fa981fac38a4f1838c1971764db96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric?= <35066297+c3do@users.noreply.github.com> Date: Thu, 4 Jan 2018 17:31:59 +0100 Subject: [PATCH 6/7] Remove PHP notices adding empty($page) --- htdocs/accountancy/customer/lines.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index ed44277d7bf..673e927fbeb 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -64,7 +64,7 @@ $limit = GETPOST('limit','int')?GETPOST('limit', 'int'):(empty($conf->global->AC $sortfield = GETPOST('sortfield', 'alpha'); $sortorder = GETPOST('sortorder', 'alpha'); $page = GETPOST('page', 'int'); -if ($page < 0) $page = 0; +if (empty($page) || $page < 0) $page = 0; $pageprev = $page - 1; $pagenext = $page + 1; $offset = $limit * $page; From 4ed86c830ad2ac1e41fd69de39f52f003aec2905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric?= <35066297+c3do@users.noreply.github.com> Date: Thu, 4 Jan 2018 17:42:23 +0100 Subject: [PATCH 7/7] Fix PHP Warning Warning: A non-numeric value encountered in dolibarr/htdocs/accountancy/bookkeeping/list.php on line 89 --- htdocs/accountancy/bookkeeping/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 9b294e76d38..2f7502455d3 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -85,7 +85,7 @@ $limit = GETPOST('limit','int')?GETPOST('limit', 'int'):(empty($conf->global->AC $sortfield = GETPOST('sortfield', 'alpha'); $sortorder = GETPOST('sortorder', 'alpha'); $page = GETPOST('page','int'); -if ($page < 0) { $page = 0; } +if (empty($page) || $page < 0) { $page = 0; } $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1;