summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartek Przybylski <bart.p.pl@gmail.com>2012-03-24 18:40:27 +0100
committerBartek Przybylski <bart.p.pl@gmail.com>2012-03-24 18:40:27 +0100
commitafcf96549883e1ac9b87681ac7d5d0c3ea0cd513 (patch)
tree84a62d9050e9b20385a316e38926a68d02c86bf5
parentcbdcb68c2b2bfed5d7ad3a1b0bf8b7f20210b258 (diff)
downloadnextcloud-server-afcf96549883e1ac9b87681ac7d5d0c3ea0cd513.tar.gz
nextcloud-server-afcf96549883e1ac9b87681ac7d5d0c3ea0cd513.zip
fixup: sharing gallery for loggedin users fail
-rw-r--r--apps/gallery/ajax/sharing.php5
1 files changed, 1 insertions, 4 deletions
diff --git a/apps/gallery/ajax/sharing.php b/apps/gallery/ajax/sharing.php
index b737d8f6fee..fba85fa34ee 100644
--- a/apps/gallery/ajax/sharing.php
+++ b/apps/gallery/ajax/sharing.php
@@ -93,10 +93,7 @@ function handleGetAlbumThumbnail($token, $albumname)
function handleGetPhoto($token, $photo) {
$owner = OC_Gallery_Sharing::getTokenOwner($token);
- if (OC_User::isLoggedIn())
- $file = OC::$CONFIG_DATADIRECTORY.urldecode($photo);
- else
- $file = OC::$CONFIG_DATADIRECTORY.'/'.$owner.'/files'.urldecode($photo);
+ $file = OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" ).'/'.$owner.'/files'.urldecode($photo);
header('Content-Type: '.OC_Image::getMimeTypeForFile($file));
OC_Response::sendFile($file);
}