Adding regex limiter for route $requirements

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3453 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2006-09-06 12:57:17 +00:00
parent f9b45b4114
commit fe903b2531

View file

@ -153,7 +153,7 @@ class Router extends Overloadable {
if (preg_match('/^:(.+)$/', $element, $r)) {
if (isset($requirements[$r[1]])) {
$parsed[] = '(?:\/(' . $requirements[$r[1]] . '))?';
$parsed[] = '(?:\/(' . $requirements[$r[1]] . '))';
} else {
$parsed[] = '(?:\/([^\/]+))?';
}