]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Open the /api/laconica/config.format API method so clients can determine whether...
authorZach Copley <zach@controlyourself.ca>
Wed, 18 Feb 2009 23:33:52 +0000 (15:33 -0800)
committerZach Copley <zach@controlyourself.ca>
Wed, 18 Feb 2009 23:33:52 +0000 (15:33 -0800)
actions/api.php

index 21fe4eea32004868e9a795422fcddb77ceaeaf73..a27d244929f032468cc5ae0e4373a936a8d47c37 100644 (file)
@@ -131,14 +131,14 @@ class ApiAction extends Action
                                  'statuses/followers',
                                  'favorites/favorites');
 
-        # If the site is "private", all API methods need authentication
-
+        $fullname = "$this->api_action/$this->api_method";
+        
+        // If the site is "private", all API methods except laconica/config 
+        // need authentication
         if (common_config('site', 'private')) {
-            return true;
+            return $fullname != 'laconica/config' || false;
         }
 
-        $fullname = "$this->api_action/$this->api_method";
-
         if (in_array($fullname, $bareauth)) {
             # bareauth: only needs auth if without an argument
             if ($this->api_arg) {