Removed inline method calls in curly braced string concat's.

This commit is contained in:
David Thalmann 2012-07-22 03:40:49 +03:00
parent d9b5ec1a3a
commit 78de6e276a

View file

@ -156,7 +156,7 @@ class TreeBehavior extends ModelBehavior {
if (is_string($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);
}
$this->_sync($Model, $diff, '-', '> ' . $data[$right]);
@ -308,7 +308,7 @@ class TreeBehavior extends ModelBehavior {
$recursive = $overrideRecursive;
}
if (!$order) {
$order = "{$Model->escapeField($left)} asc";
$order = $Model->escapeField($left) . " asc";
}
if ($direct) {
$conditions = array($scope, $Model->escapeField($parent) => $id);
@ -373,7 +373,7 @@ class TreeBehavior extends ModelBehavior {
} else {
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'));
$stack = array();
@ -933,7 +933,7 @@ class TreeBehavior extends ModelBehavior {
$db = ConnectionManager::getDataSource($Model->useDbConfig);
if ($created) {
if (is_string($scope)) {
$scope .= " AND {$Model->escapeField()} <> ";
$scope .= " AND " . $Model->escapeField() . " <> ";
$scope .= $db->value($Model->id, $Model->getColumnType($Model->primaryKey));
} else {
$scope['NOT'][$Model->alias . '.' . $Model->primaryKey] = $Model->id;
@ -991,7 +991,7 @@ class TreeBehavior extends ModelBehavior {
$field = $right;
}
if (is_string($conditions)) {
$conditions = array("{$Model->escapeField($field)} {$conditions}");
$conditions = array($Model->escapeField($field) . " {$conditions}");
}
if (($scope != '1 = 1' && $scope !== true) && $scope) {
$conditions[] = $scope;