mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fix build list of widgets
Only consider files ending in ".php" to restrict widgets and avoid load wrong files. It should fix #2761
This commit is contained in:
parent
0ff214f27d
commit
2dde998935
@ -97,6 +97,9 @@ $widgetlist = array();
|
||||
|
||||
while (false !== ($filename = readdir($dirhandle))) {
|
||||
$periodpos = strpos($filename, ".");
|
||||
/* Ignore files not ending in .php */
|
||||
if (substr($filename, -4, 4) != ".php")
|
||||
continue;
|
||||
$widgetname = substr($filename, 0, $periodpos);
|
||||
$widgetnames[] = $widgetname;
|
||||
if ($widgetname != "system_information")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user