Improve naming of expiring paid subscription notification event
authorMatthias Schmidt <gravatronics@live.com>
Wed, 31 May 2017 16:16:06 +0000 (18:16 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Wed, 31 May 2017 16:16:06 +0000 (18:16 +0200)
com.woltlab.wcf/userNotificationEvent.xml
wcfsetup/install/files/lib/system/user/notification/event/ExpiringPaidSubscriptionUserUserNotificationEvent.class.php [new file with mode: 0644]
wcfsetup/install/files/lib/system/user/notification/event/PaidSubscriptionUserUserNotificationEvent.class.php [deleted file]
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 553523db92b55815b67e371dd78fc9ad9214de52..07d121f8d5900a0b3c26137c1c64cb41bea226cb 100644 (file)
@@ -62,7 +62,7 @@
                <event>
                        <name>expiring</name>
                        <objecttype>com.woltlab.wcf.paidSubscription.user</objecttype>
-                       <classname>wcf\system\user\notification\event\PaidSubscriptionUserUserNotificationEvent</classname>
+                       <classname>wcf\system\user\notification\event\ExpiringPaidSubscriptionUserUserNotificationEvent</classname>
                        <options>module_paid_subscription</options>
                </event>
        </import>
diff --git a/wcfsetup/install/files/lib/system/user/notification/event/ExpiringPaidSubscriptionUserUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/ExpiringPaidSubscriptionUserUserNotificationEvent.class.php
new file mode 100644 (file)
index 0000000..d57c2bb
--- /dev/null
@@ -0,0 +1,55 @@
+<?php
+namespace wcf\system\user\notification\event;
+use wcf\data\paid\subscription\user\PaidSubscriptionUserList;
+use wcf\system\request\LinkHandler;
+use wcf\system\user\notification\object\PaidSubscriptionUserUserNotificationObject;
+use wcf\system\WCF;
+
+/**
+ * Notification event for expiring paid subscriptions.
+ * 
+ * @author     Matthias Schmidt
+ * @copyright  2001-2017 WoltLab GmbH
+ * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package    WoltLabSuite\Core\System\User\Notification\Event
+ * @since      3.1
+ * 
+ * @method     PaidSubscriptionUserUserNotificationObject      getUserNotificationObject()
+ */
+class ExpiringPaidSubscriptionUserUserNotificationEvent extends AbstractUserNotificationEvent {
+       /**
+        * @inheritDoc
+        */
+       public function getLink() {
+               return LinkHandler::getInstance()->getLink('PaidSubscriptionList', ['forceFrontend' => true]);
+       }
+       
+       /**
+        * @inheritDoc
+        */
+       public function getMessage() {
+               return $this->getLanguage()->getDynamicVariable('wcf.paidSubscription.expiringSubscription.notification.message', [
+                       'author' => $this->author,
+                       'notification' => $this->notification, 
+                       'userNotificationObject' => $this->getUserNotificationObject()
+               ]);
+       }
+       
+       /**
+        * @inheritDoc
+        */
+       public function getTitle() {
+               return $this->getLanguage()->get('wcf.paidSubscription.expiringSubscription.notification.title');
+       }
+       
+       /**
+        * @inheritDoc
+        */
+       public function isVisible() {
+               $userSubscriptionList = new PaidSubscriptionUserList();
+               $userSubscriptionList->getConditionBuilder()->add('userID = ?', [WCF::getUser()->userID]);
+               $userSubscriptionList->getConditionBuilder()->add('isActive = ?', [1]);
+               
+               return $userSubscriptionList->countObjects() > 0;
+       }
+}
diff --git a/wcfsetup/install/files/lib/system/user/notification/event/PaidSubscriptionUserUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/PaidSubscriptionUserUserNotificationEvent.class.php
deleted file mode 100644 (file)
index 52cf13d..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-namespace wcf\system\user\notification\event;
-use wcf\data\paid\subscription\user\PaidSubscriptionUserList;
-use wcf\system\request\LinkHandler;
-use wcf\system\user\notification\object\PaidSubscriptionUserUserNotificationObject;
-use wcf\system\WCF;
-
-/**
- * Notification event for followers.
- * 
- * @author     Matthias Schmidt
- * @copyright  2001-2017 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    WoltLabSuite\Core\System\User\Notification\Event
- * @since      3.1
- * 
- * @method     PaidSubscriptionUserUserNotificationObject      getUserNotificationObject()
- */
-class PaidSubscriptionUserUserNotificationEvent extends AbstractUserNotificationEvent {
-       /**
-        * @inheritDoc
-        */
-       public function getLink() {
-               return LinkHandler::getInstance()->getLink('PaidSubscriptionList', ['forceFrontend' => true]);
-       }
-       
-       /**
-        * @inheritDoc
-        */
-       public function getMessage() {
-               return $this->getLanguage()->getDynamicVariable('wcf.paidSubscription.notification.message', [
-                       'author' => $this->author,
-                       'notification' => $this->notification, 
-                       'userNotificationObject' => $this->getUserNotificationObject()
-               ]);
-       }
-       
-       /**
-        * @inheritDoc
-        */
-       public function getTitle() {
-               return $this->getLanguage()->get('wcf.paidSubscription.notification.title');
-       }
-       
-       /**
-        * @inheritDoc
-        */
-       public function isVisible() {
-               $userSubscriptionList = new PaidSubscriptionUserList();
-               $userSubscriptionList->getConditionBuilder()->add('userID = ?', [WCF::getUser()->userID]);
-               $userSubscriptionList->getConditionBuilder()->add('isActive = ?', [1]);
-               
-               return $userSubscriptionList->countObjects() > 0;
-       }
-}
index c6b1e68cc8c1c281f00c6878622c5528d2695753..69319c2835aaed7ad6aceb2eecaa11417b7ad75c 100644 (file)
@@ -2992,8 +2992,8 @@ Fehler sind beispielsweise:
                <item name="wcf.paidSubscription.returnMessage"><![CDATA[Danke für {if LANGUAGE_USE_INFORMAL_VARIANT}deine{else}Ihre{/if} Zahlung. {if LANGUAGE_USE_INFORMAL_VARIANT}Deine{else}Ihre{/if} Transaktion wurde abgeschlossen. Sobald {if LANGUAGE_USE_INFORMAL_VARIANT}deine{else}Ihre{/if} Zahlung von uns verarbeitet wurde, wird die erworbene Mitgliedschaft aktiviert.]]></item>
                <item name="wcf.paidSubscription.confirmTOS"><![CDATA[Hiermit bestätige ich mein Einverständnis mit den <a href="{PAID_SUBSCRIPTION_TOS_URL}">Nutzungsbedingungen</a>]]></item>
                <item name="wcf.paidSubscription.button.moreInformation"><![CDATA[Mehr Informationen]]></item>
-               <item name="wcf.paidSubscription.notification.title"><![CDATA[Ablaufende Mitgliedschaft]]></item>
-               <item name="wcf.paidSubscription.notification.message"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Deine{else}Ihre{/if} Mitgliedschaft „{$userNotificationObject->getTitle()}“ läuft {$userNotificationObject->endDate|dateDiff:$notification->time:false:true} (am {$userNotificationObject->endDate|date:'d. F'}) ab.]]></item>
+               <item name="wcf.paidSubscription.expiringSubscription.notification.title"><![CDATA[Ablaufende Mitgliedschaft]]></item>
+               <item name="wcf.paidSubscription.expiringSubscription.notification.message"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Deine{else}Ihre{/if} Mitgliedschaft „{$userNotificationObject->getTitle()}“ läuft {$userNotificationObject->endDate|dateDiff:$notification->time:false:true} (am {$userNotificationObject->endDate|date:'d. F'}) ab.]]></item>
        </category>
        
        <category name="wcf.payment">
