Remove downloadurl::processFormSingle
This commit is contained in:
committed by
Chris Morgan
parent
2071227895
commit
a57d236392
@@ -361,37 +361,6 @@ class downloadurl
|
|||||||
return TRUE;
|
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()
|
function unQueue()
|
||||||
{
|
{
|
||||||
if($this->mustBeQueued())
|
if($this->mustBeQueued())
|
||||||
|
|||||||
@@ -46,9 +46,8 @@ class version_queue
|
|||||||
|
|
||||||
$this->oTestDataQueue->oTestData->iVersionId = $this->oVersion->iVersionId;
|
$this->oTestDataQueue->oTestData->iVersionId = $this->oVersion->iVersionId;
|
||||||
$this->oTestDataQueue->create();
|
$this->oTestDataQueue->create();
|
||||||
$this->oDownloadUrl->processFormSingle($this->oVersion->iVersionId,
|
$this->oDownloadUrl->objectSetParent($this->oVersion->objectGetId());
|
||||||
$aClean,
|
$this->oDownloadUrl->create();
|
||||||
$this->oVersion->canEdit());
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user