瀏覽代碼

Minor fixes

Use a shorter path to the current user
Visman 4 年之前
父節點
當前提交
3fcf2b1068
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      app/Models/Pages/Admin/Bans.php
  2. 1 1
      app/Models/Pages/Profile/Edit.php

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

@@ -517,7 +517,7 @@ class Bans extends Admin
             ];
             ];
             $fields["l{$number}-creator"] = [
             $fields["l{$number}-creator"] = [
                 'class'   => ['result', 'creator'],
                 'class'   => ['result', 'creator'],
-                'type'    => '1' == $this->c->user->g_view_users && $ban['id_creator'] > 1 ? 'link' : 'str',
+                'type'    => '1' == $this->user->g_view_users && $ban['id_creator'] > 1 ? 'link' : 'str',
                 'caption' => __('Results banned by head'),
                 'caption' => __('Results banned by head'),
                 'value'   => $ban['name_creator'],
                 'value'   => $ban['name_creator'],
                 'href'    => $this->c->Router->link(
                 'href'    => $this->c->Router->link(

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

@@ -173,7 +173,7 @@ class Edit extends Profile
                 $v->addError('Signature has too many lines');
                 $v->addError('Signature has too many lines');
             // текст сообщения только заглавными буквами
             // текст сообщения только заглавными буквами
             } elseif (
             } elseif (
-                ! $this->c->user->isAdmin
+                ! $this->user->isAdmin
                 && '0' == $this->c->config->p_sig_all_caps
                 && '0' == $this->c->config->p_sig_all_caps
                 && \preg_match('%\p{Lu}%u', $signature)
                 && \preg_match('%\p{Lu}%u', $signature)
                 && ! \preg_match('%\p{Ll}%u', $signature)
                 && ! \preg_match('%\p{Ll}%u', $signature)