Merge branch 'rationalize-activity' into testing

* rationalize-activity:
  Move ActivityObject and related stuff to core
  Add PoCo bits, avatar link, geo point, etc. to person activity obj output
This commit is contained in:
Zach Copley
2010-02-22 17:12:33 -08:00
3 changed files with 152 additions and 102 deletions

View File

@@ -1218,25 +1218,8 @@ class Notice extends Memcached_DataObject
*/
function asActivityNoun($element)
{
$xs = new XMLStringer(true);
$xs->elementStart('activity:' . $element);
$xs->element('activity:object-type',
null,
'http://activitystrea.ms/schema/1.0/note');
$xs->element('id',
null,
$this->uri);
$xs->element('content',
array('type' => 'text/html'),
$this->rendered);
$xs->element('link',
array('type' => 'text/html',
'rel' => 'alternate',
'href' => $this->bestUrl()));
$xs->elementEnd('activity:' . $element);
return $xs->getString();
$noun = ActivityObject::fromNotice($this);
return $noun->asString('activity:' . $element);
}
function bestUrl()