diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gallery/lib/photo.php | 6 | ||||
-rw-r--r-- | apps/gallery/lib/scanner.php | 1 |
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() { |