Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions lib/private/Files/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,30 +389,6 @@ public static function mount($class, $arguments, $mountpoint) {
self::$mounts->addMount($mount);
}

/**
* return the path to a local version of the file
* we need this because we can't know if a file is stored local or not from
* outside the filestorage and for some purposes a local file is needed
*/
public static function getLocalFile(string $path): string|false {
return self::$defaultInstance->getLocalFile($path);
}

/**
* return path to file which reflects one visible in browser
*
* @param string $path
* @return string
*/
public static function getLocalPath($path) {
$datadir = \OC_User::getHome(\OC_User::getUser()) . '/files';
$newpath = $path;
if (strncmp($newpath, $datadir, strlen($datadir)) == 0) {
$newpath = substr($path, strlen($datadir));
}
return $newpath;
}

/**
* check if the requested path is valid
*
Expand Down
46 changes: 0 additions & 46 deletions lib/private/legacy/OC_User.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,16 +250,6 @@ public static function setUserId($uid) {
}
}

/**
* Check if the user is logged in, considers also the HTTP basic credentials
*
* @deprecated 12.0.0 use \OC::$server->getUserSession()->isLoggedIn()
* @return bool
*/
public static function isLoggedIn() {
return \OC::$server->getUserSession()->isLoggedIn();
}

/**
* set incognito mode, e.g. if a user wants to open a public link
*
Expand Down Expand Up @@ -350,42 +340,6 @@ public static function setPassword($uid, $password, $recoveryPassword = null) {
}
}

/**
* @param string $uid The username
* @return string
*
* returns the path to the users home directory
* @deprecated 12.0.0 Use \OC::$server->getUserManager->getHome()
*/
public static function getHome($uid) {
$user = Server::get(IUserManager::class)->get($uid);
if ($user) {
return $user->getHome();
} else {
return \OC::$server->getSystemConfig()->getValue('datadirectory', OC::$SERVERROOT . '/data') . '/' . $uid;
}
}

/**
* Get a list of all users display name
*
* @param string $search
* @param int $limit
* @param int $offset
* @return array associative array with all display names (value) and corresponding uids (key)
*
* Get a list of all display names and user ids.
* @deprecated 12.0.0 Use \OC::$server->getUserManager->searchDisplayName($search, $limit, $offset) instead.
*/
public static function getDisplayNames($search = '', $limit = null, $offset = null) {
$displayNames = [];
$users = Server::get(IUserManager::class)->searchDisplayName($search, $limit, $offset);
foreach ($users as $user) {
$displayNames[$user->getUID()] = $user->getDisplayName();
}
return $displayNames;
}

/**
* Returns the first active backend from self::$_usedBackends.
*
Expand Down
Loading