summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/local/www/index.php')
-rw-r--r--src/usr/local/www/index.php17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/usr/local/www/index.php b/src/usr/local/www/index.php
index e4ac5c2..a06b44e 100644
--- a/src/usr/local/www/index.php
+++ b/src/usr/local/www/index.php
@@ -302,17 +302,20 @@ if ($user_settings['widgets']['sequence'] != "") {
if (false !== $offset) {
$basename = substr($basename, 0, $offset);
}
+ $widgetkey = $basename . '-' . $copynum;
- // Get the widget title that should be in a var defined in the widget's inc file.
- $widgettitle = ${$basename . '_title'};
+ if (isset($user_settings['widgets'][$widgetkey]['descr'])) {
+ $widgettitle = htmlentities($user_settings['widgets'][$widgetkey]['descr']);
+ } else {
+ // Get the widget title that should be in a var defined in the widget's inc file.
+ $widgettitle = ${$basename . '_title'};
- if (empty(trim($widgettitle))) {
- // Fall back to constructing a title from the file name of the widget.
- $widgettitle = ucwords(str_replace('_', ' ', $basename));
+ if (empty(trim($widgettitle))) {
+ // Fall back to constructing a title from the file name of the widget.
+ $widgettitle = ucwords(str_replace('_', ' ', $basename));
+ }
}
- $widgetkey = $basename . '-' . $copynum;
-
$widgetsfromconfig[$widgetkey] = array(
'basename' => $basename,
'title' => $widgettitle,
OpenPOWER on IntegriCloud