Fixes to routing
This commit is contained in:
parent
a893527d77
commit
5b1e7aeb22
@ -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',
|
||||
|
@ -17,9 +17,6 @@ class Controller_Welcome extends Controller_TemplateDefault {
|
||||
if (! Kohana::config('config.appname'))
|
||||
Request::current()->redirect('guide/app');
|
||||
|
||||
if (! Auth::instance()->logged_in())
|
||||
Request::current()->redirect('login');
|
||||
|
||||
Block::add(array(
|
||||
'title'=>'Welcome to lnApp (public)!',
|
||||
'subtitle'=>'Using lnApp',
|
||||
|
Reference in New Issue
Block a user