appdb/include application_queue.php

WineHQ wineowner at wine.codeweavers.com
Thu Apr 26 19:13:28 CDT 2007


ChangeSet ID:	31109
CVSROOT:	/opt/cvs-commit
Module name:	appdb
Changes by:	wineowner at winehq.org	2007/04/26 19:13:28

Modified files:
	include        : application_queue.php 

Log message:
	Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
	application_queue, only delete version if it exists. application_queue::delete() should
	check that the version object exists because when moving a duplicate application is deleted
	before the application

Patch: http://cvs.winehq.org/patch.py?id=31109

Old revision  New revision  Changes     Path
 1.1           1.2           +8 -2       appdb/include/application_queue.php

Index: appdb/include/application_queue.php
diff -u -p appdb/include/application_queue.php:1.1 appdb/include/application_queue.php:1.2
--- appdb/include/application_queue.php:1.1	27 Apr 2007  0:13:28 -0000
+++ appdb/include/application_queue.php	27 Apr 2007  0:13:28 -0000
@@ -120,8 +120,14 @@ class application_queue
         if(!$this->oApp->delete())
             $bSuccess = FALSE;
 
-        if(!$this->oVersionQueue->delete())
-            $bSuccess = FALSE;
+        /* When deleting a duplicate app in the application queue, the version is moved
+           to another app and so when application_queue::delete() is called there is
+           no version child to delete, so check if the versionId is valid */
+        if($this->oVersionQueue->oVersion->iVersionId)
+        {
+            if(!$this->oVersionQueue->delete())
+                $bSuccess = FALSE;
+        }
 
         return $bSuccess;
     }



More information about the wine-cvs mailing list