diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php index 0475dabbdfa..723a5dbfb2a 100644 --- a/htdocs/core/ajax/ajaxdirtree.php +++ b/htdocs/core/ajax/ajaxdirtree.php @@ -198,7 +198,7 @@ if (! empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE print ''; // Edit link - print '
| '.$langs->trans("Ref").' | '; print img_picto('','object_dir').' '.$langs->trans("ECMRoot").' -> '; print $s; print ' |
| '.$langs->trans("Description").' | '; -if ($action == 'edit') +if ($module == 'ecm') { - print ''; + print ' |
| '.$langs->trans("Description").' | '; + if ($action == 'edit') + { + print ''; + } + else print dol_nl2br($ecmdir->description); + print ' |
| '.$langs->trans("ECMCreationUser").' | '; + $userecm=new User($db); + $userecm->fetch($ecmdir->fk_user_c); + print $userecm->getNomUrl(1); + print ' |
| '.$langs->trans("ECMCreationDate").' | '; +if ($module == 'ecm') +{ + print dol_print_date($ecmdir->date_c,'dayhour'); +} +else +{ + //var_dump($upload_dir); + print dol_print_date(dol_filemtime($upload_dir), 'dayhour'); } -else print dol_nl2br($ecmdir->description); -print ' |
| '.$langs->trans("ECMCreationUser").' | '; -$userecm=new User($db); -$userecm->fetch($ecmdir->fk_user_c); -print $userecm->getNomUrl(1); -print ' |
| '.$langs->trans("ECMCreationDate").' | '; -print dol_print_date($ecmdir->date_c,'dayhour'); print ' |
| '.$langs->trans("ECMDirectoryForFiles").' | '; print '/ecm/'.$relativepath; @@ -321,12 +349,12 @@ if ($action != 'edit' && $action != 'delete') if ($user->rights->ecm->setup) { - print ''.$langs->trans('Edit').''; + print ''.$langs->trans('Edit').''; } if ($user->rights->ecm->setup) { - print ''.$langs->trans('ECMAddSection').''; + print ''.$langs->trans('ECMAddSection').''; } else { @@ -337,7 +365,7 @@ if ($action != 'edit' && $action != 'delete') { if ($user->rights->ecm->setup) { - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } else { @@ -354,21 +382,20 @@ if ($action != 'edit' && $action != 'delete') // Confirm remove file if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.$_REQUEST["section"].'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile'); - + print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.GETPOST("section",'alpha').'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile'); } // Confirm remove file if ($action == 'delete_dir') { $relativepathwithoutslash=preg_replace('/[\/]$/','',$relativepath); - print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.$_REQUEST["section"], $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection',$relativepathwithoutslash), 'confirm_deletedir', '', 1, 1); - + print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.GETPOST('section','alpha').($module?'&module='.$module:''), $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection',$relativepathwithoutslash), 'confirm_deletedir', '', 1, 1); } -$formfile=new FormFile($db); /* +$formfile=new FormFile($db); + // Display upload form if ($user->rights->ecm->upload) { |