Skip to content

Commit

Permalink
Rename all usages of \OC\Files\Storage\Shared
Browse files Browse the repository at this point in the history
  • Loading branch information
icewind1991 committed Nov 13, 2014
1 parent 6174db8 commit 2124297
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion apps/files_encryption/tests/hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public static function setUpBeforeClass() {
// clear share hooks
\OC_Hook::clear('OCP\\Share');
\OC::registerShareHooks();
\OCP\Util::connectHook('OC_Filesystem', 'setup', '\OC\Files\Storage\Shared', 'setup');
\OCP\Util::connectHook('OC_Filesystem', 'post_initMountPoints', '\OCA\Files_Sharing\MountManager', 'setup');

// Filesystem related hooks
\OCA\Encryption\Helper::registerFilesystemHooks();
Expand Down
2 changes: 1 addition & 1 deletion apps/files_sharing/lib/watcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
class Shared_Watcher extends Watcher {
/**
* @var \OC\Files\Storage\Shared
* @var \OCA\Files_Sharing\SharedStorage
*/
protected $storage;

Expand Down
4 changes: 2 additions & 2 deletions apps/files_sharing/tests/cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ public function testGetPathByIdDirectShare() {
$this->assertTrue(\OC\Files\Filesystem::file_exists('/test.txt'));
list($sharedStorage) = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/test.txt');
/**
* @var \OC\Files\Storage\Shared $sharedStorage
* @var \OCA\Files_Sharing\SharedStorage $sharedStorage
*/

$sharedCache = $sharedStorage->getCache();
Expand All @@ -364,7 +364,7 @@ public function testGetPathByIdShareSubFolder() {
$this->assertTrue(\OC\Files\Filesystem::file_exists('/foo'));
list($sharedStorage) = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/foo');
/**
* @var \OC\Files\Storage\Shared $sharedStorage
* @var \OCA\Files_Sharing\SharedStorage $sharedStorage
*/

$sharedCache = $sharedStorage->getCache();
Expand Down
2 changes: 1 addition & 1 deletion apps/files_trashbin/tests/trashbin.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static function setUpBeforeClass() {
// clear share hooks
\OC_Hook::clear('OCP\\Share');
\OC::registerShareHooks();
\OCP\Util::connectHook('OC_Filesystem', 'setup', '\OC\Files\Storage\Shared', 'setup');
\OCP\Util::connectHook('OC_Filesystem', 'post_initMountPoints', '\OCA\Files_Sharing\MountManager', 'setup');

//disable encryption
self::$encryptionStatus = \OC_App::isEnabled('files_encryption');
Expand Down
2 changes: 1 addition & 1 deletion apps/files_versions/tests/versions.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static function setUpBeforeClass() {
\OC_Hook::clear('OCP\\Share');
\OC::registerShareHooks();
\OCA\Files_Versions\Hooks::connectHooks();
\OCP\Util::connectHook('OC_Filesystem', 'setup', '\OC\Files\Storage\Shared', 'setup');
\OCP\Util::connectHook('OC_Filesystem', 'post_initMountPoints', '\OCA\Files_Sharing\MountManager', 'setup');

// create test user
self::loginHelper(self::TEST_VERSIONS_USER2, true);
Expand Down
3 changes: 2 additions & 1 deletion lib/private/files/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

use OC\Files\Cache\Updater;
use OC\Files\Mount\MoveableMount;
use OCA\Files_Sharing\ISharedStorage;

class View {
private $fakeRoot = '';
Expand Down Expand Up @@ -917,7 +918,7 @@ public function getFileInfo($path, $includeMountPoints = true) {
$subStorage = Filesystem::getStorage($mountPoint);
if ($subStorage) {
// exclude shared storage ?
if ($extOnly && $subStorage instanceof \OC\Files\Storage\Shared) {
if ($extOnly && $subStorage instanceof ISharedStorage) {
continue;
}
$subCache = $subStorage->getCache('');
Expand Down
2 changes: 1 addition & 1 deletion lib/private/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ public static function getStorageInfo($path, $rootInfo = null) {
}
$quota = 0;
$storage = $rootInfo->getStorage();
if ($includeExtStorage && $storage->instanceOfStorage('\OC\Files\Storage\Shared')) {
if ($includeExtStorage && $storage->instanceOfStorage('\OCA\Files_Sharing\SharedStorage')) {
$includeExtStorage = false;
}
if ($includeExtStorage) {
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/files/cache/cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function testFolder($folder) {
$this->cache->put($file3, $fileData['foo']);

$content = $this->cache->getFolderContents($folder);
$this->assertEquals(count($content), 2);
$this->assertCount(2, $content);
foreach ($content as $cachedData) {
$data = $fileData[$cachedData['name']];
foreach ($data as $name => $value) {
Expand Down
8 changes: 8 additions & 0 deletions tests/lib/files/cache/wrapper/cachejail.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,12 @@ function testClearKeepEntriesOutsideJail() {
$this->assertFalse($this->cache->inCache('foobar'));
$this->assertTrue($this->sourceCache->inCache('folder/foobar'));
}

function testGetById() {
//not supported
}

function testGetIncomplete() {

}
}
2 changes: 1 addition & 1 deletion tests/lib/files/etagtest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class EtagTest extends \PHPUnit_Framework_TestCase {

public function setUp() {
\OC_Hook::clear('OC_Filesystem', 'setup');
\OCP\Util::connectHook('OC_Filesystem', 'setup', '\OC\Files\Storage\Shared', 'setup');
\OCP\Util::connectHook('OC_Filesystem', 'post_initMountPoints', '\OCA\Files_Sharing\MountManager', 'setup');
\OCP\Share::registerBackend('file', 'OC_Share_Backend_File');
\OCP\Share::registerBackend('folder', 'OC_Share_Backend_Folder', 'file');

Expand Down

0 comments on commit 2124297

Please sign in to comment.