aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_content.php
diff options
context:
space:
mode:
authorDhruv <dhruv.goel92@gmail.com>2013-12-27 00:28:38 +0530
committerDhruv <dhruv.goel92@gmail.com>2013-12-27 00:28:38 +0530
commit80c05e861bd8b5264daf6b1f92b69b5b77356f32 (patch)
tree71bb9e0adce0c26ea2dbd58f7c4d441c1b04767f /phpBB/includes/functions_content.php
parent1bb175ce7759e937494f74769b334a9acf3779d2 (diff)
parentf9c7f0fc193802fb866063c88e2d3448b6f0d010 (diff)
downloadforums-80c05e861bd8b5264daf6b1f92b69b5b77356f32.tar
forums-80c05e861bd8b5264daf6b1f92b69b5b77356f32.tar.gz
forums-80c05e861bd8b5264daf6b1f92b69b5b77356f32.tar.bz2
forums-80c05e861bd8b5264daf6b1f92b69b5b77356f32.tar.xz
forums-80c05e861bd8b5264daf6b1f92b69b5b77356f32.zip
Merge branch 'develop' into ticket/11271-develop
# By Vjacheslav Trushkin (148) and others # Via Joas Schilling (50) and others * develop: (635 commits) [ticket/12079] Add default value to $multibyte in request.untrimmed_variable(). [ticket/11849] Fix more function calls [ticket/11849] Update more MCP calls to pagination class [ticket/11849] Update some ACP modules with new pagination [ticket/11849] Update rest of the UCP modules [ticket/11849] Update UCP notifications and pm folder [ticket/11849] Update search and memberlist [ticket/11849] Update pagination in viewonline.php [ticket/11849] Remove old pagination test [ticket/11849] Update pagination code in viewtopic.php [ticket/11849] Replace pagination in viewforum.php with class [ticket/11849] Add service definition [ticket/11849] Remove pagination functions [ticket/11849] Test validate_start and on_page [ticket/11849] Move pagination code to class [ticket/12060] A little less verbose cleanup of event docblocks [ticket/12060] Further clarifying new event docblocks as much as possible [ticket/12060] More fixes to dockblock for acp_bbcodes_modify_create event [ticket/12060] Remove whitespaces [ticket/12060] Fix docblock for acp_bbcodes_modify_create event ...
Diffstat (limited to 'phpBB/includes/functions_content.php')
-rw-r--r--phpBB/includes/functions_content.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index 863450a4b2..8122b87e4b 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -481,6 +481,16 @@ function generate_text_for_display($text, $uid, $bitfield, $flags, $censor_text
* For parsing custom parsed text to be stored within the database.
* This function additionally returns the uid and bitfield that needs to be stored.
* Expects $text to be the value directly from request_var() and in it's non-parsed form
+*
+* @param string $text The text to be replaced with the parsed one
+* @param string $uid The BBCode uid for this parse
+* @param string $bitfield The BBCode bitfield for this parse
+* @param int $flags The allow_bbcode, allow_urls and allow_smilies compiled into a single integer.
+* @param bool $allow_bbcode If BBCode is allowed (i.e. if BBCode is parsed)
+* @param bool $allow_urls If urls is allowed
+* @param bool $allow_smilies If smilies are allowed
+*
+* @return array An array of string with the errors that occurred while parsing
*/
function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bbcode = false, $allow_urls = false, $allow_smilies = false)
{
@@ -542,7 +552,7 @@ function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bb
$vars = array('text', 'uid', 'bitfield', 'flags');
extract($phpbb_dispatcher->trigger_event('core.modify_text_for_storage_after', compact($vars)));
- return;
+ return $message_parser->warn_msg;
}
/**
@@ -773,7 +783,8 @@ function make_clickable($text, $server_url = false, $class = 'postlink')
{
$text = preg_replace_callback($magic_args[0], function($matches) use ($magic_args)
{
- return make_clickable_callback($magic_args[1], $matches[1], $matches[2], $matches[3], $magic_args[2]);
+ $relative_url = isset($matches[3]) ? $matches[3] : '';
+ return make_clickable_callback($magic_args[1], $matches[1], $matches[2], $relative_url, $magic_args[2]);
}, $text);
}
}