From 94d682f77431add84867bb0b196ad0719b293606 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Sat, 20 Oct 2012 20:54:18 -0500 Subject: [ticket/11103] Use the full class name as the item_type/method This is going to require you recreate the db tables. PHPBB3-11103 --- .../ext/test/notification/type/test.php | 30 +++++++++++++++------- 1 file changed, 21 insertions(+), 9 deletions(-) (limited to 'tests/notification/ext') diff --git a/tests/notification/ext/test/notification/type/test.php b/tests/notification/ext/test/notification/type/test.php index f3aa8ba6f3..e76bdb5e0c 100644 --- a/tests/notification/ext/test/notification/type/test.php +++ b/tests/notification/ext/test/notification/type/test.php @@ -17,13 +17,6 @@ if (!defined('IN_PHPBB')) class phpbb_ext_test_notification_type_test extends phpbb_notification_type_base { - public $email_template = 'topic_notify'; - - public static function get_item_type() - { - return 'ext_test-test'; - } - public static function get_item_id($post) { return (int) $post['post_id']; @@ -39,11 +32,25 @@ class phpbb_ext_test_notification_type_test extends phpbb_notification_type_base return $this->_find_users_for_notification(0, $options); } - public function create_insert_array($post) + public function create_insert_array($post, $pre_create_data = array()) { $this->time = $post['post_time']; - return parent::create_insert_array($post); + return parent::create_insert_array($post, $pre_create_data); + } + + public function create_update_array($type_data) + { + $data = $this->create_insert_array($type_data); + + // Unset data unique to each row + unset( + $data['notification_id'], + $data['unread'], + $data['user_id'] + ); + + return $data; } public function get_title() @@ -61,6 +68,11 @@ class phpbb_ext_test_notification_type_test extends phpbb_notification_type_base return ''; } + public function get_email_template() + { + return false; + } + public function get_email_template_variables() { return array(); -- cgit v1.2.1