X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=ijpost%2Fijpost.php;h=d2a3071eb742a5ef600d1b83e9c3fb4d6f2410da;hb=90b1ef56f7415a71f22feaa34377802a4a9d0fbb;hp=5d24509e374854629126fcbe40580d34d16717c6;hpb=1454abfdb48b8ba452d897d90f6979bb4f23912c;p=friendica-addons.git diff --git a/ijpost/ijpost.php b/ijpost/ijpost.php index 5d24509e..d2a3071e 100644 --- a/ijpost/ijpost.php +++ b/ijpost/ijpost.php @@ -11,9 +11,11 @@ use Friendica\Content\Text\BBCode; use Friendica\Core\Addon; use Friendica\Core\L10n; +use Friendica\Core\Logger; use Friendica\Core\PConfig; use Friendica\Util\DateTimeFormat; use Friendica\Util\Network; +use Friendica\Util\XML; function ijpost_install() { @@ -184,7 +186,7 @@ function ijpost_send(&$a, &$b) if ($ij_username && $ij_password && $ij_blog) { $title = $b['title']; $post = BBCode::convert($b['body']); - $post = xmlify($post); + $post = XML::escape($post); $tags = ijpost_get_tags($b['tag']); $date = DateTimeFormat::convert($b['created'], $tz); @@ -221,12 +223,12 @@ function ijpost_send(&$a, &$b) EOT; - logger('ijpost: data: ' . $xml, LOGGER_DATA); + Logger::log('ijpost: data: ' . $xml, Logger::DATA); if ($ij_blog !== 'test') { - $x = Network::post($ij_blog, $xml, ["Content-Type: text/xml"]); + $x = Network::post($ij_blog, $xml, ["Content-Type: text/xml"])->getBody(); } - logger('posted to insanejournal: ' . $x ? $x : '', LOGGER_DEBUG); + Logger::log('posted to insanejournal: ' . $x ? $x : '', Logger::DEBUG); } }