some more porting of the sharing
This commit is contained in:
parent
86be7e8872
commit
0fb707d2c9
2 changed files with 7 additions and 5 deletions
|
@ -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/');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue