X-Git-Url: https://git.mxchange.org/?p=friendica-addons.git;a=blobdiff_plain;f=dwpost%2Fdwpost.php;h=c29a3b46af58f0d5f22782fdf42c24e8e181aa89;hp=0c2e699ae75a3a20d6385c079e94f5e284294cf2;hb=48dcbc6f3fc3edae74e3ea2c823011bfb7c26081;hpb=b2e60b8c61565abf60367f1919ba5ae6b9c0a5fb diff --git a/dwpost/dwpost.php b/dwpost/dwpost.php index 0c2e699a..c29a3b46 100644 --- a/dwpost/dwpost.php +++ b/dwpost/dwpost.php @@ -9,6 +9,8 @@ * Author: Cat Gray */ +use Friendica\Core\PConfig; + function dwpost_install() { register_hook('post_local', 'addon/dwpost/dwpost.php', 'dwpost_post_local'); register_hook('notifier_normal', 'addon/dwpost/dwpost.php', 'dwpost_send'); @@ -31,9 +33,9 @@ function dwpost_jot_nets(&$a,&$b) { if(! local_user()) return; - $dw_post = get_pconfig(local_user(),'dwpost','post'); + $dw_post = PConfig::get(local_user(),'dwpost','post'); if(intval($dw_post) == 1) { - $dw_defpost = get_pconfig(local_user(),'dwpost','post_by_default'); + $dw_defpost = PConfig::get(local_user(),'dwpost','post_by_default'); $selected = ((intval($dw_defpost) == 1) ? ' checked="checked" ' : ''); $b .= '
' . t('Post to Dreamwidth') . '
'; @@ -52,22 +54,28 @@ function dwpost_settings(&$a,&$s) { /* Get the current state of our config variables */ - $enabled = get_pconfig(local_user(),'dwpost','post'); + $enabled = PConfig::get(local_user(),'dwpost','post'); $checked = (($enabled) ? ' checked="checked" ' : ''); - $def_enabled = get_pconfig(local_user(),'dwpost','post_by_default'); + $def_enabled = PConfig::get(local_user(),'dwpost','post_by_default'); $def_checked = (($def_enabled) ? ' checked="checked" ' : ''); - $dw_username = get_pconfig(local_user(), 'dwpost', 'dw_username'); - $dw_password = get_pconfig(local_user(), 'dwpost', 'dw_password'); + $dw_username = PConfig::get(local_user(), 'dwpost', 'dw_username'); + $dw_password = PConfig::get(local_user(), 'dwpost', 'dw_password'); /* Add some HTML to the existing form */ - $s .= '
'; - $s .= '

' . t('Dreamwidth Post Settings') . '

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

'. t("Dreamwidth Export").'

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