Properly handle queued apps with more than one version
This commit is contained in:
@@ -99,6 +99,18 @@ class application_queue
|
|||||||
|
|
||||||
$this->oApp->unQueue();
|
$this->oApp->unQueue();
|
||||||
$this->oVersionQueue->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()
|
function reQueue()
|
||||||
|
|||||||
@@ -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)
|
if($sWhatChanged and !$bSilent)
|
||||||
$this->SendNotificationMail("edit",$sWhatChanged);
|
$this->SendNotificationMail("edit",$sWhatChanged);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user