Update tests and apps to the new \OC\Files\Filesystem::init signature

This commit is contained in:
Robin Appelman 2013-02-11 11:06:09 +01:00
parent d7d9e2a15a
commit ad360296b9
5 changed files with 6 additions and 6 deletions

View File

@ -40,7 +40,7 @@ class Hooks {
// Manually initialise Filesystem{} singleton with correct
// fake root path, in order to avoid fatal webdav errors
\OC\Files\Filesystem::init( $params['uid'] . '/' . 'files' . '/' );
\OC\Files\Filesystem::init( $params['uid'], $params['uid'] . '/' . 'files' . '/' );
$view = new \OC_FilesystemView( '/' );

View File

@ -58,8 +58,8 @@ class OC_Filesystem {
/**
* @deprecated OC_Filesystem is replaced by \OC\Files\Filesystem
*/
static public function init($root) {
return \OC\Files\Filesystem::init($root);
static public function init($user, $root) {
return \OC\Files\Filesystem::init($user, $root);
}
/**

View File

@ -45,7 +45,7 @@ class OC_OCS_Cloud {
if(OC_User::userExists($parameters['user'])) {
// calculate the disc space
$userDir = '/'.$parameters['user'].'/files';
\OC\Files\Filesystem::init($useDir);
\OC\Files\Filesystem::init($parameters['user'], $userDir);
$rootInfo = \OC\Files\Filesystem::getFileInfo('');
$sharedInfo = \OC\Files\Filesystem::getFileInfo('/Shared');
$used = $rootInfo['size'] - $sharedInfo['size'];

View File

@ -45,7 +45,7 @@ class Updater extends \PHPUnit_Framework_TestCase {
if (!self::$user) {
if (!\OC\Files\Filesystem::getView()) {
self::$user = uniqid();
\OC\Files\Filesystem::init('/' . self::$user . '/files');
\OC\Files\Filesystem::init(self::$user, '/' . self::$user . '/files');
} else {
self::$user = \OC_User::getUser();
}

View File

@ -82,7 +82,7 @@ class Filesystem extends \PHPUnit_Framework_TestCase {
$user = \OC_User::getUser();
}else{
$user=uniqid();
\OC\Files\Filesystem::init('/'.$user.'/files');
\OC\Files\Filesystem::init($user, '/'.$user.'/files');
}
\OC_Hook::clear('OC_Filesystem');
\OC_Hook::connect('OC_Filesystem', 'post_write', $this, 'dummyHook');