]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch 'testing' of gitorious.org:statusnet/mainline into testing
authorZach Copley <zach@status.net>
Thu, 15 Sep 2011 16:30:52 +0000 (09:30 -0700)
committerZach Copley <zach@status.net>
Thu, 15 Sep 2011 16:30:52 +0000 (09:30 -0700)
* 'testing' of gitorious.org:statusnet/mainline:
  include q as param, not arg for search sub menu
  exact match for paths
  change category on urlmapper.php

lib/urlmapper.php
plugins/SearchSub/searchsubmenu.php

index f16bf128ef83339efbaadfc8553b653923710f21..fcaa66a55315b46fd5606ae74b0f107ee77c0794 100644 (file)
@@ -20,7 +20,7 @@
  * You should have received a copy of the GNU Affero General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
- * @category  Cache
+ * @category  URL
  * @package   StatusNet
  * @author    Evan Prodromou <evan@status.net>
  * @copyright 2011 StatusNet, Inc.
@@ -212,7 +212,7 @@ class URLMapper
                                        array($pr, 'toPattern'),
                                        $path);
 
-        $regex = '#' . str_replace('#', '\#', $regex) . '#';
+        $regex = '#^' . str_replace('#', '\#', $regex) . '$#';
 
         return $regex;
     }
index 755a3c9a5b121877300e6ce323e78b4fa02bd6b7..5973eb8b93af25be4dd5031b22d07dee98efa6c0 100644 (file)
@@ -85,4 +85,23 @@ class SearchSubMenu extends MoreMenu
 
         return $items;
     } 
+
+    function item($actionName, $args, $label, $description, $id=null, $cls=null)
+    {
+        if (empty($id)) {
+            $id = $this->menuItemID($actionName, $args);
+        }
+
+        // Add 'q' as a search param, not part of the url path
+
+        $url = common_local_url($actionName, array(), $args);
+
+        $this->out->menuItem($url,
+                             $label,
+                             $description,
+                             $this->isCurrent($actionName, $args),
+                             $id,
+                             $cls);
+    }
 }
+