diff options
author | Brion Vibber <brion@pobox.com> | 2010-03-09 11:27:53 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-03-09 11:27:53 -0800 |
commit | 6c4ade4251eca321b5251092dbb84d648b3a4258 (patch) | |
tree | 985f5ba068b1fa96f4df23306b775ace16f2a008 /lib/apiauth.php | |
parent | 053aafe5fbd1a0026831c28bf8b382ff44bb9de6 (diff) | |
parent | 4caf0d2e73f97c3ee99b2aa902f996e9d3bbab9f (diff) |
Merge branch 'testing' into 0.9.x
Diffstat (limited to 'lib/apiauth.php')
-rw-r--r-- | lib/apiauth.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/apiauth.php b/lib/apiauth.php index 5090871cf..f63c84d8f 100644 --- a/lib/apiauth.php +++ b/lib/apiauth.php @@ -235,7 +235,11 @@ class ApiAuthAction extends ApiAction { $this->basicAuthProcessHeader(); - $realm = common_config('site', 'name') . ' API'; + $realm = common_config('api', 'realm'); + + if (empty($realm)) { + $realm = common_config('site', 'name') . ' API'; + } if (!isset($this->auth_user_nickname) && $required) { header('WWW-Authenticate: Basic realm="' . $realm . '"'); |