]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Redirect from Attachment_thumbnailAction
authorMikael Nordfeldth <mmn@hethane.se>
Mon, 21 Apr 2014 19:19:45 +0000 (21:19 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 21 Apr 2014 19:19:45 +0000 (21:19 +0200)
Noone should trust an <img/> tag delivered like that anyway.

actions/attachment_thumbnail.php

index 0353fa18ff7d1e165923942e9c0ad80d1a3c288d..b5173efa771dfca0969e4d118be7dee24b836d04 100644 (file)
@@ -61,24 +61,9 @@ class Attachment_thumbnailAction extends AttachmentAction
      * @return nothing
      */
     function showPage()
-    {
-        if (Event::handle('StartShowBody', array($this))) {
-            $this->showCore();
-            Event::handle('EndShowBody', array($this));
-        }
-    }
-
-    /**
-     * Show core.
-     *
-     * Shows local navigation, content block and aside.
-     *
-     * @return nothing
-     */
-    function showCore()
     {
         // Returns a File_thumbnail object or throws exception if not available
         $thumbnail = $this->attachment->getThumbnail($this->thumb_w, $this->thumb_h, $this->thumb_c);
-        $this->element('img', array('src' => $thumbnail->getUrl(), 'alt' => 'Thumbnail'));
+        common_redirect($thumbnail->getUrl());
     }
 }