Visman 1 year ago
parent
commit
6f84ba979b
2 changed files with 16 additions and 4 deletions
  1. 8 2
      app/Models/Pages/Admin/Maintenance.php
  2. 8 2
      app/Models/Pages/Admin/Users/View.php

+ 8 - 2
app/Models/Pages/Admin/Maintenance.php

@@ -162,7 +162,10 @@ class Maintenance extends Admin
             ],
         ];
 
-        if (1 !== $this->c->config->b_maintenance) {
+        if (
+            1 !== $this->c->config->b_maintenance
+            || $this->c->MAINTENANCE_OFF
+        ) {
             $form['sets']['maintenance-only'] = [
                 'inform' => [
                     [
@@ -232,7 +235,10 @@ class Maintenance extends Admin
      */
     public function rebuild(array $args, string $method): Page
     {
-        if (1 !== $this->c->config->b_maintenance) {
+        if (
+            1 !== $this->c->config->b_maintenance
+            || $this->c->MAINTENANCE_OFF
+        ) {
             return $this->c->Message->message('Maintenance only');
         }
 

+ 8 - 2
app/Models/Pages/Admin/Users/View.php

@@ -416,7 +416,10 @@ class View extends Users
      */
     public function recalculate(array $args, string $method): Page
     {
-        if (1 !== $this->c->config->b_maintenance) {
+        if (
+            1 !== $this->c->config->b_maintenance
+            || $this->c->MAINTENANCE_OFF
+        ) {
             return $this->c->Message->message('Maintenance only');
         }
 
@@ -479,7 +482,10 @@ class View extends Users
             ],
         ];
 
-        if (1 !== $this->c->config->b_maintenance) {
+        if (
+            1 !== $this->c->config->b_maintenance
+            || $this->c->MAINTENANCE_OFF
+        ) {
             $form['sets']['maintenance-only'] = [
                 'inform' => [
                     [