Fix backtourl

This commit is contained in:
Laurent Destailleur 2019-09-02 22:13:57 +02:00
parent a96742ee9b
commit b9e3ba2503
2 changed files with 8 additions and 7 deletions

View File

@ -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 '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent">';
print '<table class="border centpercent tableforfield">';
/*print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>';
print img_picto('','object_dir').' <a href="'.DOL_URL_ROOT.'/ecm/index.php">'.$langs->trans("ECMRoot").'</a> -> ';
print $s;
@ -484,7 +487,7 @@ if ($action != 'edit' && $action != 'delete')
//{
if ($permtoadd)
{
print '<a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?action=delete_dir'.($module?'&module='.$module:'').'&section='.$section.'">'.$langs->trans('Delete').'</a>';
print '<a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?action=delete_dir'.($module?'&module='.$module:'').'&section='.$section.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.$langs->trans('Delete').'</a>';
}
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);
}

View File

@ -400,8 +400,6 @@ if ($action != 'edit')
if ($user->rights->ecm->setup)
{
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=edit&section='.urlencode($section).'&urlfile='.urlencode($urlfile).'">'.$langs->trans('Edit').'</a>';
//print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=cancel&section='.$section.'&urlfile='.urlencode($urlfile).'&backtopage='.urlencode($backtourl).'">'.$langs->trans('Cancel').'</a>';
}
/*
if ($user->rights->ecm->setup)