Skip to content

Commit b7bd4a4

Browse files
ENGCOM-4782: fixed issue of Backup tool not correctly detecting .maintenance.flag #19993
- Merge Pull Request #19993 from hiren0241/magento2:fixed-issue-19825 - Merged commits: 1. fd92027 2. 6374f9d
2 parents 729650d + 6374f9d commit b7bd4a4

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

app/code/Magento/Backup/Controller/Adminhtml/Index/Create.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ public function execute()
5858
$this->_coreRegistry->register('backup_manager', $backupManager);
5959

6060
if ($this->getRequest()->getParam('maintenance_mode')) {
61-
if (!$this->maintenanceMode->set(true)) {
61+
$this->maintenanceMode->set(true);
62+
63+
if (!$this->maintenanceMode->isOn()) {
6264
$response->setError(
6365
__(
6466
'You need more permissions to activate maintenance mode right now.'

app/code/Magento/Backup/Controller/Adminhtml/Index/Rollback.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ public function execute()
8282
}
8383

8484
if ($this->getRequest()->getParam('maintenance_mode')) {
85-
if (!$this->maintenanceMode->set(true)) {
85+
$this->maintenanceMode->set(true);
86+
87+
if (!$this->maintenanceMode->isOn()) {
8688
$response->setError(
8789
__(
8890
'You need more permissions to activate maintenance mode right now.'

0 commit comments

Comments
 (0)