X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=ijpost%2Fijpost.php;h=deeba04241c2a3ae31f04f256c9672377b9ac6d6;hb=c3e93f1ed9a487f823bcc75ddd43024334c25bfc;hp=d6861f46949b172720b653e01e6f0495f2bbf89a;hpb=ce21d9375a04410f11f79c9303bd86ebc29ab4da;p=friendica-addons.git diff --git a/ijpost/ijpost.php b/ijpost/ijpost.php index d6861f46..deeba042 100644 --- a/ijpost/ijpost.php +++ b/ijpost/ijpost.php @@ -9,6 +9,8 @@ * Author: Cat Gray */ +use Friendica\Core\PConfig; + function ijpost_install() { register_hook('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local'); register_hook('notifier_normal', 'addon/ijpost/ijpost.php', 'ijpost_send'); @@ -31,9 +33,9 @@ function ijpost_jot_nets(&$a,&$b) { if(! local_user()) return; - $ij_post = get_pconfig(local_user(),'ijpost','post'); + $ij_post = PConfig::get(local_user(),'ijpost','post'); if(intval($ij_post) == 1) { - $ij_defpost = get_pconfig(local_user(),'ijpost','post_by_default'); + $ij_defpost = PConfig::get(local_user(),'ijpost','post_by_default'); $selected = ((intval($ij_defpost) == 1) ? ' checked="checked" ' : ''); $b .= '
' . t('Post to Insanejournal') . '
'; @@ -52,22 +54,27 @@ function ijpost_settings(&$a,&$s) { /* Get the current state of our config variables */ - $enabled = get_pconfig(local_user(),'ijpost','post'); + $enabled = PConfig::get(local_user(),'ijpost','post'); $checked = (($enabled) ? ' checked="checked" ' : ''); - $def_enabled = get_pconfig(local_user(),'ijpost','post_by_default'); + $def_enabled = PConfig::get(local_user(),'ijpost','post_by_default'); $def_checked = (($def_enabled) ? ' checked="checked" ' : ''); - $ij_username = get_pconfig(local_user(), 'ijpost', 'ij_username'); - $ij_password = get_pconfig(local_user(), 'ijpost', 'ij_password'); + $ij_username = PConfig::get(local_user(), 'ijpost', 'ij_username'); + $ij_password = PConfig::get(local_user(), 'ijpost', 'ij_password'); /* Add some HTML to the existing form */ + $s .= ''; + $s .= '

'. t("InsaneJournal Export").'

'; + $s .= '
'; + $s .= '