Skip to content

Commit 48efc61

Browse files
committed
Revert "Route: <action> can be a number (BC break)"
This is too big BC break for route definitions. This reverts commit 59d892d.
1 parent e88fd2e commit 48efc61

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

src/Application/Routers/Route.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class Route extends Nette\Object implements Application\IRouter
7070
self::FILTER_OUT => array(__CLASS__, 'presenter2path'),
7171
),
7272
'action' => array(
73-
self::PATTERN => '[a-z0-9][a-z0-9-]*',
73+
self::PATTERN => '[a-z][a-z0-9-]*',
7474
self::FILTER_IN => array(__CLASS__, 'path2action'),
7575
self::FILTER_OUT => array(__CLASS__, 'action2path'),
7676
),

tests/Application.Routers/Route.basic.phpt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,6 @@ testRouteIn($route, '/presenter/action', 'Presenter', array(
5151
'test' => 'testvalue',
5252
), '/presenter/action/?test=testvalue');
5353

54-
testRouteIn($route, '/presenter/123', 'Presenter', array(
55-
'action' => '123',
56-
'id' => '',
57-
'test' => 'testvalue',
58-
), '/presenter/123/?test=testvalue');
59-
6054
testRouteIn($route, '/presenter/', 'Presenter', array(
6155
'id' => '',
6256
'action' => 'default',

0 commit comments

Comments
 (0)