projects
/
GitHub
/
WoltLab
/
WCF.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b4f396
)
Hide article-related notification events if articles are disabled
author
Matthias Schmidt
<gravatronics@live.com>
Sun, 3 Jan 2021 16:23:09 +0000
(17:23 +0100)
committer
Matthias Schmidt
<gravatronics@live.com>
Sun, 3 Jan 2021 16:23:09 +0000
(17:23 +0100)
com.woltlab.wcf/userNotificationEvent.xml
patch
|
blob
|
blame
|
history
wcfsetup/install/files/lib/system/user/notification/event/ArticleLikeUserNotificationEvent.class.php
patch
|
blob
|
blame
|
history
diff --git
a/com.woltlab.wcf/userNotificationEvent.xml
b/com.woltlab.wcf/userNotificationEvent.xml
index 5d3d3b1e2c1139ac2975878b34c79bd320f50941..e278e90ec8f14f8ded4805b1938d7a00d1734994 100644
(file)
--- a/
com.woltlab.wcf/userNotificationEvent.xml
+++ b/
com.woltlab.wcf/userNotificationEvent.xml
@@
-122,7
+122,6
@@
<name>like</name>
<objecttype>com.woltlab.wcf.likeableArticle.notification</objecttype>
<classname>wcf\system\user\notification\event\ArticleLikeUserNotificationEvent</classname>
- <options>module_like</options>
<preset>1</preset>
</event>
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 7b31e084ed71f8ac1373fa23cbab8a1c706d8ca2..e88d55c2852304ae24e7e83a5dc74f7fba3d142e 100644
(file)
--- 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
*/