fixed wrong function call

This commit is contained in:
Bjoern Schiessle 2012-06-06 10:40:22 +02:00
parent fce614b82c
commit 6abe8f9e2e
5 changed files with 6 additions and 6 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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');
}

View File

@ -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);

View File

@ -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);
}