summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <git@evanprodromou.name>2009-01-28 09:17:12 -0500
committerEvan Prodromou <git@evanprodromou.name>2009-01-28 09:17:12 -0500
commitd86622da334520b28db9c67cd99f6677323712cd (patch)
tree769c237b53a4b4face6dfa6c83ec5bc69491c294
parente37e9c2084c91eb4e74f73a5356f5a2f538ee2e0 (diff)
don't show reply for anon user
-rw-r--r--lib/noticelist.php28
1 files changed, 15 insertions, 13 deletions
diff --git a/lib/noticelist.php b/lib/noticelist.php
index 20bf3c9f1..7c88c33cc 100644
--- a/lib/noticelist.php
+++ b/lib/noticelist.php
@@ -440,19 +440,21 @@ class NoticeListItem extends Widget
function showReplyLink()
{
- $reply_url = common_local_url('newnotice',
- array('replyto' => $this->profile->nickname));
-
- $this->out->elementStart('dl', 'notice_reply');
- $this->out->element('dt', null, _('Reply to this notice'));
- $this->out->elementStart('dd');
- $this->out->elementStart('a', array('href' => $reply_url,
- 'title' => _('Reply to this notice')));
- $this->out->text(_('Reply'));
- $this->out->element('span', 'notice_id', $this->notice->id);
- $this->out->elementEnd('a');
- $this->out->elementEnd('dd');
- $this->out->elementEnd('dl');
+ if (common_logged_in()) {
+ $reply_url = common_local_url('newnotice',
+ array('replyto' => $this->profile->nickname));
+
+ $this->out->elementStart('dl', 'notice_reply');
+ $this->out->element('dt', null, _('Reply to this notice'));
+ $this->out->elementStart('dd');
+ $this->out->elementStart('a', array('href' => $reply_url,
+ 'title' => _('Reply to this notice')));
+ $this->out->text(_('Reply'));
+ $this->out->element('span', 'notice_id', $this->notice->id);
+ $this->out->elementEnd('a');
+ $this->out->elementEnd('dd');
+ $this->out->elementEnd('dl');
+ }
}
/**