Visman před 7 roky
rodič
revize
938c240113
2 změnil soubory, kde provedl 12 přidání a 0 odebrání
  1. 3 0
      app/Models/Post/Load.php
  2. 9 0
      app/Models/Post/Model.php

+ 3 - 0
app/Models/Post/Load.php

@@ -48,6 +48,9 @@ class Load extends Action
         foreach ($args as $aliases => $model) {
         foreach ($args as $aliases => $model) {
             $attrs = [];
             $attrs = [];
             foreach (explode('.', $aliases) as $alias) {
             foreach (explode('.', $aliases) as $alias) {
+                if (empty($this->aliases[$alias])) {
+                    continue;
+                }
                 foreach ($this->aliases[$alias] as $key => $repl) {
                 foreach ($this->aliases[$alias] as $key => $repl) {
                     $name = true === $repl ? $key : $repl;
                     $name = true === $repl ? $key : $repl;
                     $attrs[$name] = $data[$key];
                     $attrs[$name] = $data[$key];

+ 9 - 0
app/Models/Post/Model.php

@@ -99,6 +99,15 @@ class Model extends DataModel
         return $this->c->config->o_signatures == '1' && $this->c->user->show_sig == '1';
         return $this->c->config->o_signatures == '1' && $this->c->user->show_sig == '1';
     }
     }
 
 
+    /**
+     * Статус показа количества сообщений
+     *
+     * @return bool
+     */
+    protected function getshowPostCount()
+    {
+        return $this->showUserInfo && $this->c->config->o_show_post_count == '1';
+    }
 
 
     protected function getcanReport()
     protected function getcanReport()
     {
     {