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:
Renato Botelho 2013-01-17 09:53:00 -02:00
parent 0ff214f27d
commit 2dde998935

View File

@ -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")