Fix handling of queued downloadurls

This commit is contained in:
Alexander Nicolaysen Sørnes
2008-10-03 12:53:26 +02:00
committed by Chris Morgan
parent ecbfa84600
commit e86ccd1390
3 changed files with 8 additions and 2 deletions

View File

@@ -120,10 +120,14 @@ class appData
function listSubmittedBy($iUserId, $bQueued = true) function listSubmittedBy($iUserId, $bQueued = true)
{ {
$sExtra = '';
if($bQueued) // downloadurls are only queued together with versions
$sExtra = " AND appData.type != 'downloadurl' ";
$hResult = query_parameters("SELECT * FROM appData WHERE $hResult = query_parameters("SELECT * FROM appData WHERE
appData.submitterId = '?' appData.submitterId = '?'
AND AND
appData.state = '?' appData.state = '?' $sExtra
ORDER BY appData.id", ORDER BY appData.id",
$iUserId, $bQueued ? 'queued' : 'accepted'); $iUserId, $bQueued ? 'queued' : 'accepted');

View File

@@ -330,7 +330,7 @@ class downloadurl
VALUES('?', '?', '?', '?', '?', ?, '?')", VALUES('?', '?', '?', '?', '?', ?, '?')",
$this->iVersionId, "downloadurl", $this->sDescription, $this->iVersionId, "downloadurl", $this->sDescription,
$this->sUrl, $this->sUrl,
downloadurl::canEdit($this->iVersionId) ? 'accepted' : 'queued', $this->mustBeQueued() ? 'queued' : 'accepted',
"NOW()", "NOW()",
$_SESSION['current']->iUserId); $_SESSION['current']->iUserId);

View File

@@ -69,6 +69,7 @@ class version_queue
function update() function update()
{ {
$this->oVersion->update(); $this->oVersion->update();
$this->oDownloadUrl->update();
$this->oTestDataQueue->update(); $this->oTestDataQueue->update();
} }
@@ -195,6 +196,7 @@ class version_queue
{ {
$this->oVersion->iAppId = $aClean['iAppId']; $this->oVersion->iAppId = $aClean['iAppId'];
$this->oVersion->getOutputEditorValues($aClean); $this->oVersion->getOutputEditorValues($aClean);
$this->oDownloadUrl->getOutputEditorValues($aClean);
$this->oTestDataQueue->getOutputEditorValues($aClean); $this->oTestDataQueue->getOutputEditorValues($aClean);
} }