123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- if (!defined('GNUSOCIAL')) { exit(1); }
- class OwnerxrdAction extends WebfingerAction
- {
- protected $defaultformat = 'xml';
- protected function prepare(array $args=array())
- {
- $user = User::siteOwner();
- $nick = common_canonical_nickname($user->nickname);
- $args['resource'] = 'acct:' . $nick . '@' . common_config('site', 'server');
-
-
- parent::prepare($args);
- return true;
- }
- protected function setXRD()
- {
- parent::setXRD();
-
-
- if ($owner = common_config('webfinger', 'owner')) {
- $this->xrd->aliases[] = $this->xrd->subject;
- $this->xrd->subject = Discovery::normalize($owner);
- } else {
- $this->xrd->subject = $this->resource;
- }
- }
- }
|