Merge branch 'testing' of gitorious.org:statusnet/mainline into testing

* '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
This commit is contained in:
Zach Copley 2011-09-15 09:30:52 -07:00
commit 1f87e77701
2 changed files with 21 additions and 2 deletions

View File

@ -20,7 +20,7 @@
* You should have received a copy of the GNU Affero General Public License * 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/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* *
* @category Cache * @category URL
* @package StatusNet * @package StatusNet
* @author Evan Prodromou <evan@status.net> * @author Evan Prodromou <evan@status.net>
* @copyright 2011 StatusNet, Inc. * @copyright 2011 StatusNet, Inc.
@ -212,7 +212,7 @@ class URLMapper
array($pr, 'toPattern'), array($pr, 'toPattern'),
$path); $path);
$regex = '#' . str_replace('#', '\#', $regex) . '#'; $regex = '#^' . str_replace('#', '\#', $regex) . '$#';
return $regex; return $regex;
} }

View File

@ -85,4 +85,23 @@ class SearchSubMenu extends MoreMenu
return $items; 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);
}
} }