maintainer: Make the unit tests happy

This commit is contained in:
Alexander Nicolaysen Sørnes
2007-09-24 09:26:55 +02:00
committed by Chris Morgan
parent 561e44573d
commit c4736bf21c

View File

@@ -214,11 +214,14 @@ class maintainer
return NULL; return NULL;
} }
if(!$this->iUserId)
$this->iUserId = $_SESSION['current']->iUserId;
$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,
$_SESSION['current']->iUserId, $this->sMaintainReason, $this->iUserId, $this->sMaintainReason,
$this->bSuperMaintainer, "NOW()", $this->mustBeQueued() ? "true" : "false"); $this->bSuperMaintainer, "NOW()", $this->mustBeQueued() ? "true" : "false");
/* this objects id is the insert id returned by the database */ /* this objects id is the insert id returned by the database */