Add om method for displaying a move child objects page. A link to this page is displayed in

an entry's view page automatically if the class that entry has the required methods
objectMoveChildren and objectGetId
This commit is contained in:
Alexander Nicolaysen Sørnes
2007-04-27 23:43:43 +00:00
committed by WineHQ
parent 2f3587f15d
commit eb49e9344d
3 changed files with 82 additions and 0 deletions

View File

@@ -592,6 +592,29 @@ class distribution {
{
return "<a href=\"".$this->objectMakeUrl()."\">$this->sName</a>";
}
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;
}
}
?>