X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fattachment_thumbnail.php;h=e8f89ffc360d45c505aefd5198e4927e9b04a8ec;hb=1635d459ec1988104f28f3346c45ee5aebbfcc1a;hp=484e5f00f273853e393da06ae6390f152c5ae80f;hpb=ce8389443bb1b857afe8c05657a951f3916092a9;p=quix0rs-gnu-social.git diff --git a/actions/attachment_thumbnail.php b/actions/attachment_thumbnail.php index 484e5f00f2..e8f89ffc36 100644 --- a/actions/attachment_thumbnail.php +++ b/actions/attachment_thumbnail.php @@ -44,18 +44,16 @@ class Attachment_thumbnailAction extends AttachmentAction protected $thumb_h = null; // max height protected $thumb_c = null; // crop? - protected function prepare(array $args=array()) + protected function doPreparation() { - parent::prepare($args); + parent::doPreparation(); $this->thumb_w = $this->int('w'); $this->thumb_h = $this->int('h'); $this->thumb_c = $this->boolean('c'); - - return true; } - function showPage() + public function showPage() { // Returns a File_thumbnail object or throws exception if not available try { @@ -64,6 +62,6 @@ class Attachment_thumbnailAction extends AttachmentAction common_redirect($e->file->getUrl()); } - common_redirect($thumbnail->getUrl()); + common_redirect(File_thumbnail::url($thumbnail->filename)); } }