From 0643ffa1ac9b1e4b05045b24288883d9834496ba Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 1 Aug 2010 15:27:13 +0000 Subject: [PATCH] Fix: Must show feature but greyed when no permission --- htdocs/core/class/html.formfile.class.php | 2 +- htdocs/ecm/index.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index a3e5b6bafb0..44f0453aa57 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -54,7 +54,7 @@ class FormFile * \param perm Value of permission to allow upload * \return int <0 si ko, >0 si ok */ - function form_attach_new_file($url,$title='',$addcancel=0, $sectionid=0, $perm=1) + function form_attach_new_file($url, $title='', $addcancel=0, $sectionid=0, $perm=1) { global $conf,$langs; diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php index cff40b468a5..4330410e3a7 100644 --- a/htdocs/ecm/index.php +++ b/htdocs/ecm/index.php @@ -614,9 +614,9 @@ if (empty($action) || $action == 'file_manager' || preg_match('/refresh/i',$acti } } print ''; -if ($user->rights->ecm->upload && ! empty($section)) +if (! empty($section)) { - $formfile->form_attach_new_file(DOL_URL_ROOT.'/ecm/index.php','',0,$section,1); + $formfile->form_attach_new_file(DOL_URL_ROOT.'/ecm/index.php','',0,$section,$user->rights->ecm->upload); } else print ' '; print '';