diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-01-21 07:36:30 -0800 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-01-21 07:36:30 -0800 |
commit | 3a17220c9f015435ef15b70de42b4e6d95236888 (patch) | |
tree | 0000ba341d2814871b17236f82a04a30fa928a62 /apps/files_sharing | |
parent | 98415d68a5127bc0928455ecff230f53cf990686 (diff) | |
parent | 262f221d1119222825a0fbf5d26623f567bd00dd (diff) | |
download | nextcloud-server-3a17220c9f015435ef15b70de42b4e6d95236888.tar.gz nextcloud-server-3a17220c9f015435ef15b70de42b4e6d95236888.zip |
Merge pull request #6858 from owncloud/fix-setupfs-only-for-existing-users-master
OC_Util::setupFS($user) will create a data dir for the given string - no...
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/ajax/publicpreview.php | 3 | ||||
-rw-r--r-- | apps/files_sharing/appinfo/update.php | 1 | ||||
-rw-r--r-- | apps/files_sharing/public.php | 6 |
3 files changed, 6 insertions, 4 deletions
diff --git a/apps/files_sharing/ajax/publicpreview.php b/apps/files_sharing/ajax/publicpreview.php index 54a9806e8bf..a52f522afac 100644 --- a/apps/files_sharing/ajax/publicpreview.php +++ b/apps/files_sharing/ajax/publicpreview.php @@ -39,6 +39,7 @@ if(!isset($linkedItem['uid_owner']) || !isset($linkedItem['file_source'])) { $rootLinkItem = OCP\Share::resolveReShare($linkedItem); $userId = $rootLinkItem['uid_owner']; +OCP\JSON::checkUserExists($rootLinkItem['uid_owner']); \OC_Util::setupFS($userId); \OC\Files\Filesystem::initMountPoints($userId); $view = new \OC\Files\View('/' . $userId . '/files'); @@ -88,4 +89,4 @@ try{ } catch (\Exception $e) { \OC_Response::setStatus(500); \OC_Log::write('core', $e->getmessage(), \OC_Log::DEBUG); -}
\ No newline at end of file +} diff --git a/apps/files_sharing/appinfo/update.php b/apps/files_sharing/appinfo/update.php index 0d827da28ea..4b716e764f4 100644 --- a/apps/files_sharing/appinfo/update.php +++ b/apps/files_sharing/appinfo/update.php @@ -44,6 +44,7 @@ if (version_compare($installedVersion, '0.3', '<')) { $shareType = OCP\Share::SHARE_TYPE_USER; $shareWith = $row['uid_shared_with']; } + OCP\JSON::checkUserExists($row['uid_owner']); OC_User::setUserId($row['uid_owner']); //we need to setup the filesystem for the user, otherwise OC_FileSystem::getRoot will fail and break OC_Util::setupFS($row['uid_owner']); diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index d050efd5b32..80dd708ee51 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -43,10 +43,10 @@ if (isset($_GET['t'])) { $shareOwner = $linkItem['uid_owner']; $path = null; $rootLinkItem = OCP\Share::resolveReShare($linkItem); - $fileOwner = $rootLinkItem['uid_owner']; - if (isset($fileOwner)) { + if (isset($rootLinkItem['uid_owner'])) { + OCP\JSON::checkUserExists($rootLinkItem['uid_owner']); OC_Util::tearDownFS(); - OC_Util::setupFS($fileOwner); + OC_Util::setupFS($rootLinkItem['uid_owner']); $path = \OC\Files\Filesystem::getPath($linkItem['file_source']); } } |