Do not use global variable $errors in verifyparam_groupid func

This commit is contained in:
Dmitriy Simushev 2014-01-20 14:27:35 +00:00
parent 3feb32d6c9
commit 83b029e3b9
2 changed files with 4 additions and 4 deletions

View File

@ -89,9 +89,7 @@ function generate_button($title, $locale, $style, $invitation_style_name, $group
return "<!-- mibew button -->" . $temp . "<!-- / mibew button -->";
}
function verifyparam_groupid($paramid)
{
global $errors;
function verifyparam_groupid($paramid, &$errors) {
$groupid = "";
$groupid = verifyparam($paramid, "/^\d{0,8}$/", "");
if ($groupid) {

View File

@ -30,6 +30,8 @@ require_once(MIBEW_FS_ROOT.'/libs/getcode.php');
$operator = check_login();
force_password($operator);
$errors = array();
$imageLocales = get_image_locales_map(MIBEW_FS_ROOT.'/locales');
$image = verifyparam(isset($_GET['image']) ? "image" : "i", "/^\w+$/", "mibew");
if (!isset($imageLocales[$image])) {
@ -53,7 +55,7 @@ if ($invitationstyle && !in_array($invitationstyle, $invitationstylelist)) {
$invitationstyle = "";
}
$groupid = verifyparam_groupid("group");
$groupid = verifyparam_groupid("group", $errors);
$showhost = verifyparam("hostname", "/^on$/", "") == "on";
$forcesecure = verifyparam("secure", "/^on$/", "") == "on";
$modsecurity = verifyparam("modsecurity", "/^on$/", "") == "on";