Module: appdb Branch: master Commit: e86ccd1390852e1de7da9163f8e286e3fa4d5b52 URL: http://source.winehq.org/git/appdb.git/?a=commit;h=e86ccd1390852e1de7da9163f...
Author: Alexander Nicolaysen Sørnes alex@thehandofagony.com Date: Fri Oct 3 12:53:26 2008 +0200
Fix handling of queued downloadurls
---
include/appData.php | 6 +++++- include/downloadurl.php | 2 +- include/version_queue.php | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/include/appData.php b/include/appData.php index a5e32c4..407c079 100644 --- a/include/appData.php +++ b/include/appData.php @@ -120,10 +120,14 @@ class appData
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 appData.submitterId = '?' AND - appData.state = '?' + appData.state = '?' $sExtra ORDER BY appData.id", $iUserId, $bQueued ? 'queued' : 'accepted');
diff --git a/include/downloadurl.php b/include/downloadurl.php index 3a50457..acdfdf4 100644 --- a/include/downloadurl.php +++ b/include/downloadurl.php @@ -330,7 +330,7 @@ class downloadurl VALUES('?', '?', '?', '?', '?', ?, '?')", $this->iVersionId, "downloadurl", $this->sDescription, $this->sUrl, - downloadurl::canEdit($this->iVersionId) ? 'accepted' : 'queued', + $this->mustBeQueued() ? 'queued' : 'accepted', "NOW()", $_SESSION['current']->iUserId);
diff --git a/include/version_queue.php b/include/version_queue.php index 18cf062..553cb8e 100644 --- a/include/version_queue.php +++ b/include/version_queue.php @@ -69,6 +69,7 @@ class version_queue function update() { $this->oVersion->update(); + $this->oDownloadUrl->update(); $this->oTestDataQueue->update(); }
@@ -195,6 +196,7 @@ class version_queue { $this->oVersion->iAppId = $aClean['iAppId']; $this->oVersion->getOutputEditorValues($aClean); + $this->oDownloadUrl->getOutputEditorValues($aClean); $this->oTestDataQueue->getOutputEditorValues($aClean); }