Fix add protection to avoid deletion of page when deleting a file

This commit is contained in:
Laurent Destailleur 2021-10-10 20:46:06 +02:00
parent cdf1d37a1d
commit ff5f371428

View File

@ -1231,7 +1231,7 @@ if ($action == 'confirm_deletesite' && $confirm == 'yes' && $permissiontodelete)
}
// Delete page (from website page menu)
if (GETPOSTISSET('pageid') && $action == 'delete' && $permissiontodelete) {
if (GETPOSTISSET('pageid') && $action == 'delete' && $permissiontodelete && !GETPOST('file_manager')) {
$error = 0;
$db->begin();