Alexander Nicolaysen Sørnes : version: Change state when moving from queued to accepted application

Chris Morgan cmorgan at winehq.org
Mon Dec 17 19:56:44 CST 2007


Module: appdb
Branch: master
Commit: 5a31b9d5c8c301c4d78285f7ef77f045ca80fc16
URL:    http://source.winehq.org/git/appdb.git/?a=commit;h=5a31b9d5c8c301c4d78285f7ef77f045ca80fc16

Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date:   Mon Dec 17 19:34:04 2007 +0100

version: Change state when moving from queued to accepted application

---

 include/version.php |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/include/version.php b/include/version.php
index ff8f056..025cd92 100644
--- a/include/version.php
+++ b/include/version.php
@@ -204,11 +204,16 @@ class version {
      
         if ($this->iAppId && ($this->iAppId!=$oVersion->iAppId))
         {
-            if (!query_parameters("UPDATE appVersion SET appId = '?' WHERE versionId = '?'",
-                                  $this->iAppId, $this->iVersionId))
-                return false;
             $oAppBefore = new Application($oVersion->iAppId);
             $oAppAfter = new Application($this->iAppId);
+
+            if($oAppAfter->objectGetState() == 'accepted' && $this->sState == 'pending')
+                $this->sState = 'queued';
+
+            if (!query_parameters("UPDATE appVersion SET appId = '?', state = '?' WHERE versionId = '?'",
+                                  $this->iAppId, $this->sState, $this->iVersionId))
+                return false;
+
             $sWhatChanged .= "Version was moved from application ".$oAppBefore->sName." to application ".$oAppAfter->sName.".\n\n";
         }
 




More information about the wine-cvs mailing list