From 986af43f37342953bff548630aa33904c21234f4 Mon Sep 17 00:00:00 2001 From: JoshyPHP Date: Fri, 1 May 2015 08:47:01 +0200 Subject: [ticket/13803] Added plugins PHPBB3-13803 --- phpBB/phpbb/textreparser/plugins/pm_text.php | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 phpBB/phpbb/textreparser/plugins/pm_text.php (limited to 'phpBB/phpbb/textreparser/plugins/pm_text.php') diff --git a/phpBB/phpbb/textreparser/plugins/pm_text.php b/phpBB/phpbb/textreparser/plugins/pm_text.php new file mode 100644 index 0000000000..f4d87525df --- /dev/null +++ b/phpBB/phpbb/textreparser/plugins/pm_text.php @@ -0,0 +1,40 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +namespace phpbb\textreparser\plugins; + +class pm_text extends \phpbb\textreparser\row_based_plugin +{ + /** + * {@inheritdoc} + */ + protected function get_columns() + { + return array( + 'id' => 'msg_id', + 'enable_bbcode' => 'enable_bbcode', + 'enable_smilies' => 'enable_smilies', + 'enable_magic_url' => 'enable_magic_url', + 'text' => 'message_text', + 'bbcode_uid' => 'bbcode_uid', + ); + } + + /** + * {@inheritdoc} + */ + protected function get_table_name() + { + return PRIVMSGS_TABLE; + } +} -- cgit v1.2.1 From 459f1d4c1f26658c70d29ac7c4e3f3389a973a59 Mon Sep 17 00:00:00 2001 From: JoshyPHP Date: Fri, 1 May 2015 20:05:15 +0200 Subject: [ticket/13803] Refactored test PHPBB3-13803 --- phpBB/phpbb/textreparser/plugins/pm_text.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/phpbb/textreparser/plugins/pm_text.php') diff --git a/phpBB/phpbb/textreparser/plugins/pm_text.php b/phpBB/phpbb/textreparser/plugins/pm_text.php index f4d87525df..4d06a2878b 100644 --- a/phpBB/phpbb/textreparser/plugins/pm_text.php +++ b/phpBB/phpbb/textreparser/plugins/pm_text.php @@ -18,7 +18,7 @@ class pm_text extends \phpbb\textreparser\row_based_plugin /** * {@inheritdoc} */ - protected function get_columns() + public function get_columns() { return array( 'id' => 'msg_id', @@ -33,7 +33,7 @@ class pm_text extends \phpbb\textreparser\row_based_plugin /** * {@inheritdoc} */ - protected function get_table_name() + public function get_table_name() { return PRIVMSGS_TABLE; } -- cgit v1.2.1 From 2016550a32168ee5fcf11bfdd367ce48fbcf88b1 Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Thu, 29 Oct 2015 01:48:52 +0100 Subject: [ticket/14264] Don't use constants as return values This will prevent BC breaking in the future if we decide to get rid of constants. PHPBB3-14264 --- phpBB/phpbb/textreparser/plugins/pm_text.php | 8 -------- 1 file changed, 8 deletions(-) (limited to 'phpBB/phpbb/textreparser/plugins/pm_text.php') diff --git a/phpBB/phpbb/textreparser/plugins/pm_text.php b/phpBB/phpbb/textreparser/plugins/pm_text.php index 4d06a2878b..867da624ee 100644 --- a/phpBB/phpbb/textreparser/plugins/pm_text.php +++ b/phpBB/phpbb/textreparser/plugins/pm_text.php @@ -29,12 +29,4 @@ class pm_text extends \phpbb\textreparser\row_based_plugin 'bbcode_uid' => 'bbcode_uid', ); } - - /** - * {@inheritdoc} - */ - public function get_table_name() - { - return PRIVMSGS_TABLE; - } } -- cgit v1.2.1