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:
committed by
WineHQ
parent
2f3587f15d
commit
eb49e9344d
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user