File_thumbnail->getUrl now gives Attachment_thumbnail action URL
That in turn redirects to the statically stored file.
This commit is contained in:
parent
4fc4f91b9e
commit
f6432fdf48
|
@ -62,6 +62,6 @@ class Attachment_thumbnailAction extends AttachmentAction
|
|||
common_redirect($e->file->getUrl());
|
||||
}
|
||||
|
||||
common_redirect($thumbnail->getUrl());
|
||||
common_redirect(File_thumbnail::url($thumbnail->filename));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -142,7 +142,11 @@ class File_thumbnail extends Managed_DataObject
|
|||
$this->url = null;
|
||||
$this->update($orig);
|
||||
}
|
||||
return self::url($this->filename);
|
||||
$url = common_local_url('attachment_thumbnail', array('attachment'=>$this->file_id));
|
||||
if (strpos($url, '?') === false) {
|
||||
$url .= '?';
|
||||
}
|
||||
return $url . http_build_query(array('w'=>$this->width, 'h'=>$this->height));
|
||||
}
|
||||
|
||||
// No local filename available, return the URL we have stored
|
||||
|
|
Loading…
Reference in New Issue
Block a user