From 6abe8f9e2e6e11304b22085157674023cd1c185b Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Wed, 6 Jun 2012 10:40:22 +0200 Subject: [PATCH] fixed wrong function call --- apps/gallery/ajax/galleryOp.php | 2 +- apps/gallery/ajax/sharing.php | 4 ++-- apps/gallery/lib/album.php | 2 +- apps/gallery/lib/photo.php | 2 +- apps/gallery/lib/scanner.php | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/gallery/ajax/galleryOp.php b/apps/gallery/ajax/galleryOp.php index b49e52f0bd2..7cbe3e46e21 100644 --- a/apps/gallery/ajax/galleryOp.php +++ b/apps/gallery/ajax/galleryOp.php @@ -42,7 +42,7 @@ function handleRemove($name) { function handleGetThumbnails($albumname) { OCP\Response::enableCaching(3600 * 24); // 24 hour - $view = OCP\App::getStorage('gallery'); + $view = OCP\Files::getStorage('gallery'); $thumbnail = $view->fopen(urldecode($albumname).'.png', 'r'); header('Content-Type: '.OC_Image::getMimeTypeForFile($thumbnail)); OCP\Response::sendFile($thumbnail); diff --git a/apps/gallery/ajax/sharing.php b/apps/gallery/ajax/sharing.php index 304757b9e91..7134d19e78a 100644 --- a/apps/gallery/ajax/sharing.php +++ b/apps/gallery/ajax/sharing.php @@ -80,7 +80,7 @@ function handleGetThumbnail($token, $imgpath) { function handleGetAlbumThumbnail($token, $albumname) { $owner = OC_Gallery_Sharing::getTokenOwner($token); - $view = OCP\App::getStorage('gallery'); + $view = OCP\Files::getStorage('gallery'); $file = $view->fopen($albumname.'.png', 'r'); $image = new OC_Image($file); if ($image->valid()) { @@ -94,7 +94,7 @@ function handleGetAlbumThumbnail($token, $albumname) function handleGetPhoto($token, $photo) { $owner = OC_Gallery_Sharing::getTokenOwner($token); - $view = OCP\App::getStorage('files'); + $view = OCP\Files::getStorage('files'); $file = $view->fopen(urldecode($photo), 'r'); header('Content-Type: '.OC_Image::getMimeTypeForFile($file)); OCP\Response::sendFile($file); diff --git a/apps/gallery/lib/album.php b/apps/gallery/lib/album.php index 8ac27b1a70d..39d6d3aded1 100644 --- a/apps/gallery/lib/album.php +++ b/apps/gallery/lib/album.php @@ -90,7 +90,7 @@ class OC_Gallery_Album { } public static function changeThumbnailPath($oldname, $newname) { - $view = OCP\App::getStorage('gallery'); + $view = OCP\Files::getStorage('gallery'); $view->rename($oldname.'.png', $newname.'.png'); } diff --git a/apps/gallery/lib/photo.php b/apps/gallery/lib/photo.php index b4b37236b0e..f9527cb5fdb 100644 --- a/apps/gallery/lib/photo.php +++ b/apps/gallery/lib/photo.php @@ -68,7 +68,7 @@ class OC_Gallery_Photo { public static function getThumbnail($image_name, $owner = null) { if (!$owner) $owner = OCP\USER::getUser(); - $view = OCP\App::getStorage('gallery'); + $view = OCP\Files::getStorage('gallery'); $save_dir = dirname($image_name); if (!$view->is_dir($save_dir)) { $view->mkdir($save_dir); diff --git a/apps/gallery/lib/scanner.php b/apps/gallery/lib/scanner.php index e11ba1da454..233fa20bca7 100644 --- a/apps/gallery/lib/scanner.php +++ b/apps/gallery/lib/scanner.php @@ -81,7 +81,7 @@ class OC_Gallery_Scanner { $image->destroy(); } } - $view = OCP\App::getStorage('gallery'); + $view = OCP\Files::getStorage('gallery'); imagepng($thumbnail, $view->getLocalFile($albumName.'.png')); imagedestroy($thumbnail); } -- 2.39.5