]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/apiauth.php
Commit upstream updates to php-gettext after the 1.0.7 release (but in 2006! :P)
[quix0rs-gnu-social.git] / lib / apiauth.php
index 25bbae24e53dfaf2c75e1eacdc37113792e6f17f..2f2e44a2646b099f3ccaad7af2d89e8ed7fb46b6 100644 (file)
  *
  * @category  API
  * @package   StatusNet
- * @author    Zach Copley <zach@status.net>
+ * @author    Adrian Lang <mail@adrianlang.de>
+ * @author    Brenda Wallace <shiny@cpan.org>
+ * @author    Craig Andrews <candrews@integralblue.com>
+ * @author    Dan Moore <dan@moore.cx>
+ * @author    Evan Prodromou <evan@status.net>
+ * @author    mEDI <medi@milaro.net>
+ * @author    Sarven Capadisli <csarven@status.net>
+ * @author    Zach Copley <zach@status.net> 
  * @copyright 2009 StatusNet, Inc.
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link      http://status.net/
@@ -31,7 +38,7 @@ if (!defined('STATUSNET')) {
     exit(1);
 }
 
-require_once INSTALLDIR.'/lib/api.php';
+require_once INSTALLDIR . '/lib/api.php';
 
 /**
  * Actions extending this class will require auth
@@ -90,8 +97,10 @@ class ApiAuthAction extends ApiAction
     {
         $this->basicAuthProcessHeader();
 
+        $realm = common_config('site', 'name') . ' API';
+
         if (!isset($this->auth_user)) {
-            header('WWW-Authenticate: Basic realm="StatusNet API"');
+            header('WWW-Authenticate: Basic realm="' . $realm . '"');
 
             // show error if the user clicks 'cancel'