Kaynağa Gözat

Minor change

Visman 3 yıl önce
ebeveyn
işleme
24a0cf8bb3

+ 1 - 1
app/Models/StopwordList/StopwordList.php

@@ -83,7 +83,7 @@ class StopwordList extends Model
         }
 
         // Tidy up and filter the stopwords
-        $stopwords = \array_map('trim', $stopwords);
+        $stopwords = \array_map('\\trim', $stopwords);
         $stopwords = \array_filter($stopwords);
         $stopwords = \array_flip($stopwords);
 

+ 3 - 13
app/Models/Topic/Topic.php

@@ -417,16 +417,6 @@ class Topic extends DataModel
         } else {
             $this->page = (int) \ceil($result['pnum'] / $this->c->user->disp_posts);
         }
-/*
-        $query = 'SELECT COUNT(p.id) AS num
-            FROM ::posts AS p
-            INNER JOIN ::posts AS j ON (j.topic_id=?i:tid AND j.id=?i:pid)
-            WHERE p.topic_id=?i:tid AND p.id<?i:pid'; //???? может на два запроса разбить?
-
-        $result = $this->c->DB->query($query, $vars)->fetch();
-
-        $this->page = empty($result) ? null : (int) \ceil(($result['num'] + 1) / $this->c->user->disp_posts);
-*/
     }
 
     /**
@@ -470,15 +460,15 @@ class Topic extends DataModel
         $flag = false;
 
         if (false !== $this->hasNew) {
-            $flag = true;
+            $flag           = true;
             $vars[':visit'] = $this->last_post;
         }
         if (
             false !== $this->hasUnread
             && $this->timeMax > $this->hasUnread
         ) {
-            $flag = true;
-            $vars[':read'] = $this->timeMax;
+            $flag           = true;
+            $vars[':read']  = $this->timeMax;
             $vars[':visit'] = $this->last_post;
         }