X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=ijpost%2Fijpost.php;h=9d9f9112087f80fd37272a9f008f68219e0b7127;hb=f1514063559930de791c0bff18a3f6ae4b455f7c;hp=16c14a79126a479e6d86d63d5ee3664f6302b202;hpb=0afd633346b517894ff8e92c705bd5d052dd06a2;p=friendica-addons.git diff --git a/ijpost/ijpost.php b/ijpost/ijpost.php index 16c14a79..9d9f9112 100644 --- a/ijpost/ijpost.php +++ b/ijpost/ijpost.php @@ -8,7 +8,9 @@ * Author: Cat Gray */ use Friendica\Core\Addon; +use Friendica\Core\L10n; use Friendica\Core\PConfig; +use Friendica\Util\Network; function ijpost_install() { Addon::registerHook('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local'); @@ -37,7 +39,7 @@ function ijpost_jot_nets(&$a,&$b) { $ij_defpost = PConfig::get(local_user(),'ijpost','post_by_default'); $selected = ((intval($ij_defpost) == 1) ? ' checked="checked" ' : ''); $b .= '
' - . t('Post to Insanejournal') . '
'; + . L10n::t('Post to Insanejournal') . ''; } } @@ -67,36 +69,36 @@ function ijpost_settings(&$a,&$s) { /* Add some HTML to the existing form */ $s .= ''; - $s .= '

'. t("InsaneJournal Export").'

'; + $s .= '

'. L10n::t("InsaneJournal Export").'

'; $s .= '
'; $s .= ''; + $s .= '
'; } @@ -218,8 +220,9 @@ EOT; logger('ijpost: data: ' . $xml, LOGGER_DATA); - if($ij_blog !== 'test') - $x = post_url($ij_blog,$xml,["Content-Type: text/xml"]); + if($ij_blog !== 'test') { + $x = Network::post($ij_blog, $xml, ["Content-Type: text/xml"]); + } logger('posted to insanejournal: ' . ($x) ? $x : '', LOGGER_DEBUG); }