Commit 0cdad62a authored by Franco Fichtner's avatar Franco Fichtner

dashboard: fix crash report

parent c00e8eb0
...@@ -42,13 +42,14 @@ if (empty($config['widgets']) || !is_array($config['widgets'])) { ...@@ -42,13 +42,14 @@ if (empty($config['widgets']) || !is_array($config['widgets'])) {
$config['widgets'] = array(); $config['widgets'] = array();
} }
$widgetCollection = array();
if ($_SERVER['REQUEST_METHOD'] === 'GET') { if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig = $config['widgets']; $pconfig = $config['widgets'];
// set default dashboard view // set default dashboard view
$pconfig['sequence'] = !empty($pconfig['sequence']) ? $pconfig['sequence'] : ''; $pconfig['sequence'] = !empty($pconfig['sequence']) ? $pconfig['sequence'] : '';
$pconfig['column_count'] = !empty($pconfig['column_count']) ? $pconfig['column_count'] : 2; $pconfig['column_count'] = !empty($pconfig['column_count']) ? $pconfig['column_count'] : 2;
// build list of widgets // build list of widgets
$widgetCollection = array();
$widgetSeqParts = explode(",", $pconfig['sequence']); $widgetSeqParts = explode(",", $pconfig['sequence']);
foreach (glob('/usr/local/www/widgets/widgets/*.widget.php') as $php_file) { foreach (glob('/usr/local/www/widgets/widgets/*.widget.php') as $php_file) {
$widgetItem = array(); $widgetItem = array();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment