Browse Source

Kohana 3.3 migration

master
Alexander Yakovlev 8 years ago
parent
commit
34059aa157
  1. 19
      application/bootstrap.php
  2. 0
      application/classes/Controller/Error.php
  3. 4
      application/classes/Controller/Footer.php
  4. 0
      application/classes/Controller/Header.php
  5. 2
      application/classes/Controller/Login.php
  6. 2
      application/classes/Controller/Logout.php
  7. 0
      application/classes/Controller/Navigation.php
  8. 0
      application/classes/Kohana/Exception.php
  9. 0
      application/classes/Model/User.php
  10. 2
      modules/auth
  11. 2
      modules/database
  12. 2
      modules/orm
  13. 2
      system

19
application/bootstrap.php

@ -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',
));

0
application/classes/controller/error.php → application/classes/Controller/Error.php

4
application/classes/controller/footer.php → application/classes/Controller/Footer.php

@ -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('');}
}

0
application/classes/controller/header.php → application/classes/Controller/Header.php

2
application/classes/controller/login.php → application/classes/Controller/Login.php

@ -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
application/classes/controller/logout.php → application/classes/Controller/Logout.php

@ -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 = "Ошибка выхода пользователя.";
}
}

0
application/classes/controller/navigation.php → application/classes/Controller/Navigation.php

0
application/classes/kohana/exception.php → application/classes/Kohana/Exception.php

0
application/classes/model/user.php → application/classes/Model/User.php

2
modules/auth

@ -1 +1 @@
Subproject commit 24073ab4d4424ea51ceab01ef9021ee563051177
Subproject commit 74f29951da75a3d665e9468b8c54768f917bb7c1

2
modules/database

@ -1 +1 @@
Subproject commit f0944e8586ef2f8230042d822a3781c4835c3a75
Subproject commit 264e3a24bd6be3b83154816abda2e7713ddfa2c3

2
modules/orm

@ -1 +1 @@
Subproject commit bb5f9ef98e8f4a0cc7274f6331aa9eaebcba4b4d
Subproject commit cb4be3a6d9442ef9ab978c7306c5e0841e3d75d9

2
system

@ -1 +1 @@
Subproject commit 44fcb1b68a760f4d9ab46607776671b2d40d3647
Subproject commit f3c027d476b96ad22e238759f23538707f550960