Allow adding downloadurl to queued versions
This commit is contained in:
committed by
Chris Morgan
parent
e86ccd1390
commit
2071227895
@@ -63,6 +63,11 @@ class downloadurl
|
|||||||
return $sReturn;
|
return $sReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function objectSetParent($iId, $sClass = 'version')
|
||||||
|
{
|
||||||
|
$this->iVersionId = $iId;
|
||||||
|
}
|
||||||
|
|
||||||
function objectGetChildren($bIncludeDeleted = false)
|
function objectGetChildren($bIncludeDeleted = false)
|
||||||
{
|
{
|
||||||
/* We have none */
|
/* We have none */
|
||||||
|
|||||||
@@ -33,6 +33,9 @@ class version_queue
|
|||||||
|
|
||||||
$this->oTestDataQueue = new testData_queue($iTestingId);
|
$this->oTestDataQueue = new testData_queue($iTestingId);
|
||||||
$this->oDownloadUrl = new downloadurl($iDownloadUrlId);
|
$this->oDownloadUrl = new downloadurl($iDownloadUrlId);
|
||||||
|
|
||||||
|
if(!$this->oDownloadUrl->objectGetId() && $iVersionId)
|
||||||
|
$this->oDownloadUrl->objectSetParent($iVersionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
function create()
|
function create()
|
||||||
@@ -69,7 +72,13 @@ class version_queue
|
|||||||
function update()
|
function update()
|
||||||
{
|
{
|
||||||
$this->oVersion->update();
|
$this->oVersion->update();
|
||||||
|
|
||||||
|
/* A downloadurl is optional and can thus be added later */
|
||||||
|
if($this->oDownloadUrl->objectGetId())
|
||||||
$this->oDownloadUrl->update();
|
$this->oDownloadUrl->update();
|
||||||
|
else
|
||||||
|
$this->oDownloadUrl->create();
|
||||||
|
|
||||||
$this->oTestDataQueue->update();
|
$this->oTestDataQueue->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user