From 41c55dbfa21e01058a038c3885c2449cf2562fce Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Thu, 30 Jun 2005 22:51:28 +0000 Subject: [PATCH] Delete version before application, otherwise the version has no parent application. --- admin/adminAppQueue.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/admin/adminAppQueue.php b/admin/adminAppQueue.php index 74b56ad..ee1daa7 100644 --- a/admin/adminAppQueue.php +++ b/admin/adminAppQueue.php @@ -319,10 +319,6 @@ if ($_REQUEST['sub']) { if (is_numeric($_REQUEST['appId']) && !is_numeric($_REQUEST['versionId'])) // application { - // delete the application entry - $oApp = new Application($_REQUEST['appId']); - $oApp->delete(); - // get the queued versions that refers to the application entry we just removed // and delete them as we implicitly added a version entry when adding a new application $sQuery = "SELECT versionId FROM appVersion WHERE appVersion.appId = '".$_REQUEST['appId']."' AND appVersion.queued = 'true';"; @@ -335,6 +331,10 @@ if ($_REQUEST['sub']) $oVersion->delete(); } } + + // delete the application entry + $oApp = new Application($_REQUEST['appId']); + $oApp->delete(); } else if(is_numeric($_REQUEST['versionId'])) // version { $oVersion = new Version($_REQUEST['versionId']);