Alexander Nicolaysen Sørnes : maintainer : Make the unit tests happy

Chris Morgan cmorgan at winehq.org
Mon Sep 24 18:56:35 CDT 2007


Module: appdb
Branch: master
Commit: c4736bf21cb77ad5a5b29ee6d5967f288d342bc2
URL:    http://source.winehq.org/git/appdb.git/?a=commit;h=c4736bf21cb77ad5a5b29ee6d5967f288d342bc2

Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date:   Mon Sep 24 09:26:55 2007 +0200

maintainer: Make the unit tests happy

---

 include/maintainer.php |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

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 */




More information about the wine-cvs mailing list