forked from GNUsocial/gnu-social
pluginified most of hasFave, getFaves and related calls
The code is now more event-driven when it comes to rendering notices and their related HTML elements, since we can't have direct calls from core to a plugin. lib/activitymover.php has a function to move a Favorite activity which will not happen now. The move must be pluginified and performed as an event which plugins can catch on to.
This commit is contained in:
@@ -79,8 +79,10 @@ class SystemListItem extends NoticeListItemAdapter
|
||||
$user = common_current_user();
|
||||
if (!empty($user)) {
|
||||
$this->nli->out->elementStart('div', 'notice-options');
|
||||
$this->showFaveForm();
|
||||
$this->showReplyLink();
|
||||
if (Event::handle('StartShowNoticeOptionItems', array($this))) {
|
||||
$this->showReplyLink();
|
||||
Event::handle('EndShowNoticeOptionItems', array($this));
|
||||
}
|
||||
$this->nli->out->elementEnd('div');
|
||||
}
|
||||
Event::handle('EndShowNoticeOptions', array($this));
|
||||
|
Reference in New Issue
Block a user