diff options
author | Bartek Przybylski <bart.p.pl@gmail.com> | 2012-06-06 22:20:56 +0200 |
---|---|---|
committer | Bartek Przybylski <bart.p.pl@gmail.com> | 2012-06-06 22:20:56 +0200 |
commit | a90089c79200c4665e28acb07215f08c2039c1a1 (patch) | |
tree | 4f7809deaed4f2c049b3ade0ecf80b1e11becab8 | |
parent | 7c88081acb3c7b4d3b88fe4d151fb10a200a9502 (diff) | |
download | nextcloud-server-a90089c79200c4665e28acb07215f08c2039c1a1.tar.gz nextcloud-server-a90089c79200c4665e28acb07215f08c2039c1a1.zip |
hack for file download
-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() { |