Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
This commit is contained in:
commit
074e3fa895
|
@ -792,9 +792,11 @@ class Profile extends Memcached_DataObject
|
||||||
* Returns an XML string fragment with profile information as an
|
* Returns an XML string fragment with profile information as an
|
||||||
* Activity Streams noun object with the given element type.
|
* Activity Streams noun object with the given element type.
|
||||||
*
|
*
|
||||||
* Assumes that 'activity' namespace has been previously defined.
|
* Assumes that 'activity', 'georss', and 'poco' namespace has been
|
||||||
|
* previously defined.
|
||||||
*
|
*
|
||||||
* @param string $element one of 'actor', 'subject', 'object', 'target'
|
* @param string $element one of 'actor', 'subject', 'object', 'target'
|
||||||
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function asActivityNoun($element)
|
function asActivityNoun($element)
|
||||||
|
@ -811,9 +813,46 @@ class Profile extends Memcached_DataObject
|
||||||
'id',
|
'id',
|
||||||
null,
|
null,
|
||||||
$this->getUri()
|
$this->getUri()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// title should contain fullname
|
||||||
$xs->element('title', null, $this->getBestName());
|
$xs->element('title', null, $this->getBestName());
|
||||||
|
|
||||||
|
// Portable Contacts stuff
|
||||||
|
|
||||||
|
if (isset($this->bio)) {
|
||||||
|
|
||||||
|
// XXX: Possible to use OpenSocial's aboutMe?
|
||||||
|
|
||||||
|
$xs->element('poco:note', null, $this->bio);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($this->homepage)) {
|
||||||
|
|
||||||
|
$xs->elementStart('poco:urls');
|
||||||
|
$xs->element('poco:value', null, $this->homepage);
|
||||||
|
$xs->element('poco:type', null, 'homepage');
|
||||||
|
$xs->element('poco:primary', null, 'true');
|
||||||
|
$xs->elementEnd('poco:urls');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($this->location)) {
|
||||||
|
$xs->elementStart('poco:address');
|
||||||
|
$xs->element('poco:formatted', null, $this->location);
|
||||||
|
$xs->elementEnd('poco:address');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($this->lat) && isset($this->lon)) {
|
||||||
|
$this->element(
|
||||||
|
'georss:point',
|
||||||
|
null,
|
||||||
|
(float)$this->lat . ' ' . (float)$this->lon
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// XXX: Should we send all avatar sizes we have? I think
|
||||||
|
// cliqset does -Z
|
||||||
|
|
||||||
$avatar = $this->getAvatar(AVATAR_PROFILE_SIZE);
|
$avatar = $this->getAvatar(AVATAR_PROFILE_SIZE);
|
||||||
|
|
||||||
$xs->element(
|
$xs->element(
|
||||||
|
@ -829,6 +868,8 @@ class Profile extends Memcached_DataObject
|
||||||
|
|
||||||
$xs->elementEnd('activity:' . $element);
|
$xs->elementEnd('activity:' . $element);
|
||||||
|
|
||||||
|
// XXX: Add people tags with <poco:tags> plural?
|
||||||
|
|
||||||
return $xs->getString();
|
return $xs->getString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -109,11 +109,11 @@ class Atom10Feed extends XMLStringer
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_null($uri)) {
|
if (isset($uri)) {
|
||||||
$xs->element('uri', null, $uri);
|
$xs->element('uri', null, $uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_null(email)) {
|
if (isset($email)) {
|
||||||
$xs->element('email', null, $email);
|
$xs->element('email', null, $email);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,8 +60,7 @@ class AtomUserNoticeFeed extends AtomNoticeFeed
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
if (!empty($user)) {
|
if (!empty($user)) {
|
||||||
$profile = $user->getProfile();
|
$profile = $user->getProfile();
|
||||||
$this->addAuthor($profile->getBestName(),
|
$this->addAuthor($profile->nickname, $user->uri);
|
||||||
$user->uri);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ class OStatusInitAction extends Action
|
||||||
} else {
|
} else {
|
||||||
$this->connectProfile($this->acct);
|
$this->connectProfile($this->acct);
|
||||||
}
|
}
|
||||||
} elseif (strpos('@', $this->acct) !== false) {
|
} elseif (strpos($this->acct, '@') !== false) {
|
||||||
$this->connectWebfinger($this->acct);
|
$this->connectWebfinger($this->acct);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ class OStatusInitAction extends Action
|
||||||
$user = User::staticGet('nickname', $this->nickname);
|
$user = User::staticGet('nickname', $this->nickname);
|
||||||
$target_profile = common_local_url('userbyid', array('id' => $user->id));
|
$target_profile = common_local_url('userbyid', array('id' => $user->id));
|
||||||
|
|
||||||
$url = $w->applyTemplate($link['template'], $feed_url);
|
$url = $w->applyTemplate($link['template'], $target_profile);
|
||||||
|
|
||||||
common_redirect($url, 303);
|
common_redirect($url, 303);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user