diff --git a/include/maintainer.php b/include/maintainer.php
index 43d3ced..badf981 100644
--- a/include/maintainer.php
+++ b/include/maintainer.php
@@ -209,7 +209,7 @@ class maintainer
function create()
{
/* user id, appid, and maintain reason must be valid to continue */
- if(!$this->iUserId || !$this->iAppId || !$this->sMaintainReason)
+ if(!$this->iAppId || !$this->sMaintainReason)
{
return NULL;
}
@@ -218,7 +218,7 @@ class maintainer
"userId, maintainReason, superMaintainer, submitTime, queued) ".
"VALUES ('?', '?', '?', '?', '?', ?, '?')",
$this->iAppId, $this->iVersionId,
- $this->iUserId, $this->sMaintainReason,
+ $_SESSION['current']->iUserId, $this->sMaintainReason,
$this->bSuperMaintainer, "NOW()", $this->mustBeQueued() ? "true" : "false");
/* this objects id is the insert id returned by the database */
@@ -677,6 +677,22 @@ class maintainer
return $oOMTableRow;
}
+ function objectDisplayAddItemHelp()
+ {
+ echo "
This page is for submitting a request to become an application maintainer.\n";
+ echo "An application maintainer is someone who runs the application \n";
+ echo "regularly and who is willing to be active in reporting regressions with newer \n";
+ echo "versions of Wine and to help other users run this application under Wine.
";
+ echo "
Being an application maintainer comes with new rights and new responsibilities; please be sure to read the maintainer's guidelines before to proceed.
";
+ echo "
We ask that all maintainers explain why they want to be an application maintainer,\n";
+ echo "why they think they will do a good job and a little about their experience\n";
+ echo "with Wine. This is both to give you time to\n";
+ echo "think about whether you really want to be an application maintainer and also for the\n";
+ echo "appdb admins to identify people that are best suited for the job. Your request\n";
+ echo "may be denied if there are already a handful of maintainers for this application or if you\n";
+ echo "don't have the experience with Wine that is necessary to help other users out.
\n";
+ }
+
function ObjectDisplayQueueProcessingHelp()
{
echo "
\n\n";
@@ -693,111 +709,161 @@ class maintainer
return FALSE;
}
- function outputEditor()
+ function objectGetCustomVars($sAction)
{
- //view application details
- echo html_frame_start("New Maintainer Form",600,"",0);
- echo "
\n";
- echo "iMaintainerId\" />";
-
- /* User name */
- $oSubmitter = new user($this->iUserId);
- echo html_tr(array(
- array("User name", 'style="text-align:right" class="color0"'),
- $oSubmitter->objectMakeLink()
- ));
-
- /**
- * Show the other maintainers of this application, if there are any
- */
- echo '
\n";
- /* display maintainers for the version */
- if($aOtherMaintainers)
+ switch($sAction)
{
- while(list($index, $iUserId) = each($aOtherMaintainers))
- {
- $oUser = new User($iUserId);
+ case "add":
+ return array("iAppId","iVersionId");
- // because Version::getMaintainersUserIds() includes super maintainers
- // we need to exclude these from the list of maintainers that we are
- // building
- if(!maintainer::isUserSuperMaintainer($oUser, $oVersion->iAppId))
- echo "$oUser->sRealname \n";
- }
+ default:
+ return null;
}
+ }
- /* display super maintainers for the given app */
-
- if($aOtherSuperMaintainers)
+ function outputEditor($aClean = null)
+ {
+ if(!$this->iMaintainerId)
{
- while(list($index, $iUserId) = each($aOtherSuperMaintainers))
+ if($aClean['iVersionId'])
{
- $oUser = new User($iUserId);
- echo "$oUser->sRealname* \n";
- }
- }
-
- if(!$bFoundMaintainers)
- {
- echo "No other maintainers";
- }
-
- echo "
\n";
-
- // Show which other apps the user maintains
- echo '
\n";
+ echo "iMaintainerId\" />";
+
+ /* User name */
+ $oSubmitter = new user($this->iUserId);
+ echo html_tr(array(
+ array("User name", 'style="text-align:right" class="color0"'),
+ $oSubmitter->objectMakeLink()
+ ));
+
+ /**
+ * Show the other maintainers of this application, if there are any
+ */
+ echo '
\n";
+ /* display maintainers for the version */
+ if($aOtherMaintainers)
+ {
+ while(list($index, $iUserId) = each($aOtherMaintainers))
+ {
+ $oUser = new User($iUserId);
+
+ // because Version::getMaintainersUserIds() includes super maintainers
+ // we need to exclude these from the list of maintainers that we are
+ // building
+ if(!maintainer::isUserSuperMaintainer($oUser, $oVersion->iAppId))
+ echo "$oUser->sRealname \n";
+ }
+ }
+
+ /* display super maintainers for the given app */
+
+ if($aOtherSuperMaintainers)
+ {
+ while(list($index, $iUserId) = each($aOtherSuperMaintainers))
+ {
+ $oUser = new User($iUserId);
+ echo "$oUser->sRealname* \n";
+ }
+ }
+
+ if(!$bFoundMaintainers)
+ {
+ echo "No other maintainers";
+ }
+
+ echo "
\n";
+
+ // Show which other apps the user maintains
+ echo '