diff options
Diffstat (limited to 'apps/gallery')
-rw-r--r-- | apps/gallery/ajax/createAlbum.php | 2 | ||||
-rw-r--r-- | apps/gallery/ajax/galleryOp.php | 2 | ||||
-rw-r--r-- | apps/gallery/ajax/sharing.php | 2 | ||||
-rw-r--r-- | apps/gallery/ajax/thumbnail.php | 2 | ||||
-rw-r--r-- | apps/gallery/index.php | 2 | ||||
-rw-r--r-- | apps/gallery/lib/album.php | 2 | ||||
-rw-r--r-- | apps/gallery/lib/images_utils.php | 2 | ||||
-rw-r--r-- | apps/gallery/sharing.php | 2 |
8 files changed, 8 insertions, 8 deletions
diff --git a/apps/gallery/ajax/createAlbum.php b/apps/gallery/ajax/createAlbum.php index 152f5834bcb..ca02c3ae209 100644 --- a/apps/gallery/ajax/createAlbum.php +++ b/apps/gallery/ajax/createAlbum.php @@ -21,7 +21,7 @@ * */ -require_once('../../../lib/base.php'); + OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('gallery'); diff --git a/apps/gallery/ajax/galleryOp.php b/apps/gallery/ajax/galleryOp.php index 1b3ad48f561..98cf71ec14f 100644 --- a/apps/gallery/ajax/galleryOp.php +++ b/apps/gallery/ajax/galleryOp.php @@ -22,7 +22,7 @@ */ header('Content-type: text/html; charset=UTF-8') ; -require_once('../../../lib/base.php'); + OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('gallery'); diff --git a/apps/gallery/ajax/sharing.php b/apps/gallery/ajax/sharing.php index fba85fa34ee..ce56d652c60 100644 --- a/apps/gallery/ajax/sharing.php +++ b/apps/gallery/ajax/sharing.php @@ -21,7 +21,7 @@ * */ -require_once('../../../lib/base.php'); + if (!isset($_GET['token']) || !isset($_GET['operation'])) { OC_JSON::error(array('cause' => 'Not enought arguments')); diff --git a/apps/gallery/ajax/thumbnail.php b/apps/gallery/ajax/thumbnail.php index 184171f8fca..bf42fd2becb 100644 --- a/apps/gallery/ajax/thumbnail.php +++ b/apps/gallery/ajax/thumbnail.php @@ -21,7 +21,7 @@ * */ -require_once('../../../lib/base.php'); + OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('gallery'); diff --git a/apps/gallery/index.php b/apps/gallery/index.php index 7de7c094142..8c45cfb19fc 100644 --- a/apps/gallery/index.php +++ b/apps/gallery/index.php @@ -21,7 +21,7 @@ * */ -require_once('../../lib/base.php'); + OC_Util::checkLoggedIn(); OC_Util::checkAppEnabled('gallery'); diff --git a/apps/gallery/lib/album.php b/apps/gallery/lib/album.php index ef361a37913..efc545f0205 100644 --- a/apps/gallery/lib/album.php +++ b/apps/gallery/lib/album.php @@ -92,7 +92,7 @@ class OC_Gallery_Album { } public static function changeThumbnailPath($oldname, $newname) { - require_once('../../../lib/base.php'); + $thumbpath = OC::$CONFIG_DATADIRECTORY.'/../gallery/'; rename($thumbpath.$oldname.'.png', $thumbpath.$newname.'.png'); } diff --git a/apps/gallery/lib/images_utils.php b/apps/gallery/lib/images_utils.php index 126298913be..6f3959a342d 100644 --- a/apps/gallery/lib/images_utils.php +++ b/apps/gallery/lib/images_utils.php @@ -22,7 +22,7 @@ */ if (file_exists('../../../lib/base.php')) - require_once('../../../lib/base.php'); + elseif (file_exists('lib/base.php')) require_once('lib/base.php'); diff --git a/apps/gallery/sharing.php b/apps/gallery/sharing.php index d7430becf43..2739f63d4e0 100644 --- a/apps/gallery/sharing.php +++ b/apps/gallery/sharing.php @@ -25,7 +25,7 @@ if (!isset($_GET['token']) || empty($_GET['token'])) { exit; } -require_once('../../lib/base.php'); + OC_Util::checkAppEnabled('gallery'); |