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
3 changes: 0 additions & 3 deletions build/psalm-baseline-ocp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@
</MissingTemplateParam>
</file>
<file src="lib/public/Files.php">
<FalsableReturnStatement>
<code><![CDATA[\OC_App::getStorage($app)]]></code>
</FalsableReturnStatement>
<UndefinedClass>
<code><![CDATA[\OC]]></code>
</UndefinedClass>
Expand Down
5 changes: 0 additions & 5 deletions build/psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4721,11 +4721,6 @@
<code><![CDATA[IteratorAggregate]]></code>
</MissingTemplateParam>
</file>
<file src="lib/public/Files.php">
<FalsableReturnStatement>
<code><![CDATA[\OC_App::getStorage($app)]]></code>
</FalsableReturnStatement>
</file>
<file src="lib/public/L10N/ILanguageIterator.php">
<MissingTemplateParam>
<code><![CDATA[\Iterator]]></code>
Expand Down
22 changes: 0 additions & 22 deletions lib/private/legacy/OC_App.php
Original file line number Diff line number Diff line change
Expand Up @@ -768,28 +768,6 @@ private static function setupLiveMigrations(string $appId, array $steps) {
}
}

/**
* @param string $appId
* @return \OC\Files\View|false
*/
public static function getStorage(string $appId) {
if (\OC::$server->getAppManager()->isEnabledForUser($appId)) { //sanity check
if (\OC::$server->getUserSession()->isLoggedIn()) {
$view = new \OC\Files\View('/' . OC_User::getUser());
if (!$view->file_exists($appId)) {
$view->mkdir($appId);
}
return new \OC\Files\View('/' . OC_User::getUser() . '/' . $appId);
} else {
\OCP\Server::get(LoggerInterface::class)->error('Can\'t get app storage, app ' . $appId . ', user not logged in', ['app' => 'core']);
return false;
}
} else {
\OCP\Server::get(LoggerInterface::class)->error('Can\'t get app storage, app ' . $appId . ' not enabled', ['app' => 'core']);
return false;
}
}

protected static function findBestL10NOption(array $options, string $lang): string {
// only a single option
if (isset($options['@value'])) {
Expand Down
12 changes: 0 additions & 12 deletions lib/public/Files.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,4 @@ public static function streamCopy($source, $target) {
public static function buildNotExistingFileName($path, $filename) {
return \OC_Helper::buildNotExistingFileName($path, $filename);
}

/**
* Gets the Storage for an app - creates the needed folder if they are not
* existent
* @param string $app
* @return \OC\Files\View
* @since 5.0.0
* @deprecated 14.0.0 use IAppData instead
*/
public static function getStorage($app) {
return \OC_App::getStorage($app);
}
}
Loading