diff --git a/include/application_queue.php b/include/application_queue.php index c2b31e2..c3c51d1 100644 --- a/include/application_queue.php +++ b/include/application_queue.php @@ -99,6 +99,18 @@ class application_queue $this->oApp->unQueue(); $this->oVersionQueue->unQueue(); + + /* Has anyone submitted new versions while the app was queued? + If so we need to change their state from pending to queued */ + $aOtherVersions = $this->oApp->objectGetChildrenClassSpecific('version'); + foreach($aOtherVersions as $oVersion) + { + if($oVersion->objectGetState() == 'pending') + { + $oVersion->objectSetState('queued'); + $oVersion->update(); + } + } } function reQueue() diff --git a/include/version.php b/include/version.php index 055a530..b1bceae 100644 --- a/include/version.php +++ b/include/version.php @@ -247,6 +247,9 @@ class version { } } + if($this->objectGetState() != $oVersion->objectGetState()) + query_parameters("UPDATE appVersion SET state = '?' WHERE versionId = '?'", $this->objectGetState(), $this->objectGetId()); + if($sWhatChanged and !$bSilent) $this->SendNotificationMail("edit",$sWhatChanged); return true;