Remove downloadurl::processFormSingle

This commit is contained in:
Alexander Nicolaysen Sørnes
2008-10-03 13:48:56 +02:00
committed by Chris Morgan
parent 2071227895
commit a57d236392
2 changed files with 2 additions and 34 deletions

View File

@@ -361,37 +361,6 @@ class downloadurl
return TRUE;
}
/* Process a form made only for submitting one URL */
function processFormSingle($iVersionId, $aValues, $bUnQueue = FALSE)
{
/* Calling this function without suitable input data is perfectly valid,
but in that case there is nothing to do here */
if(empty($aValues['sDownloadUrlDescription']) ||
empty($aValues['sDownloadUrlUrl']))
return;
$iId = null;
if($hResult = appData::getData($iVersionId, "downloadurl", TRUE, TRUE))
{
$oObject = query_fetch_object($hResult);
$iId = $oObject->id;
}
$oDownloadurl = new downloadurl($iId);
$oDownloadurl->sDescription = $aValues['sDownloadUrlDescription'];
$oDownloadurl->sUrl = $aValues['sDownloadUrlUrl'];
$oDownloadurl->iVersionId = $iVersionId;
if($iId)
$oDownloadurl->update();
else
$oDownloadurl->create();
if($bUnQueue)
$oDownloadurl->unQueue();
}
function unQueue()
{
if($this->mustBeQueued())

View File

@@ -46,9 +46,8 @@ class version_queue
$this->oTestDataQueue->oTestData->iVersionId = $this->oVersion->iVersionId;
$this->oTestDataQueue->create();
$this->oDownloadUrl->processFormSingle($this->oVersion->iVersionId,
$aClean,
$this->oVersion->canEdit());
$this->oDownloadUrl->objectSetParent($this->oVersion->objectGetId());
$this->oDownloadUrl->create();
return TRUE;
}