]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch '1.0.x' into testing
authorEvan Prodromou <evan@status.net>
Sun, 10 Apr 2011 18:20:46 +0000 (14:20 -0400)
committerEvan Prodromou <evan@status.net>
Sun, 10 Apr 2011 18:20:46 +0000 (14:20 -0400)
actions/noticesearch.php

index 1f43af800d2194ccdbfbba1b3541b21c4c86ef12..357e8ba192e15bcbfad67ea7eb59599a324ffe97 100644 (file)
@@ -48,10 +48,21 @@ require_once INSTALLDIR.'/lib/searchaction.php';
  */
 class NoticesearchAction extends SearchAction
 {
+    protected $q = null;
+
     function prepare($args)
     {
         parent::prepare($args);
 
+        $this->q = $this->trimmed('q');
+
+        // FIXME: very dependent on tag format
+        if (preg_match('/^#([\pL\pN_\-\.]{1,64})/ue', $this->q)) {
+            common_redirect(common_local_url('tag',
+                                             array('tag' => common_canonical_tag(substr($this->q, 1)))),
+                            303);
+        }
+
         common_set_returnto($this->selfUrl());
 
         return true;