Implement version::objectMoveChildren() on top of version::objectGetChildren()

This commit is contained in:
Alexander Nicolaysen Sørnes
2009-07-23 01:40:25 +02:00
parent bd7081ebb4
commit e9c4d2ef16
10 changed files with 232 additions and 48 deletions

View File

@@ -187,10 +187,20 @@ class Bug
}
}
//TODO: figure out what we might want to do here but lie and
// return true until then
function update()
{
$oBug = new bug($this->iLinkId);
if($this->iVersionId && $this->iVersionId != $oBug->iVersionId)
{
$hResult = query_parameters("UPDATE buglinks SET versionId = '?'
WHERE linkId = '?'",
$this->iVersionId, $this->iLinkId);
if(!$hResult)
return false;
}
return true;
}
@@ -278,6 +288,16 @@ class Bug
return array(null, null, null);
}
public function objectGetParent($sClass = '')
{
return new version($this->iVersionId);
}
public function objectSetParent($iNewId, $sClass = '')
{
$this->iVersionId = $iNewId;
}
function objectGetChildren($bIncludeDeleted = false)
{
return array();