mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Adding fix for #2613, fixes afterFind callback not called on models in depth search > 1 (recursive).
Changed the regex pattern matching in Router::stripEscape() git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5140 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
df5c02aa8f
commit
056c4cc054
2 changed files with 4 additions and 3 deletions
|
@ -778,6 +778,7 @@ class DboSource extends DataSource {
|
|||
}
|
||||
}
|
||||
$this->__mergeAssociation($resultSet[$i], $fetch, $association, $type);
|
||||
$resultSet[$i][$association] = $linkModel->afterfind($resultSet[$i][$association]);
|
||||
|
||||
} else {
|
||||
$tempArray[0][$association] = false;
|
||||
|
|
|
@ -737,15 +737,15 @@ class Router extends Object {
|
|||
}
|
||||
function stripEscape($param) {
|
||||
if(is_string($param) || empty($param)) {
|
||||
$return = preg_replace('/^ ?-!/', '', $param);
|
||||
$return = preg_replace('/^ *-!/', '', $param);
|
||||
return $return;
|
||||
}
|
||||
foreach($param as $key => $value) {
|
||||
if(is_string($value)) {
|
||||
$return[$key] = preg_replace('/^ ?-!/', '', $value);
|
||||
$return[$key] = preg_replace('/^ *-!/', '', $value);
|
||||
} else {
|
||||
foreach ($value as $array => $string) {
|
||||
$return[$key][$array] = preg_replace('/^ ?-!/', '', $string);
|
||||
$return[$key][$array] = preg_replace('/^ *-!/', '', $string);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue