mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding fix for Ticket #2750, fixes rendering of links when requestAction() is used.
Router::url() replaced $_this with $this which is an instance of the class from which the method is called, in the case of this ticket it was an instance of the HtmlHelper git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5319 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
52c2591055
commit
85492fba92
2 changed files with 7 additions and 7 deletions
|
@ -458,18 +458,18 @@ class Router extends Object {
|
||||||
$defaults = $params = array('plugin' => null, 'controller' => null, 'action' => 'index');
|
$defaults = $params = array('plugin' => null, 'controller' => null, 'action' => 'index');
|
||||||
|
|
||||||
if (!empty($_this->__params)) {
|
if (!empty($_this->__params)) {
|
||||||
if (!isset($_this->params['requested'])) {
|
if (!isset($this->params['requested'])) {
|
||||||
$params = $_this->__params[0];
|
$params = $_this->__params[0];
|
||||||
} elseif (isset($_this->params['requested'])) {
|
} elseif (isset($this->params['requested'])) {
|
||||||
$params = end($_this->__params);
|
$params = end($_this->__params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$path = array('base' => null);
|
$path = array('base' => null);
|
||||||
|
|
||||||
if (!empty($_this->__paths)) {
|
if (!empty($_this->__paths)) {
|
||||||
if (!isset($_this->params['requested'])) {
|
if (!isset($this->params['requested'])) {
|
||||||
$path = $_this->__paths[0];
|
$path = $_this->__paths[0];
|
||||||
} elseif (isset($_this->params['requested'])) {
|
} elseif (isset($this->params['requested'])) {
|
||||||
$path = end($_this->__paths);
|
$path = end($_this->__paths);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -304,14 +304,14 @@ class Helper extends Overloadable {
|
||||||
*/
|
*/
|
||||||
function setFormTag($tagValue) {
|
function setFormTag($tagValue) {
|
||||||
$view =& ClassRegistry::getObject('view');
|
$view =& ClassRegistry::getObject('view');
|
||||||
|
|
||||||
if ($tagValue === null) {
|
if ($tagValue === null) {
|
||||||
$view->model = null;
|
$view->model = null;
|
||||||
$view->association = null;
|
$view->association = null;
|
||||||
$view->modelId = null;
|
$view->modelId = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$parts = preg_split('/\/|\./', $tagValue);
|
$parts = preg_split('/\/|\./', $tagValue);
|
||||||
$view->association = null;
|
$view->association = null;
|
||||||
if (count($parts) == 1) {
|
if (count($parts) == 1) {
|
||||||
|
@ -347,7 +347,7 @@ class Helper extends Overloadable {
|
||||||
} else {
|
} else {
|
||||||
return $view->association;
|
return $view->association;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Gets the ID of the currently-used model of the rendering context.
|
* Gets the ID of the currently-used model of the rendering context.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue