Kohana 3.3 fix

This commit is contained in:
Alexander Yakovlev 2012-12-29 19:07:06 +07:00
parent de2c23cdea
commit dcab756ae0
2 changed files with 11 additions and 16 deletions

View File

@ -80,8 +80,8 @@ if (isset($_SERVER['KOHANA_ENV']))
* - boolean caching enable or disable internal caching FALSE
*/
Kohana::init(array(
'base_url' => '/phunt',
'index_file' => 'index.php',
'base_url' => '/',
'index_file' => FALSE,
'errors' => TRUE,
'profile' => (Kohana::$environment == Kohana::DEVELOPMENT),
'caching' => (Kohana::$environment == Kohana::PRODUCTION)
@ -122,13 +122,8 @@ Kohana::modules(array(
* Set the routes. Each route must have a minimum of a name, a URI and a set of
* defaults for the URI.
*/
Route::set('error', 'error/<action>(/<message>)', array('action' => '[0-9]++','message' => '.+'))
->defaults(array(
'controller' => 'Error',
));
Route::set('default', '(<controller>(/<action>(/<id>)))')
->defaults(array(
->defaults(array(
'controller' => 'Error',
'action' => '404',
));
'action' => 'view',
));

View File

@ -3,10 +3,10 @@
<div id="error"><?php if(!empty($error)) echo $error;?></div>
<div id="message"><?php if(!empty($message)) echo $message;?></div>
<p>Введите логин и пароль для получения доступа к разделу.</p>
<?php echo form::open('login') ?>
<p><?php echo form::label('login','Логин: '); echo form::input('login','') ?></p>
<p><?php echo form::label('password','Пароль: '); echo form::password('password','') ?></p>
<p><?php echo form::submit('submit','Отправить') ?>
<?php echo Form::open('login') ?>
<p><?php echo Form::label('login','Логин: '); echo Form::input('login','') ?></p>
<p><?php echo Form::label('password','Пароль: '); echo Form::password('password','') ?></p>
<p><?php echo Form::submit('submit','Отправить') ?>
</p>
<?php echo form::close() ?>
<?php echo Request::factory('footer/standard')->execute() ?>
<?php echo Form::close() ?>
<?php echo Request::factory('footer/standard')->execute() ?>