maintainer: add new 'pending' queue state
This commit is contained in:
committed by
Chris Morgan
parent
710d79224a
commit
3723f34a11
@@ -209,12 +209,22 @@ class maintainer
|
|||||||
if(!$this->iUserId)
|
if(!$this->iUserId)
|
||||||
$this->iUserId = $_SESSION['current']->iUserId;
|
$this->iUserId = $_SESSION['current']->iUserId;
|
||||||
|
|
||||||
|
$oApp = new application($this->iAppId);
|
||||||
|
if(!$this->bSuperMaintainer)
|
||||||
|
$oVersion = new version($this->iVersionId);
|
||||||
|
|
||||||
|
if($oApp->sQueued != "false" ||
|
||||||
|
(!$this->bSuperMaintainer && $oVersion->sQueued != "false"))
|
||||||
|
$this->sQueued = "pending";
|
||||||
|
else
|
||||||
|
$this->sQueued = $this->mustBeQueued() ? "true" : "false";
|
||||||
|
|
||||||
$hResult = query_parameters("INSERT INTO appMaintainers (appId, versionId, ".
|
$hResult = query_parameters("INSERT INTO appMaintainers (appId, versionId, ".
|
||||||
"userId, maintainReason, superMaintainer, submitTime, queued) ".
|
"userId, maintainReason, superMaintainer, submitTime, queued) ".
|
||||||
"VALUES ('?', '?', '?', '?', '?', ?, '?')",
|
"VALUES ('?', '?', '?', '?', '?', ?, '?')",
|
||||||
$this->iAppId, $this->iVersionId,
|
$this->iAppId, $this->iVersionId,
|
||||||
$this->iUserId, $this->sMaintainReason,
|
$this->iUserId, $this->sMaintainReason,
|
||||||
$this->bSuperMaintainer, "NOW()", $this->mustBeQueued() ? "true" : "false");
|
$this->bSuperMaintainer, "NOW()", $this->sQueued);
|
||||||
|
|
||||||
/* this objects id is the insert id returned by the database */
|
/* this objects id is the insert id returned by the database */
|
||||||
$this->iMaintainerId = query_appdb_insert_id();
|
$this->iMaintainerId = query_appdb_insert_id();
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ create table appMaintainers (
|
|||||||
maintainReason text,
|
maintainReason text,
|
||||||
superMaintainer bool,
|
superMaintainer bool,
|
||||||
submitTime datetime,
|
submitTime datetime,
|
||||||
queued enum('true','false','rejected') NOT NULL default 'false',
|
queued enum('true','false','rejected','pending') NOT NULL default 'false',
|
||||||
notificationLevel int not null default '0',
|
notificationLevel int not null default '0',
|
||||||
notificationTime datetime,
|
notificationTime datetime,
|
||||||
key(maintainerId)
|
key(maintainerId)
|
||||||
|
|||||||
Reference in New Issue
Block a user