diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-05-30 14:33:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-30 14:33:12 +0200 |
commit | 65ad1d0abeed8800cf002563fbfb6eb5d62f8ae3 (patch) | |
tree | 3e36731aaa85d3599809c1fd9bf31ff9d850a64d /core/Application.php | |
parent | 5dccf25e11da5a1838e56c5afd47e1068a7fc965 (diff) | |
parent | 31b0a44cf65b6625636ea0fa15fb1a1122b525e1 (diff) | |
download | nextcloud-server-65ad1d0abeed8800cf002563fbfb6eb5d62f8ae3.tar.gz nextcloud-server-65ad1d0abeed8800cf002563fbfb6eb5d62f8ae3.zip |
Merge branch 'master' into refactor/OC-Server-getNotificationManager
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
Diffstat (limited to 'core/Application.php')
-rw-r--r-- | core/Application.php | 79 |
1 files changed, 8 insertions, 71 deletions
diff --git a/core/Application.php b/core/Application.php index 19bc06bd3e9..238ba93d7cc 100644 --- a/core/Application.php +++ b/core/Application.php @@ -1,34 +1,8 @@ <?php /** - * @copyright Copyright (c) 2016, ownCloud, Inc. - * @copyright Copyright (c) 2016 Joas Schilling <coding@schilljs.com> - * - * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author Joas Schilling <coding@schilljs.com> - * @author John Molakvoæ <skjnldsv@protonmail.com> - * @author Julius Härtl <jus@bitgrid.net> - * @author Lukas Reschke <lukas@statuscode.ch> - * @author Mario Danic <mario@lovelyhq.com> - * @author Morris Jobke <hey@morrisjobke.de> - * @author Robin Appelman <robin@icewind.nl> - * @author Roeland Jago Douma <roeland@famdouma.nl> - * @author Thomas Citharel <nextcloud@tcit.fr> - * @author Victor Dubiniuk <dubiniuk@owncloud.com> - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * + * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-FileCopyrightText: 2016 ownCloud, Inc. + * SPDX-License-Identifier: AGPL-3.0-only */ namespace OC\Core; @@ -44,15 +18,12 @@ use OC\Authentication\Listeners\UserDeletedWebAuthnCleanupListener; use OC\Authentication\Notifications\Notifier as AuthenticationNotifier; use OC\Core\Listener\BeforeTemplateRenderedListener; use OC\Core\Notification\CoreNotifier; -use OC\Metadata\FileEventListener; use OC\TagManager; use OCP\AppFramework\App; use OCP\AppFramework\Http\Events\BeforeLoginTemplateRenderedEvent; use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent; -use OCP\DB\Events\AddMissingColumnsEvent; use OCP\DB\Events\AddMissingIndicesEvent; use OCP\DB\Events\AddMissingPrimaryKeyEvent; -use OCP\DB\Types; use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\Events\Node\NodeDeletedEvent; use OCP\Files\Events\Node\NodeWrittenEvent; @@ -61,7 +32,6 @@ use OCP\Notification\IManager as INotificationManager; use OCP\User\Events\BeforeUserDeletedEvent; use OCP\User\Events\UserDeletedEvent; use OCP\Util; -use OCP\IConfig; /** * Class Application @@ -134,6 +104,11 @@ class Application extends App { 'fs_parent', ['parent'] ); + $event->addMissingIndex( + 'filecache', + 'fs_name_hash', + ['name'] + ); $event->addMissingIndex( 'twofactor_providers', @@ -178,20 +153,6 @@ class Application extends App { [], true ); - $event->addMissingIndex( - 'cards', - 'cards_abid', - ['addressbookid'], - [], - true - ); - $event->addMissingIndex( - 'cards', - 'cards_abiduri', - ['addressbookid', 'uri'], - [], - true - ); $event->addMissingIndex( 'cards_properties', @@ -306,18 +267,6 @@ class Application extends App { ); }); - $eventDispatcher->addListener(AddMissingColumnsEvent::class, function (AddMissingColumnsEvent $event) { - $event->addMissingColumn( - 'comments', - 'reference_id', - Types::STRING, - [ - 'notnull' => false, - 'length' => 64, - ] - ); - }); - $eventDispatcher->addServiceListener(BeforeTemplateRenderedEvent::class, BeforeTemplateRenderedListener::class); $eventDispatcher->addServiceListener(BeforeLoginTemplateRenderedEvent::class, BeforeTemplateRenderedListener::class); $eventDispatcher->addServiceListener(RemoteWipeStarted::class, RemoteWipeActivityListener::class); @@ -332,18 +281,6 @@ class Application extends App { $eventDispatcher->addServiceListener(UserDeletedEvent::class, UserDeletedFilesCleanupListener::class); $eventDispatcher->addServiceListener(UserDeletedEvent::class, UserDeletedWebAuthnCleanupListener::class); - // Metadata - /** @var IConfig $config */ - $config = $container->get(IConfig::class); - if ($config->getSystemValueBool('enable_file_metadata', true)) { - /** @psalm-suppress InvalidArgument */ - $eventDispatcher->addServiceListener(NodeDeletedEvent::class, FileEventListener::class); - /** @psalm-suppress InvalidArgument */ - $eventDispatcher->addServiceListener(NodeRemovedFromCache::class, FileEventListener::class); - /** @psalm-suppress InvalidArgument */ - $eventDispatcher->addServiceListener(NodeWrittenEvent::class, FileEventListener::class); - } - // Tags $eventDispatcher->addServiceListener(UserDeletedEvent::class, TagManager::class); } |