]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apitimelinetag.php
Less redundant code, please
[quix0rs-gnu-social.git] / actions / apitimelinetag.php
index b3f17d0712019c9578f92f5fd8aa6dccbfe4b0f2..632714551f95e6dc63d42a0dec8cdb7f0f03c6b0 100644 (file)
@@ -172,21 +172,12 @@ class ApiTimelineTagAction extends ApiPrivateAuthAction
      */
     function getNotices()
     {
-        $notices = array();
+        $notice = Notice_tag::getStream($this->tag)->getNotices(($this->page - 1) * $this->count,
+                                                                 $this->count + 1,
+                                                                 $this->since_id,
+                                                                 $this->max_id);
 
-        $notice = Notice_tag::getStream(
-            $this->tag,
-            ($this->page - 1) * $this->count,
-            $this->count + 1,
-            $this->since_id,
-            $this->max_id
-        );
-
-        while ($notice->fetch()) {
-            $notices[] = clone($notice);
-        }
-
-        return $notices;
+        return $notice->fetchAll();
     }
 
     /**