Cart work for payments and Paypal work to test
This commit is contained in:
@@ -11,21 +11,16 @@
|
||||
* @license http://dev.leenooks.net/license.html
|
||||
*/
|
||||
class HTTP_Exception_404 extends Kohana_HTTP_Exception_404 {
|
||||
public function __construct($message = NULL, array $variables = NULL, Exception $previous = NULL)
|
||||
{
|
||||
set_exception_handler(array(get_class($this),'handler'));
|
||||
parent::__construct($message, $variables, $previous);
|
||||
}
|
||||
public function get_response() {
|
||||
$response = Response::factory();
|
||||
$response->status($this->_code);
|
||||
|
||||
public static function handler(Exception $e)
|
||||
{
|
||||
SystemMessage::add(array(
|
||||
'title'=>_('Page not found'),
|
||||
'type'=>'error',
|
||||
'body'=>sprintf(_('The page [%s] you requested was not found?'),Request::detect_uri()),
|
||||
));
|
||||
|
||||
HTTP::redirect('welcome');
|
||||
$view = View::factory('errors/404');
|
||||
$view->message = $this->getMessage();
|
||||
|
||||
$response->body($view->render());
|
||||
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user