Browse Source

Add color differentiation for redirects

Кин-дза-дза! :smile:
Visman 2 years ago
parent
commit
68747c98a8
40 changed files with 93 additions and 88 deletions
  1. 2 2
      app/Models/Pages/Admin/Bans.php
  2. 3 3
      app/Models/Pages/Admin/Categories.php
  3. 1 1
      app/Models/Pages/Admin/Censoring.php
  4. 4 4
      app/Models/Pages/Admin/Forums.php
  5. 4 4
      app/Models/Pages/Admin/Groups.php
  6. 2 2
      app/Models/Pages/Admin/Logs.php
  7. 3 3
      app/Models/Pages/Admin/Maintenance.php
  8. 1 1
      app/Models/Pages/Admin/Options.php
  9. 5 5
      app/Models/Pages/Admin/Parser/BBCode.php
  10. 1 1
      app/Models/Pages/Admin/Parser/Edit.php
  11. 6 3
      app/Models/Pages/Admin/Parser/Smilies.php
  12. 4 2
      app/Models/Pages/Admin/Providers.php
  13. 1 1
      app/Models/Pages/Admin/Reports.php
  14. 2 2
      app/Models/Pages/Admin/Update.php
  15. 4 4
      app/Models/Pages/Admin/Users/Action.php
  16. 1 1
      app/Models/Pages/Admin/Users/NewUser.php
  17. 1 1
      app/Models/Pages/Admin/Users/Promote.php
  18. 1 1
      app/Models/Pages/Admin/Users/View.php
  19. 3 3
      app/Models/Pages/Auth.php
  20. 3 3
      app/Models/Pages/Delete.php
  21. 1 1
      app/Models/Pages/Edit.php
  22. 2 2
      app/Models/Pages/Email.php
  23. 4 4
      app/Models/Pages/Misc.php
  24. 9 9
      app/Models/Pages/Moderate.php
  25. 2 2
      app/Models/Pages/PM/PMBlock.php
  26. 1 1
      app/Models/Pages/PM/PMConfig.php
  27. 3 3
      app/Models/Pages/PM/PMDelete.php
  28. 1 1
      app/Models/Pages/PM/PMEdit.php
  29. 1 1
      app/Models/Pages/PM/PMPost.php
  30. 2 2
      app/Models/Pages/PM/PMTopic.php
  31. 2 2
      app/Models/Pages/PM/PMView.php
  32. 1 1
      app/Models/Pages/Poll.php
  33. 1 1
      app/Models/Pages/Post.php
  34. 1 1
      app/Models/Pages/Profile/Config.php
  35. 1 1
      app/Models/Pages/Profile/Edit.php
  36. 3 3
      app/Models/Pages/Profile/Email.php
  37. 1 1
      app/Models/Pages/Profile/Mod.php
  38. 2 2
      app/Models/Pages/Profile/OAuth.php
  39. 2 2
      app/Models/Pages/Profile/Pass.php
  40. 1 1
      app/Models/Pages/Report.php

+ 2 - 2
app/Models/Pages/Admin/Bans.php

@@ -694,7 +694,7 @@ class Bans extends Admin
                     $redirect->page('AdminBans');
                 }
 
-                return $redirect->message($isNew ? 'Ban added redirect' : 'Ban edited redirect');
+                return $redirect->message($isNew ? 'Ban added redirect' : 'Ban edited redirect', FORK_MESS_SUCC);
             }
 
             $data         = $v->getData();
@@ -882,6 +882,6 @@ class Bans extends Admin
             $redirect->url($user->link);
         }
 
-        return $redirect->message('Ban removed redirect');
+        return $redirect->message('Ban removed redirect', FORK_MESS_SUCC);
     }
 }

+ 3 - 3
app/Models/Pages/Admin/Categories.php

@@ -51,7 +51,7 @@ class Categories extends Admin
 
                 $this->c->forums->reset();
 
-                return $this->c->Redirect->page('AdminCategories')->message('Categories updated redirect');
+                return $this->c->Redirect->page('AdminCategories')->message('Categories updated redirect', FORK_MESS_SUCC);
             }
 
             $this->fIswev  = $v->getErrors();
@@ -168,14 +168,14 @@ class Categories extends Admin
                 ! $v->validation($_POST)
                 || '1' !== $v->confirm
             ) {
-                return $this->c->Redirect->page('AdminCategories')->message('No confirm redirect');
+                return $this->c->Redirect->page('AdminCategories')->message('No confirm redirect', FORK_MESS_WARN);
             }
 
             $this->c->categories->delete($args['id']);
 
             $this->c->forums->reset();
 
-            return $this->c->Redirect->page('AdminCategories')->message('Category deleted redirect');
+            return $this->c->Redirect->page('AdminCategories')->message('Category deleted redirect', FORK_MESS_SUCC);
         }
 
         $this->nameTpl   = 'admin/form';

+ 1 - 1
app/Models/Pages/Admin/Censoring.php

@@ -42,7 +42,7 @@ class Censoring extends Admin
 
                 $this->c->censorship->save($v->form);
 
