]> git.mxchange.org Git - friendica-addons.git/blobdiff - buffer/buffer.php
Plaintext was renamed to BBCode
[friendica-addons.git] / buffer / buffer.php
index aef9a0fdcaacb370500ebaeaa865367d0875f8b0..a82fd4fc32174e3eefb1d6a55d1b596f43284496 100644 (file)
@@ -8,7 +8,7 @@
 require 'addon/buffer/bufferapp.php';
 
 use Friendica\App;
-use Friendica\Content\Text\Plaintext;
+use Friendica\Content\Text\BBCode;
 use Friendica\Core\Addon;
 use Friendica\Core\Config;
 use Friendica\Core\L10n;
@@ -339,7 +339,7 @@ function buffer_send(App $a, &$b)
                                        $item["body"] = preg_replace("(\[s\](.*?)\[\/s\])ism",'-$1-',$item["body"]);
                                }
 
-                               $post = Plaintext::toPlaintext($item, $limit, $includedlinks, $htmlmode);
+                               $post = BBCode::toPlaintext($item, $limit, $includedlinks, $htmlmode);
                                logger("buffer_send: converted message ".$b["id"]." result: ".print_r($post, true), LOGGER_DEBUG);
 
                                // The image proxy is used as a sanitizer. Buffer seems to be really picky about pictures
@@ -365,8 +365,8 @@ function buffer_send(App $a, &$b)
                                if (($profile->service == "twitter") && isset($post["url"]) && ($post["type"] != "photo"))
                                        $post["text"] .= " ".$post["url"];
                                elseif (($profile->service == "appdotnet") && isset($post["url"]) && isset($post["title"]) && ($post["type"] != "photo")) {
-                                       $post["title"] = Plaintext::shortenMsg($post["title"], 90);
-                                       $post["text"] = Plaintext::shortenMsg($post["text"], $limit - (24 + strlen($post["title"])));
+                                       $post["title"] = BBCode::shortenMsg($post["title"], 90);
+                                       $post["text"] = BBCode::shortenMsg($post["text"], $limit - (24 + strlen($post["title"])));
                                        $post["text"] .= "\n[".$post["title"]."](".$post["url"].")";
                                } elseif (($profile->service == "appdotnet") && isset($post["url"]) && ($post["type"] != "photo"))
                                        $post["text"] .= " ".$post["url"];