forked from bluehawk/kohanut-core
-
Notifications
You must be signed in to change notification settings - Fork 3
/
init.php
37 lines (33 loc) · 1.07 KB
/
init.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php defined('SYSPATH') or die('No direct script access.');
// Grab the list of modules, and check if the install folder is hanging around, if it is, set the install route
$modules = Kohana::modules();
if (is_dir($modules['kohanut'].'/classes/controller/kohanut/install'))
{
Route::set('kohanut-install','admin/install')
->defaults(array(
'controller' => 'install',
'action' => 'index',
'directory' => 'kohanut/install'
));
}
// Media required for kohanut admin
Route::set('kohanut-media','admin/media(/<file>)', array('file' => '.+'))
->defaults(array(
'controller' => 'admin',
'action' => 'media',
'directory' => 'kohanut',
'file' => NULL,
));
// Kohanut login route
Route::set('kohanut-login','admin/<action>',array('action'=>'login|logout|lang'))
->defaults(array(
'controller' => 'admin',
'directory' => 'kohanut',
));
// Kohanut Admin route
Route::set('kohanut-admin','admin(/<controller>(/<action>(/<params>)))',array('params'=>'.*'))
->defaults(array(
'controller' => 'pages',
'action' => '',
'directory' => 'kohanut'
));