-                return $this->c->Redirect->page('AdminCensoring')->message('Data updated redirect');
+                return $this->c->Redirect->page('AdminCensoring')->message('Data updated redirect', FORK_MESS_SUCC);
             }
 
             $this->fIswev  = $v->getErrors();

+ 4 - 4
app/Models/Pages/Admin/Forums.php

@@ -117,7 +117,7 @@ class Forums extends Admin
 
                 $this->c->forums->reset();
 
-                return $this->c->Redirect->page('AdminForums')->message('Forums updated redirect');
+                return $this->c->Redirect->page('AdminForums')->message('Forums updated redirect', FORK_MESS_SUCC);
             }
 
             $this->fIswev  = $v->getErrors();
@@ -255,13 +255,13 @@ class Forums extends Admin
                 ! $v->validation($_POST)
                 || '1' !== $v->confirm
             ) {
-                return $this->c->Redirect->page('AdminForums')->message('No confirm redirect');
+                return $this->c->Redirect->page('AdminForums')->message('No confirm redirect', FORK_MESS_WARN);
             }
 
             $this->c->forums->delete($forum);
             $this->c->forums->reset();
 
-            return $this->c->Redirect->page('AdminForums')->message('Forum deleted redirect');
+            return $this->c->Redirect->page('AdminForums')->message('Forum deleted redirect', FORK_MESS_SUCC);
         }
 
         $this->nameTpl   = 'admin/form';
@@ -414,7 +414,7 @@ class Forums extends Admin
 
                 $this->c->forums->reset();
 
-                return $this->c->Redirect->page('AdminForumsEdit', ['id' => $forum->id])->message($message);
+                return $this->c->Redirect->page('AdminForumsEdit', ['id' => $forum->id])->message($message, FORK_MESS_SUCC);
             }
 
             $this->fIswev = $v->getErrors();

+ 4 - 4
app/Models/Pages/Admin/Groups.php

@@ -155,7 +155,7 @@ class Groups extends Admin
         $this->c->config->i_default_user_group = $v->defaultgroup;
         $this->c->config->save();
 
