Merge pull request #1005 from MrPetovan/task/8676-ap-multiple-link-image
authorMichael Vogel <icarus@dabo.de>
Sat, 18 Jul 2020 15:51:48 +0000 (17:51 +0200)
committerGitHub <noreply@github.com>
Sat, 18 Jul 2020 15:51:48 +0000 (17:51 +0200)
[various] Rename PageInfo::appendToBody to searchAndAppendToBody

statusnet/statusnet.php
twitter/twitter.php

index f5bb7f4..0fd1fd7 100644 (file)
@@ -897,7 +897,7 @@ function statusnet_fetchtimeline(App $a, $uid)
 
                                $_REQUEST["title"] = "";
 
-                               $_REQUEST["body"] = PageInfo::appendToBody($post->text, true);
+                               $_REQUEST["body"] = PageInfo::searchAndAppendToBody($post->text, true);
                                if (is_string($post->place->name)) {
                                        $_REQUEST["location"] = $post->place->name;
                                }
index d374f1c..948bb6b 100644 (file)
@@ -1365,11 +1365,11 @@ function twitter_expand_entities($body, stdClass $status, $picture)
                } elseif ($picture) {
                        $body .= "\n\n[img]" . $picture . "[/img]\n";
                } else {
-                       $body = PageInfo::appendToBody($body);
+                       $body = PageInfo::searchAndAppendToBody($body);
                }
        }
 
-       return ['body' => $body, 'plain' => $plain, 'taglist' => $taglist];
+       return ['body' => $body, 'plain' => trim($plain), 'taglist' => $taglist];
 }
 
 /**