]> git.mxchange.org Git - friendica-addons.git/blobdiff - blogger/blogger.php
EN-GB translation update for blockem
[friendica-addons.git] / blogger / blogger.php
index e9813dc2ef8c00af85c695c9468d9f968981b466..30c450bda9f6e5c180c597fdb70fee59c381750c 100644 (file)
@@ -5,9 +5,12 @@
  * Version: 1.0
  *
  */
+
+use Friendica\Content\Text\BBCode;
 use Friendica\Core\Addon;
 use Friendica\Core\L10n;
 use Friendica\Core\PConfig;
+use Friendica\Util\Network;
 
 function blogger_install()
 {
@@ -180,10 +183,8 @@ function blogger_send(&$a, &$b)
        $bl_blog = PConfig::get($b['uid'], 'blogger', 'bl_blog');
 
        if ($bl_username && $bl_password && $bl_blog) {
-               require_once('include/bbcode.php');
-
                $title = '<title>' . (($b['title']) ? $b['title'] : L10n::t('Post from Friendica')) . '</title>';
-               $post = $title . bbcode($b['body']);
+               $post = $title . BBCode::convert($b['body']);
                $post = xmlify($post);
 
                $xml = <<< EOT
@@ -205,7 +206,7 @@ EOT;
                logger('blogger: data: ' . $xml, LOGGER_DATA);
 
                if ($bl_blog !== 'test') {
-                       $x = post_url($bl_blog, $xml);
+                       $x = Network::post($bl_blog, $xml);
                }
 
                logger('posted to blogger: ' . (($x) ? $x : ''), LOGGER_DEBUG);