Version 4.7.13

This commit is contained in:
Neo committed 2025-12-19 16:14:56 -08:00
1 parent fd22d99e69
commit 7124a02564
954 files changed
+29277 -59308

No files matched your search

+3 -3
View File
@@ -90,7 +90,7 @@ class _NodeController extends \IPS\Api\Controller
* Delete
*
* @param int $id ID Number
* @param int|NULL $deleteChildrenOrMove -1 to delete all child nodes, or the new parent node ID to move the children to
* @param int|NULL $deleteChildrenOrMove -1 to delete all child nodes and content, or the new parent node ID to move the children and content to
* @throws 1S359/1 INVALID_ID The node ID does not exist
* @throws 1S359/2 INVALID_TARGET The target node cannot be deleted because the new parent node does not exist
* @throws 1S359/3 HAS_CHILDREN The target node cannot be deleted because it has children (pass deleteChildrenOrMove in the request to specify how to handle the children)
@@ -104,7 +104,7 @@ class _NodeController extends \IPS\Api\Controller
{
$node = $class::load( $id );
if ( $node->hasChildren( NULL, NULL, TRUE ) )
if ( $node->hasChildren( NULL, NULL, TRUE ) OR ( isset( $node::$contentItemClass ) AND $node::$contentItemClass ) )
{
/* -1 means delete everything */
if ( $deleteChildrenOrMove AND $deleteChildrenOrMove == -1 )
@@ -116,7 +116,7 @@ class _NodeController extends \IPS\Api\Controller
try
{
$target = $class::load( $deleteChildrenOrMove );
$node->deleteOrMoveFormSubmit( array( 'node_move_children' => TRUE, 'node_destination' => $target->_id ) );
$node->deleteOrMoveFormSubmit( array( 'node_move_children' => TRUE, 'node_destination' => $target->_id, 'node_move_content' => $target ) );
}
catch ( \OutOfRangeException $e )
{