From c4736bf21cb77ad5a5b29ee6d5967f288d342bc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?= Date: Mon, 24 Sep 2007 09:26:55 +0200 Subject: [PATCH] maintainer: Make the unit tests happy --- include/maintainer.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/maintainer.php b/include/maintainer.php index 4c63ef1..6aae664 100644 --- a/include/maintainer.php +++ b/include/maintainer.php @@ -214,11 +214,14 @@ class maintainer return NULL; } + if(!$this->iUserId) + $this->iUserId = $_SESSION['current']->iUserId; + $hResult = query_parameters("INSERT INTO appMaintainers (appId, versionId, ". "userId, maintainReason, superMaintainer, submitTime, queued) ". "VALUES ('?', '?', '?', '?', '?', ?, '?')", $this->iAppId, $this->iVersionId, - $_SESSION['current']->iUserId, $this->sMaintainReason, + $this->iUserId, $this->sMaintainReason, $this->bSuperMaintainer, "NOW()", $this->mustBeQueued() ? "true" : "false"); /* this objects id is the insert id returned by the database */