From afcf96549883e1ac9b87681ac7d5d0c3ea0cd513 Mon Sep 17 00:00:00 2001 From: Bartek Przybylski Date: Sat, 24 Mar 2012 18:40:27 +0100 Subject: [PATCH] fixup: sharing gallery for loggedin users fail --- apps/gallery/ajax/sharing.php | 5 +---- 1 file changed, 1 insertion(+), 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); }