mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-02-12 06:56:24 +00:00
Removed inline method calls in curly braced string concat's.
This commit is contained in:
parent
d9b5ec1a3a
commit
78de6e276a
1 changed files with 5 additions and 5 deletions
|
@ -156,7 +156,7 @@ class TreeBehavior extends ModelBehavior {
|
||||||
if (is_string($scope)) {
|
if (is_string($scope)) {
|
||||||
$scope = array($scope);
|
$scope = array($scope);
|
||||||
}
|
}
|
||||||
$scope[]["{$Model->escapeField($left)} BETWEEN ? AND ?"] = array($data[$left] + 1, $data[$right] - 1);
|
$scope[][$Model->escapeField($left) . " BETWEEN ? AND ?"] = array($data[$left] + 1, $data[$right] - 1);
|
||||||
$Model->deleteAll($scope);
|
$Model->deleteAll($scope);
|
||||||
}
|
}
|
||||||
$this->_sync($Model, $diff, '-', '> ' . $data[$right]);
|
$this->_sync($Model, $diff, '-', '> ' . $data[$right]);
|
||||||
|
@ -308,7 +308,7 @@ class TreeBehavior extends ModelBehavior {
|
||||||
$recursive = $overrideRecursive;
|
$recursive = $overrideRecursive;
|
||||||
}
|
}
|
||||||
if (!$order) {
|
if (!$order) {
|
||||||
$order = "{$Model->escapeField($left)} asc";
|
$order = $Model->escapeField($left) . " asc";
|
||||||
}
|
}
|
||||||
if ($direct) {
|
if ($direct) {
|
||||||
$conditions = array($scope, $Model->escapeField($parent) => $id);
|
$conditions = array($scope, $Model->escapeField($parent) => $id);
|
||||||
|
@ -373,7 +373,7 @@ class TreeBehavior extends ModelBehavior {
|
||||||
} else {
|
} else {
|
||||||
array_unshift($valuePath, '%s' . $valuePath[0], '{n}.tree_prefix');
|
array_unshift($valuePath, '%s' . $valuePath[0], '{n}.tree_prefix');
|
||||||
}
|
}
|
||||||
$order = "{$Model->escapeField($left)} asc";
|
$order = $Model->escapeField($left) . " asc";
|
||||||
$results = $Model->find('all', compact('conditions', 'fields', 'order', 'recursive'));
|
$results = $Model->find('all', compact('conditions', 'fields', 'order', 'recursive'));
|
||||||
$stack = array();
|
$stack = array();
|
||||||
|
|
||||||
|
@ -933,7 +933,7 @@ class TreeBehavior extends ModelBehavior {
|
||||||
$db = ConnectionManager::getDataSource($Model->useDbConfig);
|
$db = ConnectionManager::getDataSource($Model->useDbConfig);
|
||||||
if ($created) {
|
if ($created) {
|
||||||
if (is_string($scope)) {
|
if (is_string($scope)) {
|
||||||
$scope .= " AND {$Model->escapeField()} <> ";
|
$scope .= " AND " . $Model->escapeField() . " <> ";
|
||||||
$scope .= $db->value($Model->id, $Model->getColumnType($Model->primaryKey));
|
$scope .= $db->value($Model->id, $Model->getColumnType($Model->primaryKey));
|
||||||
} else {
|
} else {
|
||||||
$scope['NOT'][$Model->alias . '.' . $Model->primaryKey] = $Model->id;
|
$scope['NOT'][$Model->alias . '.' . $Model->primaryKey] = $Model->id;
|
||||||
|
@ -991,7 +991,7 @@ class TreeBehavior extends ModelBehavior {
|
||||||
$field = $right;
|
$field = $right;
|
||||||
}
|
}
|
||||||
if (is_string($conditions)) {
|
if (is_string($conditions)) {
|
||||||
$conditions = array("{$Model->escapeField($field)} {$conditions}");
|
$conditions = array($Model->escapeField($field) . " {$conditions}");
|
||||||
}
|
}
|
||||||
if (($scope != '1 = 1' && $scope !== true) && $scope) {
|
if (($scope != '1 = 1' && $scope !== true) && $scope) {
|
||||||
$conditions[] = $scope;
|
$conditions[] = $scope;
|
||||||
|
|
Loading…
Add table
Reference in a new issue