From: Matthias Schmidt Date: Sun, 3 Jan 2021 16:23:09 +0000 (+0100) Subject: Hide article-related notification events if articles are disabled X-Git-Tag: 5.3.2~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=09ecea3dbd57fb14ad1976d11f4fa34ca7595806;p=GitHub%2FWoltLab%2FWCF.git Hide article-related notification events if articles are disabled --- diff --git a/com.woltlab.wcf/userNotificationEvent.xml b/com.woltlab.wcf/userNotificationEvent.xml index 5d3d3b1e2c..e278e90ec8 100644 --- a/com.woltlab.wcf/userNotificationEvent.xml +++ b/com.woltlab.wcf/userNotificationEvent.xml @@ -122,7 +122,6 @@ like com.woltlab.wcf.likeableArticle.notification wcf\system\user\notification\event\ArticleLikeUserNotificationEvent - module_like 1 diff --git a/wcfsetup/install/files/lib/system/user/notification/event/ArticleLikeUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/ArticleLikeUserNotificationEvent.class.php index 7b31e084ed..e88d55c285 100644 --- a/wcfsetup/install/files/lib/system/user/notification/event/ArticleLikeUserNotificationEvent.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/event/ArticleLikeUserNotificationEvent.class.php @@ -130,6 +130,17 @@ class ArticleLikeUserNotificationEvent extends AbstractSharedUserNotificationEve return true; } + /** + * @inheritDoc + */ + public function isVisible() { + if (!MODULE_ARTICLE || !MODULE_LIKE) { + return false; + } + + return parent::isVisible(); + } + /** * @inheritDoc */