summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorScott Dale <sdale@pfsense.org>2008-07-24 00:30:11 +0000
committerScott Dale <sdale@pfsense.org>2008-07-24 00:30:11 +0000
commitf617ecbd6b461dafb853705efb7998ae13060549 (patch)
tree9f02340c419e135d43d5d195a180a6127a1611ab /usr/local/www
parent6cc843c39b3accebc7e60c0486d42b92d1496877 (diff)
downloadpfsense-f617ecbd6b461dafb853705efb7998ae13060549.zip
pfsense-f617ecbd6b461dafb853705efb7998ae13060549.tar.gz
code cleanup, does not resolve widget save bug
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/index.php17
1 files changed, 3 insertions, 14 deletions
diff --git a/usr/local/www/index.php b/usr/local/www/index.php
index 7909084..8dfde20 100755
--- a/usr/local/www/index.php
+++ b/usr/local/www/index.php
@@ -122,6 +122,7 @@ $dirhandle = opendir($directory);
$filename = "";
$widgetnames = array();
$widgetfiles = array();
+$widgetlist = array();
while (false !== ($filename = readdir($dirhandle))) {
$periodpos = strpos($filename, ".");
@@ -133,12 +134,9 @@ while (false !== ($filename = readdir($dirhandle))) {
sort($widgetfiles);
array_unshift($widgetfiles, "system_information.widget.php");
-
if (!is_array($config['widgets'])) {
$config['widgets'] = array();
}
-
-$pconfig['sequence'] = $config['widgets']['sequence'];
if ($_POST){
$config['widgets']['sequence'] = $_POST['sequence'];
@@ -154,10 +152,10 @@ if ($_POST){
exit;
}
+$pconfig['sequence'] = $config['widgets']['sequence'];
if ($config['widgets'] && $pconfig['sequence'] != "")
{
- $widgetlist = array();
$widgetlist = $pconfig['sequence'];
$colpos = array();
$savedwidgetfiles = array();
@@ -172,22 +170,13 @@ if ($config['widgets'] && $pconfig['sequence'] != "")
$displayarray[] = substr($widget,$displayposition+1);
$savedwidgetfiles[] = $widgetname . ".widget.php";
}
- foreach ($widgetnames as $widget){
- if ($config['widgets'][$widget . '-config']){
- $pconfig[$widget . '-config'] = $config['widgets'][$widget . '-config'];
- }
- }
- $widgetlist = $savedwidgetfiles;
-
+ $widgetlist = $savedwidgetfiles;
}
else{
$widgetlist = $widgetfiles;
}
-
-
-
//build list of php include files
$phpincludefiles = array();
$directory = "/usr/local/www/widgets/include/";
OpenPOWER on IntegriCloud