X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=ljpost%2Fljpost.php;h=981162e8e33b9676e10a10eb73654ac1e79b414e;hb=f1514063559930de791c0bff18a3f6ae4b455f7c;hp=7843d6f3912791adcd81adcd96d58068779abea2;hpb=c6e5bc3429c9c610895ba826d841cddd8c0f378b;p=friendica-addons.git diff --git a/ljpost/ljpost.php b/ljpost/ljpost.php index 7843d6f3..981162e8 100644 --- a/ljpost/ljpost.php +++ b/ljpost/ljpost.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 ljpost_install() { Addon::registerHook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local'); @@ -37,7 +39,7 @@ function ljpost_jot_nets(&$a,&$b) { $lj_defpost = PConfig::get(local_user(),'ljpost','post_by_default'); $selected = ((intval($lj_defpost) == 1) ? ' checked="checked" ' : ''); $b .= '
' - . t('Post to LiveJournal') . '
'; + . L10n::t('Post to LiveJournal') . ''; } } @@ -68,30 +70,30 @@ function ljpost_settings(&$a,&$s) { /* Add some HTML to the existing form */ $s .= '
'; - $s .= '

' . t('LiveJournal Post Settings') . '

'; + $s .= '

' . L10n::t('LiveJournal Post Settings') . '

'; $s .= '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; $s .= '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; $s .= '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; $s .= '
'; - $s .= ''; + $s .= ''; $s .= ''; $s .= '
'; /* provide a submit button */ - $s .= '
'; + $s .= '
'; } @@ -232,10 +234,10 @@ EOT; logger('ljpost: data: ' . $xml, LOGGER_DATA); - if($lj_blog !== 'test') - $x = post_url($lj_blog,$xml,["Content-Type: text/xml"]); + if ($lj_blog !== 'test') { + $x = Network::post($lj_blog, $xml, ["Content-Type: text/xml"]); + } logger('posted to livejournal: ' . ($x) ? $x : '', LOGGER_DEBUG); - } }