Browse Source

Add another message for the administrator if MAINTENANCE_OFF = true #21

Visman 1 year ago
parent
commit
bc4fec2e34
3 changed files with 13 additions and 3 deletions
  1. 5 1
      app/Models/Page.php
  2. 4 1
      app/lang/en/common.po
  3. 4 1
      app/lang/ru/common.po

+ 5 - 1
app/Models/Page.php

@@ -312,7 +312,11 @@ abstract class Page extends Model
             1 === $this->c->config->b_maintenance
             && $this->user->isAdmin
         ) {
-            $this->fIswev = [FORK_MESS_WARN, ['Maintenance mode enabled', $this->c->Router->link('AdminMaintenance')]];
+            if ($this->c->MAINTENANCE_OFF) {
+                $this->fIswev = [FORK_MESS_ERR, ['Maintenance mode enabled off', $this->c->Router->link('AdminMaintenance')]];
+            } else {
+                $this->fIswev = [FORK_MESS_WARN, ['Maintenance mode enabled', $this->c->Router->link('AdminMaintenance')]];
+            }
         }
 
         if (

+ 4 - 1
app/lang/en/common.po

@@ -375,7 +375,10 @@ msgid "New reports"
 msgstr "<a href=\"%s\">There are new reports</a>"
 
 msgid "Maintenance mode enabled"
-msgstr "<a href=\"%s\">Maintenance mode is enabled!</a>"
+msgstr "<a href=\"%s\">Maintenance mode is enabled</a>"
+
+msgid "Maintenance mode enabled off"
+msgstr "<a href=\"%s\">Maintenance mode is blocked by the MAINTENANCE_OFF parameter</a>"
 
 msgid "%s B"
 msgstr "%sB"

+ 4 - 1
app/lang/ru/common.po

@@ -377,7 +377,10 @@ msgid "New reports"
 msgstr "<a href=\"%s\">Есть новые сигналы</a>"
 
 msgid "Maintenance mode enabled"
-msgstr "<a href=\"%s\">Включен режим обслуживания!</a>"
+msgstr "<a href=\"%s\">Включен режим обслуживания</a>"
+
+msgid "Maintenance mode enabled off"
+msgstr "<a href=\"%s\">Режим обслуживания заблокирован параметром MAINTENANCE_OFF</a>"
 
 msgid "%s B"
 msgstr "%sб"