]> git.mxchange.org Git - friendica.git/commitdiff
Rename BBCode::removeAbstract() to BBCode::stripAbstract()
authorHypolite Petovan <mrpetovan@gmail.com>
Mon, 5 Feb 2018 04:38:40 +0000 (23:38 -0500)
committerHypolite Petovan <mrpetovan@gmail.com>
Mon, 5 Feb 2018 04:38:40 +0000 (23:38 -0500)
src/Content/Text/BBCode.php
src/Protocol/DFRN.php

index 004440cfccffb8c794a79e0dff820c9a1dc5a048..a4eb46115b5ef3785d5dd849a81acdb119fb9223 100644 (file)
@@ -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);
index 5d26e663c0110c9dfe7d1822ac62a93146a1fc1c..292d35e9d77ce792cc3527abd32f2c81bdb62378 100644 (file)
@@ -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;