summaryrefslogtreecommitdiffstats
path: root/apps/gallery/ajax/thumbnail.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gallery/ajax/thumbnail.php')
-rw-r--r--apps/gallery/ajax/thumbnail.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/gallery/ajax/thumbnail.php b/apps/gallery/ajax/thumbnail.php
index ff0cb44022c..4fc9eba992d 100644
--- a/apps/gallery/ajax/thumbnail.php
+++ b/apps/gallery/ajax/thumbnail.php
@@ -20,14 +20,15 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
-
OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('gallery');
+require_once('apps/gallery/lib/managers.php');
+
-$img = $_GET['img'];
+$img = $_GET['filepath'];
-$image = OC_Gallery_Photo::getThumbnail($img);
+$image = \OC\Pictures\ThumbnailsManager::getInstance()->getThumbnail($img);
if ($image) {
OCP\Response::enableCaching(3600 * 24); // 24 hour
$image->show();