Version 5.0.0 beta 3

This commit is contained in:
Neo committed 2025-12-19 16:47:22 -08:00
1 parent f61b0da85d
commit e86153356a
108 files changed
+2927 -1573

No files matched your search

+20 -3
View File
@@ -143,9 +143,17 @@ class Controller extends DispatcherController
$this->protectRoots = TRUE;
}
$tree = new Tree( $this->url, $nodeClass::$nodeTitle, array( $this, '_getRoots' ), array( $this, '_getRow' ), array( $this, '_getRowParentId' ), array( $this, '_getChildren' ), array( $this, '_getRootButtons' ), TRUE, $this->lockParents, $this->protectRoots );
$tree = new Tree( $this->url, $nodeClass::$nodeTitle, array( $this, '_getRoots' ), array( $this, '_getRow' ), array( $this, '_getRowParentId' ), array( $this, '_getChildren' ), array( $this, '_getRootButtons' ), TRUE, $this->lockParents, $this->protectRoots, $this->_getRootsPerPage(), array( $this, '_getTotalRoots' ) );
Output::i()->output .= $tree;
}
/**
* @return int|null
*/
public function _getRootsPerPage(): ?int
{
return null;
}
/**
* Get Root Rows
@@ -163,7 +171,16 @@ class Controller extends DispatcherController
return $rows;
}
/**
* @return int
*/
public function _getTotalRoots(): int
{
$nodeClass = $this->nodeClass;
return count( $nodeClass::roots( NULL ) );
}
/**
* Show the "add" button in the page root rather than the table root
*/
@@ -460,7 +477,7 @@ class Controller extends DispatcherController
if ( $new and isset( $node::$databaseColumnOrder ) AND $node::$automaticPositionDetermination === TRUE )
{
$orderColumn = $node::$databaseColumnOrder;
$node->$orderColumn = Db::i()->select( 'MAX(' . $node::$databasePrefix . $orderColumn . ')', $node::$databaseTable )->first() + 1;
$node->$orderColumn = intval( Db::i()->select( 'MAX(' . $node::$databasePrefix . $orderColumn . ')', $node::$databaseTable )->first() ) + 1;
}
$old = NULL;