Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2021-02-16 13:56:07 +0300
committerMorris Jobke <hey@morrisjobke.de>2021-05-21 16:00:34 +0300
commit81964200639c585ff523c6303fdb99eb0c7c180c (patch)
treedb98b7db0ac8f8b7ba095db611fa65bf92836d13 /apps/files_versions/lib
parent7ffee26aa8768736593c77dcb12d17978a6e06b2 (diff)
Drop \OCP\User
Inlines and remaining usages and drops the deprecated public API. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/files_versions/lib')
-rw-r--r--apps/files_versions/lib/Hooks.php4
-rw-r--r--apps/files_versions/lib/Storage.php6
2 files changed, 5 insertions, 5 deletions
diff --git a/apps/files_versions/lib/Hooks.php b/apps/files_versions/lib/Hooks.php
index 9a74a9280b5..78a89202457 100644
--- a/apps/files_versions/lib/Hooks.php
+++ b/apps/files_versions/lib/Hooks.php
@@ -129,7 +129,7 @@ class Hooks {
public static function pre_renameOrCopy_hook($params) {
// if we rename a movable mount point, then the versions don't have
// to be renamed
- $absOldPath = Filesystem::normalizePath('/' . \OCP\User::getUser() . '/files' . $params['oldpath']);
+ $absOldPath = Filesystem::normalizePath('/' . \OC_User::getUser() . '/files' . $params['oldpath']);
$manager = Filesystem::getMountManager();
$mount = $manager->find($absOldPath);
$internalPath = $mount->getInternalPath($absOldPath);
@@ -137,7 +137,7 @@ class Hooks {
return;
}
- $view = new View(\OCP\User::getUser() . '/files');
+ $view = new View(\OC_User::getUser() . '/files');
if ($view->file_exists($params['newpath'])) {
Storage::store($params['newpath']);
} else {
diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php
index 231faaaac04..79683e41b4e 100644
--- a/apps/files_versions/lib/Storage.php
+++ b/apps/files_versions/lib/Storage.php
@@ -46,6 +46,7 @@
namespace OCA\Files_Versions;
+use OC_User;
use OC\Files\Filesystem;
use OC\Files\View;
use OCA\Files_Versions\AppInfo\Application;
@@ -56,7 +57,6 @@ use OCP\Files\NotFoundException;
use OCP\Files\StorageNotAvailableException;
use OCP\IUser;
use OCP\Lock\ILockingProvider;
-use OCP\User;
class Storage {
public const DEFAULTENABLED = true;
@@ -105,10 +105,10 @@ class Storage {
// to a remote user with a federated cloud ID we use the current logged-in
// user. We need a valid local user to create the versions
if (!$userManager->userExists($uid)) {
- $uid = User::getUser();
+ $uid = OC_User::getUser();
}
Filesystem::initMountPoints($uid);
- if ($uid !== User::getUser()) {
+ if ($uid !== OC_User::getUser()) {
$info = Filesystem::getFileInfo($filename);
$ownerView = new View('/'.$uid.'/files');
try {