ezsystems/ezpublish-legacy — pull request #1032 by joaoinacio (2014-07-17 15:10:41+00:00)
Title: Fix EZP-23170: swapping node with sub items with non-container node.

JIRA: https://jira.ez.no/browse/EZP-23170

Problem: swapping a non-container node (class definition) with a node that contains children/sub items will result in an invalid state;
The new node will display the sub item count but will not list any children on the admin interface.

This PR adds an additional check in content/action that prevents the swap if any of the nodes is not a container and the other contains children.

Tests: manual.

Note:
An improvement to this would be to add the check in the interface, before the action is executed (for example when browsing for the "destination" node.