More doc comments on MicroApp stuff; some of the show-notice code & the ActivityStreams stuff is a bit wonky and may need smoothing out
This commit is contained in:
parent
4a54bb337a
commit
541613ce69
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user