summaryrefslogtreecommitdiff
path: root/actions/shownotice.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-03-15 12:45:38 -0700
committerBrion Vibber <brion@pobox.com>2010-03-15 12:45:38 -0700
commitc89e1865f7250341c8b5e7878715d5a693a0e6aa (patch)
tree55e68b59dc6b0d7caa63c20b81c85372ba70f18c /actions/shownotice.php
parent3e2b806e755064d9bcf5ad63faa83329455ffbc2 (diff)
parent7aa49b5e87efa2aa383b446b264f00608f1a5eac (diff)
Merge branch 'testing' into 0.9.x
Diffstat (limited to 'actions/shownotice.php')
-rw-r--r--actions/shownotice.php20
1 files changed, 11 insertions, 9 deletions
diff --git a/actions/shownotice.php b/actions/shownotice.php
index a1933ff63..ca6b60d1f 100644
--- a/actions/shownotice.php
+++ b/actions/shownotice.php
@@ -103,11 +103,6 @@ class ShownoticeAction extends OwnerDesignAction
$this->user = User::staticGet('id', $this->profile->id);
- if ($this->notice->is_local == Notice::REMOTE_OMB) {
- common_redirect($this->notice->uri);
- return false;
- }
-
$this->avatar = $this->profile->getAvatar(AVATAR_PROFILE_SIZE);
return true;
@@ -198,13 +193,20 @@ class ShownoticeAction extends OwnerDesignAction
if ($this->notice->is_local == Notice::REMOTE_OMB) {
if (!empty($this->notice->url)) {
- common_redirect($this->notice->url, 301);
+ $target = $this->notice->url;
} else if (!empty($this->notice->uri) && preg_match('/^https?:/', $this->notice->uri)) {
- common_redirect($this->notice->uri, 301);
+ // Old OMB posts saved the remote URL only into the URI field.
+ $target = $this->notice->uri;
+ } else {
+ // Shouldn't happen.
+ $target = false;
+ }
+ if ($target && $target != $this->selfUrl()) {
+ common_redirect($target, 301);
+ return false;
}
- } else {
- $this->showPage();
}
+ $this->showPage();
}
/**