X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=widgets%2Fwidgets.php;h=e62932448efc5f2badd7d21e7a3a63c8aaf3ce92;hb=48dcbc6f3fc3edae74e3ea2c823011bfb7c26081;hp=72534ce3bb75863556051ffbbbe91c13738eacc0;hpb=6d6e73096afb22e95678c651e055337f1bf5405d;p=friendica-addons.git diff --git a/widgets/widgets.php b/widgets/widgets.php index 72534ce3..e6293244 100755 --- a/widgets/widgets.php +++ b/widgets/widgets.php @@ -5,8 +5,9 @@ * Version: 1.0 * Author: Fabio Comuni */ - - + +use Friendica\Core\PConfig; + function widgets_install() { register_hook('plugin_settings', 'addon/widgets/widgets.php', 'widgets_settings'); register_hook('plugin_settings_post', 'addon/widgets/widgets.php', 'widgets_settings_post'); @@ -32,8 +33,8 @@ function widgets_settings(&$a,&$o) { return; - $key = get_pconfig(local_user(), 'widgets', 'key' ); - if ($key=='') { $key = mt_rand(); set_pconfig(local_user(), 'widgets', 'key', $key); } + $key = PConfig::get(local_user(), 'widgets', 'key' ); + if ($key=='') { $key = mt_rand(); PConfig::set(local_user(), 'widgets', 'key', $key); } $widgets = array(); $d = dir(dirname(__file__));