diff --git a/VERSION.txt b/VERSION.txt index 302140275..049ecdee7 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -6,4 +6,4 @@ // +---------------------------------------------------------------------------------------------------+ // /////////////////////////////////////////////////////////////////////////////////////////////////////////// -0.10.4.1652_beta \ No newline at end of file +0.10.4.1678_beta \ No newline at end of file diff --git a/cake/dispatcher.php b/cake/dispatcher.php index 4cca5b05a..b2082d6de 100644 --- a/cake/dispatcher.php +++ b/cake/dispatcher.php @@ -108,11 +108,6 @@ class Dispatcher extends Object $this->base = $this->baseUrl(); - if(!in_array('render', array_keys($params))) - { - $params['render'] = 0; - } - if (empty($params['controller'])) { $missingController = true; @@ -176,6 +171,19 @@ class Dispatcher extends Object $missingAction = true; } + if(!in_array('return', array_keys($params)) && $controller->autoRender == true) + { + $params['render'] = 1; + } + elseif(in_array('return', array_keys($params)) && $params['return'] == 1) + { + $params['render'] = 1; + } + else + { + $params['render'] = 0; + } + $controller->base = $this->base; $controller->here = $this->base.'/'.$url; $controller->webroot = $this->webroot; diff --git a/cake/libs/controller/pages_controller.php b/cake/libs/controller/pages_controller.php index 0509746e8..8362969a2 100644 --- a/cake/libs/controller/pages_controller.php +++ b/cake/libs/controller/pages_controller.php @@ -71,7 +71,6 @@ class PagesController extends AppController{ $this->set('subpage', empty($path[1])? null: $path[1]); $this->set('title', ucfirst($path[count($path)-1])); $this->render(join('/', $path)); - $this->autoRender = false; } } ?> \ No newline at end of file diff --git a/cake/libs/object.php b/cake/libs/object.php index 33f4d7514..3533bb35b 100644 --- a/cake/libs/object.php +++ b/cake/libs/object.php @@ -97,19 +97,18 @@ class Object function requestAction ($url, $extra = array()) { $dispatcher =& new Dispatcher(); - - if(in_array('render', $extra)) + if(in_array('return', $extra)) { - $extra['render'] = 0; - $extra['bare'] = 1; - ob_start(); + $extra['return'] = 0; + $extra['bare'] = 1; + ob_start(); $out = $dispatcher->dispatch($url, $extra); $out = ob_get_clean(); return $out; } else { - $extra['render'] = 1; + $extra['return'] = 1; $extra['bare'] = 1; $out = $dispatcher->dispatch($url, $extra); return $out;