updated NoticeTitle plugin to use new activity events

This commit is contained in:
Evan Prodromou 2010-12-05 16:31:43 -05:00
parent f7cb854fcd
commit 89f5dd4c18
1 changed files with 7 additions and 2 deletions

View File

@ -259,12 +259,17 @@ class NoticeTitlePlugin extends Plugin
* @return boolean hook value
*/
function onStartActivityTitle(&$notice, &$xs, &$output)
function onEndNoticeAsActivity($notice, &$activity)
{
$title = Notice_title::fromNotice($notice);
if (!empty($title)) {
$output = $title;
foreach ($activity->objects as $obj) {
if ($obj->id == $notice->uri) {
$obj->title = $title;
break;
}
}
}
return true;