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