1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- defined('GNUSOCIAL') || die();
- 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 (!empty($owner = common_config('webfinger', 'owner'))) {
- $this->xrd->aliases[] = $this->xrd->subject;
- $this->xrd->subject = Discovery::normalize($owner);
- } else {
- $this->xrd->subject = $this->resource;
- }
- }
- }
|