]> git.mxchange.org Git - friendica.git/commitdiff
Removed unneeded parameter
authorMichael <heluecht@pirati.ca>
Sun, 16 Jul 2023 16:48:24 +0000 (16:48 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 16 Jul 2023 16:48:24 +0000 (16:48 +0000)
src/Content/Text/BBCode.php
src/Model/Event.php
src/Model/Profile.php
src/Module/Notifications/Introductions.php
src/Navigation/Notifications/Entity/Notify.php
src/Navigation/Notifications/Factory/FormattedNotify.php
src/Navigation/Notifications/Factory/Notify.php

index 875674544cb174d299422039eca29107b28b40ee..f40160c9de9138ecf015ba15038cac81f11386ca 100644 (file)
@@ -226,7 +226,7 @@ class BBCode
         * @param bool $keep_urls Whether to keep URLs in the resulting plaintext
         * @return string
         */
-       public static function toPlaintext(string $text, bool $keep_urls = true, bool $strip_tags = false): string
+       public static function toPlaintext(string $text, bool $keep_urls = true): string
        {
                DI::profiler()->startRecording('rendering');
                // Remove pictures in advance to avoid unneeded proxy calls
@@ -238,9 +238,6 @@ class BBCode
 
                $naked_text = HTML::toPlaintext(self::convert($text, false, BBCode::EXTERNAL, true), 0, !$keep_urls);
 
-               if ($strip_tags) {
-                       $naked_text = strip_tags($naked_text);
-               }
                DI::profiler()->stopRecording();
                return $naked_text;
        }
index 8221fa82b7709b6fb524a3d921db5c4dac2608e8..ecf21d3420d3f95e77cb4f717af5b9ab5e5085af 100644 (file)
@@ -1012,7 +1012,7 @@ class Event
                        }
                }
 
-               $location['name'] = BBCode::toPlaintext($location['name'], false, true);
+               $location['name'] = BBCode::toPlaintext($location['name'], false);
 
                // Construct the map HTML.
                if (isset($location['address'])) {
index 0a6881853dd594cf93a71e6d5bed10252a1d4444..0602df10aad4c33c46db3bc62c1de1934d46ec8a 100644 (file)
@@ -640,13 +640,13 @@ class Profile
                                        $istoday = true;
                                }
 
-                               $title = BBCode::toPlaintext($rr['summary'], false, true);
+                               $title = BBCode::toPlaintext($rr['summary'], false);
 
                                if (strlen($title) > 35) {
                                        $title = substr($title, 0, 32) . '... ';
                                }
 
-                               $description = BBCode::toPlaintext($rr['desc'], false, true) . '... ';
+                               $description = BBCode::toPlaintext($rr['desc'], false) . '... ';
                                if (!$description) {
                                        $description = DI::l10n()->t('[No description]');
                                }
index 48c0d4dfe57f3b6342c1e426c91d2e7c95e6410b..921761ab5cba4548781e88391b35a6dca68f2537 100644 (file)
@@ -147,7 +147,7 @@ class Introductions extends BaseNotifications
                                                $knowyou = '';
                                        }
 
-                                       $convertedName = BBCode::toPlaintext($Introduction->getName(), false, true);
+                                       $convertedName = BBCode::toPlaintext($Introduction->getName(), false);
 
                                        $helptext  = $this->t('Shall your connection be bidirectional or not?');
                                        $helptext2 = $this->t('Accepting %s as a friend allows %s to subscribe to your posts, and you will also receive updates from them in your news feed.', $convertedName, $convertedName);
index d45976c17414c9c943dc7ca41d6437150bf654d0..ab042bc9f0cb53accecc3889c6f90e5767efee9c 100644 (file)
@@ -118,7 +118,7 @@ class Notify extends BaseEntity
        public function updateMsgFromPreamble($epreamble)
        {
                $this->msg       = Renderer::replaceMacros($epreamble, ['$itemlink' => $this->link->__toString()]);
-               $this->msg_cache = self::formatMessage($this->name_cache, BBCode::toPlaintext($this->msg, false, true));
+               $this->msg_cache = self::formatMessage($this->name_cache, BBCode::toPlaintext($this->msg, false));
        }
 
        /**
@@ -134,6 +134,6 @@ class Notify extends BaseEntity
         */
        public static function formatMessage(string $name, string $message): string
        {
-               return str_replace('{0}', '<span class="contactname">' . BBCode::toPlaintext($name, false, true) . '</span>', htmlspecialchars($message));
+               return str_replace('{0}', '<span class="contactname">' . BBCode::toPlaintext($name, false) . '</span>', htmlspecialchars($message));
        }
 }
index 75f6e767695b7ce9a18ecad538d69fb600ac1a63..9b200dea5a3cee63a8692b13c5a2e62df7b7a862 100644 (file)
@@ -222,7 +222,7 @@ class FormattedNotify extends BaseFactory
                                        $this->baseUrl . '/notify/' . $Notify->id,
                                        Contact::getAvatarUrlForUrl($Notify->url, $Notify->uid, Proxy::SIZE_MICRO),
                                        $Notify->url,
-                                       BBCode::toPlaintext($Notify->msg ?? '', false, true),
+                                       BBCode::toPlaintext($Notify->msg ?? '', false),
                                        DateTimeFormat::local($Notify->date->format(DateTimeFormat::MYSQL), 'r'),
                                        Temporal::getRelativeDate($Notify->date->format(DateTimeFormat::MYSQL)),
                                        $Notify->seen
index dd59b3323c98d34929bc489e17cf612b92ae2e32..40c77c84deee89b289ff41d1619c0ce4ac438b0b 100644 (file)
@@ -68,7 +68,7 @@ class Notify extends BaseFactory implements ICanCreateFromTableRow
                        false,
                        $params['verb'] ?? '',
                        $params['otype'] ?? '',
-                       substr(BBCode::toPlaintext($params['source_name'], false, true), 0, 255),
+                       substr(BBCode::toPlaintext($params['source_name'], false), 0, 255),
                        null,
                        null,
                        $item_id,