Prefix all GPC variables according to our coding standard
This commit is contained in:
@@ -13,10 +13,10 @@ require(BASE."include/application.php");
|
||||
|
||||
$aClean = array(); //array of filtered user input
|
||||
|
||||
$aClean['maintainReason'] = makeSafe($_REQUEST['maintainReason']);
|
||||
$aClean['appId'] = makeSafe($_POST['appId']);
|
||||
$aClean['versionId'] = makeSafe(strip_tags($_POST['versionId']));
|
||||
$aClean['superMaintainer'] = makeSafe($_POST['superMaintainer']);
|
||||
$aClean['sMaintainReason'] = makeSafe($_REQUEST['sMaintainReason']);
|
||||
$aClean['iAppId'] = makeSafe($_POST['iAppId']);
|
||||
$aClean['iVersionId'] = makeSafe(strip_tags($_POST['iVersionId']));
|
||||
$aClean['iSuperMaintainer'] = makeSafe($_POST['iSuperMaintainer']);
|
||||
|
||||
|
||||
/**
|
||||
@@ -52,23 +52,23 @@ if(!$_SESSION['current']->isLoggedIn())
|
||||
|
||||
/* if we have a versionId to check against see if */
|
||||
/* the user is already a maintainer */
|
||||
if(!$aClean['superMaintainer'] && $_SESSION['current']->isMaintainer($aClean['versionId']))
|
||||
if(!$aClean['iSuperMaintainer'] && $_SESSION['current']->isMaintainer($aClean['iVersionId']))
|
||||
{
|
||||
echo "You are already a maintainer of this app!";
|
||||
exit;
|
||||
}
|
||||
|
||||
/* if this user is a super maintainer they maintain all of the versionIds of this appId */
|
||||
if($_SESSION['current']->isSuperMaintainer($aClean['appId']))
|
||||
if($_SESSION['current']->isSuperMaintainer($aClean['iAppId']))
|
||||
{
|
||||
echo "You are already a supermaintainer of the whole application family!";
|
||||
exit;
|
||||
}
|
||||
|
||||
if( $aClean['maintainReason'] )
|
||||
if( $aClean['sMaintainReason'] )
|
||||
{
|
||||
// check the input for empty/invalid fields
|
||||
$errors = checkAppMaintainerInput($aClean['maintainReason']);
|
||||
$errors = checkAppMaintainerInput($aClean['sMaintainReason']);
|
||||
if(!empty($errors))
|
||||
{
|
||||
util_show_error_page("We found the following errors:","<ul>$errors</ul><br />Please go back and correct them.");
|
||||
@@ -76,7 +76,7 @@ if( $aClean['maintainReason'] )
|
||||
}
|
||||
|
||||
// header
|
||||
if($aClean['superMaintainer'])
|
||||
if($aClean['iSuperMaintainer'])
|
||||
apidb_header("Submit SuperMaintainer Request");
|
||||
else
|
||||
apidb_header("Submit Maintainer Request");
|
||||
@@ -85,9 +85,9 @@ if( $aClean['maintainReason'] )
|
||||
$hResult = query_parameters("INSERT INTO appMaintainerQueue (queueId, appId, versionId, ".
|
||||
"userId, maintainReason, superMaintainer, submitTime) ".
|
||||
"VALUES (?, '?', '?', '?', '?', '?', ?)",
|
||||
"null", $aClean['appId'], $aClean['versionId'],
|
||||
$_SESSION['current']->iUserId, $aClean['maintainReason'],
|
||||
$aClean['superMaintainer'], "NOW()");
|
||||
"null", $aClean['iAppId'], $aClean['iVersionId'],
|
||||
$_SESSION['current']->iUserId, $aClean['sMaintainReason'],
|
||||
$aClean['iSuperMaintainer'], "NOW()");
|
||||
|
||||
if ($hResult)
|
||||
{
|
||||
@@ -97,15 +97,15 @@ if( $aClean['maintainReason'] )
|
||||
} else
|
||||
{
|
||||
// header
|
||||
if($aClean['versionId'])
|
||||
if($aClean['iVersionId'])
|
||||
{
|
||||
$oVersion = new Version($aClean['versionId']);
|
||||
$oVersion = new Version($aClean['iVersionId']);
|
||||
$oApp = new Application($oVersion->iAppId);
|
||||
apidb_header("Request to become an application maintainer of ".$oApp->sName." ".$oVersion->sName);
|
||||
}
|
||||
else
|
||||
{
|
||||
$oApp = new Application($aClean['appId']);
|
||||
$oApp = new Application($aClean['iAppId']);
|
||||
apidb_header("Request to become an application super maintainer of ".$oApp->sName);
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ if( $aClean['maintainReason'] )
|
||||
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.</p>";
|
||||
echo "<p>Being an application maintainer comes with new rights and new responsibilities; please be sure to read the <a href=\"".BASE."/help/?topic=maintainer_guidelines\">maintainer's guidelines</a> before to proceed.</p> ";
|
||||
echo "<p>Being an application maintainer comes with new rights and new responsibilities; please be sure to read the <a href=\"".BASE."/help/?sTopic=maintainer_guidelines\">maintainer's guidelines</a> before to proceed.</p> ";
|
||||
echo "<p>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";
|
||||
@@ -127,7 +127,7 @@ if( $aClean['maintainReason'] )
|
||||
echo "don't have the experience with Wine that is necessary to help other users out.</p>\n";
|
||||
|
||||
/* Special message for super maintainer applications */
|
||||
if($aClean['superMaintainer'])
|
||||
if($aClean['iSuperMaintainer'])
|
||||
{
|
||||
echo "<p>Super maintainers are just like normal maintainers but they can modify EVERY version of\n";
|
||||
echo "this application (and the application itself). We don't expect you to run every version but at least to help keep\n";
|
||||
@@ -135,7 +135,7 @@ if( $aClean['maintainReason'] )
|
||||
}
|
||||
echo "<br /><br />";
|
||||
|
||||
if($aClean['superMaintainer'])
|
||||
if($aClean['iSuperMaintainer'])
|
||||
echo html_frame_start("New Super Maintainer Form",400,"",0);
|
||||
else
|
||||
echo html_frame_start("New Maintainer Form",400,"",0);
|
||||
@@ -144,20 +144,20 @@ if( $aClean['maintainReason'] )
|
||||
echo "<tr valign=top><td class=color0>";
|
||||
echo '<b>Application</b></td><td>'.$oApp->sName;
|
||||
echo '</td></tr>',"\n";
|
||||
if($aClean['versionId'])
|
||||
if($aClean['iVersionId'])
|
||||
{
|
||||
echo "<tr valign=top><td class=color0>";
|
||||
echo '<b>Version</b></td><td>'.$oVersion->sName;
|
||||
echo '</td></tr>',"\n";
|
||||
}
|
||||
echo "<input type=hidden name='appId' value={$aClean['appId']}>";
|
||||
echo "<input type=hidden name='versionId' value={$aClean['versionId']}>";
|
||||
echo "<input type=hidden name='superMaintainer' value={$aClean['superMaintainer']}>";
|
||||
echo "<input type=hidden name='iAppId' value={$aClean['iAppId']}>";
|
||||
echo "<input type=hidden name='iVersionId' value={$aClean['iVersionId']}>";
|
||||
echo "<input type=hidden name='iSuperMaintainer' value={$aClean['iSuperMaintainer']}>";
|
||||
|
||||
if($aClean['superMaintainer'])
|
||||
echo '<tr valign=top><td class=color0><b>Why you want to and should be an application super maintainer</b></td><td><textarea name="maintainReason" rows=15 cols=70></textarea></td></tr>',"\n";
|
||||
if($aClean['iSuperMaintainer'])
|
||||
echo '<tr valign=top><td class=color0><b>Why you want to and should be an application super maintainer</b></td><td><textarea name="sMaintainReason" rows=15 cols=70></textarea></td></tr>',"\n";
|
||||
else
|
||||
echo '<tr valign=top><td class=color0><b>Why you want to and should be an application maintainer</b></td><td><textarea name="maintainReason" rows=15 cols=70></textarea></td></tr>',"\n";
|
||||
echo '<tr valign=top><td class=color0><b>Why you want to and should be an application maintainer</b></td><td><textarea name="sMaintainReason" rows=15 cols=70></textarea></td></tr>',"\n";
|
||||
|
||||
echo '<tr valign=top><td class=color3 align=center colspan=2> <input type=submit value=" Submit Maintainer Request " class=button> </td></tr>',"\n";
|
||||
echo '</table>',"\n";
|
||||
|
||||
Reference in New Issue
Block a user