kohanut
kohanut copied to clipboard
Redirects are missing
Redirects are not handled this time. To fix this, edit 'action_view' in 'kohanut\modules\kohanut\classes\controller\kohanut.php'
Modify the catch to this:
$redir = Sprig::factory('kohanut_redirect' , array('url' => $url))->load();
if ( $redir->count() > 0 ) {
// set status
Kohanut::status( $redir->type );
// redirect
$path = $redir->newurl;
Request::instance()->redirect( $path );
} else {
// Find the error page
$error = Sprig::factory('kohanut_page',array('url'=>'error'))->load();
// If i couldn't find the error page, just give a generic message
if ( ! $error->loaded())
{
Kohanut::status(404);
$this->request->response = View::factory('kohanut/generic404');
return;
}
// Set the response
$out = $error->render();
}