summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-10-27 14:25:15 +0200
committerRobin Appelman <icewind@owncloud.com>2012-10-27 14:25:15 +0200
commit0fb707d2c90846c1231cdefac79e9b58c8351c81 (patch)
tree6b8a8532036cd2d2af8314d451c446775875bf0d /apps/files_sharing
parent86be7e88721ada34e7b230a0e5dfb4df546bc38a (diff)
downloadnextcloud-server-0fb707d2c90846c1231cdefac79e9b58c8351c81.tar.gz
nextcloud-server-0fb707d2c90846c1231cdefac79e9b58c8351c81.zip
some more porting of the sharing
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/appinfo/update.php9
-rw-r--r--apps/files_sharing/public.php3
2 files changed, 7 insertions, 5 deletions
diff --git a/apps/files_sharing/appinfo/update.php b/apps/files_sharing/appinfo/update.php
index 51048bd178c..69c526eae0f 100644
--- a/apps/files_sharing/appinfo/update.php
+++ b/apps/files_sharing/appinfo/update.php
@@ -9,11 +9,12 @@ if (version_compare($installedVersion, '0.3', '<')) {
OC_User::useBackend(new OC_User_Database());
OC_Group::useBackend(new OC_Group_Database());
OC_App::loadApps(array('authentication'));
+ $rootView = new \OC\Files\View('');
while ($row = $result->fetchRow()) {
- $meta = \OC\Files\Filesystem::getId($path, '');
- $itemSource = OC_FileCache::getId($row['source'], '');
+ $meta = $rootView->getFileInfo($$row['source']);
+ $itemSource = $meta['fileid'];
if ($itemSource != -1) {
- $file = OC_FileCache::get($row['source'], '');
+ $file = $meta;
if ($file['mimetype'] == 'httpd/unix-directory') {
$itemType = 'folder';
} else {
@@ -69,6 +70,6 @@ if (version_compare($installedVersion, '0.3.3', '<')) {
OC_App::loadApps(array('authentication'));
$users = OC_User::getUsers();
foreach ($users as $user) {
- OC_FileCache::delete('Shared', '/'.$user.'/files/');
+// OC_FileCache::delete('Shared', '/'.$user.'/files/');
}
}
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index 35e7734e2d0..1fe73110024 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -10,7 +10,8 @@ if (isset($_GET['token'])) {
$qry = \OC_DB::prepare('SELECT `source` FROM `*PREFIX*sharing` WHERE `target` = ? LIMIT 1');
$filepath = $qry->execute(array($_GET['token']))->fetchOne();
if(isset($filepath)) {
- $info = OC_FileCache_Cached::get($filepath, '');
+ $rootView = new \OC\Files\View('');
+ $info = $rootView->getFileInfo($filepath, '');
if(strtolower($info['mimetype']) == 'httpd/unix-directory') {
$_GET['dir'] = $filepath;
} else {