Improve locating section when accessing a group
This commit is contained in:
parent
21a98d9724
commit
9215202c01
|
@ -350,11 +350,11 @@ function get_section_by_group($groupname) {
|
||||||
$glfp=fopen($config_dir.$menuitem[0]."/groups.txt", 'r');
|
$glfp=fopen($config_dir.$menuitem[0]."/groups.txt", 'r');
|
||||||
while($gl=fgets($glfp)) {
|
while($gl=fgets($glfp)) {
|
||||||
$group_name = preg_split("/( |\t)/", $gl, 2);
|
$group_name = preg_split("/( |\t)/", $gl, 2);
|
||||||
if(stripos(trim($groupname), trim($group_name[0])) !== false) {
|
if(strtolower(trim($groupname)) == strtolower(trim($group_name[0]))) {
|
||||||
fclose($glfp);
|
fclose($glfp);
|
||||||
$section=$menuitem[0];
|
$section=$menuitem[0];
|
||||||
fclose($glfp);
|
fclose($glfp);
|
||||||
return $section;
|
return $section;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue