Moved into own repository WoltLab/com.woltlab.wcf.notification
authorAlexander Ebert <ebert@woltlab.com>
Wed, 27 Jul 2011 16:22:58 +0000 (18:22 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 27 Jul 2011 16:22:58 +0000 (18:22 +0200)
36 files changed:
com.woltlab.wcf.notification/coreobject.xml [deleted file]
com.woltlab.wcf.notification/files/lib/data/user/notification/UserNotification.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/data/user/notification/UserNotificationAction.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/data/user/notification/UserNotificationEditor.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/data/user/notification/UserNotificationList.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/data/user/notification/event/UserNotificationEvent.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/data/user/notification/event/UserNotificationEventAction.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/data/user/notification/event/UserNotificationEventEditor.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/data/user/notification/event/UserNotificationEventList.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/data/user/notification/object/type/UserNotificationObjectType.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/data/user/notification/object/type/UserNotificationObjectTypeAction.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/data/user/notification/object/type/UserNotificationObjectTypeEditor.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/data/user/notification/object/type/UserNotificationObjectTypeList.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/data/user/notification/recipient/UserNotificationRecipient.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/data/user/notification/recipient/UserNotificationRecipientList.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/data/user/notification/type/UserNotificationType.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/data/user/notification/type/UserNotificationTypeAction.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/data/user/notification/type/UserNotificationTypeEditor.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/data/user/notification/type/UserNotificationTypeList.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/system/cache/builder/CacheBuilderUserNotificationObjectType.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/system/package/plugin/UserNotificationEventPackageInstallationPlugin.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/system/package/plugin/UserNotificationObjectTypePackageInstallationPlugin.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/system/package/plugin/UserNotificationTypePackageInstallationPlugin.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/system/user/notification/UserNotificationHandler.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/system/user/notification/event/AbstractUserNotificationEvent.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/system/user/notification/event/IUserNotificationEvent.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/system/user/notification/object/IUserNotificationObject.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/system/user/notification/object/type/AbstractUserNotificationObjectType.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/system/user/notification/object/type/IUserNotificationObjectType.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/system/user/notification/type/AbstractUserNotificationType.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/system/user/notification/type/IUserNotificationType.class.php [deleted file]
com.woltlab.wcf.notification/files/lib/system/user/notification/type/MailUserNotificationType.class.php [deleted file]
com.woltlab.wcf.notification/install.sql [deleted file]
com.woltlab.wcf.notification/package.xml [deleted file]
com.woltlab.wcf.notification/pip.xml [deleted file]
com.woltlab.wcf.notification/userNotificationType.xml [deleted file]

diff --git a/com.woltlab.wcf.notification/coreobject.xml b/com.woltlab.wcf.notification/coreobject.xml
deleted file mode 100644 (file)
index 48890e4..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/coreobject.xsd">
-       <import>
-               <coreobject>
-                       <objectname><![CDATA[wcf\system\user\notification\UserNotificationHandler]]></objectname>
-               </coreobject>
-       </import>
-</data>
diff --git a/com.woltlab.wcf.notification/files/lib/data/user/notification/UserNotification.class.php b/com.woltlab.wcf.notification/files/lib/data/user/notification/UserNotification.class.php
deleted file mode 100644 (file)
index 0b4fcc0..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-namespace wcf\data\user\notification;
-use wcf\data\DatabaseObject;
-
-/**
- * Represents a user notification.
- * 
- * @author     Marcel Werk
- * @copyright  2001-2011 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage data.user.notification
- * @category   Community Framework
- */
-class UserNotification extends DatabaseObject {
-       /**
-        * @see wcf\data\DatabaseObject::$databaseTableName
-        */
-       protected static $databaseTableName = 'user_notification';
-       
-       /**
-        * @see wcf\data\DatabaseObject::$databaseTableIndexName
-        */
-       protected static $databaseTableIndexName = 'notificationID';
-}
diff --git a/com.woltlab.wcf.notification/files/lib/data/user/notification/UserNotificationAction.class.php b/com.woltlab.wcf.notification/files/lib/data/user/notification/UserNotificationAction.class.php
deleted file mode 100644 (file)
index e335d70..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-namespace wcf\data\user\notification;
-use wcf\data\AbstractDatabaseObjectAction;
-
-/**
- * Executes user notification-related actions.
- * 
- * @author     Marcel Werk
- * @copyright  2001-2011 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage data.user.notification
- * @category   Community Framework
- */
-class UserNotificationAction extends AbstractDatabaseObjectAction {
-       /**
-        * @see wcf\data\AbstractDatabaseObjectAction::$className
-        */
-       protected $className = 'wcf\data\user\notification\UserNotificationEditor';
-}
diff --git a/com.woltlab.wcf.notification/files/lib/data/user/notification/UserNotificationEditor.class.php b/com.woltlab.wcf.notification/files/lib/data/user/notification/UserNotificationEditor.class.php
deleted file mode 100644 (file)
index 36004ef..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-namespace wcf\data\user\notification;
-use wcf\data\DatabaseObjectEditor;
-use wcf\system\WCF;
-
-/**
- * Provides functions to edit user notifications.
- * 
- * @author     Marcel Werk
- * @copyright  2001-2011 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage data.user.notification
- * @category   Community Framework
- */
-class UserNotificationEditor extends DatabaseObjectEditor {
-       /**
-        * @see wcf\data\DatabaseObjectDecorator::$baseClass
-        */
-       protected static $baseClass = 'wcf\data\user\notification\UserNotification';
-       
-       /**
-        * @see EditableObject::create()
-        */
-       public static function create(array $parameters = array()) {
-               $recipientIDs = array();
-               if (isset($parameters['recipientIDs']) && is_array($parameters['recipientIDs'])) {
-                       $recipientIDs = $parameters['recipientIDs'];
-                       unset($parameters['recipientIDs']);
-               }
-               
-               $notification = parent::create($parameters);
-               
-               // save recpients
-               if (count($recipientIDs)) {
-                       $sql = "INSERT INTO     wcf".WCF_N."_user_notification_to_user
-                                               (notificationID, userID)
-                               VALUES          (?, ?)";
-                       $statement = WCF::getDB()->prepareStatement($sql);
-                       foreach ($recipientIDs as $recipientID) {
-                               $statement->execute(array($notification->notificationID, $recipientID));
-                       }
-               }
-               
-               return $notification;
-       }
-}
diff --git a/com.woltlab.wcf.notification/files/lib/data/user/notification/UserNotificationList.class.php b/com.woltlab.wcf.notification/files/lib/data/user/notification/UserNotificationList.class.php
deleted file mode 100644 (file)
index 8a60cf1..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-namespace wcf\data\user\notification;
-use wcf\data\DatabaseObjectList;
-
-/**
- * Represents a list of user notifications.
- * 
- * @author     Marcel Werk
- * @copyright  2001-2011 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage data.user.notification
- * @category   Community Framework
- */
-class UserNotificationList extends DatabaseObjectList {
-       /**
-        * @see wcf\data\DatabaseObjectList::$className
-        */
-       public $className = 'wcf\data\user\notification\UserNotification';
-}
diff --git a/com.woltlab.wcf.notification/files/lib/data/user/notification/event/UserNotificationEvent.class.php b/com.woltlab.wcf.notification/files/lib/data/user/notification/event/UserNotificationEvent.class.php
deleted file mode 100644 (file)
index f44ade6..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-namespace wcf\data\user\notification\event;
-use wcf\data\ProcessibleDatabaseObject;
-
-/**
- * Represents a user notification event.
- * 
- * @author     Marcel Werk
- * @copyright  2001-2011 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage data.user.notification.event
- * @category   Community Framework
- */
-class UserNotificationEvent extends ProcessibleDatabaseObject {
-       /**
-        * @see wcf\data\DatabaseObject::$databaseTableName
-        */
-       protected static $databaseTableName = 'user_notification_event';
-       
-       /**
-        * @see wcf\data\DatabaseObject::$databaseTableIndexName
-        */
-       protected static $databaseTableIndexName = 'eventID';
-       
-       /**
-        * @see wcf\data\ProcessibleDatabaseObject::$processorInterface
-        */
-       protected static $processorInterface = 'wcf\system\user\notification\event\IUserNotificationEvent';
-}
diff --git a/com.woltlab.wcf.notification/files/lib/data/user/notification/event/UserNotificationEventAction.class.php b/com.woltlab.wcf.notification/files/lib/data/user/notification/event/UserNotificationEventAction.class.php
deleted file mode 100644 (file)
index 9321c2c..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-namespace wcf\data\user\notification\event;
-use wcf\data\AbstractDatabaseObjectAction;
-
-/**
- * Executes user notification event-related actions.
- * 
- * @author     Marcel Werk
- * @copyright  2001-2011 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage data.user.notification.event
- * @category   Community Framework
- */
-class UserNotificationEventAction extends AbstractDatabaseObjectAction {
-       /**
-        * @see wcf\data\AbstractDatabaseObjectAction::$className
-        */
-       protected $className = 'wcf\data\user\notification\event\UserNotificationEventEditor';
-}
diff --git a/com.woltlab.wcf.notification/files/lib/data/user/notification/event/UserNotificationEventEditor.class.php b/com.woltlab.wcf.notification/files/lib/data/user/notification/event/UserNotificationEventEditor.class.php
deleted file mode 100644 (file)
index 8f51549..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-namespace wcf\data\user\notification\event;
-use wcf\data\DatabaseObjectEditor;
-
-/**
- * Provides functions to edit user notification events.
- * 
- * @author     Marcel Werk
- * @copyright  2001-2011 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage data.user.notification.event
- * @category   Community Framework
- */
-class UserNotificationEventEditor extends DatabaseObjectEditor {
-       /**
-        * @see wcf\data\DatabaseObjectDecorator::$baseClass
-        */
-       protected static $baseClass = 'wcf\data\user\notification\event\UserNotificationEvent';
-}
diff --git a/com.woltlab.wcf.notification/files/lib/data/user/notification/event/UserNotificationEventList.class.php b/com.woltlab.wcf.notification/files/lib/data/user/notification/event/UserNotificationEventList.class.php
deleted file mode 100644 (file)
index f55a438..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-namespace wcf\data\user\notification\event;
-use wcf\data\DatabaseObjectList;
-
-/**
- * Represents a list of user notification events.
- * 
- * @author     Marcel Werk
- * @copyright  2001-2011 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage data.user.notification.event
- * @category   Community Framework
- */
-class UserNotificationEventList extends DatabaseObjectList {
-       /**
-        * @see wcf\data\DatabaseObjectList::$className
-        */
-       public $className = 'wcf\data\user\notification\event\UserNotificationEvent';
-}
diff --git a/com.woltlab.wcf.notification/files/lib/data/user/notification/object/type/UserNotificationObjectType.class.php b/com.woltlab.wcf.notification/files/lib/data/user/notification/object/type/UserNotificationObjectType.class.php
deleted file mode 100644 (file)
index 4215300..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-namespace wcf\data\user\notification\object\type;
-use wcf\data\ProcessibleDatabaseObject;
-
-/**
- * Represents a user notification object type.
- * 
- * @author     Marcel Werk
- * @copyright  2001-2011 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage data.user.notification.object.type
- * @category   Community Framework
- */
-class UserNotificationObjectType extends ProcessibleDatabaseObject {
-       /**
-        * @see wcf\data\DatabaseObject::$databaseTableName
-        */
-       protected static $databaseTableName = 'user_notification_object_type';
-       
-       /**
-        * @see wcf\data\DatabaseObject::$databaseTableIndexName
-        */
-       protected static $databaseTableIndexName = 'objectTypeID';
-       
-       /**
-        * @see wcf\data\ProcessibleDatabaseObject::$processorInterface
-        */
-       protected static $processorInterface = 'wcf\system\user\notification\object\type\IUserNotificationObjectType';
-}
diff --git a/com.woltlab.wcf.notification/files/lib/data/user/notification/object/type/UserNotificationObjectTypeAction.class.php b/com.woltlab.wcf.notification/files/lib/data/user/notification/object/type/UserNotificationObjectTypeAction.class.php
deleted file mode 100644 (file)
index 0e7eea0..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-namespace wcf\data\user\notification\object\type;
-use wcf\data\AbstractDatabaseObjectAction;
-
-/**
- * Executes user notification object type-related actions.
- * 
- * @author     Marcel Werk
- * @copyright  2001-2011 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage data.user.notification.object.type
- * @category   Community Framework
- */
-class UserNotificationObjectTypeAction extends AbstractDatabaseObjectAction {
-       /**
-        * @see wcf\data\AbstractDatabaseObjectAction::$className
-        */
-       protected $className = 'wcf\data\user\notification\object\type\UserNotificationObjectTypeEditor';
-}
diff --git a/com.woltlab.wcf.notification/files/lib/data/user/notification/object/type/UserNotificationObjectTypeEditor.class.php b/com.woltlab.wcf.notification/files/lib/data/user/notification/object/type/UserNotificationObjectTypeEditor.class.php
deleted file mode 100644 (file)
index 8247834..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-namespace wcf\data\user\notification\object\type;
-use wcf\data\DatabaseObjectEditor;
-
-/**
- * Provides functions to edit user notification object types.
- * 
- * @author     Marcel Werk
- * @copyright  2001-2011 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage data.user.notification.object.type
- * @category   Community Framework
- */
-class UserNotificationObjectTypeEditor extends DatabaseObjectEditor {
-       /**
-        * @see wcf\data\DatabaseObjectDecorator::$baseClass
-        */
-       protected static $baseClass = 'wcf\data\user\notification\object\type\UserNotificationObjectType';
-}
diff --git a/com.woltlab.wcf.notification/files/lib/data/user/notification/object/type/UserNotificationObjectTypeList.class.php b/com.woltlab.wcf.notification/files/lib/data/user/notification/object/type/UserNotificationObjectTypeList.class.php
deleted file mode 100644 (file)
index 0bd0b48..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-namespace wcf\data\user\notification\object\type;
-use wcf\data\DatabaseObjectList;
-
-/**
- * Represents a list of user notification object types.
- * 
- * @author     Marcel Werk
- * @copyright  2001-2011 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage data.user.notification
- * @category   Community Framework
- */
-class UserNotificationObjectTypeList extends DatabaseObjectList {
-       /**
-        * @see wcf\data\DatabaseObjectList::$className
-        */
-       public $className = 'wcf\data\user\notification\object\type\UserNotificationObjectType';
-}
diff --git a/com.woltlab.wcf.notification/files/lib/data/user/notification/recipient/UserNotificationRecipient.class.php b/com.woltlab.wcf.notification/files/lib/data/user/notification/recipient/UserNotificationRecipient.class.php
deleted file mode 100644 (file)
index 7e9dee9..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-namespace wcf\data\user\notification\recipient;
-use wcf\data\user\notification\type\UserNotificationType;
-use wcf\data\user\User;
-use wcf\data\DatabaseObjectDecorator;
-use wcf\system\WCF;
-
-/**
- * Decorates the user object to provide special functions for handling recipients of user notifications.
- * 
- * @author     Marcel Werk
- * @copyright  2001-2011 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage data.user.notification.user
- * @category   Community Framework
- */
-class UserNotificationRecipient extends DatabaseObjectDecorator {
-       /**
-        * @see DatabaseObjectDecorator::$baseClass
-        */
-       protected static $baseClass = 'wcf\data\user\User';
-       
-       /**
-        * Creates a new UserNotificationRecipient object.
-        * 
-        * @param       wcf\data\user\User              $object
-        */
-       public function __construct(User $object) {
-               parent::__construct($object);
-               
-               // get notification types
-               if (!isset($this->object->data['notificationTypes'])) {
-                       $this->object->data['notificationTypes'] = array();
-                       $sql = "SELECT          event_to_user.eventID, notification_type.*
-                               FROM            wcf".WCF_N."_user_notification_event_to_user event_to_user
-                               LEFT JOIN       wcf".WCF_N."_user_notification_type notification_type
-                               ON              (notification_type.notificationTypeID = event_to_user.notificationTypeID)
-                               WHERE           event_to_user.userID = ?
-                                               AND event_to_user.enabled = ?";
-                       $statement = WCF::getDB()->prepareStatement($sql);
-                       $statement->execute(array($this->userID, 1));
-                       while ($row = $statement->fetchArray()) {
-                               $databaseObject = new UserNotificationType(null, $row);
-                               $this->object->data['notificationTypes'][$row['eventID']][] = $databaseObject->getProcessor();
-                       }
-               }
-       }
-       
-       /**
-        * Returns the enabled notification types for the given event.
-        * 
-        * @param       integer         $eventID
-        * @return      array<wcf\system\user\notification\type\IUserNotificationType>
-        */
-       public function getNotificationTypes($eventID) {
-               if (isset($this->notificationTypes[$eventID])) {
-                       return $this->notificationTypes[$eventID];
-               }
-               
-               return array();
-       }
-}
diff --git a/com.woltlab.wcf.notification/files/lib/data/user/notification/recipient/UserNotificationRecipientList.class.php b/com.woltlab.wcf.notification/files/lib/data/user/notification/recipient/UserNotificationRecipientList.class.php
deleted file mode 100644 (file)
index 6253315..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-namespace wcf\data\user\notification\recipient;
-use wcf\data\user\notification\type\UserNotificationType;
-use wcf\data\user\UserList;
-use wcf\data\user\User;
-use wcf\system\database\util\PreparedStatementConditionBuilder;
-use wcf\system\WCF;
-
-/**
- * Decorates the user object to provide special functions for handling recipients of user notifications.
- * 
- * @author     Marcel Werk
- * @copyright  2001-2011 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage data.user.notification.user
- * @category   Community Framework
- */
-class UserNotificationRecipientList extends UserList {
-       /**
-        * @see wcf\data\DatabaseObjectList\DatabaseObjectList::readObjects()
-        */
-       public function readObjects() {
-               if ($this->objectIDs === null) {
-                       $this->readObjectIDs();
-               }
-               
-               if (!count($this->objectIDs)) {
-                       return;
-               }
-               
-               // get notification types
-               $notificationTypes = array();
-               $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('event_to_user.userID IN (?)', array($this->objectIDs));
-               $conditionBuilder->add('event_to_user.enabled = ?', array(1));
-               
-               $sql = "SELECT          event_to_user.eventID, event_to_user.userID, notification_type.*
-                       FROM            wcf".WCF_N."_user_notification_event_to_user event_to_user
-                       LEFT JOIN       wcf".WCF_N."_user_notification_type notification_type
-                       ON              (notification_type.notificationTypeID = event_to_user.notificationTypeID)
-                       ".$conditionBuilder->__toString();
-               $statement = WCF::getDB()->prepareStatement($sql);
-               $statement->execute($conditionBuilder->getParameters());
-               while ($row = $statement->fetchArray()) {
-                       $databaseObject = new UserNotificationType(null, $row);
-                       $notificationTypes[$row['userID']][$row['eventID']][] = $databaseObject->getProcessor();
-               }
-
-               // get users
-               $sql = "SELECT  ".(!empty($this->sqlSelects) ? $this->sqlSelects.',' : '')."
-                               ".$this->getDatabaseTableAlias().".*
-                       FROM    ".$this->getDatabaseTableName()." ".$this->getDatabaseTableAlias()."
-                               ".$this->sqlJoins."
-                       WHERE   ".$this->getDatabaseTableAlias().".".$this->getDatabaseTableIndexName()." IN (?".str_repeat(',?', count($this->objectIDs) - 1).")
-                               ".(!empty($this->sqlOrderBy) ? "ORDER BY ".$this->sqlOrderBy : '');
-               $statement = WCF::getDB()->prepareStatement($sql);
-               $statement->execute($this->objectIDs);
-               while ($row = $statement->fetchArray()) {
-                       $row['notificationTypes'] = (isset($notificationTypes[$row['userID']]) ? $notificationTypes[$row['userID']] : array());
-                       $this->objects[] = new UserNotificationRecipient(new User(null, $row)); 
-               }
-       }
-}
diff --git a/com.woltlab.wcf.notification/files/lib/data/user/notification/type/UserNotificationType.class.php b/com.woltlab.wcf.notification/files/lib/data/user/notification/type/UserNotificationType.class.php
deleted file mode 100644 (file)
index b78ceca..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-namespace wcf\data\user\notification\type;
-use wcf\data\ProcessibleDatabaseObject;
-
-/**
- * Represents a user notification type.
- * 
- * @author     Marcel Werk
- * @copyright  2001-2011 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage data.user.notification.type
- * @category   Community Framework
- */
-class UserNotificationType extends ProcessibleDatabaseObject {
-       /**
-        * @see wcf\data\DatabaseObject::$databaseTableName
-        */
-       protected static $databaseTableName = 'user_notification_type';
-       
-       /**
-        * @see wcf\data\DatabaseObject::$databaseTableIndexName
-        */
-       protected static $databaseTableIndexName = 'notificationTypeID';
-       
-       /**
-        * @see wcf\data\ProcessibleDatabaseObject::$processorInterface
-        */
-       protected static $processorInterface = 'wcf\system\user\notification\type\IUserNotificationType';
-}
diff --git a/com.woltlab.wcf.notification/files/lib/data/user/notification/type/UserNotificationTypeAction.class.php b/com.woltlab.wcf.notification/files/lib/data/user/notification/type/UserNotificationTypeAction.class.php
deleted file mode 100644 (file)
index 69ef7ba..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-namespace wcf\data\user\notification\type;
-use wcf\data\AbstractDatabaseObjectAction;
-
-/**
- * Executes user notification type-related actions.
- * 
- * @author     Marcel Werk
- * @copyright  2001-2011 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage data.user.notification.type
- * @category   Community Framework
- */
-class UserNotificationTypeAction extends AbstractDatabaseObjectAction {
-       /**
-        * @see wcf\data\AbstractDatabaseObjectAction::$className
-        */
-       protected $className = 'wcf\data\user\notification\type\UserNotificationTypeEditor';
-}
diff --git a/com.woltlab.wcf.notification/files/lib/data/user/notification/type/UserNotificationTypeEditor.class.php b/com.woltlab.wcf.notification/files/lib/data/user/notification/type/UserNotificationTypeEditor.class.php
deleted file mode 100644 (file)
index 1794dec..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-namespace wcf\data\user\notification\type;
-use wcf\data\DatabaseObjectEditor;
-
-/**
- * Provides functions to edit user notification types.
- * 
- * @author     Marcel Werk
- * @copyright  2001-2011 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage data.user.notification.type
- * @category   Community Framework
- */
-class UserNotificationTypeEditor extends DatabaseObjectEditor {
-       /**
-        * @see wcf\data\DatabaseObjectDecorator::$baseClass
-        */
-       protected static $baseClass = 'wcf\data\user\notification\type\UserNotificationType';
-}
diff --git a/com.woltlab.wcf.notification/files/lib/data/user/notification/type/UserNotificationTypeList.class.php b/com.woltlab.wcf.notification/files/lib/data/user/notification/type/UserNotificationTypeList.class.php
deleted file mode 100644 (file)
index 8e83df0..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-namespace wcf\data\user\notification\type;
-use wcf\data\DatabaseObjectList;
-
-/**
- * Represents a list of user notification types.
- * 
- * @author     Marcel Werk
- * @copyright  2001-2011 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage data.user.notification.type
- * @category   Community Framework
- */
-class UserNotificationTypeList extends DatabaseObjectList {
-       /**
-        * @see wcf\data\DatabaseObjectList::$className
-        */
-       public $className = 'wcf\data\user\notification\type\UserNotificationType';
-}
diff --git a/com.woltlab.wcf.notification/files/lib/system/cache/builder/CacheBuilderUserNotificationObjectType.class.php b/com.woltlab.wcf.notification/files/lib/system/cache/builder/CacheBuilderUserNotificationObjectType.class.php
deleted file mode 100644 (file)
index 9d69444..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-namespace wcf\system\cache\builder;
-use wcf\data\user\notification\event\UserNotificationEvent;
-use wcf\data\user\notification\object\type\UserNotificationObjectType;
-use wcf\system\cache\ICacheBuilder;
-use wcf\system\WCF;
-
-/**
- * Caches user notification object types and events.
- *
- * @author     Marcell Werk, Oliver Kliebisch
- * @copyright  2001-2011 WoltLab GmbH, Oliver Kliebisch
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage system.cache.builder
- * @category   Community Framework
- */
-class CacheBuilderUserNotificationObjectType implements ICacheBuilder {
-       /**
-        * @see wcf\system\cache\ICacheBuilder::getData()
-        */
-       public function getData($cacheResource) {
-               $data = array();
-               
-               // get package id
-               $tmp = explode('-', $cacheResource['cache']);
-               $packageID = array_pop($tmp);
-               
-               // get object types
-               $typeIDArray = array();
-               $sql = "SELECT          object_type.*
-                       FROM            wcf".WCF_N."_user_notification_object_type object_type,
-                                       wcf".WCF_N."_package_dependency package_dependency
-                       WHERE           object_type.packageID = package_dependency.dependency
-                                       AND package_dependency.packageID = ?
-                       ORDER BY        package_dependency.priority DESC";
-               $statement = WCF::getDB()->prepareStatement($sql);
-               $statement->execute(array($packageID));
-               while ($row = $statement->fetchArray()) {
-                       if (!isset($data[$row['objectType']])) {
-                               $databaseObject = new UserNotificationObjectType(null, $row);
-                               $data[$row['objectType']] = array(
-                                       'object' => $databaseObject->getProcessor(),
-                                       'events' => array()
-                               );
-                       }
-               }
-
-               // get events
-               $sql = "SELECT          event.*, object_type.objectType
-                       FROM            wcf".WCF_N."_package_dependency package_dependency,
-                                       wcf".WCF_N."_user_notification_event event
-                       LEFT JOIN       wcf".WCF_N."_user_notification_object_type object_type
-                       ON              (object_type.objectTypeID = event.objectTypeID)
-                       WHERE           event.packageID = package_dependency.dependency
-                                       AND package_dependency.packageID = ?
-                       ORDER BY        package_dependency.priority DESC";
-               $statement = WCF::getDB()->prepareStatement($sql);
-               $statement->execute(array($packageID));
-               while ($row = $statement->fetchArray()) {
-                       if (isset($data[$row['objectType']]) && !isset($data[$row['objectType']]['events'][$row['eventName']])) {
-                               $databaseObject = new UserNotificationEvent(null, $row);
-                               $data[$row['objectType']]['events'][$row['eventName']] = $databaseObject->getProcessor();
-                       }
-               }
-               
-               return $data;
-       }
-}
diff --git a/com.woltlab.wcf.notification/files/lib/system/package/plugin/UserNotificationEventPackageInstallationPlugin.class.php b/com.woltlab.wcf.notification/files/lib/system/package/plugin/UserNotificationEventPackageInstallationPlugin.class.php
deleted file mode 100644 (file)
index 5527e75..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-<?php
-namespace wcf\system\package\plugin;
-use wcf\system\exception\SystemException;
-use wcf\system\WCF;
-
-/**
- * This PIP installs, updates or deletes user notification events.
- * 
- * @author     Marcel Werk
- * @copyright  2001-2011 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage system.package.plugin
- * @category   Community Framework
- */
-class UserNotificationEventPackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin {
-       /**
-        * @see wcf\system\package\plugin\AbstractXMLPackageInstallationPlugin::$className
-        */
-       public $className = 'wcf\data\user\notification\event\UserNotificationEventEditor';
-       
-       /**
-        * @see wcf\system\package\plugin\AbstractPackageInstallationPlugin::$tableName
-        */
-       public $tableName = 'user_notification_event';
-       
-       /**
-        * @see wcf\system\package\plugin\AbstractXMLPackageInstallationPlugin::$tagName
-        */     
-       public $tagName = 'event';
-       
-       /**
-        * @see AbstractXMLPackageInstallationPlugin::handleDelete()
-        */
-       protected function handleDelete(array $items) {
-               $sql = "DELETE FROM     wcf".WCF_N."_".$this->tableName."
-                       WHERE           packageID = ?
-                                       AND eventName = ?";
-               $statement = WCF::getDB()->prepareStatement($sql);
-               foreach ($items as $item) {
-                       $statement->execute(array(
-                               $this->installation->getPackageID(),
-                               $item['elements']['name']
-                       ));
-               }
-       }
-       
-       /**
-        * @see AbstractXMLPackageInstallationPlugin::prepareImport()
-        */
-       protected function prepareImport(array $data) {
-               // get object type id
-               $sql = "SELECT          notification_object_type.objectTypeID
-                       FROM            wcf".WCF_N."_package_dependency package_dependency,
-                                       wcf".WCF_N."_user_notification_object_type notification_object_type
-                       WHERE           notification_object_type.packageID = package_dependency.dependency
-                                       AND package_dependency.packageID = ?
-                                       AND notification_object_type.objectType = ?
-                       ORDER BY        package_dependency.priority DESC";
-               $statement = WCF::getDB()->prepareStatement($sql, 1);
-               $statement->execute(array($this->installation->getPackageID(), $data['elements']['objecttype']));
-               $row = $statement->fetchArray();
-               if (empty($row['objectTypeID'])) throw new SystemException("unknown notification object type '".$data['elements']['objecttype']."' given");
-               $objectTypeID = $row['objectTypeID'];
-               
-               // get notification type id
-               $defaultNotificationTypeID = 0;
-               if (!empty($data['elements']['defaultnotificationtype'])) {
-                       $sql = "SELECT          notification_type.notificationTypeID
-                               FROM            wcf".WCF_N."_package_dependency package_dependency,
-                                               wcf".WCF_N."_user_notification_type notification_type
-                               WHERE           notification_type.packageID = package_dependency.dependency
-                                               AND package_dependency.packageID = ?
-                                               AND notification_type.notificationType = ?
-                               ORDER BY        package_dependency.priority DESC";
-                       $statement = WCF::getDB()->prepareStatement($sql, 1);
-                       $statement->execute(array($this->installation->getPackageID(), $data['elements']['defaultnotificationtype']));
-                       $row = $statement->fetchArray();
-                       if (empty($row['notificationTypeID'])) throw new SystemException("unknown notification type '".$data['elements']['defaultnotificationtype']."' given");
-                       $defaultNotificationTypeID = $row['notificationTypeID'];
-               }
-               
-               return array(
-                       'eventName' => $data['elements']['name'],
-                       'className' => $data['elements']['classname'],
-                       'objectTypeID' => $objectTypeID,
-                       'defaultNotificationTypeID' => $defaultNotificationTypeID,
-                       'languageCategory' => (isset($data['elements']['languagecategory']) ? $data['elements']['languagecategory'] : ''),
-                       'requiresConfirmation' => (isset($data['elements']['requiresconfirmation']) ? intval($data['elements']['requiresconfirmation']) : 0),
-                       'acceptURL' => (isset($data['elements']['accepturl']) ? $data['elements']['accepturl'] : ''),
-                       'declineURL' => (isset($data['elements']['declineurl']) ? $data['elements']['declineurl'] : ''),
-                       'permissions' => (isset($data['elements']['permissions']) ? $data['elements']['permissions'] : ''),
-                       'options' => (isset($data['elements']['options']) ? $data['elements']['options'] : '')
-               );
-       }
-       
-       /**
-        * @see AbstractXMLPackageInstallationPlugin::findExistingItem()
-        */
-       protected function findExistingItem(array $data) {
-               $sql = "SELECT  *
-                       FROM    wcf".WCF_N."_".$this->tableName."
-                       WHERE   packageID = ?
-                               AND eventName = ?";
-               $parameters = array(
-                       $this->installation->getPackageID(),
-                       $data['eventName']
-               );
-               
-               return array(
-                       'sql' => $sql,
-                       'parameters' => $parameters
-               );
-       }
-}
diff --git a/com.woltlab.wcf.notification/files/lib/system/package/plugin/UserNotificationObjectTypePackageInstallationPlugin.class.php b/com.woltlab.wcf.notification/files/lib/system/package/plugin/UserNotificationObjectTypePackageInstallationPlugin.class.php
deleted file mode 100644 (file)
index b6d1dc6..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-<?php
-namespace wcf\system\package\plugin;
-use wcf\system\WCF;
-
-/**
- * This PIP installs, updates or deletes user notification object types.
- * 
- * @author     Marcel Werk
- * @copyright  2001-2011 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage system.package.plugin
- * @category   Community Framework
- */
-class UserNotificationObjectTypePackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin {
-       /**
-        * @see wcf\system\package\plugin\AbstractXMLPackageInstallationPlugin::$className
-        */
-       public $className = 'wcf\data\user\notification\object\type\UserNotificationObjectTypeEditor';
-       
-       /**
-        * @see wcf\system\package\plugin\AbstractPackageInstallationPlugin::$tableName
-        */
-       public $tableName = 'user_notification_object_type';
-       
-       /**
-        * @see wcf\system\package\plugin\AbstractXMLPackageInstallationPlugin::$tagName
-        */     
-       public $tagName = 'objecttype';
-       
-       /**
-        * @see AbstractXMLPackageInstallationPlugin::handleDelete()
-        */
-       protected function handleDelete(array $items) {
-               $sql = "DELETE FROM     wcf".WCF_N."_".$this->tableName."
-                       WHERE           packageID = ?
-                                       AND objectType = ?";
-               $statement = WCF::getDB()->prepareStatement($sql);
-               foreach ($items as $item) {
-                       $statement->execute(array(
-                               $this->installation->getPackageID(),
-                               $item['elements']['name']
-                       ));
-               }
-       }
-       
-       /**
-        * @see AbstractXMLPackageInstallationPlugin::prepareImport()
-        */
-       protected function prepareImport(array $data) {
-               return array(
-                       'objectType' => $data['elements']['name'],
-                       'className' => $data['elements']['classname'],
-                       'permissions' => (isset($data['elements']['permissions']) ? $data['elements']['permissions'] : ''),
-                       'options' => (isset($data['elements']['options']) ? $data['elements']['options'] : '')
-               );
-       }
-       
-       /**
-        * @see AbstractXMLPackageInstallationPlugin::findExistingItem()
-        */
-       protected function findExistingItem(array $data) {
-               $sql = "SELECT  *
-                       FROM    wcf".WCF_N."_".$this->tableName."
-                       WHERE   packageID = ?
-                               AND objectType = ?";
-               $parameters = array(
-                       $this->installation->getPackageID(),
-                       $data['objectType']
-               );
-               
-               return array(
-                       'sql' => $sql,
-                       'parameters' => $parameters
-               );
-       }
-}
diff --git a/com.woltlab.wcf.notification/files/lib/system/package/plugin/UserNotificationTypePackageInstallationPlugin.class.php b/com.woltlab.wcf.notification/files/lib/system/package/plugin/UserNotificationTypePackageInstallationPlugin.class.php
deleted file mode 100644 (file)
index d875f30..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-<?php
-namespace wcf\system\package\plugin;
-use wcf\system\WCF;
-
-/**
- * This PIP installs, updates or deletes user notification types.
- * 
- * @author     Marcel Werk
- * @copyright  2001-2011 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage system.package.plugin
- * @category   Community Framework
- */
-class UserNotificationTypePackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin {
-       /**
-        * @see wcf\system\package\plugin\AbstractXMLPackageInstallationPlugin::$className
-        */
-       public $className = 'wcf\data\user\notification\type\UserNotificationTypeEditor';
-       
-       /**
-        * @see wcf\system\package\plugin\AbstractPackageInstallationPlugin::$tableName
-        */
-       public $tableName = 'user_notification_type';
-       
-       /**
-        * @see wcf\system\package\plugin\AbstractXMLPackageInstallationPlugin::$tagName
-        */     
-       public $tagName = 'notificationtype';
-       
-       /**
-        * @see AbstractXMLPackageInstallationPlugin::handleDelete()
-        */
-       protected function handleDelete(array $items) {
-               $sql = "DELETE FROM     wcf".WCF_N."_".$this->tableName."
-                       WHERE           packageID = ?
-                                       AND notificationType = ?";
-               $statement = WCF::getDB()->prepareStatement($sql);
-               foreach ($items as $item) {
-                       $statement->execute(array(
-                               $this->installation->getPackageID(),
-                               $item['elements']['name']
-                       ));
-               }
-       }
-       
-       /**
-        * @see AbstractXMLPackageInstallationPlugin::prepareImport()
-        */
-       protected function prepareImport(array $data) {
-               return array(
-                       'notificationType' => $data['elements']['name'],
-                       'className' => $data['elements']['classname'],
-                       'permissions' => (isset($data['elements']['permissions']) ? $data['elements']['permissions'] : ''),
-                       'options' => (isset($data['elements']['options']) ? $data['elements']['options'] : '')
-               );
-       }
-       
-       /**
-        * @see AbstractXMLPackageInstallationPlugin::findExistingItem()
-        */
-       protected function findExistingItem(array $data) {
-               $sql = "SELECT  *
-                       FROM    wcf".WCF_N."_".$this->tableName."
-                       WHERE   packageID = ?
-                               AND notificationType = ?";
-               $parameters = array(
-                       $this->installation->getPackageID(),
-                       $data['notificationType']
-               );
-               
-               return array(
-                       'sql' => $sql,
-                       'parameters' => $parameters
-               );
-       }
-}
diff --git a/com.woltlab.wcf.notification/files/lib/system/user/notification/UserNotificationHandler.class.php b/com.woltlab.wcf.notification/files/lib/system/user/notification/UserNotificationHandler.class.php
deleted file mode 100644 (file)
index 12f990c..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-<?php
-namespace wcf\system\user\notification;
-use wcf\data\user\notification\event\UserNotificationEvent;
-use wcf\data\user\notification\recipient\UserNotificationRecipientList;
-use wcf\data\user\notification\UserNotificationAction;
-use wcf\system\cache\CacheHandler;
-use wcf\system\exception\SystemException;
-use wcf\system\user\notification\object\IUserNotificationObject;
-use wcf\system\SingletonFactory;
-
-/**
- * Handles user notifications.
- *
- * @author     Marcel Werk, Oliver Kliebisch
- * @copyright  2001-2011 WoltLab GmbH, Oliver Kliebisch
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage system.user.notification
- * @category   Community Framework
- */
-class UserNotificationHandler extends SingletonFactory {
-       /**
-        * list of available object types
-        * @var array
-        */
-       protected $availableObjectTypes = array();
-       
-       /**
-        * @see wcf\system\SingletonFactory::init()
-        */
-       protected function init() {
-               // load cache
-               CacheHandler::getInstance()->addResource('user-notification-object-type-'.PACKAGE_ID, WCF_DIR.'cache/cache.user-notification-object-type-'.PACKAGE_ID.'.php', 'wcf\system\cache\CacheBuilderUserNotificationObjectType');
-               $this->availableObjectTypes = CacheHandler::getInstance()->get('user-notification-object-type-'.PACKAGE_ID);
-       }
-       
-       /**
-        * Triggers a notification event.
-        *
-        * @param       string                                                          $eventName
-        * @param       string                                                          $objectType
-        * @param       wcf\system\user\notification\object\IUserNotificationObject     $notificationObject
-        * @param       array<integer>                                                  $recipientIDs
-        * @param       array<mixed>                                                    $additionalData
-        */
-       public function fireEvent($eventName, $objectType, IUserNotificationObject $notificationObject, array $recipientIDs, array $additionalData = array()) {
-               // check given object type and event name
-               if (!isset($this->availableObjectTypes[$objectType]['events'][$eventName])) {
-                       throw new SystemException("Unknown event '.$objectType.'-.$eventName.' given");
-               }
-               
-               // get objects
-               $objectType = $this->availableObjectTypes[$objectType]['object'];
-               $event = $this->availableObjectTypes[$objectType]['events'][$eventName];
-               
-               // save notification
-               $action = new UserNotificationAction(array(), 'create', array('data' => array(
-                       'packageID' => PACKAGE_ID,
-                       'eventID' => $event->eventID,
-                       'objectID' => $notificationObject->getObjectID(),
-                       'time' => TIME_NOW,
-                       'shortOutput' => $event->getShortOutput($eventName),
-                       'mediumOutput' => $event->getMediumOutput($eventName),
-                       'longOutput' => $event->getOutput($eventName),
-                       'additionalData' => serialize($additionalData),
-                       'recipientIDs' => $recipientIDs
-               )));
-               $result = $action->executeAction();
-               $notification = $result['returnValues'];
-               
-               // get recipients
-               $recipientList = new UserNotificationRecipientList();
-               $recipientList->getConditionBuilder()->add('user.userID = ?', array($recipientIDs));
-               $recipientList->readObjects();
-               
-               // sends notifications
-               foreach ($recipientList->getObjects() as $recipient) {
-                       foreach ($recipient->getNotificationTypes($event->eventID) as $notificationType) {
-                               if ($event->supportsNotificationType($notificationType)) {
-                                       $notificationType->send($notification, $recipient, $event);
-                               }
-                       }
-               }
-       }
-}
diff --git a/com.woltlab.wcf.notification/files/lib/system/user/notification/event/AbstractUserNotificationEvent.class.php b/com.woltlab.wcf.notification/files/lib/system/user/notification/event/AbstractUserNotificationEvent.class.php
deleted file mode 100644 (file)
index e1a9430..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-namespace wcf\system\user\notification\event;
-use wcf\data\DatabaseObjectDecorator;
-
-/**
- * Provides default a implementation for user notification events.
- *
- * @author     Marcel Werk, Oliver Kliebisch
- * @copyright  2001-2011 WoltLab GmbH, Oliver Kliebisch
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage system.user.notification.event
- * @category   Community Framework
- */
-abstract class AbstractUserNotificationEvent extends DatabaseObjectDecorator implements IUserNotificationEvent {
-       /**
-        * @see wcf\data\DatabaseObjectDecorator::$baseClass
-        */
-       protected static $baseClass = 'wcf\data\user\notification\event\UserNotificationEvent';
-}
diff --git a/com.woltlab.wcf.notification/files/lib/system/user/notification/event/IUserNotificationEvent.class.php b/com.woltlab.wcf.notification/files/lib/system/user/notification/event/IUserNotificationEvent.class.php
deleted file mode 100644 (file)
index 1ece06d..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-namespace wcf\system\user\notification\event;
-use wcf\data\IDatabaseObjectProcessor;
-use wcf\system\user\notification\type\IUserNotificationType;
-
-/**
- * This interface should be implemented by every event which is fired by the notification system.
- *
- * @author     Marcel Werk, Oliver Kliebisch
- * @copyright  2001-2011 WoltLab GmbH, Oliver Kliebisch
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage system.user.notification.event
- * @category   Community Framework
- */
-interface IUserNotificationEvent extends IDatabaseObjectProcessor {
-       /**
-        * Returns the message for this notification event.
-        *
-        * @param       wcf\system\user\notification\type\IUserNotificationType $notificationType
-        * @return      string
-        */
-       public function getMessage(IUserNotificationType $notificationType);
-
-       /**
-        * Returns the short output for this notification event.
-        *
-        * @return      string
-        */
-       public function getShortOutput();
-
-       /**
-        * Returns the medium output for this notification event.
-        *
-        * @return      string
-        */
-       public function getMediumOutput();
-
-       /**
-        * Returns the full output for this notification event.
-        *
-        * @return      string
-        */
-       public function getOutput();
-
-       /**
-        * Returns the human-readable title of this event.
-        *
-        * @return      string
-        */
-       public function getTitle();
-
-       /**
-        * Returns the human-readable description of this event.
-        *
-        * @return      string
-        */
-       public function getDescription();
-
-       /**
-        * Returns true if this event supports the given notification type.
-        *
-        * @param       wcf\system\user\notification\type\IUserNotificationType $notificationType
-        * @return      boolean
-        */
-       public function supportsNotificationType(IUserNotificationType $notificationType);
-}
diff --git a/com.woltlab.wcf.notification/files/lib/system/user/notification/object/IUserNotificationObject.class.php b/com.woltlab.wcf.notification/files/lib/system/user/notification/object/IUserNotificationObject.class.php
deleted file mode 100644 (file)
index c7be07a..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-namespace wcf\system\user\notification\object;
-use wcf\data\IDatabaseObjectProcessor;
-
-/**
- * This interface should be implemented by every object which is part of a notification.
- *
- * @author     Marcel Werk, Oliver Kliebisch
- * @copyright  2001-2011 WoltLab GmbH, Oliver Kliebisch
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage system.user.notification.object
- * @category   Community Framework
- */
-interface IUserNotificationObject extends IDatabaseObjectProcessor {
-       /**
-        * Returns the ID of this object.
-        *
-        * @return      integer
-        */
-       public function getObjectID();
-
-       /**
-        * Returns the title of this object.
-        *
-        * @return      string
-        */
-       public function getTitle();
-
-       /**
-        * Returns the url of this object.
-        *
-        * @return      string
-        */
-       public function getURL();
-}
diff --git a/com.woltlab.wcf.notification/files/lib/system/user/notification/object/type/AbstractUserNotificationObjectType.class.php b/com.woltlab.wcf.notification/files/lib/system/user/notification/object/type/AbstractUserNotificationObjectType.class.php
deleted file mode 100644 (file)
index ccbc07c..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-namespace wcf\system\user\notification\object\type;
-use wcf\data\DatabaseObjectDecorator;
-
-/**
- * Provides default a implementation for user notification object types.
- *
- * @author     Marcel Werk, Oliver Kliebisch
- * @copyright  2001-2011 WoltLab GmbH, Oliver Kliebisch
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage system.user.notification.event
- * @category   Community Framework
- */
-abstract class AbstractUserNotificationObjectType extends DatabaseObjectDecorator implements IUserNotificationObjectType {
-       /**
-        * @see wcf\data\DatabaseObjectDecorator::$baseClass
-        */
-       protected static $baseClass = 'wcf\data\user\notification\object\type\UserNotificationObjectType';
-}
diff --git a/com.woltlab.wcf.notification/files/lib/system/user/notification/object/type/IUserNotificationObjectType.class.php b/com.woltlab.wcf.notification/files/lib/system/user/notification/object/type/IUserNotificationObjectType.class.php
deleted file mode 100644 (file)
index e12a477..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-namespace wcf\system\user\notification\object\type;
-use wcf\data\IDatabaseObjectProcessor;
-
-/**
- * This interface defines the basic methods every notification object type should implement.
- *
- * @author     Marcel Werk, Oliver Kliebisch
- * @copyright  2001-2011 WoltLab GmbH, Oliver Kliebisch
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage system.user.notification.object.type
- * @category   Community Framework
- */
-interface IUserNotificationObjectType extends IDatabaseObjectProcessor {
-       /**
-        * Gets a notification object by its ID.
-        *
-        * @param       integer         $objectID
-        * @return      wcf\system\user\notification\object\IUserNotificationObject
-        */
-       public function getObjectByID($objectID);
-
-       /**
-        * Gets notification objects by their IDs.
-        *
-        * @param       array<integer>          $objectIDs
-        * @return      array<wcf\system\user\notification\object\IUserNotificationObject>
-        */
-       public function getObjectsByIDs($objectIDs);
-
-}
diff --git a/com.woltlab.wcf.notification/files/lib/system/user/notification/type/AbstractUserNotificationType.class.php b/com.woltlab.wcf.notification/files/lib/system/user/notification/type/AbstractUserNotificationType.class.php
deleted file mode 100644 (file)
index f07c7d7..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-namespace wcf\system\user\notification\type;
-use wcf\data\DatabaseObjectDecorator;
-
-/**
- * Provides default a implementation for user notification types.
- *
- * @author     Marcel Werk
- * @copyright  2001-2011 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage system.user.notification.type
- * @category   Community Framework
- */
-abstract class AbstractUserNotificationType extends DatabaseObjectDecorator implements IUserNotificationType {
-       /**
-        * @see wcf\data\DatabaseObjectDecorator::$baseClass
-        */
-       protected static $baseClass = 'wcf\data\user\notification\type\UserNotificationType';
-}
diff --git a/com.woltlab.wcf.notification/files/lib/system/user/notification/type/IUserNotificationType.class.php b/com.woltlab.wcf.notification/files/lib/system/user/notification/type/IUserNotificationType.class.php
deleted file mode 100644 (file)
index d57bb2f..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-namespace wcf\system\user\notification\type;
-use wcf\data\user\notification\recipient\UserNotificationRecipient;
-use wcf\data\user\notification\UserNotification;
-use wcf\data\IDatabaseObjectProcessor;
-use wcf\system\user\notification\event\IUserNotificationEvent;
-
-/**
- * This interface should be implemented by every user notification type.
- *
- * @author     Marcel Werk, Oliver Kliebisch
- * @copyright  2001-2011 WoltLab GmbH, Oliver Kliebisch
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage system.user.notification.type
- * @category   Community Framework
- */
-interface IUserNotificationType extends IDatabaseObjectProcessor {
-       /**
-        * Sends the notification using this notification transport type.
-        *
-        * @param       wcf\data\user\notification\UserNotification                     $notification
-        * @param       wcf\data\user\notification\recipient\UserNotificationRecipient  $user
-        * @param       wcf\system\user\notification\event\IUserNotificationEvent       $event
-        */
-       public function send(UserNotification $notification, UserNotificationRecipient $user, IUserNotificationEvent $event);
-
-       /**
-        * Tries to revoke the notification. This might not be applicable for all notification types.
-        *
-        * @param       wcf\data\user\notification\UserNotification                     $notification
-        * @param       wcf\data\user\notification\recipient\UserNotificationRecipient  $user
-        * @param       wcf\system\user\notification\event\IUserNotificationEvent               $event
-        */
-       public function revoke(UserNotification $notification, UserNotificationRecipient $user, IUserNotificationEvent $event);
-}
diff --git a/com.woltlab.wcf.notification/files/lib/system/user/notification/type/MailUserNotificationType.class.php b/com.woltlab.wcf.notification/files/lib/system/user/notification/type/MailUserNotificationType.class.php
deleted file mode 100644 (file)
index b95eda3..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-namespace wcf\system\user\notification\type;
-use wcf\data\user\notification\recipient\UserNotificationRecipient;
-use wcf\data\user\notification\UserNotification;
-use wcf\data\user\UserEditor;
-use wcf\system\mail\Mail;
-use wcf\system\user\notification\event\IUserNotificationEvent;
-use wcf\util\FileUtil;
-use wcf\util\StringUtil;
-
-/**
- * A notification type for sending mail notifications.
- *
- * @author     Marcel Werk, Oliver Kliebisch
- * @copyright  2001-2011 WoltLab GmbH, Oliver Kliebisch
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf.notification
- * @subpackage system.user.notification.type
- * @category   Community Framework
- */
-class MailUserNotificationType extends AbstractUserNotificationType {        
-       /**
-        * @see wcf\system\user\notification\type\IUserNotificationType::send()
-        */
-        public function send(UserNotification $notification, UserNotificationRecipient $user, IUserNotificationEvent $event) {
-                // get message
-               $message = $event->getMessage($this, array(
-                       'user' => $user,
-                       'pageURL' => FileUtil::addTrailingSlash(PAGE_URL)
-                ));
-
-                // append notification mail footer
-               $token = $user->notificationMailToken;
-               if (!$token) {
-                       // generate token if not present
-                       $token = StringUtil::substring($token = StringUtil::getHash(serialize(array($user->userID, StringUtil::getRandomID()))), 0, 20);
-                       $editor = new UserEditor($user->getDecoratedObject());
-                       $editor->updateUserOptions(array('notificationMailToken' => $token));
-               }
-                $message .= "\n".$user->getLanguage()->getDynamicVariable('wcf.user.notification.type.mail.footer', array(
-                       'user' => $user,
-                       'pageURL' => FileUtil::addTrailingSlash(PAGE_URL),
-                       'token' => $token,
-                       'notification' => $notification
-                ));
-
-                // use short output as mail subject and strip its HTML
-               $shortMessage = StringUtil::stripHTML($notification->shortOutput);
-
-               // build mail
-               $mail = new Mail(array($user->username => $user->email), $user->getLanguage()->getDynamicVariable('wcf.user.notification.type.mail.subject', array('title' => $shortMessage)), $message);
-                $mail->send();
-        }
-
-       /**
-        * @see wcf\system\user\notification\type\IUserNotificationType::revoke()
-        */
-        public function revoke(UserNotification $notification, UserNotificationRecipient $user, IUserNotificationEvent $event) {
-               // unsupported
-               return;
-        }
-}
diff --git a/com.woltlab.wcf.notification/install.sql b/com.woltlab.wcf.notification/install.sql
deleted file mode 100644 (file)
index 367c463..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
--- notifications
-DROP TABLE IF EXISTS wcf1_user_notification;
-CREATE TABLE wcf1_user_notification (
-       notificationID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
-       packageID INT(10) NOT NULL,
-       eventID INT(10) NOT NULL,
-       objectID INT(10) NOT NULL DEFAULT 0,
-       time INT(10) NOT NULL DEFAULT 0,
-       shortOutput VARCHAR(255) DEFAULT NULL,
-       mediumOutput TEXT,
-       longOutput TEXT,
-       additionalData TEXT
-);
-
--- notification recipients
-DROP TABLE IF EXISTS wcf1_user_notification_to_user;
-CREATE TABLE wcf1_user_notification_to_user (
-       notificationID INT(10) NOT NULL,
-       userID INT(10) NOT NULL,
-       confirmed TINYINT(1) NOT NULL DEFAULT 0,
-       confirmationTime INT(10) NOT NULL DEFAULT 0,
-       UNIQUE KEY notificationID (notificationID, userID)
-);
-
--- events that create notifications
-DROP TABLE IF EXISTS wcf1_user_notification_event;
-CREATE TABLE wcf1_user_notification_event (
-       eventID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
-       packageID INT(10) NOT NULL,
-       eventName VARCHAR(255) NOT NULL DEFAULT '',
-       objectTypeID INT(10) NOT NULL,
-       className VARCHAR(255) NOT NULL DEFAULT '',
-       languageCategory VARCHAR(255) NOT NULL,
-       defaultNotificationTypeID INT(10) NULL,
-       requiresConfirmation TINYINT(1) NOT NULL DEFAULT 0,
-       acceptURL VARCHAR(255) NOT NULL DEFAULT '',
-       declineURL VARCHAR(255) NOT NULL DEFAULT '',
-       permissions TEXT,
-       options TEXT,
-       UNIQUE KEY packageID (packageID, eventName)
-);
-
--- user configuration for events
-DROP TABLE IF EXISTS wcf1_user_notification_event_to_user;
-CREATE TABLE wcf1_user_notification_event_to_user (
-       userID INT(10) NOT NULL,
-       eventID INT(10) NOT NULL,
-       notificationTypeID INT(10) NOT NULL,
-       enabled TINYINT(1) NOT NULL DEFAULT 0
-);
-
--- objects that create notifications
-DROP TABLE IF EXISTS wcf1_user_notification_object_type;
-CREATE TABLE wcf1_user_notification_object_type (
-       objectTypeID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
-       packageID INT(10) NOT NULL,
-       objectType VARCHAR(255) NOT NULL,
-       className VARCHAR(255) NOT NULL,  
-       permissions TEXT,
-       options TEXT,
-       UNIQUE KEY packageID (packageID, objectType)
-);
-
--- notification types (pm, mail, ...)
-DROP TABLE IF EXISTS wcf1_user_notification_type;
-CREATE TABLE wcf1_user_notification_type (
-       notificationTypeID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
-       packageID INT(10) NOT NULL,
-       notificationType VARCHAR(255) NOT NULL,
-       className VARCHAR(255) NOT NULL,
-       permissions TEXT,
-       options TEXT,
-       UNIQUE KEY packageID (packageID, notificationType) 
-);
-
-ALTER TABLE wcf1_user_notification ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
-ALTER TABLE wcf1_user_notification ADD FOREIGN KEY (eventID) REFERENCES wcf1_user_notification_event (eventID) ON DELETE CASCADE;
-
-ALTER TABLE wcf1_user_notification_to_user ADD FOREIGN KEY (notificationID) REFERENCES wcf1_user_notification (notificationID) ON DELETE CASCADE;
-ALTER TABLE wcf1_user_notification_to_user ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
-
-ALTER TABLE wcf1_user_notification_event ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
-ALTER TABLE wcf1_user_notification_event ADD FOREIGN KEY (objectTypeID) REFERENCES wcf1_user_notification_object_type (objectTypeID) ON DELETE CASCADE;
-ALTER TABLE wcf1_user_notification_event ADD FOREIGN KEY (defaultNotificationTypeID) REFERENCES wcf1_user_notification_type (notificationTypeID) ON DELETE SET NULL;
-
-ALTER TABLE wcf1_user_notification_event_to_user ADD FOREIGN KEY (userID) REFERENCES wcf1_user (userID) ON DELETE CASCADE;
-ALTER TABLE wcf1_user_notification_event_to_user ADD FOREIGN KEY (eventID) REFERENCES wcf1_user_notification_event (eventID) ON DELETE CASCADE;
-ALTER TABLE wcf1_user_notification_event_to_user ADD FOREIGN KEY (notificationTypeID) REFERENCES wcf1_user_notification_type (notificationTypeID) ON DELETE CASCADE;
-
-ALTER TABLE wcf1_user_notification_object_type ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
-
-ALTER TABLE wcf1_user_notification_type ADD FOREIGN KEY (packageID) REFERENCES wcf1_package (packageID) ON DELETE CASCADE;
\ No newline at end of file
diff --git a/com.woltlab.wcf.notification/package.xml b/com.woltlab.wcf.notification/package.xml
deleted file mode 100644 (file)
index 3c19547..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<package name="com.woltlab.wcf.notification" xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com/XSD/package.xsd">
-       <packageinformation>
-               <packagename>User Notification System</packagename>
-               <packagedescription>Provides functions to deliver notification messages</packagedescription>            
-               <version>1.0.0 Alpha 1</version>
-               <date>2010-08-22</date>
-               <isunique>1</isunique>
-       </packageinformation>
-
-       <authorinformation>
-               <author>WoltLab GmbH, Oliver Kliebisch and Tim Düsterhus</author>
-               <authorurl>http://www.woltlab.com</authorurl>
-       </authorinformation>
-       
-       <requiredpackages>
-               <requiredpackage minversion="2.0.0 Alpha 1">com.woltlab.wcf</requiredpackage>
-       </requiredpackages>
-
-       <instructions type="install">
-               <instruction type="packageinstallationplugins">pip.xml</instruction>
-               <instruction type="files">files.tar</instruction>
-               <instruction type="sql">install.sql</instruction>
-               <instruction type="userNotificationType">userNotificationType.xml</instruction>
-               <instruction type="coreobject">coreobject.xml</instruction>
-       </instructions>
-</package>
\ No newline at end of file
diff --git a/com.woltlab.wcf.notification/pip.xml b/com.woltlab.wcf.notification/pip.xml
deleted file mode 100644 (file)
index 5cf8227..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/pip.xsd">
-       <import>
-               <pip name="userNotificationEvent">wcf\system\package\plugin\UserNotificationEventPackageInstallationPlugin</pip>
-               <pip name="userNotificationObjectType">wcf\system\package\plugin\UserNotificationObjectTypePackageInstallationPlugin</pip>
-               <pip name="userNotificationType">wcf\system\package\plugin\UserNotificationTypePackageInstallationPlugin</pip>
-       </import>
-</data>
diff --git a/com.woltlab.wcf.notification/userNotificationType.xml b/com.woltlab.wcf.notification/userNotificationType.xml
deleted file mode 100644 (file)
index 86ff008..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/user-notification-type.xsd">
-       <import>
-               <notificationtype>
-                       <name>mail</name>
-                       <classname>wcf\system\user\notification\type\MailUserNotificationType</classname>
-               </notificationtype>
-       </import>
-</data>
\ No newline at end of file