X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=ijpost%2Fijpost.php;h=d2a3071eb742a5ef600d1b83e9c3fb4d6f2410da;hb=90b1ef56f7415a71f22feaa34377802a4a9d0fbb;hp=b003742f719a68e14b0bf035ce84a77d3999102a;hpb=04074465719b2ee5342a04f11d48cedbd9685484;p=friendica-addons.git
diff --git a/ijpost/ijpost.php b/ijpost/ijpost.php
index b003742f..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()
{
@@ -56,7 +58,7 @@ function ijpost_settings(&$a, &$s)
/* Add our stylesheet to the page so we can make our settings look nice */
- $a->page['htmlhead'] .= '' . "\r\n";
+ $a->page['htmlhead'] .= '' . "\r\n";
/* Get the current state of our config variables */
@@ -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);
}
}