summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-08-07 18:26:12 -0400
committerCraig Andrews <candrews@integralblue.com>2009-08-07 18:26:12 -0400
commita7a87913befddd7b1ab8e0b4ab0e563e7927950b (patch)
treef34b4e01ba65ced97017ab6cc7d0610c4d079cd6 /lib
parent11086c78239a30dc47622837a2800d899ebf9b0f (diff)
Redirect instead of showing an error when the user visits a non-local notice's url
Use consistent logic in display non-local notice links Fixes http://laconi.ca/trac/ticket/1788
Diffstat (limited to 'lib')
-rw-r--r--lib/noticelist.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/noticelist.php b/lib/noticelist.php
index a8d5059ca..5429d943f 100644
--- a/lib/noticelist.php
+++ b/lib/noticelist.php
@@ -350,11 +350,10 @@ class NoticeListItem extends Widget
function showNoticeLink()
{
- $noticeurl = common_local_url('shownotice',
+ if($this->notice->is_local){
+ $noticeurl = common_local_url('shownotice',
array('notice' => $this->notice->id));
- // XXX: we need to figure this out better. Is this right?
- if (strcmp($this->notice->uri, $noticeurl) != 0 &&
- preg_match('/^http/', $this->notice->uri)) {
+ }else{
$noticeurl = $this->notice->uri;
}
$this->out->elementStart('a', array('rel' => 'bookmark',