index 0231fab6559961a41183dec1db9dd4d106cc2b7b..a3944f966e08f828a2c005c189dba209f724836c 100644 (file)
@@ -2985,8 +2985,8 @@ Errors are:
                <item name="wcf.paidSubscription.returnMessage"><![CDATA[Thank you for your payment, the transaction has been completed. Your subscription will be active once your payment has been processed by us.]]></item>
                <item name="wcf.paidSubscription.confirmTOS"><![CDATA[I agree to the <a href="{PAID_SUBSCRIPTION_TOS_URL}">Terms of Service</a>]]></item>
                <item name="wcf.paidSubscription.button.moreInformation"><![CDATA[More Details]]></item>
-               <item name="wcf.paidSubscription.notification.title"><![CDATA[Expiring Subscription]]></item>
-               <item name="wcf.paidSubscription.notification.message"><![CDATA[Your subscription “{$userNotificationObject->getTitle()}” will expire {$userNotificationObject->endDate|dateDiff:$notification->time:false:true} (on {$userNotificationObject->endDate|date:'F jS'}).]]></item>
+               <item name="wcf.paidSubscription.expiringSubscription.notification.title"><![CDATA[Expiring Subscription]]></item>
+               <item name="wcf.paidSubscription.expiringSubscription.notification.message"><![CDATA[Your subscription “{$userNotificationObject->getTitle()}” will expire {$userNotificationObject->endDate|dateDiff:$notification->time:false:true} (on {$userNotificationObject->endDate|date:'F jS'}).]]></item>
        </category>
        
        <category name="wcf.payment">