if ($notices) {
$this->out->elementStart('ul', 'notices threaded-replies xoxo');
- $item = new ThreadedNoticeListFavesItem($notice, $this->out);
+ $item = new ThreadedNoticeListFavesItem($this->notice, $this->out);
$hasFaves = $item->show();
if ($moreCutoff) {
$item = new ThreadedNoticeListMoreItem($moreCutoff, $this->out);
// @fixme do a proper can-post check that's consistent
// with the JS side
if (common_current_user()) {
- $item = new ThreadedNoticeListReplyItem($notice, $this->out);
+ $item = new ThreadedNoticeListReplyItem($this->notice, $this->out);
$item->show();
}
$this->out->elementEnd('ul');
{
function show()
{
- return $this->showFaves();
- }
-
- function showFaves()
- {
- $this->out->text('(QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ)');
- return 0;
// @fixme caching & scalability!
$fave = new Fave();
$fave->notice_id = $this->notice->id;
if ($links) {
$count = count($links);
- $msg = _m('%1$s has favored this notice', '%1$s have favored this notice', $count);
+ if ($count == 1 && $you) {
+ // darn first person being different from third person!
+ $msg = _m('FAVELIST', 'You have favored this notice');
+ } else {
+ // if 'you' is the first item...
+ $msg = _m('FAVELIST', '%1$s has favored this notice', '%1$s have favored this notice', $count);
+ }
$out = sprintf($msg, implode(', ', $links));
$this->out->elementStart('li', array('class' => 'notice-faves'));