From 329c0b29131a8ee10d044c97e534620aebcca378 Mon Sep 17 00:00:00 2001 From: Florian HENRY <florian.henry@open-concept.pro> Date: Wed, 13 Aug 2014 12:42:55 +0200 Subject: [PATCH] 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; -- GitLab