version: Change state when moving from queued to accepted application
This commit is contained in:
committed by
Chris Morgan
parent
3ad7c45890
commit
5a31b9d5c8
@@ -204,11 +204,16 @@ class version {
|
|||||||
|
|
||||||
if ($this->iAppId && ($this->iAppId!=$oVersion->iAppId))
|
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);
|
$oAppBefore = new Application($oVersion->iAppId);
|
||||||
$oAppAfter = new Application($this->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";
|
$sWhatChanged .= "Version was moved from application ".$oAppBefore->sName." to application ".$oAppAfter->sName.".\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user