Remove unused parameter preserve_nl in BBCode::convert

This commit is contained in:
Hypolite Petovan 2018-02-14 20:28:10 -05:00
parent ee380c3149
commit 29f5270313
2 changed files with 2 additions and 7 deletions

View File

@ -7,5 +7,5 @@ use Friendica\Content\Text\BBCode;
function bbcode($Text, $preserve_nl = false, $tryoembed = true, $simplehtml = false, $forplaintext = false)
{
return BBCode::convert($Text, $preserve_nl, $tryoembed, $simplehtml, $forplaintext);
return BBCode::convert($Text, $tryoembed, $simplehtml, $forplaintext);
}

View File

@ -1342,13 +1342,12 @@ class BBCode
* - 8: Used for WP backlink text setting
*
* @param string $text
* @param bool $preserve_nl
* @param bool $try_oembed
* @param int $simple_html
* @param bool $for_plaintext
* @return string
*/
public static function convert($text, $preserve_nl = false, $try_oembed = true, $simple_html = false, $for_plaintext = false)
public static function convert($text, $try_oembed = true, $simple_html = false, $for_plaintext = false)
{
$a = get_app();
@ -1473,10 +1472,6 @@ class BBCode
$text = str_replace(["\r","\n"], ['<br />', '<br />'], $text);
if ($preserve_nl) {
$text = str_replace(["\n", "\r"], ['', ''], $text);
}
// Remove all hashtag addresses
if ((!$try_oembed || $simple_html) && !in_array($simple_html, [3, 7])) {
$text = preg_replace("/([#@!])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '$1$3', $text);