Skip to content

Commit b84eb26

Browse files
authored
Merge pull request #34325 from nextcloud/backport/34313/stable25
[stable25] unbundle files_videoplayer and clean up a little
2 parents b6fd615 + 68284b8 commit b84eb26

5 files changed

Lines changed: 60 additions & 6 deletions

File tree

core/shipped.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"files_sharing",
2020
"files_trashbin",
2121
"files_versions",
22-
"files_videoplayer",
2322
"firstrunwizard",
2423
"logreader",
2524
"lookup_server_connector",
@@ -64,7 +63,6 @@
6463
"files_sharing",
6564
"files_trashbin",
6665
"files_versions",
67-
"files_videoplayer",
6866
"firstrunwizard",
6967
"logreader",
7068
"lookup_server_connector",

lib/composer/composer/autoload_classmap.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1431,6 +1431,7 @@
14311431
'OC\\Repair\\AddBruteForceCleanupJob' => $baseDir . '/lib/private/Repair/AddBruteForceCleanupJob.php',
14321432
'OC\\Repair\\AddCleanupUpdaterBackupsJob' => $baseDir . '/lib/private/Repair/AddCleanupUpdaterBackupsJob.php',
14331433
'OC\\Repair\\CleanTags' => $baseDir . '/lib/private/Repair/CleanTags.php',
1434+
'OC\\Repair\\CleanUpAbandonedApps' => $baseDir . '/lib/private/Repair/CleanUpAbandonedApps.php',
14341435
'OC\\Repair\\ClearFrontendCaches' => $baseDir . '/lib/private/Repair/ClearFrontendCaches.php',
14351436
'OC\\Repair\\ClearGeneratedAvatarCache' => $baseDir . '/lib/private/Repair/ClearGeneratedAvatarCache.php',
14361437
'OC\\Repair\\ClearGeneratedAvatarCacheJob' => $baseDir . '/lib/private/Repair/ClearGeneratedAvatarCacheJob.php',

lib/composer/composer/autoload_static.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,6 +1464,7 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
14641464
'OC\\Repair\\AddBruteForceCleanupJob' => __DIR__ . '/../../..' . '/lib/private/Repair/AddBruteForceCleanupJob.php',
14651465
'OC\\Repair\\AddCleanupUpdaterBackupsJob' => __DIR__ . '/../../..' . '/lib/private/Repair/AddCleanupUpdaterBackupsJob.php',
14661466
'OC\\Repair\\CleanTags' => __DIR__ . '/../../..' . '/lib/private/Repair/CleanTags.php',
1467+
'OC\\Repair\\CleanUpAbandonedApps' => __DIR__ . '/../../..' . '/lib/private/Repair/CleanUpAbandonedApps.php',
14671468
'OC\\Repair\\ClearFrontendCaches' => __DIR__ . '/../../..' . '/lib/private/Repair/ClearFrontendCaches.php',
14681469
'OC\\Repair\\ClearGeneratedAvatarCache' => __DIR__ . '/../../..' . '/lib/private/Repair/ClearGeneratedAvatarCache.php',
14691470
'OC\\Repair\\ClearGeneratedAvatarCacheJob' => __DIR__ . '/../../..' . '/lib/private/Repair/ClearGeneratedAvatarCacheJob.php',

lib/private/Repair.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
*/
3535
namespace OC;
3636

37+
use OC\Repair\CleanUpAbandonedApps;
3738
use OCP\AppFramework\QueryException;
3839
use OCP\AppFramework\Utility\ITimeFactory;
3940
use OCP\Collaboration\Resources\IManager;
@@ -89,12 +90,11 @@
8990
class Repair implements IOutput {
9091

9192
/** @var IRepairStep[] */
92-
private $repairSteps;
93+
private array $repairSteps;
9394

9495
private IEventDispatcher $dispatcher;
9596

96-
/** @var string */
97-
private $currentStep;
97+
private string $currentStep;
9898

9999
private LoggerInterface $logger;
100100

@@ -171,7 +171,7 @@ public function addStep($repairStep) {
171171
*
172172
* @return IRepairStep[]
173173
*/
174-
public static function getRepairSteps() {
174+
public static function getRepairSteps(): array {
175175
return [
176176
new Collation(\OC::$server->getConfig(), \OC::$server->get(LoggerInterface::class), \OC::$server->getDatabaseConnection(), false),
177177
new RepairMimeTypes(\OC::$server->getConfig(), \OC::$server->getDatabaseConnection()),
@@ -208,6 +208,7 @@ public static function getRepairSteps() {
208208
\OCP\Server::get(RepairDavShares::class),
209209
\OCP\Server::get(LookupServerSendCheck::class),
210210
\OCP\Server::get(AddTokenCleanupJob::class),
211+
\OCP\Server::get(CleanUpAbandonedApps::class),
211212
];
212213
}
213214

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/**
6+
* @copyright Copyright (c) 2022 Arthur Schiwon <blizzz@arthur-schiwon.de>
7+
*
8+
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
9+
*
10+
* @license GNU AGPL version 3 or any later version
11+
*
12+
* This program is free software: you can redistribute it and/or modify
13+
* it under the terms of the GNU Affero General Public License as
14+
* published by the Free Software Foundation, either version 3 of the
15+
* License, or (at your option) any later version.
16+
*
17+
* This program is distributed in the hope that it will be useful,
18+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20+
* GNU Affero General Public License for more details.
21+
*
22+
* You should have received a copy of the GNU Affero General Public License
23+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
24+
*
25+
*/
26+
27+
namespace OC\Repair;
28+
29+
use OCP\IConfig;
30+
use OCP\Migration\IOutput;
31+
use OCP\Migration\IRepairStep;
32+
33+
class CleanUpAbandonedApps implements IRepairStep {
34+
protected const ABANDONED_APPS = ['accessibility', 'files_videoplayer'];
35+
private IConfig $config;
36+
37+
public function __construct(IConfig $config) {
38+
$this->config = $config;
39+
}
40+
41+
public function getName(): string {
42+
return 'Clean up abandoned apps';
43+
}
44+
45+
public function run(IOutput $output): void {
46+
foreach (self::ABANDONED_APPS as $app) {
47+
// only remove global app values
48+
// user prefs of accessibility are dealt with in Theming migration
49+
// videoplayer did not have user prefs
50+
$this->config->deleteAppValues($app);
51+
}
52+
}
53+
}

0 commit comments

Comments
 (0)