diff options
author | Bart Visscher <bartv@thisnet.nl> | 2011-10-06 21:22:01 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2011-10-06 21:22:01 +0200 |
commit | b0847a61f52b8056365d26b52d23dddab329b62d (patch) | |
tree | e7dbae23e5b7ff6d4388704c4e846bfb6c6e16df /apps/gallery/ajax/thumbnail.php | |
parent | 4786ed321e802f8a63cff2bc4cb36461a3385971 (diff) | |
download | nextcloud-server-b0847a61f52b8056365d26b52d23dddab329b62d.tar.gz nextcloud-server-b0847a61f52b8056365d26b52d23dddab329b62d.zip |
Start using OC_JSON in gallery app
Diffstat (limited to 'apps/gallery/ajax/thumbnail.php')
-rw-r--r-- | apps/gallery/ajax/thumbnail.php | 7 |
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']; |