mirror of
				https://github.com/Mibew/mibew.git
				synced 2025-10-26 00:06:55 +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 -->"; | 	return "<!-- mibew button -->" . $temp . "<!-- / mibew button -->"; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function verifyparam_groupid($paramid) | function verifyparam_groupid($paramid, &$errors) { | ||||||
| { |  | ||||||
| 	global $errors; |  | ||||||
| 	$groupid = ""; | 	$groupid = ""; | ||||||
| 	$groupid = verifyparam($paramid, "/^\d{0,8}$/", ""); | 	$groupid = verifyparam($paramid, "/^\d{0,8}$/", ""); | ||||||
| 	if ($groupid) { | 	if ($groupid) { | ||||||
|  | |||||||
| @ -30,6 +30,8 @@ require_once(MIBEW_FS_ROOT.'/libs/getcode.php'); | |||||||
| $operator = check_login(); | $operator = check_login(); | ||||||
| force_password($operator); | force_password($operator); | ||||||
| 
 | 
 | ||||||
|  | $errors = array(); | ||||||
|  | 
 | ||||||
| $imageLocales = get_image_locales_map(MIBEW_FS_ROOT.'/locales'); | $imageLocales = get_image_locales_map(MIBEW_FS_ROOT.'/locales'); | ||||||
| $image = verifyparam(isset($_GET['image']) ? "image" : "i", "/^\w+$/", "mibew"); | $image = verifyparam(isset($_GET['image']) ? "image" : "i", "/^\w+$/", "mibew"); | ||||||
| if (!isset($imageLocales[$image])) { | if (!isset($imageLocales[$image])) { | ||||||
| @ -53,7 +55,7 @@ if ($invitationstyle && !in_array($invitationstyle, $invitationstylelist)) { | |||||||
| 	$invitationstyle = ""; | 	$invitationstyle = ""; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| $groupid = verifyparam_groupid("group"); | $groupid = verifyparam_groupid("group", $errors); | ||||||
| $showhost = verifyparam("hostname", "/^on$/", "") == "on"; | $showhost = verifyparam("hostname", "/^on$/", "") == "on"; | ||||||
| $forcesecure = verifyparam("secure", "/^on$/", "") == "on"; | $forcesecure = verifyparam("secure", "/^on$/", "") == "on"; | ||||||
| $modsecurity = verifyparam("modsecurity", "/^on$/", "") == "on"; | $modsecurity = verifyparam("modsecurity", "/^on$/", "") == "on"; | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user