From b9e3ba25036f7ba54ac63fcaa60da593a4cdfe0f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 2 Sep 2019 22:13:57 +0200 Subject: [PATCH] Fix backtourl --- htdocs/ecm/dir_card.php | 13 ++++++++----- htdocs/ecm/file_card.php | 2 -- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/htdocs/ecm/dir_card.php b/htdocs/ecm/dir_card.php index a279c228646..b6cb7dbfb7f 100644 --- a/htdocs/ecm/dir_card.php +++ b/htdocs/ecm/dir_card.php @@ -151,7 +151,10 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') if ($action == 'confirm_deletedir' && $confirm == 'yes') { $backtourl = DOL_URL_ROOT."/ecm/index.php"; - if ($module == 'medias') $backtourl = DOL_URL_ROOT."/website/index.php?file_manager=1"; + if ($module == 'medias') + { + $backtourl = DOL_URL_ROOT."/website/index.php?file_manager=1"; + } $deletedirrecursive = (GETPOST('deletedirrecursive', 'alpha') == 'on' ? 1 : 0); @@ -381,7 +384,7 @@ dol_banner_tab($object, '', $morehtml, 0, '', '', $morehtmlref); print '
'; print '
'; -print ''; +print '
'; /*print '
'.$langs->trans("Ref").''; print img_picto('','object_dir').' '.$langs->trans("ECMRoot").' -> '; print $s; @@ -484,7 +487,7 @@ if ($action != 'edit' && $action != 'delete') //{ if ($permtoadd) { - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } else { @@ -504,7 +507,7 @@ if ($action != 'edit' && $action != 'delete') // Confirm remove file if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.GETPOST("section", 'alpha').'&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"]).($backtopage ? '&backtopage='.urlencode($backtopage) : ''), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile'); } // Confirm remove file @@ -521,7 +524,7 @@ if ($action == 'delete_dir') ); } - print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.GETPOST('section', 'alpha').($module?'&module='.$module:''), $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection', $relativepathwithoutslash), 'confirm_deletedir', $formquestion, 1, 1); + print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.GETPOST('section', 'alpha').($module?'&module='.$module:'').($backtopage ? '&backtopage='.urlencode($backtopage) : ''), $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection', $relativepathwithoutslash), 'confirm_deletedir', $formquestion, 1, 1); } diff --git a/htdocs/ecm/file_card.php b/htdocs/ecm/file_card.php index 4eebb2d36b3..bbf210f631e 100644 --- a/htdocs/ecm/file_card.php +++ b/htdocs/ecm/file_card.php @@ -400,8 +400,6 @@ if ($action != 'edit') if ($user->rights->ecm->setup) { print ''.$langs->trans('Edit').''; - - //print ''.$langs->trans('Cancel').''; } /* if ($user->rights->ecm->setup)