summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actions/shownotice.php4
-rw-r--r--lib/noticelist.php7
2 files changed, 5 insertions, 6 deletions
diff --git a/actions/shownotice.php b/actions/shownotice.php
index 8f73dc824..4b179bc72 100644
--- a/actions/shownotice.php
+++ b/actions/shownotice.php
@@ -97,8 +97,8 @@ class ShownoticeAction extends OwnerDesignAction
$this->user = User::staticGet('id', $this->profile->id);
- if (empty($this->user)) {
- $this->serverError(_('Not a local notice'), 500);
+ if (! $this->notice->is_local) {
+ common_redirect($this->notice->uri);
return false;
}
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',