Kohana 3.3 migration
This commit is contained in:
parent
c95b8a90e9
commit
34059aa157
|
@ -3,17 +3,17 @@
|
|||
// -- Environment setup --------------------------------------------------------
|
||||
|
||||
// Load the core Kohana class
|
||||
require SYSPATH.'classes/kohana/core'.EXT;
|
||||
require SYSPATH.'classes/Kohana/Core'.EXT;
|
||||
|
||||
if (is_file(APPPATH.'classes/kohana'.EXT))
|
||||
if (is_file(APPPATH.'classes/Kohana'.EXT))
|
||||
{
|
||||
// Application extends the core
|
||||
require APPPATH.'classes/kohana'.EXT;
|
||||
require APPPATH.'classes/Kohana'.EXT;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Load empty core extension
|
||||
require SYSPATH.'classes/kohana'.EXT;
|
||||
require SYSPATH.'classes/Kohana'.EXT;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -97,6 +97,11 @@ Kohana::$log->attach(new Log_File(APPPATH.'logs'));
|
|||
*/
|
||||
Kohana::$config->attach(new Config_File);
|
||||
|
||||
/**
|
||||
* Set cookie salt (required)
|
||||
*/
|
||||
Cookie::$salt = 'Dz75cE_QoUDXvo2';
|
||||
|
||||
/**
|
||||
* Enable modules. Modules are referenced by a relative or absolute path.
|
||||
*/
|
||||
|
@ -119,11 +124,11 @@ Kohana::modules(array(
|
|||
*/
|
||||
Route::set('error', 'error/<action>(/<message>)', array('action' => '[0-9]++','message' => '.+'))
|
||||
->defaults(array(
|
||||
'controller' => 'error',
|
||||
'controller' => 'Error',
|
||||
));
|
||||
|
||||
Route::set('default', '(<controller>(/<action>(/<id>)))')
|
||||
->defaults(array(
|
||||
'controller' => 'error',
|
||||
'action' => 'view',
|
||||
'controller' => 'Error',
|
||||
'action' => '404',
|
||||
));
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
class Controller_Footer extends Controller_Template {
|
||||
public $template = 'footer';
|
||||
public function action_standard() { }
|
||||
public function action_view(){$this->request->redirect('');}
|
||||
}
|
||||
public function action_view(){$this->redirect('');}
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
class Controller_Login extends Controller_Template {
|
||||
public $template = 'login';
|
||||
public function action_view() {
|
||||
if(Auth::instance()->logged_in()) return $this->request->redirect('');
|
||||
if(Auth::instance()->logged_in()) return $this->redirect('');
|
||||
if ($_POST){
|
||||
$user = ORM::factory('user');
|
||||
$status = Auth::instance()->login($this->request->post('login'), $this->request->post('password'));
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class Controller_Logout extends Controller {
|
||||
public function action_view() {
|
||||
if (Auth::instance()->logout()) return $this->request->redirect('login');
|
||||
if (Auth::instance()->logout()) return $this->redirect('login');
|
||||
else $this->template->error = "Ошибка выхода пользователя.";
|
||||
}
|
||||
}
|
|
@ -1 +1 @@
|
|||
Subproject commit 24073ab4d4424ea51ceab01ef9021ee563051177
|
||||
Subproject commit 74f29951da75a3d665e9468b8c54768f917bb7c1
|
|
@ -1 +1 @@
|
|||
Subproject commit f0944e8586ef2f8230042d822a3781c4835c3a75
|
||||
Subproject commit 264e3a24bd6be3b83154816abda2e7713ddfa2c3
|
|
@ -1 +1 @@
|
|||
Subproject commit bb5f9ef98e8f4a0cc7274f6331aa9eaebcba4b4d
|
||||
Subproject commit cb4be3a6d9442ef9ab978c7306c5e0841e3d75d9
|
2
system
2
system
|
@ -1 +1 @@
|
|||
Subproject commit 44fcb1b68a760f4d9ab46607776671b2d40d3647
|
||||
Subproject commit f3c027d476b96ad22e238759f23538707f550960
|
Reference in a new issue