From a80a536e4104bf1b621a86b72d35c7f637d7afd5 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Mon, 26 Jan 2009 15:03:38 +0100 Subject: Fix canonical tags in notice and in URLs --- actions/tag.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'actions/tag.php') 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; } -- cgit v1.2.3-54-g00ecf