diff --git a/include/distribution.php b/include/distribution.php
index 7a9f69e..20aa389 100644
--- a/include/distribution.php
+++ b/include/distribution.php
@@ -592,6 +592,29 @@ class distribution {
{
return "objectMakeUrl()."\">$this->sName";
}
+
+ function objectMoveChildren($iNewId)
+ {
+ /* Keep track of how many children we modified */
+ $iCount = 0;
+
+ foreach($this->aTestingIds as $iTestId)
+ {
+ $oTest = new testData($iTestId);
+ $oTest->iDistributionId = $iNewId;
+ if($oTest->update(TRUE))
+ $iCount++;
+ else
+ return FALSE;
+ }
+
+ return $iCount;
+ }
+
+ function objectGetid()
+ {
+ return $this->iDistributionId;
+ }
}
?>
diff --git a/include/objectManager.php b/include/objectManager.php
index 90443e3..073a7df 100644
--- a/include/objectManager.php
+++ b/include/objectManager.php
@@ -249,6 +249,52 @@ class ObjectManager
$this->delete_entry();
}
+ /* Display a page where the user can select which object the children of the current
+ object can be moved to */
+ function display_move_children()
+ {
+ $oObject = new $this->sClass($this->iId);
+ if(!$oObject->canEdit())
+ {
+ echo "Insufficient privileges.
\n";
+ return FALSE;
+ }
+
+ /* We only allow moving to non-queued objects */
+ if(!$hResult = $oObject->objectGetEntries(false, false))
+ {
+ echo "Failed to get list of objects.
\n";
+ return FALSE;
+ }
+
+ /* Display some help text */
+ echo "
Move all child objects of ".$oObject->objectMakeLink()." to the entry "; + echo "selected below, and delete ".$oObject->objectMakeLink()." afterwards.
\n"; + + echo "