aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/notification
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2014-08-16 21:06:10 +0200
committerTristan Darricau <github@nicofuma.fr>2014-08-16 21:46:03 +0200
commitfe8096753566f4beb708e9070d8789eebdd1e70b (patch)
treecc1eb23e00a105adb4dac1089bcc86f43d4c5030 /phpBB/phpbb/notification
parente9f5b9d657b92f6d53d76c28ba4de64722700e7e (diff)
downloadforums-fe8096753566f4beb708e9070d8789eebdd1e70b.tar
forums-fe8096753566f4beb708e9070d8789eebdd1e70b.tar.gz
forums-fe8096753566f4beb708e9070d8789eebdd1e70b.tar.bz2
forums-fe8096753566f4beb708e9070d8789eebdd1e70b.tar.xz
forums-fe8096753566f4beb708e9070d8789eebdd1e70b.zip
[ticket/12990] Use the full services name for the notification's types
PHPBB3-12990
Diffstat (limited to 'phpBB/phpbb/notification')
-rw-r--r--phpBB/phpbb/notification/manager.php6
-rw-r--r--phpBB/phpbb/notification/method/email.php2
-rw-r--r--phpBB/phpbb/notification/method/jabber.php2
-rw-r--r--phpBB/phpbb/notification/type/admin_activate_user.php2
-rw-r--r--phpBB/phpbb/notification/type/approve_post.php2
-rw-r--r--phpBB/phpbb/notification/type/approve_topic.php2
-rw-r--r--phpBB/phpbb/notification/type/bookmark.php2
-rw-r--r--phpBB/phpbb/notification/type/disapprove_post.php2
-rw-r--r--phpBB/phpbb/notification/type/disapprove_topic.php2
-rw-r--r--phpBB/phpbb/notification/type/group_request.php2
-rw-r--r--phpBB/phpbb/notification/type/group_request_approved.php2
-rw-r--r--phpBB/phpbb/notification/type/pm.php2
-rw-r--r--phpBB/phpbb/notification/type/post.php2
-rw-r--r--phpBB/phpbb/notification/type/post_in_queue.php4
-rw-r--r--phpBB/phpbb/notification/type/quote.php2
-rw-r--r--phpBB/phpbb/notification/type/report_pm.php4
-rw-r--r--phpBB/phpbb/notification/type/report_pm_closed.php2
-rw-r--r--phpBB/phpbb/notification/type/report_post.php4
-rw-r--r--phpBB/phpbb/notification/type/report_post_closed.php2
-rw-r--r--phpBB/phpbb/notification/type/topic.php2
-rw-r--r--phpBB/phpbb/notification/type/topic_in_queue.php4
21 files changed, 25 insertions, 29 deletions
diff --git a/phpBB/phpbb/notification/manager.php b/phpBB/phpbb/notification/manager.php
index 5e4bab1530..81b450ebbd 100644
--- a/phpBB/phpbb/notification/manager.php
+++ b/phpBB/phpbb/notification/manager.php
@@ -570,7 +570,7 @@ class manager
{
$subscription_methods[$method_name] = array(
'id' => $method->get_type(),
- 'lang' => 'NOTIFICATION_METHOD_' . strtoupper($method->get_type()),
+ 'lang' => str_replace('.', '_', strtoupper($method->get_type())),
);
}
}
@@ -851,8 +851,6 @@ class manager
*/
public function get_item_type_class($notification_type_name, $data = array())
{
- $notification_type_name = (strpos($notification_type_name, 'notification.type.') === 0) ? $notification_type_name : 'notification.type.' . $notification_type_name;
-
$item = $this->load_object($notification_type_name);
$item->set_initial_data($data);
@@ -865,8 +863,6 @@ class manager
*/
public function get_method_class($method_name)
{
- $method_name = (strpos($method_name, 'notification.method.') === 0) ? $method_name : 'notification.method.' . $method_name;
-
return $this->load_object($method_name);
}
diff --git a/phpBB/phpbb/notification/method/email.php b/phpBB/phpbb/notification/method/email.php
index 424f0aaf57..a4b93bc85c 100644
--- a/phpBB/phpbb/notification/method/email.php
+++ b/phpBB/phpbb/notification/method/email.php
@@ -27,7 +27,7 @@ class email extends \phpbb\notification\method\messenger_base
*/
public function get_type()
{
- return 'email';
+ return 'notification.method.email';
}
/**
diff --git a/phpBB/phpbb/notification/method/jabber.php b/phpBB/phpbb/notification/method/jabber.php
index 55de50fecd..09f186e3ca 100644
--- a/phpBB/phpbb/notification/method/jabber.php
+++ b/phpBB/phpbb/notification/method/jabber.php
@@ -27,7 +27,7 @@ class jabber extends \phpbb\notification\method\messenger_base
*/
public function get_type()
{
- return 'jabber';
+ return 'notification.method.jabber';
}
/**
diff --git a/phpBB/phpbb/notification/type/admin_activate_user.php b/phpBB/phpbb/notification/type/admin_activate_user.php
index 364df74cc5..038ca3726e 100644
--- a/phpBB/phpbb/notification/type/admin_activate_user.php
+++ b/phpBB/phpbb/notification/type/admin_activate_user.php
@@ -25,7 +25,7 @@ class admin_activate_user extends \phpbb\notification\type\base
*/
public function get_type()
{
- return 'admin_activate_user';
+ return 'notification.type.admin_activate_user';
}
/**
diff --git a/phpBB/phpbb/notification/type/approve_post.php b/phpBB/phpbb/notification/type/approve_post.php
index 22c9076adc..a9e635b41a 100644
--- a/phpBB/phpbb/notification/type/approve_post.php
+++ b/phpBB/phpbb/notification/type/approve_post.php
@@ -27,7 +27,7 @@ class approve_post extends \phpbb\notification\type\post
*/
public function get_type()
{
- return 'approve_post';
+ return 'notification.type.approve_post';
}
/**
diff --git a/phpBB/phpbb/notification/type/approve_topic.php b/phpBB/phpbb/notification/type/approve_topic.php
index 77e53a0064..2f4678359c 100644
--- a/phpBB/phpbb/notification/type/approve_topic.php
+++ b/phpBB/phpbb/notification/type/approve_topic.php
@@ -27,7 +27,7 @@ class approve_topic extends \phpbb\notification\type\topic
*/
public function get_type()
{
- return 'approve_topic';
+ return 'notification.type.approve_topic';
}
/**
diff --git a/phpBB/phpbb/notification/type/bookmark.php b/phpBB/phpbb/notification/type/bookmark.php
index 21180b3b53..4f2d34cb60 100644
--- a/phpBB/phpbb/notification/type/bookmark.php
+++ b/phpBB/phpbb/notification/type/bookmark.php
@@ -27,7 +27,7 @@ class bookmark extends \phpbb\notification\type\post
*/
public function get_type()
{
- return 'bookmark';
+ return 'notification.type.bookmark';
}
/**
diff --git a/phpBB/phpbb/notification/type/disapprove_post.php b/phpBB/phpbb/notification/type/disapprove_post.php
index 7b18ed70ea..6c7bcbcaee 100644
--- a/phpBB/phpbb/notification/type/disapprove_post.php
+++ b/phpBB/phpbb/notification/type/disapprove_post.php
@@ -27,7 +27,7 @@ class disapprove_post extends \phpbb\notification\type\approve_post
*/
public function get_type()
{
- return 'disapprove_post';
+ return 'notification.type.disapprove_post';
}
/**
diff --git a/phpBB/phpbb/notification/type/disapprove_topic.php b/phpBB/phpbb/notification/type/disapprove_topic.php
index 3f87741807..efa5eb7ecd 100644
--- a/phpBB/phpbb/notification/type/disapprove_topic.php
+++ b/phpBB/phpbb/notification/type/disapprove_topic.php
@@ -27,7 +27,7 @@ class disapprove_topic extends \phpbb\notification\type\approve_topic
*/
public function get_type()
{
- return 'disapprove_topic';
+ return 'notification.type.disapprove_topic';
}
/**
diff --git a/phpBB/phpbb/notification/type/group_request.php b/phpBB/phpbb/notification/type/group_request.php
index 980234c129..4baf516fed 100644
--- a/phpBB/phpbb/notification/type/group_request.php
+++ b/phpBB/phpbb/notification/type/group_request.php
@@ -20,7 +20,7 @@ class group_request extends \phpbb\notification\type\base
*/
public function get_type()
{
- return 'group_request';
+ return 'notification.type.group_request';
}
/**
diff --git a/phpBB/phpbb/notification/type/group_request_approved.php b/phpBB/phpbb/notification/type/group_request_approved.php
index bf9cd0019f..d284046ffa 100644
--- a/phpBB/phpbb/notification/type/group_request_approved.php
+++ b/phpBB/phpbb/notification/type/group_request_approved.php
@@ -20,7 +20,7 @@ class group_request_approved extends \phpbb\notification\type\base
*/
public function get_type()
{
- return 'group_request_approved';
+ return 'notification.type.group_request_approved';
}
/**
diff --git a/phpBB/phpbb/notification/type/pm.php b/phpBB/phpbb/notification/type/pm.php
index 8445ca4b22..330a70c85a 100644
--- a/phpBB/phpbb/notification/type/pm.php
+++ b/phpBB/phpbb/notification/type/pm.php
@@ -27,7 +27,7 @@ class pm extends \phpbb\notification\type\base
*/
public function get_type()
{
- return 'pm';
+ return 'notification.type.pm';
}
/**
diff --git a/phpBB/phpbb/notification/type/post.php b/phpBB/phpbb/notification/type/post.php
index 1eba4a6a88..d9e74f2e95 100644
--- a/phpBB/phpbb/notification/type/post.php
+++ b/phpBB/phpbb/notification/type/post.php
@@ -27,7 +27,7 @@ class post extends \phpbb\notification\type\base
*/
public function get_type()
{
- return 'post';
+ return 'notification.type.post';
}
/**
diff --git a/phpBB/phpbb/notification/type/post_in_queue.php b/phpBB/phpbb/notification/type/post_in_queue.php
index 3bb1028619..315b8b0243 100644
--- a/phpBB/phpbb/notification/type/post_in_queue.php
+++ b/phpBB/phpbb/notification/type/post_in_queue.php
@@ -27,7 +27,7 @@ class post_in_queue extends \phpbb\notification\type\post
*/
public function get_type()
{
- return 'post_in_queue';
+ return 'notification.type.post_in_queue';
}
/**
@@ -44,7 +44,7 @@ class post_in_queue extends \phpbb\notification\type\post
* Array of data (including keys 'id', 'lang', and 'group')
*/
public static $notification_option = array(
- 'id' => 'needs_approval',
+ 'id' => 'notification.type.needs_approval',
'lang' => 'NOTIFICATION_TYPE_IN_MODERATION_QUEUE',
'group' => 'NOTIFICATION_GROUP_MODERATION',
);
diff --git a/phpBB/phpbb/notification/type/quote.php b/phpBB/phpbb/notification/type/quote.php
index 5c3c822ec2..508ca92fa0 100644
--- a/phpBB/phpbb/notification/type/quote.php
+++ b/phpBB/phpbb/notification/type/quote.php
@@ -27,7 +27,7 @@ class quote extends \phpbb\notification\type\post
*/
public function get_type()
{
- return 'quote';
+ return 'notification.type.quote';
}
/**
diff --git a/phpBB/phpbb/notification/type/report_pm.php b/phpBB/phpbb/notification/type/report_pm.php
index 14a328e104..d39143f4b7 100644
--- a/phpBB/phpbb/notification/type/report_pm.php
+++ b/phpBB/phpbb/notification/type/report_pm.php
@@ -27,7 +27,7 @@ class report_pm extends \phpbb\notification\type\pm
*/
public function get_type()
{
- return 'report_pm';
+ return 'notification.type.report_pm';
}
/**
@@ -61,7 +61,7 @@ class report_pm extends \phpbb\notification\type\pm
* Array of data (including keys 'id', 'lang', and 'group')
*/
public static $notification_option = array(
- 'id' => 'report',
+ 'id' => 'notification.type.report',
'lang' => 'NOTIFICATION_TYPE_REPORT',
'group' => 'NOTIFICATION_GROUP_MODERATION',
);
diff --git a/phpBB/phpbb/notification/type/report_pm_closed.php b/phpBB/phpbb/notification/type/report_pm_closed.php
index de7bf74a97..9f301ee2cc 100644
--- a/phpBB/phpbb/notification/type/report_pm_closed.php
+++ b/phpBB/phpbb/notification/type/report_pm_closed.php
@@ -27,7 +27,7 @@ class report_pm_closed extends \phpbb\notification\type\pm
*/
public function get_type()
{
- return 'report_pm_closed';
+ return 'notification.type.report_pm_closed';
}
/**
diff --git a/phpBB/phpbb/notification/type/report_post.php b/phpBB/phpbb/notification/type/report_post.php
index bec59df9d5..027cca716b 100644
--- a/phpBB/phpbb/notification/type/report_post.php
+++ b/phpBB/phpbb/notification/type/report_post.php
@@ -26,7 +26,7 @@ class report_post extends \phpbb\notification\type\post_in_queue
*/
public function get_type()
{
- return 'report_post';
+ return 'notification.type.report_post';
}
/**
@@ -67,7 +67,7 @@ class report_post extends \phpbb\notification\type\post_in_queue
* Array of data (including keys 'id' and 'lang')
*/
public static $notification_option = array(
- 'id' => 'report',
+ 'id' => 'notification.type.report',
'lang' => 'NOTIFICATION_TYPE_REPORT',
'group' => 'NOTIFICATION_GROUP_MODERATION',
);
diff --git a/phpBB/phpbb/notification/type/report_post_closed.php b/phpBB/phpbb/notification/type/report_post_closed.php
index cd1400f8fa..a0bb187a0d 100644
--- a/phpBB/phpbb/notification/type/report_post_closed.php
+++ b/phpBB/phpbb/notification/type/report_post_closed.php
@@ -27,7 +27,7 @@ class report_post_closed extends \phpbb\notification\type\post
*/
public function get_type()
{
- return 'report_post_closed';
+ return 'notification.type.report_post_closed';
}
/**
diff --git a/phpBB/phpbb/notification/type/topic.php b/phpBB/phpbb/notification/type/topic.php
index af199fb765..cf0ec77099 100644
--- a/phpBB/phpbb/notification/type/topic.php
+++ b/phpBB/phpbb/notification/type/topic.php
@@ -27,7 +27,7 @@ class topic extends \phpbb\notification\type\base
*/
public function get_type()
{
- return 'topic';
+ return 'notification.type.topic';
}
/**
diff --git a/phpBB/phpbb/notification/type/topic_in_queue.php b/phpBB/phpbb/notification/type/topic_in_queue.php
index aef1487d77..4c60c6b858 100644
--- a/phpBB/phpbb/notification/type/topic_in_queue.php
+++ b/phpBB/phpbb/notification/type/topic_in_queue.php
@@ -27,7 +27,7 @@ class topic_in_queue extends \phpbb\notification\type\topic
*/
public function get_type()
{
- return 'topic_in_queue';
+ return 'notification.type.topic_in_queue';
}
/**
@@ -44,7 +44,7 @@ class topic_in_queue extends \phpbb\notification\type\topic
* Array of data (including keys 'id', 'lang', and 'group')
*/
public static $notification_option = array(
- 'id' => 'needs_approval',
+ 'id' => 'notification.type.needs_approval',
'lang' => 'NOTIFICATION_TYPE_IN_MODERATION_QUEUE',
'group' => 'NOTIFICATION_GROUP_MODERATION',
);