From 2dde998935cd0bfb4c72ca0512366cf248088ba1 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Thu, 17 Jan 2013 09:53:00 -0200 Subject: Fix build list of widgets Only consider files ending in ".php" to restrict widgets and avoid load wrong files. It should fix #2761 --- usr/local/www/index.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'usr/local') diff --git a/usr/local/www/index.php b/usr/local/www/index.php index 1287672..c8d721c 100755 --- a/usr/local/www/index.php +++ b/usr/local/www/index.php @@ -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") -- cgit v1.1