diff options
author | Bartek Przybylski <bart.p.pl@gmail.com> | 2012-06-07 00:20:56 +0400 |
---|---|---|
committer | Bartek Przybylski <bart.p.pl@gmail.com> | 2012-06-10 15:16:06 +0400 |
commit | 276aefba818f4c8083360d3a358d124e9f8f1bae (patch) | |
tree | 6f80776bb4ab3e1798710b5b15dd30a26e5a29ea /apps | |
parent | 71b4cddd5271ba30365640c5631e19228c266048 (diff) |
hack for file download
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gallery/lib/tiles.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/gallery/lib/tiles.php b/apps/gallery/lib/tiles.php index c2d7fede786..3805b6dd25c 100644 --- a/apps/gallery/lib/tiles.php +++ b/apps/gallery/lib/tiles.php @@ -96,7 +96,9 @@ class TileSingle extends TileBase { } public function get($extra = '') { - return '<a rel="images" href="?app=files&getfile=download.php?file='.urlencode($this->getPath()).'"><img rel="images" src="'.GET_THUMBNAIL_PATH.urlencode($this->getPath()).'" '.$extra.'></a>'; + // !HACK! file path needs to be encoded twice because files app decode twice url, so any special chars like + or & in filename + // !HACK! will result in failing of opening them + return '<a rel="images" href="?app=files&getfile=download.php?file='.urlencode(urlencode($this->getPath())).'"><img rel="images" src="'.GET_THUMBNAIL_PATH.urlencode($this->getPath()).'" '.$extra.'></a>'; } public function getMiniatureSrc() { |