mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Merged:
[1679] git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1680 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
6009ff5b7b
commit
b000ca5b9c
5 changed files with 6 additions and 19 deletions
|
@ -6,4 +6,4 @@
|
|||
// +---------------------------------------------------------------------------------------------------+ //
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
0.10.4.1678_beta
|
||||
0.10.4.1680_beta
|
|
@ -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))
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -110,8 +110,7 @@ class Object
|
|||
{
|
||||
$extra['return'] = 1;
|
||||
$extra['bare'] = 1;
|
||||
$out = $dispatcher->dispatch($url, $extra);
|
||||
return $out;
|
||||
return $dispatcher->dispatch($url, $extra);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -228,8 +228,6 @@ class View extends Object
|
|||
$this->hasRendered = false;
|
||||
}
|
||||
|
||||
$this->autoRender = false;
|
||||
|
||||
if (!$action)
|
||||
{
|
||||
$action = $this->action;
|
||||
|
|
Loading…
Add table
Reference in a new issue