mirror of
https://github.com/Mibew/mibew.git
synced 2025-02-01 05:44:41 +03:00
Do not use global variable $errors in verifyparam_groupid func
This commit is contained in:
parent
3feb32d6c9
commit
83b029e3b9
@ -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) {
|
||||
|
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user