]> git.mxchange.org Git - friendica-addons.git/commitdiff
look for the application name in pconfig 1st, then global config
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Tue, 19 Feb 2013 07:28:10 +0000 (08:28 +0100)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Tue, 19 Feb 2013 07:28:10 +0000 (08:28 +0100)
statusnet/statusnet.php

index 393bbfe53fba58e2286e3d4c5962650cfea88e7f..d12aefe79c55dab5c2f0889b24eef4a552ab3e34 100755 (executable)
@@ -791,8 +791,12 @@ function statusnet_fetchtimeline($a, $uid) {
        $osecret = get_pconfig($uid, 'statusnet', 'oauthsecret');
        $lastid  = get_pconfig($uid, 'statusnet', 'lastid');
 
-       $application_name  = get_config('statusnet', 'application_name');
-
+        //  get the application name for the SN app
+        //  1st try personal config, then system config and fallback to the 
+        //  hostname of the node if neither one is set. 
+        $application_name  = get_pconfig( $uid, 'statusnet', 'application_name');
+        if ($application_name == "")
+               $application_name  = get_config('statusnet', 'application_name');
        if ($application_name == "")
                $application_name = $a->get_hostname();