forked from GNUsocial/gnu-social
fix whitespace in lib/xrdaction.php
This commit is contained in:
parent
4b4b763255
commit
d5466ac87e
@ -53,53 +53,53 @@ class XrdAction extends Action
|
|||||||
$xrd->subject = self::normalize($this->uri);
|
$xrd->subject = self::normalize($this->uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Event::handle('StartXrdActionAliases', array(&$xrd, $this->user))) {
|
if (Event::handle('StartXrdActionAliases', array(&$xrd, $this->user))) {
|
||||||
|
|
||||||
// Possible aliases for the user
|
// Possible aliases for the user
|
||||||
|
|
||||||
$uris = array($this->user->uri, $profile->profileurl);
|
$uris = array($this->user->uri, $profile->profileurl);
|
||||||
|
|
||||||
// FIXME: Webfinger generation code should live somewhere on its own
|
// FIXME: Webfinger generation code should live somewhere on its own
|
||||||
|
|
||||||
$path = common_config('site', 'path');
|
$path = common_config('site', 'path');
|
||||||
|
|
||||||
if (empty($path)) {
|
if (empty($path)) {
|
||||||
$uris[] = sprintf('acct:%s@%s', $nick, common_config('site', 'server'));
|
$uris[] = sprintf('acct:%s@%s', $nick, common_config('site', 'server'));
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($uris as $uri) {
|
foreach ($uris as $uri) {
|
||||||
if ($uri != $xrd->subject) {
|
if ($uri != $xrd->subject) {
|
||||||
$xrd->alias[] = $uri;
|
$xrd->alias[] = $uri;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Event::handle('EndXrdActionAliases', array(&$xrd, $this->user));
|
Event::handle('EndXrdActionAliases', array(&$xrd, $this->user));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Event::handle('StartXrdActionLinks', array(&$xrd, $this->user))) {
|
if (Event::handle('StartXrdActionLinks', array(&$xrd, $this->user))) {
|
||||||
|
|
||||||
$xrd->links[] = array('rel' => self::PROFILEPAGE,
|
$xrd->links[] = array('rel' => self::PROFILEPAGE,
|
||||||
'type' => 'text/html',
|
'type' => 'text/html',
|
||||||
'href' => $profile->profileurl);
|
'href' => $profile->profileurl);
|
||||||
|
|
||||||
// hCard
|
// hCard
|
||||||
$xrd->links[] = array('rel' => self::HCARD,
|
$xrd->links[] = array('rel' => self::HCARD,
|
||||||
'type' => 'text/html',
|
'type' => 'text/html',
|
||||||
'href' => common_local_url('hcard', array('nickname' => $nick)));
|
'href' => common_local_url('hcard', array('nickname' => $nick)));
|
||||||
|
|
||||||
// XFN
|
// XFN
|
||||||
$xrd->links[] = array('rel' => 'http://gmpg.org/xfn/11',
|
$xrd->links[] = array('rel' => 'http://gmpg.org/xfn/11',
|
||||||
'type' => 'text/html',
|
'type' => 'text/html',
|
||||||
'href' => $profile->profileurl);
|
'href' => $profile->profileurl);
|
||||||
// FOAF
|
// FOAF
|
||||||
$xrd->links[] = array('rel' => 'describedby',
|
$xrd->links[] = array('rel' => 'describedby',
|
||||||
'type' => 'application/rdf+xml',
|
'type' => 'application/rdf+xml',
|
||||||
'href' => common_local_url('foaf',
|
'href' => common_local_url('foaf',
|
||||||
array('nickname' => $nick)));
|
array('nickname' => $nick)));
|
||||||
|
|
||||||
|
|
||||||
Event::handle('EndXrdActionLinks', array(&$xrd, $this->user));
|
Event::handle('EndXrdActionLinks', array(&$xrd, $this->user));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
header('Content-type: application/xrd+xml');
|
header('Content-type: application/xrd+xml');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user