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, 2 insertions, 5 deletions
diff --git a/apps/gallery/ajax/thumbnail.php b/apps/gallery/ajax/thumbnail.php
index db428eeff34..f24782390f6 100644
--- a/apps/gallery/ajax/thumbnail.php
+++ b/apps/gallery/ajax/thumbnail.php
@@ -1,5 +1,7 @@
<?php
require_once('../../../lib/base.php');
+OC_JSON::checkLoggedIn();
+OC_JSON::checkAppEnabled('gallery');
function CroppedThumbnail($imgSrc,$thumbnail_width,$thumbnail_height) { //$imgSrc is a FILE - Returns an image resource.
//getting the image dimensions
@@ -40,11 +42,6 @@ function CroppedThumbnail($imgSrc,$thumbnail_width,$thumbnail_height) { //$imgSr
return $thumb;
}
-// Check if we are a user
-if( !OC_User::isLoggedIn()){
- echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => 'You need to log in.')));
- exit();
-}
$box_size = 200;
$img = $_GET['img'];