From: Hypolite Petovan Date: Mon, 5 Feb 2018 04:38:40 +0000 (-0500) Subject: Rename BBCode::removeAbstract() to BBCode::stripAbstract() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d75bb8e97053dbfe7a5c0c444d6fed1bff274e26;p=friendica.git Rename BBCode::removeAbstract() to BBCode::stripAbstract() --- diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index 004440cfcc..a4eb46115b 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -355,7 +355,7 @@ class BBCode $body = preg_replace("/([^\]\='".'"'."]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", '$1[url]$2[/url]', $body); // Remove the abstract - $body = self::removeAbstract($body); + $body = self::stripAbstract($body); // At first look at data that is attached via "type-..." stuff // This will hopefully replaced with a dedicated bbcode later @@ -1380,7 +1380,7 @@ class BBCode $text = preg_replace_callback("/\[pre\](.*?)\[\/pre\]/ism", 'self::escapeNoparseCallback', $text); // Remove the abstract element. It is a non visible element. - $text = self::removeAbstract($text); + $text = self::stripAbstract($text); // Move all spaces out of the tags $text = preg_replace("/\[(\w*)\](\s*)/ism", '$2[$1]', $text); @@ -1941,12 +1941,12 @@ class BBCode } /** - * @brief Removes the "abstract" element from the text + * @brief Strips the "abstract" tag from the provided text * * @param string $text The text with BBCode * @return string The same text - but without "abstract" element */ - public static function removeAbstract($text) + public static function stripAbstract($text) { $text = preg_replace("/[\s|\n]*\[abstract\].*?\[\/abstract\][\s|\n]*/ism", '', $text); $text = preg_replace("/[\s|\n]*\[abstract=.*?\].*?\[\/abstract][\s|\n]*/ism", '', $text); diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index 5d26e663c0..292d35e9d7 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -930,7 +930,7 @@ class DFRN } // Remove the abstract element. It is only locally important. - $body = BBCode::removeAbstract($body); + $body = BBCode::stripAbstract($body); if ($type == 'html') { $htmlbody = $body;