Fix: Must show feature but greyed when no permission

This commit is contained in:
Laurent Destailleur 2010-08-01 15:27:13 +00:00
parent 64e5c50e6f
commit 0643ffa1ac
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -614,9 +614,9 @@ if (empty($action) || $action == 'file_manager' || preg_match('/refresh/i',$acti
}
}
print '</td><td>';
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 '&nbsp;';
print '</td></tr>';