Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

3.1 compatibility

  • Loading branch information...
commit e7a3356ee7e635c513ee4e41e00bc7ad0aafb913 1 parent ff09c08
@DrPheltRight authored
View
8 classes/prophet.php
@@ -6,11 +6,11 @@ public static function exception_handler(Exception $e)
{
if (Kohana::$environment === Kohana::DEVELOPMENT)
{
- Kohana_Core::exception_handler($e);
+ Kohana_Exception::handler($e);
}
// It's a nice time to log :)
- Kohana::$log->add(Kohana::ERROR, Kohana::exception_text($e));
+ Kohana::$log->add(Kohana_Log::ERROR, Kohana_Exception::text($e));
if ( ! defined('SUPPRESS_REQUEST'))
{
@@ -22,8 +22,8 @@ public static function exception_handler(Exception $e)
'message' => rawurlencode($e->getMessage()),
);
- // Override status if HTTP_Response_Exception thrown
- if ($e instanceof HTTP_Response_Exception)
+ // Override status if HTTP_Exception thrown
+ if ($e instanceof HTTP_Exception)
{
$request['action'] = $e->getCode();
}
View
10 classes/prophet/controller.php
@@ -34,15 +34,17 @@ public function __get($name)
{
if ($name === 'view')
{
- if ($this->_view === NULL && ! in_array($this->request->action, $this->viewless))
+ if ($this->_view === NULL && ! in_array($this->request->action(), $this->viewless))
{
$view_parts = array();
foreach (array('directory', 'controller', 'action') as $_part)
{
- if ( ! empty($this->request->{$_part}))
+ $part = call_user_func(array($this->request, $_part));
+
+ if ( ! empty($part))
{
- $view_parts[] = $this->request->{$_part};
+ $view_parts[] = $part;
}
}
@@ -77,7 +79,7 @@ public function after()
{
if ($this->view)
{
- $this->request->response = $this->view;
+ $this->response->body($this->view);
}
return parent::after();
View
2  classes/prophet/controller/error.php
@@ -5,7 +5,7 @@ class Prophet_Controller_Error extends Controller {
public function before()
{
// External requests default to 404
- if (Request::$instance === Request::$current)
+ if ($this->request->is_initial())
{
$this->request->action = 404;
}
Please sign in to comment.
Something went wrong with that request. Please try again.