Fix cancel in media filemanager

This commit is contained in:
Laurent Destailleur 2020-06-03 11:40:51 +02:00
parent ae3d786593
commit 51c578840c

View File

@ -321,6 +321,13 @@ if (GETPOST('refreshsite', 'alpha') || GETPOST('refreshsite.x', 'alpha') || GETP
}
if (GETPOST('refreshpage', 'alpha') && !in_array($action, array('updatecss'))) $action = 'preview';
if ($action == 'renamefile') {
$action = 'file_manager'; // After actions_linkedfiles, if action were renamefile, we set it to 'file_manager'
}
if ($cancel && $action == 'file_manager') {
$cancel = '';
}
// Cancel
if ($cancel)
{
@ -339,8 +346,6 @@ if ($sortorder) $backtopage .= '&sortorder='.$sortorder;
include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
$backtopage = $savbacktopage;
if ($action == 'renamefile') $action = 'file_manager'; // After actions_linkedfiles, if action were renamefile, we set it to 'file_manager'
if ($action == 'seteditinline')
{
dolibarr_set_const($db, 'WEBSITE_EDITINLINE', 1);