mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-10 05:22:41 +00:00
Reduce variable use/duplicate code.
This commit is contained in:
parent
64cf40558f
commit
09bdad6ceb
1 changed files with 4 additions and 4 deletions
|
@ -796,8 +796,8 @@ class Model extends Object implements CakeEventListener {
|
|||
if ($result !== array('unhandled')) {
|
||||
return $result;
|
||||
}
|
||||
$return = $this->getDataSource()->query($method, $params, $this);
|
||||
return $return;
|
||||
|
||||
return $this->getDataSource()->query($method, $params, $this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2957,8 +2957,9 @@ class Model extends Object implements CakeEventListener {
|
|||
* @return array
|
||||
*/
|
||||
protected function _findNeighbors($state, $query, $results = array()) {
|
||||
extract($query);
|
||||
|
||||
if ($state === 'before') {
|
||||
extract($query);
|
||||
$conditions = (array)$conditions;
|
||||
if (isset($field) && isset($value)) {
|
||||
if (strpos($field, '.') === false) {
|
||||
|
@ -2976,7 +2977,6 @@ class Model extends Object implements CakeEventListener {
|
|||
return $query;
|
||||
}
|
||||
|
||||
extract($query);
|
||||
unset($query['conditions'][$field . ' <']);
|
||||
$return = array();
|
||||
if (isset($results[0])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue