From 541613ce69be049dd93a9b05c82ad22b4d101714 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 7 Mar 2011 15:15:21 -0800 Subject: [PATCH] More doc comments on MicroApp stuff; some of the show-notice code & the ActivityStreams stuff is a bit wonky and may need smoothing out --- lib/activityobject.php | 7 ++++++- lib/microappplugin.php | 6 ++++++ plugins/Bookmark/BookmarkPlugin.php | 7 +++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/lib/activityobject.php b/lib/activityobject.php index de2fcab767..d620bf27bb 100644 --- a/lib/activityobject.php +++ b/lib/activityobject.php @@ -613,6 +613,8 @@ class ActivityObject $this->poco->outputTo($xo); } + // @fixme there's no way here to make a tree; elements can only contain plaintext + // @fixme these may collide with JSON extensions foreach ($this->extra as $el) { list($extraTag, $attrs, $content) = $el; $xo->element($extraTag, $attrs, $content); @@ -697,6 +699,7 @@ class ActivityObject // // We can probably use the whole schema URL here but probably the // relative simple name is easier to parse + // @fixme this breaks extension URIs $object['type'] = substr($this->type, strrpos($this->type, '/') + 1); // summary @@ -708,7 +711,9 @@ class ActivityObject $object['url'] = $this->id; /* Extensions */ - + // @fixme these may collide with XML extensions + // @fixme multiple tags of same name will overwrite each other + // @fixme text content from XML extensions will be lost foreach ($this->extra as $e) { list($objectName, $props, $txt) = $e; $object[$objectName] = $props; diff --git a/lib/microappplugin.php b/lib/microappplugin.php index 8bc657f44a..93b70a0324 100644 --- a/lib/microappplugin.php +++ b/lib/microappplugin.php @@ -146,6 +146,10 @@ abstract class MicroAppPlugin extends Plugin * * @param Notice $notice * @param HTMLOutputter $out + * + * @fixme WARNING WARNING WARNING base plugin stuff below tries to close + * a div that this function opens in the BookmarkPlugin child class. + * This is probably wrong. */ abstract function showNotice($notice, $out); @@ -232,6 +236,8 @@ abstract class MicroAppPlugin extends Plugin * @param NoticeListItem $nli The list item being shown. * * @return boolean hook value + * + * @fixme WARNING WARNING WARNING this closes a 'div' that is implicitly opened in BookmarkPlugin's showNotice implementation */ function onStartShowNoticeItem($nli) diff --git a/plugins/Bookmark/BookmarkPlugin.php b/plugins/Bookmark/BookmarkPlugin.php index 1dc71d9dfa..6c3f8cdc28 100644 --- a/plugins/Bookmark/BookmarkPlugin.php +++ b/plugins/Bookmark/BookmarkPlugin.php @@ -508,6 +508,13 @@ class BookmarkPlugin extends MicroAppPlugin return $object; } + /** + * @fixme WARNING WARNING WARNING this opens a 'div' that is apparently closed by MicroAppPlugin + * @fixme that's probably wrong? + * + * @param Notice $notice + * @param HTMLOutputter $out + */ function showNotice($notice, $out) { $nb = Bookmark::getByNotice($notice);