diff --git a/lib/urlmapper.php b/lib/urlmapper.php
index f16bf128ef..fcaa66a553 100644
--- a/lib/urlmapper.php
+++ b/lib/urlmapper.php
@@ -20,7 +20,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*
- * @category Cache
+ * @category URL
* @package StatusNet
* @author Evan Prodromou
* @copyright 2011 StatusNet, Inc.
@@ -212,7 +212,7 @@ class URLMapper
array($pr, 'toPattern'),
$path);
- $regex = '#' . str_replace('#', '\#', $regex) . '#';
+ $regex = '#^' . str_replace('#', '\#', $regex) . '$#';
return $regex;
}
diff --git a/plugins/SearchSub/searchsubmenu.php b/plugins/SearchSub/searchsubmenu.php
index 755a3c9a5b..5973eb8b93 100644
--- a/plugins/SearchSub/searchsubmenu.php
+++ b/plugins/SearchSub/searchsubmenu.php
@@ -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);
+ }
}
+