From d68b89cae43beca3a3ae8531395d125ea67cd053 Mon Sep 17 00:00:00 2001 From: Björn Schießle Date: Mon, 22 Oct 2012 14:52:59 +0200 Subject: add parameter to specify user for which OC_Filesystem should be initialized. (needed to share files via public links where no user is logged in) --- lib/filesystem.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/filesystem.php') diff --git a/lib/filesystem.php b/lib/filesystem.php index 8b44ab6e6c6..00682573dd9 100644 --- a/lib/filesystem.php +++ b/lib/filesystem.php @@ -254,14 +254,17 @@ class OC_Filesystem{ } } - static public function init($root) { + static public function init($root, $user = '') { if(self::$defaultInstance) { return false; } self::$defaultInstance=new OC_FilesystemView($root); //load custom mount config - self::loadSystemMountPoints(OC_User::getUser()); + if (!isset($user)) { + $user = OC_User::getUser(); + } + self::loadSystemMountPoints($user); self::$loaded=true; } -- cgit v1.2.3