Merge branch '3.6-release'
[friendica-addons.git] / numfriends / numfriends.php
index 7acb914dc7d6a7df820a712d92dd987a7ddba3cf..247c7dc7593e98aa9fa66e4ba42c12e12b7cd55c 100644 (file)
@@ -54,6 +54,7 @@ function numfriends_settings(&$a, &$s)
 {
        if (! local_user()) {
                return;
+       }
 
        /* Add our stylesheet to the page so we can make our settings look nice */
 
@@ -61,9 +62,7 @@ function numfriends_settings(&$a, &$s)
 
        /* Get the current state of our config variable */
 
-       $numfriends = get_pconfig(local_user(),'system','display_friend_count');
-       if($numfriends === false)
-               $numfriends = 24;
+       $numfriends = PConfig::get(local_user(), 'system', 'display_friend_count', 24);
        
        /* Add some HTML to the existing form */