[ticket/269] Use trimmessage tool as extension and add test
B3P-269
This commit is contained in:
@@ -412,21 +412,14 @@ function character_limit(&$title, $limit = 0)
|
||||
*/
|
||||
function get_sub_taged_string($message, $bbcode_uid, $length)
|
||||
{
|
||||
global $portal_root_path, $phpEx;
|
||||
|
||||
if(!class_exists('phpbb_trim_message'))
|
||||
if (class_exists('\nickvergessen\trimmessage\trim_message'))
|
||||
{
|
||||
include($portal_root_path . 'includes/trim_message/trim_message.' . $phpEx);
|
||||
$trim = new \nickvergessen\trimmessage\trim_message($message, $bbcode_uid, $length);
|
||||
$message = $trim->message();
|
||||
unset($trim);
|
||||
}
|
||||
|
||||
if(!class_exists('phpbb_trim_message_bbcodes'))
|
||||
{
|
||||
include($portal_root_path . 'includes/trim_message/bbcodes.' . $phpEx);
|
||||
}
|
||||
|
||||
$object = new phpbb_trim_message($message, $bbcode_uid, $length);
|
||||
// Ready to get parsed:
|
||||
return $object->message();
|
||||
return $message;
|
||||
}
|
||||
|
||||
function ap_validate($str)
|
||||
|
||||
Reference in New Issue
Block a user