Add title for notification
authorCyperghost <olaf_schmitz_1@t-online.de>
Wed, 20 Mar 2024 11:53:07 +0000 (12:53 +0100)
committerCyperghost <olaf_schmitz_1@t-online.de>
Wed, 20 Mar 2024 11:53:07 +0000 (12:53 +0100)
wcfsetup/install/files/lib/system/user/notification/event/ReportModerationQueueUserNotificationEvent.class.php
wcfsetup/install/files/lib/system/user/notification/object/ModerationQueueUserNotificationObject.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 8fc2fac93a648b2c8dbd845a6b3685c9032fd84a..32199a0ea6edd59e5f6eed30450904aa0cb98b8d 100644 (file)
@@ -17,35 +17,32 @@ use wcf\system\user\notification\object\ModerationQueueUserNotificationObject;
  */
 final class ReportModerationQueueUserNotificationEvent extends AbstractUserNotificationEvent
 {
-    /**
-     * @inheritDoc
-     */
+    #[\Override]
     public function getTitle(): string
     {
-        // TODO
-        return "";
+        return $this->getLanguage()->get('wcf.moderation.report.notification.title');
     }
 
-    /**
-     * @inheritDoc
-     */
+    #[\Override]
     public function getMessage()
     {
-        // TODO
-        return "";
+        return $this->getLanguage()->getDynamicVariable(
+            'wcf.moderation.report.notification.message',
+            [
+                'author' => $this->author,
+                'notification' => $this->notification,
+                'userNotificationObject' => $this->getUserNotificationObject(),
+            ]
+        );
     }
 
-    /**
-     * @inheritDoc
-     */
+    #[\Override]
     public function getEmailMessage($notificationType = 'instant')
     {
         // TODO
     }
 
-    /**
-     * @inheritDoc
-     */
+    #[\Override]
     public function getLink(): string
     {
         return LinkHandler::getInstance()->getLink('ModerationReport', [
@@ -53,9 +50,7 @@ final class ReportModerationQueueUserNotificationEvent extends AbstractUserNotif
         ]);
     }
 
-    /**
-     * @inheritDoc
-     */
+    #[\Override]
     public function getEventHash()
     {
         return \sha1($this->eventID . '-' . $this->getUserNotificationObject()->queueID);
index 7351aab88614ae5de8e643edb6d3e8282e991e83..20acef36cd6669ccba630c837274c059a0200354 100644 (file)
@@ -23,25 +23,19 @@ final class ModerationQueueUserNotificationObject extends DatabaseObjectDecorato
      */
     protected static $baseClass = ModerationQueue::class;
 
-    /**
-     * @inheritDoc
-     */
+    #[\Override]
     public function getTitle(): string
     {
         return '';
     }
 
-    /**
-     * @inheritDoc
-     */
+    #[\Override]
     public function getURL()
     {
         return '';
     }
 
-    /**
-     * @inheritDoc
-     */
+    #[\Override]
     public function getAuthorID()
     {
         return $this->userID;
index 05cf36253bd985bf85dc616261c0470c5e0ace31..d01eecd5a0b494b9cc81e420110fddb30a927609 100644 (file)
@@ -4389,6 +4389,7 @@ Dateianhänge:
                <item name="wcf.moderation.report.changeJustifiedStatus"><![CDATA[„Berechtigt“-Status ändern]]></item>
                <item name="wcf.moderation.report.changeJustifiedStatus.markAsJustified"><![CDATA[Meldung als „Berechtigt“ markieren]]></item>
                <item name="wcf.moderation.report.changeJustifiedStatus.confirmMessage"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Willst du{else}Wollen Sie{/if} den „Berechtigt“-Status dieser Meldung wirklich ändern?]]></item>
+               <item name="wcf.moderation.report.notification.title"><![CDATA[Neue Meldung]]></item>
        </category>
        <category name="wcf.notice">
                <item name="wcf.notice.button.dismiss"><![CDATA[Hinweis dauerhaft ausblenden]]></item>
index a6cb4ca94eb3ac49337c128e3ce5e7cdf2802718..e57444e47e9e7ca321b7e564050e34ef0401f541 100644 (file)
@@ -4341,6 +4341,7 @@ Attachments:
                <item name="wcf.moderation.report.changeJustifiedStatus"><![CDATA[Change “Justified” status]]></item>
                <item name="wcf.moderation.report.changeJustifiedStatus.markAsJustified"><![CDATA[Mark report as “Justified”]]></item>
                <item name="wcf.moderation.report.changeJustifiedStatus.confirmMessage"><![CDATA[Do you really want to change the “Justified” status of this report?]]></item>
+               <item name="wcf.moderation.report.notification.title"><![CDATA[New report]]></item>
        </category>
        <category name="wcf.notice">
                <item name="wcf.notice.button.dismiss"><![CDATA[Permanently dismiss this notice]]></item>