]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/tag.php
Refactored new sections code to proper classes and added notice link to links in...
[quix0rs-gnu-social.git] / actions / tag.php
index 2202f9bb07041e713ced894331f3232795f84b23..47420e4c33c799ee83136f54f003e8116bc0dfcc 100644 (file)
@@ -49,17 +49,8 @@ class TagAction extends Action
     {
         $pop = new PopularNoticeSection($this);
         $pop->show();
-
-        $notice_tag = new Notice_tag;
-        $query = 'select file_id, count(file_id) as c from notice_tag join file_to_post on post_id = notice_id where tag="' . $notice_tag->escape($this->tag) . '" group by file_id order by c desc';
-        $notice_tag->query($query);
-        $this->elementStart('ol');
-        while ($notice_tag->fetch()) {
-            $this->elementStart('li');
-            $this->element('a', array('class' => 'attachment', 'href' => common_local_url('attachment', array('attachment' => $notice_tag->file_id))), "Attachment tagged {$notice_tag->c} times");
-            $this->elementEnd('li');
-        }
-        $this->elementEnd('ol');
+        $freqatt = new FrequentAttachmentSection($this);
+        $freqatt->show();
     }
 
     function title()