summaryrefslogtreecommitdiffstats
path: root/apps/gallery/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-03-26 22:40:38 +0200
committerRobin Appelman <icewind@owncloud.com>2012-03-26 22:40:38 +0200
commit3f881f1ca50b50bb1d564c6bdf55789cda10d4d4 (patch)
treea783f4defb10ac4a49b73a82df8cad4af5db27f2 /apps/gallery/lib
parent0ba93323585cd277d845eb7d7600cd4cac4f84da (diff)
downloadnextcloud-server-3f881f1ca50b50bb1d564c6bdf55789cda10d4d4.tar.gz
nextcloud-server-3f881f1ca50b50bb1d564c6bdf55789cda10d4d4.zip
memory cleanup in gallery
Diffstat (limited to 'apps/gallery/lib')
-rw-r--r--apps/gallery/lib/photo.php6
-rw-r--r--apps/gallery/lib/scanner.php1
2 files changed, 4 insertions, 3 deletions
diff --git a/apps/gallery/lib/photo.php b/apps/gallery/lib/photo.php
index 0c0f16e659a..2263608dcc2 100644
--- a/apps/gallery/lib/photo.php
+++ b/apps/gallery/lib/photo.php
@@ -66,9 +66,9 @@ class OC_Gallery_Photo {
$stmt->execute(array($newpath, $newAlbumId, $oldAlbumId, $oldpath));
}
- public static function getThumbnail($image_name, $owner = null) {
- if (!$owner) $owner = OC_User::getUser();
- $save_dir = OC_Config::getValue("datadirectory").'/'. $owner .'/gallery/';
+ public static function getThumbnail($image_name, $owner = null) {
+ if (!$owner) $owner = OC_User::getUser();
+ $save_dir = OC_Config::getValue("datadirectory").'/'. $owner .'/gallery/';
$save_dir .= dirname($image_name). '/';
$image_path = $image_name;
$thumb_file = $save_dir . basename($image_name);
diff --git a/apps/gallery/lib/scanner.php b/apps/gallery/lib/scanner.php
index c8825c267eb..34b9bb8da3d 100644
--- a/apps/gallery/lib/scanner.php
+++ b/apps/gallery/lib/scanner.php
@@ -81,6 +81,7 @@ class OC_Gallery_Scanner {
}
}
imagepng($thumbnail, OC_Config::getValue("datadirectory").'/'. OC_User::getUser() .'/gallery/' . $albumName.'.png');
+ imagedestroy($thumbnail);
}
public static function createIntermediateAlbums() {