summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-08-08 17:05:11 +0200
committerGitHub <noreply@github.com>2022-08-08 17:05:11 +0200
commitf8b13ecd604451eb853bf1d7d1f12aadc857e527 (patch)
tree2ec4ae37cc98bbef9b1c6e52fe05dd0aab0706c9 /core
parentfe2f8b5d189cbcda8c4f197197169a6e015d6622 (diff)
parent458c2fa2971e6595a18a289b0afeb4a79ea0e0d3 (diff)
downloadnextcloud-server-f8b13ecd604451eb853bf1d7d1f12aadc857e527.tar.gz
nextcloud-server-f8b13ecd604451eb853bf1d7d1f12aadc857e527.zip
Merge pull request #32363 from nextcloud/cleanup/remove-long-deprecated-classes
Remove OCP\App and OCP\BackgroundJob
Diffstat (limited to 'core')
-rw-r--r--core/Command/Maintenance/Repair.php2
-rw-r--r--core/Command/User/ResetPassword.php9
-rw-r--r--core/register_command.php2
-rw-r--r--core/templates/installation.php2
-rw-r--r--core/templates/layout.base.php6
-rw-r--r--core/templates/layout.guest.php8
6 files changed, 16 insertions, 13 deletions
diff --git a/core/Command/Maintenance/Repair.php b/core/Command/Maintenance/Repair.php
index aa0f6a2a086..2c1fda7c8e4 100644
--- a/core/Command/Maintenance/Repair.php
+++ b/core/Command/Maintenance/Repair.php
@@ -82,7 +82,7 @@ class Repair extends Command {
if (!$this->appManager->isEnabledForUser($app)) {
continue;
}
- $info = \OC_App::getAppInfo($app);
+ $info = $this->appManager->getAppInfo($app);
if (!is_array($info)) {
continue;
}
diff --git a/core/Command/User/ResetPassword.php b/core/Command/User/ResetPassword.php
index 21bc5cc45b0..294cea38b71 100644
--- a/core/Command/User/ResetPassword.php
+++ b/core/Command/User/ResetPassword.php
@@ -28,6 +28,7 @@
namespace OC\Core\Command\User;
use OC\Core\Command\Base;
+use OCP\App\IAppManager;
use OCP\IUser;
use OCP\IUserManager;
use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext;
@@ -41,10 +42,12 @@ use Symfony\Component\Console\Question\Question;
class ResetPassword extends Base {
protected IUserManager $userManager;
+ private IAppManager $appManager;
- public function __construct(IUserManager $userManager) {
- $this->userManager = $userManager;
+ public function __construct(IUserManager $userManager, IAppManager $appManager) {
parent::__construct();
+ $this->userManager = $userManager;
+ $this->appManager = $appManager;
}
protected function configure() {
@@ -84,7 +87,7 @@ class ResetPassword extends Base {
/** @var QuestionHelper $helper */
$helper = $this->getHelper('question');
- if (\OCP\App::isEnabled('encryption')) {
+ if ($this->appManager->isEnabledForUser('encryption', $user)) {
$output->writeln(
'<error>Warning: Resetting the password when using encryption will result in data loss!</error>'
);
diff --git a/core/register_command.php b/core/register_command.php
index d80465e0906..98a653aed7e 100644
--- a/core/register_command.php
+++ b/core/register_command.php
@@ -183,7 +183,7 @@ if (\OC::$server->getConfig()->getSystemValue('installed', false)) {
$application->add(new OC\Core\Command\User\Enable(\OC::$server->getUserManager()));
$application->add(new OC\Core\Command\User\LastSeen(\OC::$server->getUserManager()));
$application->add(\OC::$server->get(\OC\Core\Command\User\Report::class));
- $application->add(new OC\Core\Command\User\ResetPassword(\OC::$server->getUserManager()));
+ $application->add(new OC\Core\Command\User\ResetPassword(\OC::$server->getUserManager(), \OC::$server->getAppManager()));
$application->add(new OC\Core\Command\User\Setting(\OC::$server->getUserManager(), \OC::$server->getConfig()));
$application->add(new OC\Core\Command\User\ListCommand(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
$application->add(new OC\Core\Command\User\Info(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
diff --git a/core/templates/installation.php b/core/templates/installation.php
index b08f1cd9ac1..45d9cfc9252 100644
--- a/core/templates/installation.php
+++ b/core/templates/installation.php
@@ -55,7 +55,7 @@ script('core', 'install');
<?php if (!$_['directoryIsSet'] or !$_['dbIsSet'] or count($_['errors']) > 0): ?>
<fieldset id="advancedHeader">
- <legend><a id="showAdvanced" tabindex="0" href="#"><?php p($l->t('Storage & database')); ?><img src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" /></a></legend>
+ <legend><a id="showAdvanced" tabindex="0" href="#"><?php p($l->t('Storage & database')); ?><img src="<?php print_unescaped(image_path('core', 'actions/caret.svg')); ?>" /></a></legend>
</fieldset>
<?php endif; ?>
diff --git a/core/templates/layout.base.php b/core/templates/layout.base.php
index 0eb80098889..d8a54bfec2e 100644
--- a/core/templates/layout.base.php
+++ b/core/templates/layout.base.php
@@ -7,9 +7,9 @@
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<meta name="theme-color" content="<?php p($theme->getColorPrimary()); ?>">
- <link rel="icon" href="<?php print_unescaped(image_path('', 'favicon.ico')); /* IE11+ supports png */ ?>">
- <link rel="apple-touch-icon" href="<?php print_unescaped(image_path('', 'favicon-touch.png')); ?>">
- <link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path('', 'favicon-mask.svg')); ?>" color="<?php p($theme->getColorPrimary()); ?>">
+ <link rel="icon" href="<?php print_unescaped(image_path('core', 'favicon.ico')); /* IE11+ supports png */ ?>">
+ <link rel="apple-touch-icon" href="<?php print_unescaped(image_path('core', 'favicon-touch.png')); ?>">
+ <link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path('core', 'favicon-mask.svg')); ?>" color="<?php p($theme->getColorPrimary()); ?>">
<?php emit_css_loading_tags($_); ?>
<?php emit_script_loading_tags($_); ?>
<?php print_unescaped($_['headers']); ?>
diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php
index 432bc4e8601..c275d9746b7 100644
--- a/core/templates/layout.guest.php
+++ b/core/templates/layout.guest.php
@@ -17,10 +17,10 @@
<meta name="apple-itunes-app" content="app-id=<?php p($theme->getiTunesAppId()); ?>">
<?php } ?>
<meta name="theme-color" content="<?php p($theme->getColorPrimary()); ?>">
- <link rel="icon" href="<?php print_unescaped(image_path('', 'favicon.ico')); /* IE11+ supports png */ ?>">
- <link rel="apple-touch-icon" href="<?php print_unescaped(image_path('', 'favicon-touch.png')); ?>">
- <link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path('', 'favicon-mask.svg')); ?>" color="<?php p($theme->getColorPrimary()); ?>">
- <link rel="manifest" href="<?php print_unescaped(image_path('', 'manifest.json')); ?>">
+ <link rel="icon" href="<?php print_unescaped(image_path('core', 'favicon.ico')); /* IE11+ supports png */ ?>">
+ <link rel="apple-touch-icon" href="<?php print_unescaped(image_path('core', 'favicon-touch.png')); ?>">
+ <link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path('core', 'favicon-mask.svg')); ?>" color="<?php p($theme->getColorPrimary()); ?>">
+ <link rel="manifest" href="<?php print_unescaped(image_path('core', 'manifest.json')); ?>">
<?php emit_css_loading_tags($_); ?>
<?php emit_script_loading_tags($_); ?>
<?php print_unescaped($_['headers']); ?>