summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorAdrian Lang <mail@adrianlang.de>2009-01-26 15:03:38 +0100
committerEvan Prodromou <evan@controlyourself.ca>2009-01-26 15:03:38 +0100
commita80a536e4104bf1b621a86b72d35c7f637d7afd5 (patch)
treeec74fdf02ebd7bc35b240a6b67dedb0417732c34 /actions
parent12b9d4346f75027d3a4f804db72222fbe2282e5d (diff)
Fix canonical tags in notice and in URLs
Diffstat (limited to 'actions')
-rw-r--r--actions/tag.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/actions/tag.php b/actions/tag.php
index 039cd9660..803026e62 100644
--- a/actions/tag.php
+++ b/actions/tag.php
@@ -24,13 +24,18 @@ class TagAction extends Action
function prepare($args)
{
parent::prepare($args);
- $this->tag = $this->trimmed('tag');
+ $taginput = $this->trimmed('tag');
+ $this->tag = common_canonical_tag($taginput);
if (!$this->tag) {
common_redirect(common_local_url('publictagcloud'), 301);
return false;
}
+ if ($this->tag != $taginput) {
+ common_redirect(common_local_url('tag', array('tag' => $this->tag)));
+ }
+
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
return true;
}