diff --git a/core/user_settings/user_dashboard.php b/core/user_settings/user_dashboard.php index 2cf7c7796d..4269a6a5fa 100644 --- a/core/user_settings/user_dashboard.php +++ b/core/user_settings/user_dashboard.php @@ -45,7 +45,7 @@ require_once "resources/check_auth.php"; //disable login message - if ($_GET['msg'] == 'dismiss') { + if (isset($_GET['msg']) && $_GET['msg'] == 'dismiss') { unset($_SESSION['login']['message']['text']); $sql = "update v_default_settings "; @@ -88,7 +88,7 @@ echo "
"; //display login message - if (if_group("superadmin") && $_SESSION['login']['message']['text'] != '') { + if (if_group("superadmin") && isset($_SESSION['login']['message']['text']) && $_SESSION['login']['message']['text'] != '') { echo "
".$text['login-message_attention']."  ".$_SESSION['login']['message']['text']."  (".$text['login-message_dismiss'].")
"; } @@ -378,7 +378,7 @@ } } - $hud[$n]['html'] .= "".$text['label-voicemail'].""; + $hud[$n]['html'] = "".$text['label-voicemail'].""; $hud[$n]['html'] .= "".$messages['new'].""; $hud[$n]['html'] .= "".$text['label-new_messages']."\n"; @@ -808,7 +808,7 @@ $show_stat = false; } - $hud[$n]['html'] .= "".$text['label-system_counts'].""; + $hud[$n]['html'] = "".$text['label-system_counts'].""; if ($show_stat) { $hud[$n]['html'] .= "".$hud_stat.""; @@ -961,7 +961,7 @@ $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; - $hud[$n]['html'] .= "".$text['label-system_status'].""; + $hud[$n]['html'] = "".$text['label-system_status'].""; //disk usage if (PHP_OS == 'FreeBSD' || PHP_OS == 'Linux') { @@ -1031,7 +1031,7 @@ if (stristr(PHP_OS, 'Linux')) { unset($tmp); $cut = shell_exec("/usr/bin/which cut"); - $uptime = shell_exec(escapeshellcmd($cut." -d. -f1 /proc/uptime")); + $uptime = trim(shell_exec(escapeshellcmd($cut." -d. -f1 /proc/uptime"))); $tmp['y'] = floor($uptime/60/60/24/365); $tmp['d'] = $uptime/60/60/24%365; $tmp['h'] = $uptime/60/60%24; @@ -1295,4 +1295,4 @@ //show the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?>