Fixes to routing
This commit is contained in:
@@ -124,9 +124,12 @@ Kohana::modules(array_merge(Kohana::modules(),Config::modules()));
|
||||
/**
|
||||
* Enable specalised interfaces
|
||||
*/
|
||||
Route::set('sections', '<directory>/<controller>/(<action>(/<id>(/<sid>)))',
|
||||
Route::set('sections', '<directory>/<controller>(/<action>(/<id>(/<sid>)))',
|
||||
array(
|
||||
'directory' => '('.implode('|',Kohana::config('config.method_directory')).')'
|
||||
))
|
||||
->defaults(array(
|
||||
'action' => 'index',
|
||||
));
|
||||
|
||||
// Static file serving (CSS, JS, images)
|
||||
@@ -134,14 +137,13 @@ Route::set('default/media', 'media(/<file>)', array('file' => '.+'))
|
||||
->defaults(array(
|
||||
'controller' => 'welcome',
|
||||
'action' => 'media',
|
||||
'file' => NULL,
|
||||
));
|
||||
|
||||
/**
|
||||
* Set the routes. Each route must have a minimum of a name, a URI and a set of
|
||||
* defaults for the URI.
|
||||
*/
|
||||
Route::set('default', '<controller>(/<action>(/<id>))', array('id' => '[a-zA-Z0-9_.-]+'))
|
||||
Route::set('default', '(<controller>(/<action>(/<id>)))', array('id' => '[a-zA-Z0-9_.-]+'))
|
||||
->defaults(array(
|
||||
'controller' => 'welcome',
|
||||
'action' => 'index',
|
||||
|
Reference in New Issue
Block a user