Update ISWEV to constants

This commit is contained in:
Visman 2023-05-13 13:31:15 +07:00
parent 6f0ea1264d
commit ced54003f8
37 changed files with 94 additions and 94 deletions

View file

@ -44,7 +44,7 @@ class Test
if (empty($_SERVER['HTTP_USER_AGENT'])) {
$index += 1;
} elseif (\preg_match('%\bmsie\b%i', $_SERVER['HTTP_USER_AGENT'])) {
$v->addError('Old browser', 'w');
$v->addError('Old browser', FORK_MESS_WARN);
return $value;
}
@ -88,7 +88,7 @@ class Test
$index += 3;
}
if ($index > 3) {
$v->addError('Bad browser', 'e');
$v->addError('Bad browser', FORK_MESS_ERR);
}
return $value;

View file

@ -327,7 +327,7 @@ class Validator
/**
* Добавляет ошибку
*/
public function addError(string|array|null $error, string $type = 'v'): void
public function addError(string|array|null $error, string $type = FORK_MESS_VLD): void
{
if (empty($vars = \end($this->curData))) {
throw new RuntimeException('The array of variables is empty');
@ -776,7 +776,7 @@ class Validator
! \is_string($value)
|| ! $this->c->Csrf->verify($value, $attr, $args)
) {
$this->addError($this->c->Csrf->getError() ?? 'Bad token', 'e');
$this->addError($this->c->Csrf->getError() ?? 'Bad token', FORK_MESS_ERR);
$value = null;
}

View file

@ -283,14 +283,14 @@ abstract class Page extends Model
1 === $this->c->config->b_maintenance
&& $this->user->isAdmin
) {
$this->fIswev = ['w', ['Maintenance mode enabled', $this->c->Router->link('AdminMaintenance')]];
$this->fIswev = [FORK_MESS_WARN, ['Maintenance mode enabled', $this->c->Router->link('AdminMaintenance')]];
}
if (
$this->user->isAdmMod
&& $this->user->last_report_id < $this->c->reports->lastId()
) {
$this->fIswev = ['i', ['New reports', $this->c->Router->link('AdminReports')]];
$this->fIswev = [FORK_MESS_INFO, ['New reports', $this->c->Router->link('AdminReports')]];
}
}

View file

@ -346,7 +346,7 @@ class Bans extends Admin
$usedLike
&& ! $this->c->config->insensitive()
) {
$this->fIswev = ['i', 'The search may be case sensitive'];
$this->fIswev = [FORK_MESS_INFO, 'The search may be case sensitive'];
}
return $this->c->bans->filter($filters, $order);
@ -367,7 +367,7 @@ class Bans extends Admin
$number = \count($idsN);
if (0 == $number) {
$this->fIswev = ['i', 'No bans found'];
$this->fIswev = [FORK_MESS_INFO, 'No bans found'];
return $this->view([], 'GET', $data);
}

View file

