diff options
author | Faisal Alghamdi <falghamdi125@gmail.com> | 2024-11-12 17:51:36 +0300 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2024-12-03 09:56:15 +0000 |
commit | 72fbfa579bb9dd4306585ead237cca657e263fb6 (patch) | |
tree | c798875c975c7892369a0ad847b1227c0ce426cb | |
parent | fbfe30716b2fa2b3fd62d3e42703c263d8ffbea4 (diff) | |
download | nextcloud-server-backport/49232/stable29.tar.gz nextcloud-server-backport/49232/stable29.zip |
Fix(files_reminders): Add an error log message that notifications app isn't enabled at files_reminders app load.backport/49232/stable29
Signed-off-by: Faisal Alghamdi <falghamdi125@gmail.com>
-rw-r--r-- | apps/files_reminders/appinfo/info.xml | 3 | ||||
-rw-r--r-- | apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/apps/files_reminders/appinfo/info.xml b/apps/files_reminders/appinfo/info.xml index 86cee2e7f5b..70b27bb6976 100644 --- a/apps/files_reminders/appinfo/info.xml +++ b/apps/files_reminders/appinfo/info.xml @@ -7,6 +7,9 @@ <description><![CDATA[**📣 File reminders** Set file reminders. + +Note: to use the `File reminders` app, ensure that the `Notifications` app is installed and enabled. The `Notifications` app provides the necessary APIs for the `File reminders` app to work correctly. + ]]></description> <version>1.2.0</version> <licence>agpl</licence> diff --git a/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php b/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php index ab66b6bc7a0..62818cf18d4 100644 --- a/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php +++ b/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php @@ -32,11 +32,13 @@ use OCP\App\IAppManager; use OCP\EventDispatcher\Event; use OCP\EventDispatcher\IEventListener; use OCP\Util; +use Psr\Log\LoggerInterface; /** @template-implements IEventListener<LoadAdditionalScriptsEvent> */ class LoadAdditionalScriptsListener implements IEventListener { public function __construct( private IAppManager $appManager, + private LoggerInterface $logger, ) { } @@ -46,6 +48,7 @@ class LoadAdditionalScriptsListener implements IEventListener { } if (!$this->appManager->isEnabledForUser('notifications')) { + $this->logger->error('Failed to register the `files_reminders` app. This could happen due to the `notifications` app being disabled.', ['app' => 'files_reminders']); return; } |