diff --git a/html/pages/preferences.inc.php b/html/pages/preferences.inc.php index 0c269299e1..cc72cf1945 100644 --- a/html/pages/preferences.inc.php +++ b/html/pages/preferences.inc.php @@ -24,10 +24,10 @@ if ($_SESSION['userlevel'] == 11) { $changepass_message = 'Incorrect password'; } } - if ($_POST['action'] == 'changedash') { + if ($vars['action'] === 'changedash') { if (!empty($vars['dashboard'])) { dbUpdate(array('dashboard'=>$vars['dashboard']), 'users', 'user_id = ?', array($_SESSION['user_id'])); - print_message("User default dashboard updated"); + $updatedashboard_message = "User default dashboard updated"; } } @@ -180,7 +180,9 @@ if ($_SESSION['userlevel'] == 11) { echo "

Default Dashboard


"; -echo $updatedashboard_message; +if (!empty($updatedashboard_message)) { + print_message($updatedashboard_message); +} echo "
@@ -200,7 +202,7 @@ $dashoptions = dbFetchRows( foreach ($dashoptions as $dash) { echo " - "; + "; } echo "