From b000ca5b9cef0079614d426bb374fb8f8ec2ab1b Mon Sep 17 00:00:00 2001 From: phpnut Date: Thu, 29 Dec 2005 06:45:33 +0000 Subject: [PATCH] Merged: [1679] git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1680 3807eeeb-6ff5-0310-8944-8be069107fe0 --- VERSION.txt | 2 +- cake/dispatcher.php | 13 ++----------- cake/libs/controller/controller.php | 5 ++--- cake/libs/object.php | 3 +-- cake/libs/view/view.php | 2 -- 5 files changed, 6 insertions(+), 19 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index 049ecdee7..2d00efa08 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -6,4 +6,4 @@ // +---------------------------------------------------------------------------------------------------+ // /////////////////////////////////////////////////////////////////////////////////////////////////////////// -0.10.4.1678_beta \ No newline at end of file +0.10.4.1680_beta \ No newline at end of file diff --git a/cake/dispatcher.php b/cake/dispatcher.php index b2082d6de..2df878172 100644 --- a/cake/dispatcher.php +++ b/cake/dispatcher.php @@ -171,17 +171,9 @@ class Dispatcher extends Object $missingAction = true; } - if(!in_array('return', array_keys($params)) && $controller->autoRender == true) + if(in_array('return', array_keys($params)) && $params['return'] == 1) { - $params['render'] = 1; - } - elseif(in_array('return', array_keys($params)) && $params['return'] == 1) - { - $params['render'] = 1; - } - else - { - $params['render'] = 0; + $controller->autoRender = false; } $controller->base = $this->base; @@ -192,7 +184,6 @@ class Dispatcher extends Object $controller->data = empty($params['data'])? null: $params['data']; $controller->passed_args = empty($params['pass'])? null: $params['pass']; $controller->autoLayout = !$params['bare']; - $controller->autoRender = !$params['render']; $controller->webservices = $params['webservices']; if(!is_null($controller->webservices)) diff --git a/cake/libs/controller/controller.php b/cake/libs/controller/controller.php index 7dbd9a23f..1a53ccd26 100644 --- a/cake/libs/controller/controller.php +++ b/cake/libs/controller/controller.php @@ -281,7 +281,7 @@ class Controller extends Object function redirect ($url) { $this->autoRender = false; - header ('Location: '.$this->base.$url); + header ('Location: '.$this->webroot.$url); } /** @@ -353,7 +353,6 @@ class Controller extends Object function render($action=null, $layout=null, $file=null) { $view =& new View($this); - if(!empty($this->modelNames)) { foreach ($this->modelNames as $model) @@ -364,7 +363,7 @@ class Controller extends Object } } } - + $this->autoRender = false; return $view->render($action, $layout, $file); } diff --git a/cake/libs/object.php b/cake/libs/object.php index 3533bb35b..507e533bd 100644 --- a/cake/libs/object.php +++ b/cake/libs/object.php @@ -110,8 +110,7 @@ class Object { $extra['return'] = 1; $extra['bare'] = 1; - $out = $dispatcher->dispatch($url, $extra); - return $out; + return $dispatcher->dispatch($url, $extra); } } diff --git a/cake/libs/view/view.php b/cake/libs/view/view.php index ff4336c0f..ba50d476b 100644 --- a/cake/libs/view/view.php +++ b/cake/libs/view/view.php @@ -228,8 +228,6 @@ class View extends Object $this->hasRendered = false; } - $this->autoRender = false; - if (!$action) { $action = $this->action;