Improve locating section when accessing a group

This commit is contained in:
Retro_Guy 2022-06-26 21:35:51 +01:00
parent 21a98d9724
commit 9215202c01
1 changed files with 5 additions and 5 deletions

View File

@ -350,11 +350,11 @@ function get_section_by_group($groupname) {
$glfp=fopen($config_dir.$menuitem[0]."/groups.txt", 'r');
while($gl=fgets($glfp)) {
$group_name = preg_split("/( |\t)/", $gl, 2);
if(stripos(trim($groupname), trim($group_name[0])) !== false) {
fclose($glfp);
$section=$menuitem[0];
fclose($glfp);
return $section;
if(strtolower(trim($groupname)) == strtolower(trim($group_name[0]))) {
fclose($glfp);
$section=$menuitem[0];
fclose($glfp);
return $section;
}
}
}