summaryrefslogtreecommitdiffstats
path: root/apps/gallery/lib/photo.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gallery/lib/photo.php')
-rw-r--r--apps/gallery/lib/photo.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/gallery/lib/photo.php b/apps/gallery/lib/photo.php
index 5e6df8069b5..0c0f16e659a 100644
--- a/apps/gallery/lib/photo.php
+++ b/apps/gallery/lib/photo.php
@@ -66,8 +66,9 @@ class OC_Gallery_Photo {
$stmt->execute(array($newpath, $newAlbumId, $oldAlbumId, $oldpath));
}
- public static function getThumbnail($image_name) {
- $save_dir = OC_Config::getValue("datadirectory").'/'. OC_User::getUser() .'/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);