-        return $this->c->Redirect->page('AdminGroups')->message('Default group redirect');
+        return $this->c->Redirect->page('AdminGroups')->message('Default group redirect', FORK_MESS_SUCC);
     }
 
     /**
@@ -364,7 +364,7 @@ class Groups extends Admin
 
         $this->c->forums->reset();
 
-        return $this->c->Redirect->page('AdminGroupsEdit', ['id' => $group->g_id])->message($message);
+        return $this->c->Redirect->page('AdminGroupsEdit', ['id' => $group->g_id])->message($message, FORK_MESS_SUCC);
     }
 
     /**
@@ -801,7 +801,7 @@ class Groups extends Admin
                 ! $v->validation($_POST)
                 || '1' !== $v->confirm
             ) {
-                return $this->c->Redirect->page('AdminGroups')->message('No confirm redirect');
+                return $this->c->Redirect->page('AdminGroups')->message('No confirm redirect', FORK_MESS_WARN);
             }
 
             if ($v->movegroup) {
@@ -810,7 +810,7 @@ class Groups extends Admin
                 $this->c->groups->delete($group);
             }
 
-            return $this->c->Redirect->page('AdminGroups')->message('Group removed redirect');
+            return $this->c->Redirect->page('AdminGroups')->message('Group removed redirect', FORK_MESS_SUCC);
         }
 
 

+ 2 - 2
app/Models/Pages/Admin/Logs.php

@@ -127,7 +127,7 @@ class Logs extends Admin
                     $v->validation($_POST)
                     && \unlink($path)
                 ) {
-                    return $this->c->Redirect->page('AdminLogs')->message('Log deleted redirect');
+                    return $this->c->Redirect->page('AdminLogs')->message('Log deleted redirect', FORK_MESS_SUCC);
                 }
             } catch (Throwable $e) {
                 $this->c->Log->error('Delete log: failed', [
@@ -136,7 +136,7 @@ class Logs extends Admin
                 ]);
             }
 
-            return $this->c->Redirect->page('AdminLogs')->message('Failed to delete log redirect');
+            return $this->c->Redirect->page('AdminLogs')->message('Failed to delete log redirect', FORK_MESS_ERR);
         }
 
         $this->nameTpl   = 'admin/form';

+ 3 - 3
app/Models/Pages/Admin/Maintenance.php

@@ -46,7 +46,7 @@ class Maintenance extends Admin
                 $this->c->config->o_maintenance_message = $v->o_maintenance_message;
                 $this->c->config->save();
 
-                return $this->c->Redirect->page('AdminMaintenance')->message('Data updated redirect');
+                return $this->c->Redirect->page('AdminMaintenance')->message('Data updated redirect', FORK_MESS_SUCC);
             }
 
             $this->fIswev = $v->getErrors();
@@ -236,9 +236,9 @@ class Maintenance extends Admin
                 'clear' => $v->clear ? '1' : '0',
             ];
 
-            return $this->c->Redirect->page('AdminRebuildIndex', $args)->message(['Processed posts', $v->start, $last]);
+            return $this->c->Redirect->page('AdminRebuildIndex', $args)->message(['Processed posts', $v->start, $last], FORK_MESS_SUCC);
         } else {
-            return $this->c->Redirect->page('AdminMaintenance')->message('Rebuilding index end');
+            return $this->c->Redirect->page('AdminMaintenance')->message('Rebuilding index end', FORK_MESS_SUCC);
         }
     }
 }

+ 1 - 1
app/Models/Pages/Admin/Options.php

@@ -135,7 +135,7 @@ class Options extends Admin
             if ($valid) {
                 $config->save();
 
-                return $this->c->Redirect->page('AdminOptions')->message('Options updated redirect');
+                return $this->c->Redirect->page('AdminOptions')->message('Options updated redirect', FORK_MESS_SUCC);
             }
 
             $this->fIswev  = $v->getErrors();

+ 5 - 5
app/Models/Pages/Admin/Parser/BBCode.php

@@ -102,7 +102,7 @@ class BBCode extends Parser
 
                 $this->c->config->save();
 
-                return $this->c->Redirect->url($this->AdminBBCodeUrl)->message('Parser settings updated redirect');
+                return $this->c->Redirect->url($this->AdminBBCodeUrl)->message('Parser settings updated redirect', FORK_MESS_SUCC);
             }
 
             $this->fIswev  = $v->getErrors();
@@ -254,12 +254,12 @@ class BBCode extends Parser
                 ! $v->validation($_POST)
                 || '1' !== $v->confirm
             ) {
-                return $this->c->Redirect->url($this->AdminBBCodeUrl)->message('No confirm redirect');
+                return $this->c->Redirect->url($this->AdminBBCodeUrl)->message('No confirm redirect', FORK_MESS_WARN);
             }
 
             $this->c->bbcode->delete($args['id']);
 
-            return $this->c->Redirect->url($this->AdminBBCodeUrl)->message('BBCode deleted redirect');
+            return $this->c->Redirect->url($this->AdminBBCodeUrl)->message('BBCode deleted redirect', FORK_MESS_SUCC);
         }
 
         $formAction      = $this->c->Router->link('AdminBBCodeDelete', $args);
@@ -426,7 +426,7 @@ class BBCode extends Parser
                         $message = 'BBCode added redirect';
                     }
 
-                    return $this->c->Redirect->page('AdminBBCodeEdit', ['id' => $id])->message($message);
+                    return $this->c->Redirect->page('AdminBBCodeEdit', ['id' => $id])->message($message, FORK_MESS_SUCC);
                 }
 
                 $this->fIswev = $v->getErrors();
@@ -747,6 +747,6 @@ class BBCode extends Parser
 
         $this->c->bbcode->update($id, $structure);
 
-        return $this->c->Redirect->page('AdminBBCodeEdit', ['id' => $id])->message('BBCode updated redirect');
+        return $this->c->Redirect->page('AdminBBCodeEdit', ['id' => $id])->message('BBCode updated redirect', FORK_MESS_SUCC);
     }
 }

+ 1 - 1
app/Models/Pages/Admin/Parser/Edit.php

@@ -52,7 +52,7 @@ class Edit extends Parser
             if ($valid) {
                 $config->save();
 
-                return $this->c->Redirect->page('AdminParser')->message('Parser settings updated redirect');
+                return $this->c->Redirect->page('AdminParser')->message('Parser settings updated redirect', FORK_MESS_SUCC);
             }
 
             $this->fIswev  = $v->getErrors();

+ 6 - 3
app/Models/Pages/Admin/Parser/Smilies.php

@@ -110,7 +110,7 @@ class Smilies extends Parser
 
                 $this->c->smilies->reset();
 
-                return $this->c->Redirect->page('AdminSmilies')->message('Smilies updated redirect');
+                return $this->c->Redirect->page('AdminSmilies')->message('Smilies updated redirect', FORK_MESS_SUCC);
             }
 
             $this->fIswev = $v->getErrors();
@@ -363,6 +363,8 @@ class Smilies extends Parser
             return $this->c->Message->message($this->c->Csrf->getError());
         }
 
+        $status = FORK_MESS_SUCC;
+
         if (
             \is_numeric($args['name'])
             && \is_int(0 + $args['name'])
@@ -381,12 +383,13 @@ class Smilies extends Parser
                 $message = ['File %s deleted redirect', $args['name']];
             } else {
                 $message = ['File %s not deleted redirect', $args['name']];
+                $status  = FORK_MESS_ERR;
             }
         } else {
             return $this->c->Message->message('Bad request');
         }
 
-        return $this->c->Redirect->page('AdminSmilies')->message($message);
+        return $this->c->Redirect->page('AdminSmilies')->message($message, $status);
     }
 
     /**
@@ -415,7 +418,7 @@ class Smilies extends Parser
                     ->rewrite(false)
                     ->toFile($this->c->DIR_PUBLIC . '/img/sm/*.(jpg|png|gif)')
             ) {
-                return $this->c->Redirect->page('AdminSmilies')->message('Image uploaded redirect');
+                return $this->c->Redirect->page('AdminSmilies')->message('Image uploaded redirect', FORK_MESS_SUCC);
             } else {
                 return $this->c->Message->message($v->upload_image->error());
             }

+ 4 - 2
app/Models/Pages/Admin/Providers.php

@@ -52,7 +52,7 @@ class Providers extends Admin
             if ($v->validation($_POST)) {
                 $this->c->providers->update($v->form);
 
-                return $this->c->Redirect->page('AdminProviders')->message('Providers updated redirect');
+                return $this->c->Redirect->page('AdminProviders')->message('Providers updated redirect', FORK_MESS_SUCC);
             }
 
             $this->fIswev  = $v->getErrors();
@@ -159,11 +159,13 @@ class Providers extends Admin
                     ]);
 
                     $message = 'Provider updated redirect';
+                    $status  = FORK_MESS_SUCC;
                 } else {
                     $message = 'No confirm redirect';
+                    $status  = FORK_MESS_WARN;
                 }
 
-                return $this->c->Redirect->page('AdminProvider', $args)->message($message);
+                return $this->c->Redirect->page('AdminProvider', $args)->message($message, $status);
             }
 
             $this->fIswev  = $v->getErrors();

+ 1 - 1
app/Models/Pages/Admin/Reports.php

@@ -164,6 +164,6 @@ class Reports extends Admin
             $this->c->reports->clear();
         }
 
-        return $this->c->Redirect->page('AdminReports')->message('Report zapped redirect');
+        return $this->c->Redirect->page('AdminReports')->message('Report zapped redirect', FORK_MESS_SUCC);
     }
 }

+ 2 - 2
app/Models/Pages/Admin/Update.php

@@ -370,7 +370,7 @@ class Update extends Admin
                     return $this->c->Redirect->page(
                         'AdminUpdateStage',
                         ['uid' => $uid, 'stage' => $stage, 'start' => $start]
-                    )->message(['Stage %1$s (%2$s)', $stage, (int) $start]);
+                    )->message(['Stage %1$s (%2$s)', $stage, (int) $start], FORK_MESS_SUCC);
                 }
 
                 ++$stage;
@@ -384,7 +384,7 @@ class Update extends Admin
                 throw new RuntimeException('Unable to clear cache');
             }
 
-            return $this->c->Redirect->page('Index')->message('Successfully updated');
+            return $this->c->Redirect->page('Index')->message('Successfully updated', FORK_MESS_SUCC);
         } catch (ForkException $excp) {
             return $this->c->Message->message($excp->getMessage(), true, 503);
         }

+ 4 - 4
app/Models/Pages/Admin/Users/Action.php

@@ -134,7 +134,7 @@ class Action extends Users
                 ! $v->validation($_POST)
                 || 1 !== $v->confirm
             ) {
-                return $this->c->Redirect->page('AdminUsers')->message('No confirm redirect');
+                return $this->c->Redirect->page('AdminUsers')->message('No confirm redirect', FORK_MESS_WARN);
             }
 
             if (1 === $v->delete_posts) {
@@ -147,7 +147,7 @@ class Action extends Users
 
             $this->c->forums->reset();
 
-            return $this->c->Redirect->page('AdminUsers')->message('Users delete redirect');
+            return $this->c->Redirect->page('AdminUsers')->message('Users delete redirect', FORK_MESS_SUCC);
         }
 
         $this->nameTpl   = 'admin/form';
@@ -281,7 +281,7 @@ class Action extends Users
 
             if ($v->validation($_POST)) {
                 if (1 !== $v->confirm) {
-                    return $redirect->url($link)->message('No confirm redirect');
+                    return $redirect->url($link)->message('No confirm redirect', FORK_MESS_WARN);
                 }
 
                 $this->c->users->changeGroup($v->new_group, ...$this->userList);
@@ -298,7 +298,7 @@ class Action extends Users
                     $redirect->page('AdminUsers');
                 }
 
-                return $redirect->message('Users move redirect');
+                return $redirect->message('Users move redirect', FORK_MESS_SUCC);
 
             }
 

+ 1 - 1
app/Models/Pages/Admin/Users/NewUser.php

@@ -65,7 +65,7 @@ class NewUser extends Users
                     $this->c->users->insert($user);
 
                     return $this->c->Redirect->page('User', ['id' => $user->id, 'name' => $user->username])
-                        ->message('New user added redirect');
+                        ->message('New user added redirect', FORK_MESS_SUCC);
                 }
 
                 $this->fIswev = $v->getErrors();

+ 1 - 1
app/Models/Pages/Admin/Users/Promote.php

@@ -32,6 +32,6 @@ class Promote extends Users
             $this->c->users->update($user);
         }
 
-        return $this->c->Redirect->page('ViewPost', ['id' => $args['pid']])->message('User promote redirect');
+        return $this->c->Redirect->page('ViewPost', ['id' => $args['pid']])->message('User promote redirect', FORK_MESS_SUCC);
     }
 }

+ 1 - 1
app/Models/Pages/Admin/Users/View.php

@@ -437,7 +437,7 @@ class View extends Users
 
         $this->c->users->updateCountPosts();
 
-        return $this->c->Redirect->page('AdminUsers')->message('Updated the number of users posts redirect');
+        return $this->c->Redirect->page('AdminUsers')->message('Updated the number of users posts redirect', FORK_MESS_SUCC);
     }
 
     /**

+ 3 - 3
app/Models/Pages/Auth.php

@@ -37,7 +37,7 @@ class Auth extends Page
                 'user' => $this->user->fLog(),
             ]);
 
-            return $this->c->Redirect->page('Index')->message($this->c->Csrf->getError());
+            return $this->c->Redirect->page('Index')->message($this->c->Csrf->getError(), FORK_MESS_ERR);
         }
 
         $this->c->Cookie->deleteUser();
@@ -50,7 +50,7 @@ class Auth extends Page
 
         $this->c->Lang->load('auth');
 
-        return $this->c->Redirect->page('Index')->message('Logout redirect');
+        return $this->c->Redirect->page('Index')->message('Logout redirect', FORK_MESS_SUCC);
     }
 
     /**
@@ -102,7 +102,7 @@ class Auth extends Page
             if ($v->validation($_POST, true)) {
                 $this->loginEnd($v);
 
-                return $this->c->Redirect->url($v->redirect)->message('Login redirect');
+                return $this->c->Redirect->url($v->redirect)->message('Login redirect', FORK_MESS_SUCC);
             }
 
             $this->fIswev = $v->getErrors();

+ 3 - 3
app/Models/Pages/Delete.php

@@ -52,18 +52,18 @@ class Delete extends Page
                 ! $v->validation($_POST)
                 || '1' !== $v->confirm
             ) {
-                return $this->c->Redirect->page('ViewPost', $args)->message('No confirm redirect');
+                return $this->c->Redirect->page('ViewPost', $args)->message('No confirm redirect', FORK_MESS_WARN);
             }
 
             if ($deleteTopic) {
                 $redirect = $this->c->Redirect
                     ->page('Forum', ['id' => $topic->forum_id, 'name' => $topic->parent->forum_name])
-                    ->message('Topic del redirect');
+                    ->message('Topic del redirect', FORK_MESS_SUCC);
                 $this->c->topics->delete($topic);
             } else {
                 $redirect = $this->c->Redirect
                     ->page('ViewPost', ['id' => $this->c->posts->previousPost($post)])
-                    ->message('Post del redirect');
+                    ->message('Post del redirect', FORK_MESS_SUCC);
                 $this->c->posts->delete($post);
             }
 

+ 1 - 1
app/Models/Pages/Edit.php

@@ -232,7 +232,7 @@ class Edit extends Page
 
         $this->c->search->index($post, 'edit');
 
-        return $this->c->Redirect->url($post->link)->message('Edit redirect');
+        return $this->c->Redirect->url($post->link)->message('Edit redirect', FORK_MESS_SUCC);
     }
 
     /**

+ 2 - 2
app/Models/Pages/Email.php

@@ -98,7 +98,7 @@ class Email extends Page
                             'recipient' => $this->curUser->fLog(),
                         ]);
 
-                        return $this->c->Redirect->url($v->redirect)->message('Email sent redirect');
+                        return $this->c->Redirect->url($v->redirect)->message('Email sent redirect', FORK_MESS_SUCC);
                     }
                 } catch (MailException $e) {
                     $this->c->Log->error('Email send: MailException', [
@@ -108,7 +108,7 @@ class Email extends Page
                     ]);
                 }
 
-                return $this->c->Message->message('When sending email there was an error');
+                return $this->c->Message->message('When sending email there was an error', FORK_MESS_ERR);
             }
 
             $this->fIswev = $v->getErrors();

+ 4 - 4
app/Models/Pages/Misc.php

@@ -29,7 +29,7 @@ class Misc extends Page
         }
 
         if (! $this->c->Csrf->verify($args['token'], 'MarkRead', $args)) {
-            return $this->c->Redirect->url($forum->link)->message($this->c->Csrf->getError());
+            return $this->c->Redirect->url($forum->link)->message($this->c->Csrf->getError(), FORK_MESS_ERR);
         }
 
         $this->c->forums->markread($forum, $this->user);
@@ -38,7 +38,7 @@ class Misc extends Page
 
         $message = $forum->id ? 'Mark forum read redirect' : 'Mark read redirect';
 
-        return $this->c->Redirect->url($forum->link)->message($message);
+        return $this->c->Redirect->url($forum->link)->message($message, FORK_MESS_SUCC);
     }
 
     /**
@@ -72,7 +72,7 @@ class Misc extends Page
             $message = 'Unsubscribe redirect';
         }
 
-        return $this->c->Redirect->url($forum->link)->message($message);
+        return $this->c->Redirect->url($forum->link)->message($message, FORK_MESS_SUCC);
     }
 
     /**
@@ -106,7 +106,7 @@ class Misc extends Page
             $message = 'Unsubscribe redirect';
         }
 
-        return $this->c->Redirect->url($topic->link)->message($message);
+        return $this->c->Redirect->url($topic->link)->message($message, FORK_MESS_SUCC);
     }
 
     protected function confirmMessage(): Page

+ 9 - 9
app/Models/Pages/Moderate.php

@@ -289,7 +289,7 @@ class Moderate extends Page
 
     protected function actionCancel(array $objects, Validator $v): Page
     {
-        return $this->c->Redirect->url($this->backLink)->message('No confirm redirect');
+        return $this->c->Redirect->url($this->backLink)->message('No confirm redirect', FORK_MESS_WARN);
     }
 
     protected function actionOpen(array $topics, Validator $v): Page
@@ -310,7 +310,7 @@ class Moderate extends Page
                 if (1 === $v->confirm) {
                     $this->c->topics->access(true, ...$topics);
 
-                    return $this->c->Redirect->url($this->backLink)->message(['Open topic redirect', $this->numObj]);
+                    return $this->c->Redirect->url($this->backLink)->message(['Open topic redirect', $this->numObj], FORK_MESS_SUCC);
                 } else {
                     return $this->actionCancel($topics, $v);
                 }
@@ -337,7 +337,7 @@ class Moderate extends Page
                 if (1 === $v->confirm) {
                     $this->c->topics->access(false, ...$topics);
 
-                    return $this->c->Redirect->url($this->backLink)->message(['Close topic redirect', $this->numObj]);
+                    return $this->c->Redirect->url($this->backLink)->message(['Close topic redirect', $this->numObj], FORK_MESS_SUCC);
                 } else {
                     return $this->actionCancel($topics, $v);
                 }
@@ -397,7 +397,7 @@ class Moderate extends Page
                         $message = 'Delete topic redirect';
                     }
 
-                    return $this->c->Redirect->url($this->curForum->link)->message([$message, $this->numObj]);
+                    return $this->c->Redirect->url($this->curForum->link)->message([$message, $this->numObj], FORK_MESS_SUCC);
                 } else {
                     return $this->actionCancel($objects, $v);
                 }
@@ -426,7 +426,7 @@ class Moderate extends Page
                     $forum = $this->c->forums->get($v->destination);
                     $this->c->topics->move(1 === $v->redirect, $forum, ...$topics);
 
-                    return $this->c->Redirect->url($this->curForum->link)->message(['Move topic redirect', $this->numObj]);
+                    return $this->c->Redirect->url($this->curForum->link)->message(['Move topic redirect', $this->numObj], FORK_MESS_SUCC);
                 } else {
                     return $this->actionCancel($topics, $v);
                 }
@@ -472,7 +472,7 @@ class Moderate extends Page
                 if (1 === $v->confirm) {
                     $this->c->topics->merge(1 === $v->redirect, ...$topics);
 
-                    return $this->c->Redirect->url($this->curForum->link)->message('Merge topics redirect');
+                    return $this->c->Redirect->url($this->curForum->link)->message('Merge topics redirect', FORK_MESS_SUCC);
                 } else {
                     return $this->actionCancel($topics, $v);
                 }
@@ -502,7 +502,7 @@ class Moderate extends Page
                         $this->c->topics->update($topic);
                     }
 
-                    return $this->c->Redirect->url($this->backLink)->message(['Unstick topic redirect', $this->numObj]);
+                    return $this->c->Redirect->url($this->backLink)->message(['Unstick topic redirect', $this->numObj], FORK_MESS_SUCC);
                 } else {
                     return $this->actionCancel($topics, $v);
                 }
@@ -532,7 +532,7 @@ class Moderate extends Page
                         $this->c->topics->update($topic);
                     }
 
-                    return $this->c->Redirect->url($this->backLink)->message(['Stick topic redirect', $this->numObj]);
+                    return $this->c->Redirect->url($this->backLink)->message(['Stick topic redirect', $this->numObj], FORK_MESS_SUCC);
                 } else {
                     return $this->actionCancel($topics, $v);
                 }
@@ -561,7 +561,7 @@ class Moderate extends Page
 
                     $this->c->posts->move(false, $newTopic, ...$posts);
 
-                    return $this->c->Redirect->url($this->curForum->link)->message('Split posts redirect');
+                    return $this->c->Redirect->url($this->curForum->link)->message('Split posts redirect', FORK_MESS_SUCC);
                 } else {
                     return $this->actionCancel($posts, $v);
                 }

+ 2 - 2
app/Models/Pages/PM/PMBlock.php

@@ -104,7 +104,7 @@ class PMBlock extends AbstractPM
                 ! $v->validation($_POST)
                 || '1' !== $v->confirm
             ) {
-                return $this->c->Redirect->url($this->linkBack)->message('No confirm redirect');
+                return $this->c->Redirect->url($this->linkBack)->message('No confirm redirect', FORK_MESS_WARN);
             } elseif (
                 (
                     ! $v->{self::BLOCK}
@@ -132,7 +132,7 @@ class PMBlock extends AbstractPM
                 $message = 'User is unblocked redirect';
             }
 
-            return $this->c->Redirect->url($this->linkBack)->message($message);
+            return $this->c->Redirect->url($this->linkBack)->message($message, FORK_MESS_SUCC);
         }
 
         $this->nameTpl    = 'pm/form';

+ 1 - 1
app/Models/Pages/PM/PMConfig.php

@@ -52,7 +52,7 @@ class PMConfig extends AbstractPM
 
                 $this->c->users->update($this->user);
 
-                return $this->c->Redirect->page('PMAction', $args)->message('PM Config redirect');
+                return $this->c->Redirect->page('PMAction', $args)->message('PM Config redirect', FORK_MESS_SUCC);
             }
 
             $this->fIswev = $v->getErrors();

+ 3 - 3
app/Models/Pages/PM/PMDelete.php

@@ -78,7 +78,7 @@ class PMDelete extends AbstractPM
                 ! $v->validation($_POST)
                 || '1' !== $v->confirm
             ) {
-                return $this->c->Redirect->url($post->link)->message('No confirm redirect');
+                return $this->c->Redirect->url($post->link)->message('No confirm redirect', FORK_MESS_WARN);
             }
 
             if ($deleteTopic) {
@@ -90,7 +90,7 @@ class PMDelete extends AbstractPM
 
                 $redirect = $this->c->Redirect
                     ->page('PMAction', ['second' => $second, 'action' => $this->pms->area])
-                    ->message('Dialogue del redirect');
+                    ->message('Dialogue del redirect', FORK_MESS_SUCC);
 
                 $topic->status = Cnst::PT_DELETED;
 
@@ -98,7 +98,7 @@ class PMDelete extends AbstractPM
             } else {
                 $redirect = $this->c->Redirect
                     ->url($post->linkPrevious)
-                    ->message('Message del redirect');
+                    ->message('Message del redirect', FORK_MESS_SUCC);
 
                 $this->pms->delete($post);
             }

+ 1 - 1
app/Models/Pages/PM/PMEdit.php

@@ -170,6 +170,6 @@ class PMEdit extends AbstractPM
             $this->c->users->update($this->user);
         }
 
-        return $this->c->Redirect->url($post->link)->message('Edit redirect');
+        return $this->c->Redirect->url($post->link)->message('Edit redirect', FORK_MESS_SUCC);
     }
 }

+ 1 - 1
app/Models/Pages/PM/PMPost.php

@@ -296,6 +296,6 @@ class PMPost extends AbstractPM
         }
         // отправка уведомления
 
-        return $this->c->Redirect->url($post->link)->message($message);
+        return $this->c->Redirect->url($post->link)->message($message, FORK_MESS_SUCC);
     }
 }

+ 2 - 2
app/Models/Pages/PM/PMTopic.php

@@ -110,7 +110,7 @@ class PMTopic extends AbstractPM
                 ! $v->validation($_POST)
                 || '1' !== $v->confirm
             ) {
-                return $this->c->Redirect->url($this->model->link)->message('No confirm redirect');
+                return $this->c->Redirect->url($this->model->link)->message('No confirm redirect', FORK_MESS_WARN);
             }
 
             $this->model->poster_status = Cnst::PT_NORMAL; //????
@@ -120,7 +120,7 @@ class PMTopic extends AbstractPM
             $this->pms->recalculate($this->targetUser);
             $this->pms->recalculate($this->user);
 
-            return $this->c->Redirect->url($this->model->link)->message('Send dialogue redirect');
+            return $this->c->Redirect->url($this->model->link)->message('Send dialogue redirect', FORK_MESS_SUCC);
         }
 
         $this->pms->area  = $this->pms->inArea($this->model);

+ 2 - 2
app/Models/Pages/PM/PMView.php

@@ -71,7 +71,7 @@ class PMView extends AbstractPM
 
                     return $this;
                 } elseif (1 !== $v->confirm) {
-                    return $this->c->Redirect->page('PMAction', $this->args)->message('No confirm redirect');
+                    return $this->c->Redirect->page('PMAction', $this->args)->message('No confirm redirect', FORK_MESS_WARN);
                 } else {
                     $topics = $this->pms->loadByIds(Cnst::PTOPIC, $v->ids);
 
@@ -94,7 +94,7 @@ class PMView extends AbstractPM
 
                     unset($args['more1']);
 
-                    return $this->c->Redirect->page('PMAction', $args)->message($message);
+                    return $this->c->Redirect->page('PMAction', $args)->message($message, FORK_MESS_SUCC);
                 }
             }
 

+ 1 - 1
app/Models/Pages/Poll.php

@@ -55,7 +55,7 @@ class Poll extends Page
         } elseif (null !== ($result = $topic->poll->vote($v->poll_vote))) {
             return $this->c->Message->message($result);
         } else {
-            return $this->c->Redirect->url($topic->link)->message('You voted');
+            return $this->c->Redirect->url($topic->link)->message('You voted', FORK_MESS_SUCC);
         }
     }
 }

+ 1 - 1
app/Models/Pages/Post.php

@@ -339,6 +339,6 @@ class Post extends Page
             }
         }
 
-        return $this->c->Redirect->url($merge ? $lastPost->link : $post->link)->message('Post redirect');
+        return $this->c->Redirect->url($merge ? $lastPost->link : $post->link)->message('Post redirect', FORK_MESS_SUCC);
     }
 }

+ 1 - 1
app/Models/Pages/Profile/Config.php

@@ -115,7 +115,7 @@ class Config extends Profile
 
                 $this->c->users->update($this->curUser);
 
-                return $this->c->Redirect->page('EditUserBoardConfig', $args)->message('Board configuration redirect');
+                return $this->c->Redirect->page('EditUserBoardConfig', $args)->message('Board configuration redirect', FORK_MESS_SUCC);
             }
 
             $this->fIswev = $v->getErrors();

+ 1 - 1
app/Models/Pages/Profile/Edit.php

@@ -146,7 +146,7 @@ class Edit extends Profile
 
                 $this->c->users->update($this->curUser);
 
-                return $this->c->Redirect->page('EditUserProfile', $args)->message('Profile redirect');
+                return $this->c->Redirect->page('EditUserProfile', $args)->message('Profile redirect', FORK_MESS_SUCC);
             } else {
                 $this->fIswev = $v->getErrors();
 

+ 3 - 3
app/Models/Pages/Profile/Email.php

@@ -42,7 +42,7 @@ class Email extends Profile
 
         return $this->c->Redirect
             ->url($this->user->link)
-            ->message($change ? 'Email changed redirect' : 'Email confirmed redirect');
+            ->message($change ? 'Email changed redirect' : 'Email confirmed redirect', FORK_MESS_SUCC);
     }
 
     /**
@@ -88,7 +88,7 @@ class Email extends Profile
                 ) {
                     return $this->c->Redirect
                         ->page('EditUserProfile', $args)
-                        ->message('Email is old redirect');
+                        ->message('Email is old redirect', FORK_MESS_WARN);
                 }
 
                 $v = $v->reset()
@@ -127,7 +127,7 @@ class Email extends Profile
 
                         return $this->c->Redirect
                             ->page('EditUserProfile', $args)
-                            ->message('Email changed redirect');
+                            ->message('Email changed redirect', FORK_MESS_SUCC);
                     } else {
                         $this->c->Csrf->setHashExpiration(259200); // ???? хэш действует 72 часа
 

+ 1 - 1
app/Models/Pages/Profile/Mod.php

@@ -62,7 +62,7 @@ class Mod extends Profile
 
                 $this->c->forums->reset();
 
-                return $this->c->Redirect->page('EditUserModeration', $args)->message('Update rights redirect');
+                return $this->c->Redirect->page('EditUserModeration', $args)->message('Update rights redirect', FORK_MESS_SUCC);
             }
 
             $this->fIswev = $v->getErrors();

+ 2 - 2
app/Models/Pages/Profile/OAuth.php

@@ -149,11 +149,11 @@ class OAuth extends Profile
                 if (! empty($v->delete)) {
                     $this->c->providerUser->deleteAccount($this->curUser, $name, $userId);
 
-                    return $this->c->Redirect->page('EditUserOAuth', $args)->message('Account removed');
+                    return $this->c->Redirect->page('EditUserOAuth', $args)->message('Account removed', FORK_MESS_SUCC);
                 }
             }
 
-            return $this->c->Redirect->page('EditUserOAuthAction', $args)->message('No confirm redirect');
+            return $this->c->Redirect->page('EditUserOAuthAction', $args)->message('No confirm redirect', FORK_MESS_WARN);
         }
 
         $this->crumbs          = $this->crumbs(

+ 2 - 2
app/Models/Pages/Profile/Pass.php

@@ -63,9 +63,9 @@ class Pass extends Profile
 #                    $auth = $this->c->Auth;
 #                    $auth->fIswev = [FORK_MESS_SUCC => [__('Pass updated')]];
 #                    return $auth->login([], 'GET', $this->curUser->username);
-                    return $this->c->Redirect->page('Login')->message('Pass updated'); // ???? нужна передача данных между скриптами не привязанная к пользователю
+                    return $this->c->Redirect->page('Login')->message('Pass updated', FORK_MESS_SUCC); // ???? нужна передача данных между скриптами не привязанная к пользователю
                 } else {
-                    return $this->c->Redirect->page('EditUserProfile', $args)->message('Pass updated redirect');
+                    return $this->c->Redirect->page('EditUserProfile', $args)->message('Pass updated redirect', FORK_MESS_SUCC);
                 }
             }
 

+ 1 - 1
app/Models/Pages/Report.php

@@ -99,7 +99,7 @@ class Report extends Page
                 if (false === $result && 1 === $this->c->config->i_report_method) {
                     $this->fIswev = [FORK_MESS_ERR, ['Error mail', $this->c->config->o_admin_email]];
                 } else {
-                    return $this->c->Redirect->page('ViewPost', ['id' => $post->id])->message('Report redirect');
+                    return $this->c->Redirect->page('ViewPost', ['id' => $post->id])->message('Report redirect', FORK_MESS_SUCC);
                 }
             }