@ -35,7 +35,7 @@ class Host extends Admin
$this->titles = 'Info';
$this->back = true;
$this->fIswev = [
'i',
FORK_MESS_INFO,
[
'Host info',
$ip,

View file

@ -102,14 +102,14 @@ class Install extends Admin
// версия PHP
if (\version_compare(\PHP_VERSION, self::PHP_MIN, '<')) {
$this->fIswev = ['e', ['You are running error', 'PHP', \PHP_VERSION, $this->c->FORK_REVISION, self::PHP_MIN]];
$this->fIswev = [FORK_MESS_ERR, ['You are running error', 'PHP', \PHP_VERSION, $this->c->FORK_REVISION, self::PHP_MIN]];
}
// типы БД
$this->dbTypes = $this->DBTypes();
if (empty($this->dbTypes)) {
$this->fIswev = ['e', 'No DB extensions'];
$this->fIswev = [FORK_MESS_ERR, 'No DB extensions'];
}
// доступность папок на запись
@ -123,7 +123,7 @@ class Install extends Admin
foreach ($folders as $folder) {
if (! \is_writable($folder)) {
$folder = \str_replace(\dirname($this->c->DIR_APP), '', $folder);
$this->fIswev = ['e', ['Alert folder %s', $folder]];
$this->fIswev = [FORK_MESS_ERR, ['Alert folder %s', $folder]];
}
}
@ -131,7 +131,7 @@ class Install extends Admin
$config = \file_get_contents($this->c->DIR_CONFIG . '/main.dist.php');
if (false === $config) {
$this->fIswev = ['e', 'No access to main.dist.php'];
$this->fIswev = [FORK_MESS_ERR, 'No access to main.dist.php'];
}
unset($config);
@ -140,20 +140,20 @@ class Install extends Admin
$langs = $this->c->Func->getNameLangs();
if (empty($langs)) {
$this->fIswev = ['e', 'No language packs'];
$this->fIswev = [FORK_MESS_ERR, 'No language packs'];
}
// стили
$styles = $this->c->Func->getStyles();
if (empty($styles)) {
$this->fIswev = ['e', 'No styles'];
$this->fIswev = [FORK_MESS_ERR, 'No styles'];
}
if (
'POST' === $method
&& ! $changeLang
&& empty($this->fIswev['e'])
&& empty($this->fIswev[FORK_MESS_ERR])
) { //????
$v = $this->c->Validator->reset()
->addValidators([

View file

@ -24,9 +24,9 @@ class Providers extends Admin
protected function mDisabled(): void
{
if (! \extension_loaded('curl')) {
$this->fIswev = ['e', 'cURL disabled'];
$this->fIswev = [FORK_MESS_ERR, 'cURL disabled'];
} elseif (1 !== $this->c->config->b_oauth_allow) {
$this->fIswev = ['w', ['OAuth authorization disabled', $this->c->Router->link('AdminOptions', ['#' => 'id-fs-registration'])]];
$this->fIswev = [FORK_MESS_WARN, ['OAuth authorization disabled', $this->c->Router->link('AdminOptions', ['#' => 'id-fs-registration'])]];
}
}

View file

@ -84,10 +84,10 @@ class Update extends Admin
protected function returnMaintenance(bool $isStage = true): Page
{
$maintenance = $this->c->Maintenance;
$maintenance->fIswev = ['w', 'Update script is running'];
$maintenance->fIswev = [FORK_MESS_WARN, 'Update script is running'];
if ($isStage) {
$maintenance->fIswev = ['e', 'Script runs error'];
$maintenance->fIswev = [FORK_MESS_ERR, 'Script runs error'];
}
return $maintenance;
@ -248,7 +248,7 @@ class Update extends Admin
$uid = $this->setLock();
if (null === $uid) {
$this->fIswev = ['e', 'Unable to write update lock'];
$this->fIswev = [FORK_MESS_ERR, 'Unable to write update lock'];
} else {
$this->c->config->o_maintenance_message = $v->o_maintenance_message;

View file

@ -86,7 +86,7 @@ abstract class Users extends Admin
});
if (! empty($bad)) {
$this->fIswev = ['v', 'Action not available'];
$this->fIswev = [FORK_MESS_VLD, 'Action not available'];
return false;
}
@ -102,16 +102,16 @@ abstract class Users extends Admin
switch ($action) {
case self::ACTION_BAN:
if ($this->c->bans->banFromName($user->username) > 0) {
$this->fIswev = ['i', ['User is ban', $user->username]];
$this->fIswev = [FORK_MESS_INFO, ['User is ban', $user->username]];
return false;
}
if (! $this->c->userRules->canBanUser($user)) {
$this->fIswev = ['v', ['You are not allowed to ban the %s', $user->username]];
$this->fIswev = [FORK_MESS_VLD, ['You are not allowed to ban the %s', $user->username]];
if ($user->isAdmMod) {
$this->fIswev = ['i', 'No ban admins message'];
$this->fIswev = [FORK_MESS_INFO, 'No ban admins message'];
}
return false;
@ -120,10 +120,10 @@ abstract class Users extends Admin
break;
case self::ACTION_DEL:
if (! $this->c->userRules->canDeleteUser($user)) {
$this->fIswev = ['v', ['You are not allowed to delete the %s', $user->username]];
$this->fIswev = [FORK_MESS_VLD, ['You are not allowed to delete the %s', $user->username]];
if ($user->isAdmMod) {
$this->fIswev = ['i', 'No delete admins message'];
$this->fIswev = [FORK_MESS_INFO, 'No delete admins message'];
}
return false;
@ -132,10 +132,10 @@ abstract class Users extends Admin
break;
case self::ACTION_CHG:
if (! $this->c->userRules->canChangeGroup($user, $profile)) {
$this->fIswev = ['v', ['You are not allowed to change group for %s', $user->username]];
$this->fIswev = [FORK_MESS_VLD, ['You are not allowed to change group for %s', $user->username]];
if ($user->isAdmin) {
$this->fIswev = ['i', 'No move admins message'];
$this->fIswev = [FORK_MESS_INFO, 'No move admins message'];
}
return false;
@ -143,7 +143,7 @@ abstract class Users extends Admin
break;
default:
$this->fIswev = ['v', 'Action not available'];
$this->fIswev = [FORK_MESS_VLD, 'Action not available'];
return false;
}
@ -151,12 +151,12 @@ abstract class Users extends Admin
$result[] = $user->id;
if ($user->id === $this->user->id) {
$this->fIswev = ['i', 'You are trying to change your own group'];
$this->fIswev = [FORK_MESS_INFO, 'You are trying to change your own group'];
}
}
if (empty($result)) {
$this->fIswev = ['v', 'No users selected'];
$this->fIswev = [FORK_MESS_VLD, 'No users selected'];
return false;
}

View file

@ -45,7 +45,7 @@ class Result extends Users
if (0 == $number) {
$view = $this->c->AdminUsers;
$view->fIswev = ['i', 'No users found'];
$view->fIswev = [FORK_MESS_INFO, 'No users found'];
return $view->view([], 'GET', $data);
}
@ -96,7 +96,7 @@ class Result extends Users
) {
$action = self::ACTION_CHG;
} else {
$this->fIswev = ['v', 'Action not available'];
$this->fIswev = [FORK_MESS_VLD, 'Action not available'];
}
if (empty($this->fIswev)) {
@ -231,7 +231,7 @@ class Result extends Users
$usedLike
&& ! $this->c->config->insensitive()
) {
$this->fIswev = ['i', 'The search may be case sensitive'];
$this->fIswev = [FORK_MESS_INFO, 'The search may be case sensitive'];
}
return $this->c->users->filter($filters, $order);

View file

@ -40,7 +40,7 @@ class Stat extends Users
$user = $this->c->users->load($args['id']);
if (0 == $number) {
$this->fIswev = ['i', 'Results no posts found'];
$this->fIswev = [FORK_MESS_INFO, 'Results no posts found'];
}
$this->nameTpl = 'admin/users_result';

View file

@ -52,7 +52,7 @@ class View extends Users
$ip = \filter_var($v->ip, \FILTER_VALIDATE_IP);
if (false === $ip) {
$this->fIswev = ['v', 'Bad IP message'];
$this->fIswev = [FORK_MESS_VLD, 'Bad IP message'];
$data = $v->getData();
} else {
return $this->c->Redirect->page('AdminUsersResult', ['data' => $this->encodeData($ip)]);

View file

@ -221,7 +221,7 @@ class Auth extends Page
) {
$v->addError('Wrong user/pass');
} elseif ($this->userAfterLogin->isUnverified) {
$v->addError('Account is not activated', 'w');
$v->addError('Account is not activated', FORK_MESS_WARN);
} elseif (
$this->loginWithForm
&& ! \password_verify($password, $this->userAfterLogin->password)
@ -439,7 +439,7 @@ class Auth extends Page
$this->c->users->update($user);
$this->fIswev = ['s', 'Pass updated'];
$this->fIswev = [FORK_MESS_SUCC, 'Pass updated'];
$this->c->Log->info('Passphrase reset: ok', [
'user' => $user->fLog(),
@ -465,7 +465,7 @@ class Auth extends Page
$this->c->users->update($user);
$this->fIswev = ['i', 'Account activated'];
$this->fIswev = [FORK_MESS_INFO, 'Account activated'];
$this->c->Log->info('Account activation: ok', [
'user' => $user->fLog(),

View file

@ -55,7 +55,7 @@ class Email extends Page
$floodSize = $floodSize < $this->user->g_email_flood ? $this->user->g_email_flood - $floodSize : 0;
if ($floodSize > 0) {
$this->fIswev = ['e', ['Flood message', $floodSize]];
$this->fIswev = [FORK_MESS_ERR, ['Flood message', $floodSize]];
}
$data = [

View file

@ -56,7 +56,7 @@ class Forum extends Page
$this->crumbs = $this->crumbs($forum);
if (empty($this->topics)) {
$this->fIswev = ['i', 'Empty forum'];
$this->fIswev = [FORK_MESS_INFO, 'Empty forum'];
} elseif (
$this->user->isAdmin
|| $this->user->isModerator($forum)

View file

@ -43,7 +43,7 @@ class Index extends Page
$ctgs = [];
if (empty($forums)) {
$this->fIswev = ['i', 'Empty board'];
$this->fIswev = [FORK_MESS_INFO, 'Empty board'];
} else {
foreach ($forums as $forum) {
$ctgs[$forum->cat_id][] = $forum;

View file

@ -32,7 +32,7 @@ class Maintenance extends Page
$this->header('Retry-After', '3600');
# $this->fIswev = ['i', $this->c->config->o_maintenance_message];
# $this->fIswev = [FORK_MESS_INFO, $this->c->config->o_maintenance_message];
}
/**

View file

@ -34,13 +34,13 @@ class Message extends Page
}
if ($status < 200) {
$type = 'i';
$type = FORK_MESS_INFO;
} elseif ($status < 300) {
$type = 's';
$type = FORK_MESS_SUCC;
} elseif ($status < 400) {
$type = 'w';
$type = FORK_MESS_WARN;
} else {
$type = 'e';
$type = FORK_MESS_ERR;
}
if (

View file

@ -43,7 +43,7 @@ abstract class AbstractPM extends Page
$this->crumbs = $this->crumbs(...$this->pmCrumbs);
if (1 !== $this->user->u_pm) {
$this->fIswev = ['w', 'PM off'];
$this->fIswev = [FORK_MESS_WARN, 'PM off'];
}
parent::prepare();

View file

@ -76,15 +76,15 @@ class PMPost extends AbstractPM
}
if ($topic->closed) {
$this->fIswev = ['e', 'Dialogue is closed'];
$this->fIswev = [FORK_MESS_ERR, 'Dialogue is closed'];
} elseif (2 === $topic->blockStatus) {
$this->fIswev = ['e', 'You block addr'];
$this->fIswev = [FORK_MESS_ERR, 'You block addr'];
} elseif (1 === $topic->blockStatus) {
$this->fIswev = ['e', 'Addr block you'];
$this->fIswev = [FORK_MESS_ERR, 'Addr block you'];
} elseif (! $topic->actionsAllowed) {
$this->fIswev = ['e', 'Target group pm off'];
$this->fIswev = [FORK_MESS_ERR, 'Target group pm off'];
} elseif (! $topic->canReply) {
$this->fIswev = ['e', 'Target pm off'];
$this->fIswev = [FORK_MESS_ERR, 'Target pm off'];
}
$this->c->Lang->load('post');
@ -102,19 +102,19 @@ class PMPost extends AbstractPM
$this->targetUser->g_pm_limit > 0
&& $this->targetUser->u_pm_num_all >= $this->targetUser->g_pm_limit
) {
$this->fIswev = ['e', 'Target is full'];
$this->fIswev = [FORK_MESS_ERR, 'Target is full'];
} elseif (
$this->user->g_pm_limit > 0
&& $this->user->u_pm_num_all >= $this->user->g_pm_limit
) {
$this->fIswev = ['e', 'Active is full'];
$this->fIswev = [FORK_MESS_ERR, 'Active is full'];
}
} elseif (null !== $v->archive) {
if (
$this->user->g_pm_limit > 0
&& $this->pms->totalArchive >= $this->user->g_pm_limit
) {
$this->fIswev = ['e', 'Archive is full'];
$this->fIswev = [FORK_MESS_ERR, 'Archive is full'];
}
}
}
@ -123,7 +123,7 @@ class PMPost extends AbstractPM
$args['_vars'] = $v->getData();
if (
empty($this->fIswev['e'])
empty($this->fIswev[FORK_MESS_ERR])
&& $isValid
&& null === $v->preview
&& (

View file

@ -90,7 +90,7 @@ trait PostValidatorTrait
$time = \time() - $last;
if ($time < $this->user->g_post_flood) {
$v->addError(['Flood message', $this->user->g_post_flood - $time], 'e');
$v->addError(['Flood message', $this->user->g_post_flood - $time], FORK_MESS_ERR);
}
return $submit;

View file

@ -60,7 +60,7 @@ class OAuth extends Profile
$data = $this->c->providerUser->loadUserData($this->curUser);
if (0 === \count($data)) {
$this->fIswev = ['i', 'No linked accounts'];
$this->fIswev = [FORK_MESS_INFO, 'No linked accounts'];
return [];
}

View file

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

View file

@ -91,7 +91,7 @@ class RegLog extends Page
|| $this->c->users->loadByEmail($provider->userEmail) instanceof User
) {
$auth = $this->c->Auth;
$auth->fIswev = ['i', ['Email message', __($provider->name)]];
$auth->fIswev = [FORK_MESS_INFO, ['Email message', __($provider->name)]];
return $auth->forget([], 'GET', $provider->userEmail);
}

View file

@ -45,7 +45,7 @@ class Register extends Page
'password' => 'Passphrase',
])->addMessages([
'agree.required' => ['cancel', 'cancel'],
'agree.token' => ['w', ['Bad agree', $this->c->Router->link('Register')]],
'agree.token' => [FORK_MESS_WARN, ['Bad agree', $this->c->Router->link('Register')]],
'password.password' => 'Pass format',
'username.login' => 'Login format',
]);
@ -271,14 +271,14 @@ class Register extends Page
// форма сброса пароля
} else {
$auth = $this->c->Auth;
$auth->fIswev = ['w', ['Error welcom mail', $this->c->config->o_admin_email]];
$auth->fIswev = [FORK_MESS_WARN, ['Error welcom mail', $this->c->config->o_admin_email]];
return $auth->forget([], 'GET', $v->email);
}
// форма логина
} else {
$auth = $this->c->Auth;
$auth->fIswev = ['s', 'Reg complete'];
$auth->fIswev = [FORK_MESS_SUCC, 'Reg complete'];
return $auth->login([], 'GET', $v->username);
}
@ -341,14 +341,14 @@ class Register extends Page
// форма сброса пароля
} else {
$auth = $this->c->Auth;
$auth->fIswev = ['w', ['Error welcom mail', $this->c->config->o_admin_email]];
$auth->fIswev = [FORK_MESS_WARN, ['Error welcom mail', $this->c->config->o_admin_email]];
return $auth->forget([], 'GET', $v->email);
}
// форма логина
} else {
$auth = $this->c->Auth;
$auth->fIswev = ['s', 'Reg complete'];
$auth->fIswev = [FORK_MESS_SUCC, 'Reg complete'];
return $auth->login([], 'GET', $v->username);
}
@ -385,7 +385,7 @@ class Register extends Page
$this->c->Lang->load('register');
$auth = $this->c->Auth;
$auth->fIswev = ['s', 'Reg complete'];
$auth->fIswev = [FORK_MESS_SUCC, 'Reg complete'];
return $auth->login([], 'GET', $user->username);
}

View file

@ -37,7 +37,7 @@ class Report extends Page
$floodSize = \time() - (int) $this->user->last_report_sent;
$floodSize = $floodSize < $this->user->g_report_flood ? $this->user->g_report_flood - $floodSize : 0;
if ($floodSize > 0) {
$this->fIswev = ['e', ['Flood message', $floodSize]];
$this->fIswev = [FORK_MESS_ERR, ['Flood message', $floodSize]];
}
$data = [];
@ -97,7 +97,7 @@ class Report extends Page
}
if (false === $result && 1 === $this->c->config->i_report_method) {
$this->fIswev = ['e', ['Error mail', $this->c->config->o_admin_email]];
$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');
}

View file

@ -136,7 +136,7 @@ class Search extends Page
}
if (! $this->c->config->insensitive()) {
$this->fIswev = ['i', 'The search may be case sensitive'];
$this->fIswev = [FORK_MESS_INFO, 'The search may be case sensitive'];
}
$this->fIndex = 'search';
@ -338,7 +338,7 @@ class Search extends Page
$flood = false;
if (empty($search->queryIds)) {
$v->addError('No hits', 'i');
$v->addError('No hits', FORK_MESS_INFO);
}
if (
@ -521,7 +521,7 @@ class Search extends Page
if (false === $list) {
return $this->c->Message->message('Bad request');
} elseif (empty($list)) {
$this->fIswev = ['i', 'No hits'];
$this->fIswev = [FORK_MESS_INFO, 'No hits'];
return $this->view([], 'GET', true);
}

View file

@ -92,7 +92,7 @@ class Userlist extends Page
\preg_match('%[\x80-\xFF]%', $v->name)
&& ! $this->c->config->insensitive()
) {
$this->fIswev = ['i', 'The search may be case sensitive'];
$this->fIswev = [FORK_MESS_INFO, 'The search may be case sensitive'];
}
}
@ -146,7 +146,7 @@ class Userlist extends Page
$this->startNum = 0;
$this->userList = null;
$this->links = [null, null, null, null, null, null];
$this->fIswev = ['i', 'No users found'];
$this->fIswev = [FORK_MESS_INFO, 'No users found'];
}
$this->fIndex = self::FI_USERS;

View file

@ -120,7 +120,7 @@ class Email extends RulesValidator
}
if ($flood < $this->c->FLOOD_INTERVAL) {
$v->addError(['Account email flood', (int) (($this->c->FLOOD_INTERVAL - $flood) / 60)], 'e');
$v->addError(['Account email flood', (int) (($this->c->FLOOD_INTERVAL - $flood) / 60)], FORK_MESS_ERR);
$ok = false;
}
}

View file

@ -77,7 +77,7 @@
<div class="f-hcell f-clast">{!! __('Last post') !!}</div>
</li>
@foreach ($p->topics as $id => $topic)
@if (empty($topic->id) && $iswev = ['e' => [['Topic %s was not found in the database', $id]]])
@if (empty($topic->id) && $iswev = [FORK_MESS_ERR => [['Topic %s was not found in the database', $id]]])
<li id="topic-{{ $id }}" class="f-row">
@include ('layouts/iswev')
</li>

View file

@ -30,7 +30,7 @@
</div>
</section>
@endif
@if (! $p->fIswev['e'])
@if (! $p->fIswev[FORK_MESS_ERR])
@if ($form = $p->form2)
<section class="f-install">
<h2>{!! __(['Install', $p->rev]) !!}</h2>

View file

@ -1,49 +1,49 @@
<aside class="f-iswev-wrap">
@if ($iswev['i'])
@if ($iswev[FORK_MESS_INFO])
<div class="f-iswev f-info">
<p class="f-sim-header">Info message:</p>
<ul>
@foreach ($iswev['i'] as $cur)
@foreach ($iswev[FORK_MESS_INFO] as $cur)
<li class="f-icontent">{!! __($cur) !!}</li>
@endforeach
</ul>
</div>
@endif
@if ($iswev['s'])
@if ($iswev[FORK_MESS_SUCC])
<div class="f-iswev f-success">
<p class="f-sim-header">Successful operation message:</p>
<ul>
@foreach ($iswev['s'] as $cur)
@foreach ($iswev[FORK_MESS_SUCC] as $cur)
<li class="f-scontent">{!! __($cur) !!}</li>
@endforeach
</ul>
</div>
@endif
@if ($iswev['w'])
@if ($iswev[FORK_MESS_WARN])
<div class="f-iswev f-warning">
<p class="f-sim-header">Warning message:</p>
<ul>
@foreach ($iswev['w'] as $cur)
@foreach ($iswev[FORK_MESS_WARN] as $cur)
<li class="f-wcontent">{!! __($cur) !!}</li>
@endforeach
</ul>
</div>
@endif
@if ($iswev['e'])
@if ($iswev[FORK_MESS_ERR])
<div class="f-iswev f-error">
<p class="f-sim-header">Error message:</p>
<ul>
@foreach ($iswev['e'] as $cur)
@foreach ($iswev[FORK_MESS_ERR] as $cur)
<li class="f-econtent">{!! __($cur) !!}</li>
@endforeach
</ul>
</div>
@endif
@if ($iswev['v'])
@if ($iswev[FORK_MESS_VLD])
<div class="f-iswev f-validation">
<p class="f-sim-header">Validation message:</p>
<ul>
@foreach ($iswev['v'] as $cur)
@foreach ($iswev[FORK_MESS_VLD] as $cur)
<li class="f-vcontent">{!! __($cur) !!}</li>
@endforeach
</ul>

View file

@ -1,7 +1,7 @@
@extends ('layouts/pm')
<section id="fork-pm-bl" class="f-pm f-pm-bl-list @empty ($p->blockList) f-pm-bl-empty @endempty">
<h2>{!! __('Blocked users title') !!}</h2>
@if (empty($p->blockList) && $iswev = ['i' => ['No blocked users']])
@if (empty($p->blockList) && $iswev = [FORK_MESS_INFO => ['No blocked users']])
@include ('layouts/iswev')
@else
<div>

View file

@ -41,7 +41,7 @@
<section id="fork-topic" class="f-pm f-pmtopic">
<h2>{{ $p->model->name }}</h2>
@foreach ($p->posts as $id => $post)
@if (empty($post->id) && $iswev = ['e' => [['Message %s was not found in the database', $id]]])
@if (empty($post->id) && $iswev = [FORK_MESS_ERR => [['Message %s was not found in the database', $id]]])
@include ('layouts/iswev')
@else
<article id="p{{ $post->id }}" class="f-post @if (1 == $post->user->gender) f-user-male @elseif (2 == $post->user->gender) f-user-female @endif @if ($post->user->online) f-user-online @endif @if (1 === $post->postNumber) f-post-first @endif">

View file

@ -29,7 +29,7 @@
@endif
<section id="fork-forum" class="f-pm f-pmview @empty ($p->pmList) f-pm-empty @endempty">
<h2>{!! __($p->title) !!}</h2>
@if (empty($p->pmList) && $iswev = ['i' => ['Info zero']])
@if (empty($p->pmList) && $iswev = [FORK_MESS_INFO => ['Info zero']])
@include ('layouts/iswev')
@else
<div class="f-ftlist">
@ -40,7 +40,7 @@
<div class="f-hcell f-clast">{!! __('Last post') !!}</div>
</li>
@foreach ($p->pmList as $id => $topic)
@if (empty($topic->id) && $iswev = ['e' => [['Dialogue %s was not found in the database', $id]]])
@if (empty($topic->id) && $iswev = [FORK_MESS_ERR => [['Dialogue %s was not found in the database', $id]]])
<li id="ptopic-{{ $id }}" class="f-row">
@include ('layouts/iswev')
</li>

View file

@ -48,7 +48,7 @@
<section id="fork-topic" class="f-main">
<h2>{!! __('Post list') !!}</h2>
@foreach ($p->posts as $id => $post)
@if (empty($post->id) && $iswev = ['e' => [['Message %s was not found in the database', $id]]])
@if (empty($post->id) && $iswev = [FORK_MESS_ERR => [['Message %s was not found in the database', $id]]])
@include ('layouts/iswev')
@else
<article id="p{{ $post->id }}" class="f-post @if (1 == $post->user->gender) f-user-male @elseif (2 == $post->user->gender) f-user-female @endif @if ($post->user->online) f-user-online @endif @if (1 === $post->postNumber) f-post-first @endif">

View file

@ -35,7 +35,7 @@
<section id="fork-topic-ins" class="f-main">
<h2>{!! __('Post list') !!}</h2>
@foreach ($p->posts as $id => $post)
@if (empty($post->id) && $iswev = ['e' => [['Message %s was not found in the database', $id]]])
@if (empty($post->id) && $iswev = [FORK_MESS_ERR => [['Message %s was not found in the database', $id]]])
@include ('layouts/iswev')
@else
<article id="p{{ $post->id }}" class="f-post f-post-search @if (1 == $post->user->gender) f-user-male @elseif (2 == $post->user->gender) f-user-female @endif @if ($post->user->online) f-user-online @endif">