mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUG: open ticket 7812 correcting filter syntax on a DataObject used by function updatetreenodes
This commit is contained in:
parent
0a6a3fa936
commit
3e351bc421
@ -753,9 +753,9 @@ class LeftAndMain extends Controller implements PermissionProvider {
|
|||||||
$next = $prev = null;
|
$next = $prev = null;
|
||||||
|
|
||||||
$className = $this->stat('tree_class');
|
$className = $this->stat('tree_class');
|
||||||
$next = DataObject::get($className, 'ParentID = '.$record->ParentID.' AND Sort > '.$record->Sort)->first();
|
$next = DataObject::get($className)->filter('ParentID', $record->ParentID)->filter('Sort:GreaterThan', $record->Sort)->first();
|
||||||
if (!$next) {
|
if (!$next) {
|
||||||
$prev = DataObject::get($className, 'ParentID = '.$record->ParentID.' AND Sort < '.$record->Sort)->reverse()->first();
|
$prev = DataObject::get($className)->filter('ParentID', $record->ParentID)->filter('Sort:LessThan', $record->Sort)->reverse()->first();
|
||||||
}
|
}
|
||||||
|
|
||||||
$link = Controller::join_links($recordController->Link("show"), $record->ID);
|
$link = Controller::join_links($recordController->Link("show"), $record->ID);
|
||||||
|
Loading…
Reference in New Issue
Block a user