Include a link in the plain text too for (un)favored notices, (un)subbed groups etc.

This commit is contained in:
Marcel van der Boom 2010-12-14 14:27:37 +01:00
parent 65bbd991c2
commit 82db24831b
2 changed files with 19 additions and 12 deletions

View File

@ -96,8 +96,9 @@ class ActivityPlugin extends Plugin
$rendered = sprintf(_m('<em>Started following <a href="%s">%s</a></em>.'), $rendered = sprintf(_m('<em>Started following <a href="%s">%s</a></em>.'),
$other->profileurl, $other->profileurl,
$other->getBestName()); $other->getBestName());
$content = sprintf(_m('Started following %s.'), $content = sprintf(_m('Started following %s : %s'),
$other->getBestName()); $other->getBestName(),
$other->profileurl);
$notice = Notice::saveNew($user->id, $notice = Notice::saveNew($user->id,
$content, $content,
@ -118,8 +119,9 @@ class ActivityPlugin extends Plugin
$rendered = sprintf(_m('<em>Stopped following <a href="%s">%s</a></em>.'), $rendered = sprintf(_m('<em>Stopped following <a href="%s">%s</a></em>.'),
$other->profileurl, $other->profileurl,
$other->getBestName()); $other->getBestName());
$content = sprintf(_m('Stopped following %s.'), $content = sprintf(_m('Stopped following %s : %s'),
$other->getBestName()); $other->getBestName(),
$other->profileurl);
$notice = Notice::saveNew($user->id, $notice = Notice::saveNew($user->id,
$content, $content,
@ -142,8 +144,9 @@ class ActivityPlugin extends Plugin
$rendered = sprintf(_m('<em>Liked <a href="%s">%s\'s status</a></em>.'), $rendered = sprintf(_m('<em>Liked <a href="%s">%s\'s status</a></em>.'),
$notice->bestUrl(), $notice->bestUrl(),
$author->getBestName()); $author->getBestName());
$content = sprintf(_m('Liked %s\'s status.'), $content = sprintf(_m('Liked %s\'s status: %s'),
$author->getBestName()); $author->getBestName(),
$notice->bestUrl());
$notice = Notice::saveNew($user->id, $notice = Notice::saveNew($user->id,
$content, $content,
@ -166,8 +169,9 @@ class ActivityPlugin extends Plugin
$rendered = sprintf(_m('<em>Stopped liking <a href="%s">%s\'s status</a></em>.'), $rendered = sprintf(_m('<em>Stopped liking <a href="%s">%s\'s status</a></em>.'),
$notice->bestUrl(), $notice->bestUrl(),
$author->getBestName()); $author->getBestName());
$content = sprintf(_m('Stopped liking %s\'s status.'), $content = sprintf(_m('Stopped liking %s\'s status: %s'),
$author->getBestName()); $author->getBestName(),
$notice->bestUrl());
$notice = Notice::saveNew($user->id, $notice = Notice::saveNew($user->id,
$content, $content,
@ -186,8 +190,9 @@ class ActivityPlugin extends Plugin
$rendered = sprintf(_m('<em>Joined the group &quot;<a href="%s">%s</a>&quot;</em>.'), $rendered = sprintf(_m('<em>Joined the group &quot;<a href="%s">%s</a>&quot;</em>.'),
$group->homeUrl(), $group->homeUrl(),
$group->getBestName()); $group->getBestName());
$content = sprintf(_m('Joined the group %s.'), $content = sprintf(_m('Joined the group %s : %s'),
$group->getBestName()); $group->getBestName(),
$group->homeUrl());
$notice = Notice::saveNew($user->id, $notice = Notice::saveNew($user->id,
$content, $content,
@ -205,8 +210,9 @@ class ActivityPlugin extends Plugin
$rendered = sprintf(_m('<em>Left the group &quot;<a href="%s">%s</a>&quot;</em>.'), $rendered = sprintf(_m('<em>Left the group &quot;<a href="%s">%s</a>&quot;</em>.'),
$group->homeUrl(), $group->homeUrl(),
$group->getBestName()); $group->getBestName());
$content = sprintf(_m('Left the group "%s".'), $content = sprintf(_m('Left the group "%s" : %s'),
$group->getBestName()); $group->getBestName(),
$group->homeUrl());
$notice = Notice::saveNew($user->id, $notice = Notice::saveNew($user->id,
$content, $content,

View File

@ -152,3 +152,4 @@ class Notice_activity extends Memcached_DataObject
} }
} }
} }
?>