From 6849f713b579df735b02d9e73da7ed3e0cf6f2d1 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 11 Aug 2014 13:09:35 +0200 Subject: [PATCH 1/6] Fix bug in output extrafields sell list --- htdocs/core/class/extrafields.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 63c84e17ae6..67dcddb3fa2 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -971,15 +971,15 @@ class ExtraFields $value=''; // value was used, so now we reste it to use it to build final output $obj = $this->db->fetch_object($resql); - + // Several field into label (eq table:code|libelle:rowid) $fields_label = explode('|',$InfoFieldList[1]); - + if(is_array($fields_label)) { foreach ($fields_label as $field_toshow) { - $translabel=$langs->trans($obj->field_toshow); + $translabel=$langs->trans($obj->$field_toshow); if ($translabel!=$field_toshow) { $value.=dol_trunc($translabel,18).' '; }else { From aabbc331a4eac871e7e1e05fbc4928cf3d20e4aa Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 11 Aug 2014 13:12:04 +0200 Subject: [PATCH 2/6] Fix output extrafield selllist --- htdocs/core/class/extrafields.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 67dcddb3fa2..8304c626fb0 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -971,10 +971,10 @@ class ExtraFields $value=''; // value was used, so now we reste it to use it to build final output $obj = $this->db->fetch_object($resql); - + // Several field into label (eq table:code|libelle:rowid) $fields_label = explode('|',$InfoFieldList[1]); - + if(is_array($fields_label)) { foreach ($fields_label as $field_toshow) From 329c0b29131a8ee10d044c97e534620aebcca378 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 13 Aug 2014 12:42:55 +0200 Subject: [PATCH 3/6] Fix: Missing include files.lib.php in some pages ti use dol_delete_recursive --- ChangeLog | 1 + htdocs/adherents/fiche.php | 1 + htdocs/admin/tools/update.php | 2 +- htdocs/contrat/class/contrat.class.php | 1 + htdocs/product/class/product.class.php | 1 + htdocs/projet/class/task.class.php | 1 + 6 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2da9d45364d..6e81703b33a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,6 +18,7 @@ Fix: Update impayees.php Fix: Link product, In list view and label product Fix: visible task into area "time" for "My task" must limit task to tasks i am assigned to. Fix: When disabled, all fields to add time into task line must be disabled. +Fix: Missing include files.lib.php in some pages ti use dol_delete_recursive ***** ChangeLog for 3.5.4 compared to 3.5.3 ***** Fix: Hide title of event when agenda module disabled. diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index 99a89ff0d1e..e71e9c8541a 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -328,6 +328,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) { if (GETPOST('deletephoto')) { + require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; $fileimg=$conf->adherent->dir_output.'/'.get_exdir($object->id,2,0,1).'/photos/'.$object->photo; $dirthumbs=$conf->adherent->dir_output.'/'.get_exdir($object->id,2,0,1).'/photos/thumbs'; dol_delete_file($fileimg); diff --git a/htdocs/admin/tools/update.php b/htdocs/admin/tools/update.php index 29e4c96b6c3..e449d265fa3 100644 --- a/htdocs/admin/tools/update.php +++ b/htdocs/admin/tools/update.php @@ -23,7 +23,7 @@ */ require '../../main.inc.php'; -include_once $dolibarr_main_document_root.'/core/lib/files.lib.php'; +include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; $langs->load("admin"); $langs->load("other"); diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 6eda2558daf..7da3e5aaf7e 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -811,6 +811,7 @@ class Contrat extends CommonObject function delete($user) { global $conf, $langs; + require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; $error=0; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 59dbc487f74..52ad1a7f323 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -594,6 +594,7 @@ class Product extends CommonObject function delete($id=0) { global $conf,$user,$langs; + require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; $error=0; diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index c6ad2b82604..57b1ecc695e 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -354,6 +354,7 @@ class Task extends CommonObject { global $conf, $langs; + require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; $error=0; From 387c12322966a28218e56679263a5fa9d2eab68b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 Aug 2014 01:53:54 +0200 Subject: [PATCH 4/6] Fix: List of colors was too low. --- htdocs/theme/eldy/graph-color.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/theme/eldy/graph-color.php b/htdocs/theme/eldy/graph-color.php index ab59c7689a4..81cfc21f067 100644 --- a/htdocs/theme/eldy/graph-color.php +++ b/htdocs/theme/eldy/graph-color.php @@ -28,7 +28,7 @@ global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet; $theme_bordercolor = array(235,235,224); -$theme_datacolor = array(array(190,190,220), array(200,160,180), array(125,135,150), array(170,140,190), array(190,190,170)); +$theme_datacolor = array(array(190,190,220), array(200,160,180), array(125,135,150), array(170,140,190), array(190,190,170), array(190,170,190), array(170,190,190), array(150,135,125), array(85,135,150), array(150,135,80), array(150,80,150)); $theme_bgcolor = array(hexdec('F4'),hexdec('F4'),hexdec('F4')); $theme_bgcoloronglet = array(hexdec('DE'),hexdec('E7'),hexdec('EC')); From d4a0c122bee431b9ca4dae85163beb4625ce2d8e Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 14 Aug 2014 15:33:41 +0200 Subject: [PATCH 5/6] Fix: add global object to test condition with an object --- htdocs/core/lib/functions.lib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index f6a901f3d3d..b5bac3b0ab0 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -4242,6 +4242,7 @@ function dol_eval($s,$returnvalue=0) global $langs, $user, $conf; global $leftmenu; global $rights; + global $object; //print $s."
\n"; if ($returnvalue) return @eval('return '.$s.';'); From a8668aee11952b54f21b19606d744c19b31f07db Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 14 Aug 2014 15:33:41 +0200 Subject: [PATCH 6/6] Fix: add global object to test condition with an object --- htdocs/core/lib/functions.lib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index e450650549e..68c61886efd 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -4267,6 +4267,7 @@ function dol_eval($s,$returnvalue=0) global $langs, $user, $conf; global $leftmenu; global $rights; + global $object; //print $s."
\n"; if ($returnvalue) return @eval('return '.$s.';');