Fix cancel in media filemanager

This commit is contained in:
Laurent Destailleur 2020-06-03 11:40:51 +02:00
parent 8894570054
commit 66df7fca41

View File

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