summaryrefslogtreecommitdiff
path: root/classes/Notice.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-10-24 23:05:33 -0400
committerEvan Prodromou <evan@status.net>2010-10-24 23:05:33 -0400
commit698818bd7eee94e92f23967897862857a190c6ea (patch)
treefc934e0d2d299e16da284189b8215198ea6c5b23 /classes/Notice.php
parentc0664599aa5a90f99d462d7e9d9930e1aaf5dcbc (diff)
show rel=edit links in notices for authenticated users
Diffstat (limited to 'classes/Notice.php')
-rw-r--r--classes/Notice.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index 60989f9ba..676e4cb54 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -1613,6 +1613,20 @@ class Notice extends Memcached_DataObject
Event::handle('EndActivityGeo', array(&$this, &$xs, $lat, $lon));
}
+ // @fixme check this logic
+
+ if ($this->isLocal() && !empty($cur) && $cur->id == $this->profile_id) {
+ $relEditUrl = common_local_url('ApiStatusesShow', array('id' => $this->id,
+ 'format' => 'atom'));
+
+ if (Event::handle('StartActivityRelEdit', array(&$this, &$xs, &$relEditUrl))) {
+ $xs->element('link', array('rel' => 'edit',
+ 'type' => 'application/atom+xml',
+ 'href' => $relEditUrl));
+ Event::handle('EndActivityRelEdit', array(&$this, &$xs, $relEditUrl));
+ }
+ }
+
if (Event::handle('StartActivityEnd', array(&$this, &$xs))) {
$xs->elementEnd('entry');
Event::handle('EndActivityEnd', array(&$this, &$xs));