summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2012-06-06 10:40:22 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2012-06-06 10:40:22 +0200
commit6abe8f9e2e6e11304b22085157674023cd1c185b (patch)
treeb2b7a7de853710c89f35becee704ce2222c94122
parentfce614b82c61a0d2e45ffe05bbe030d842f3ca16 (diff)
downloadnextcloud-server-6abe8f9e2e6e11304b22085157674023cd1c185b.tar.gz
nextcloud-server-6abe8f9e2e6e11304b22085157674023cd1c185b.zip
fixed wrong function call
-rw-r--r--apps/gallery/ajax/galleryOp.php2
-rw-r--r--apps/gallery/ajax/sharing.php4
-rw-r--r--apps/gallery/lib/album.php2
-rw-r--r--apps/gallery/lib/photo.php2
-rw-r--r--apps/gallery/lib/scanner.php2
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);
}