From: skodak Date: Mon, 11 Sep 2006 18:56:41 +0000 (+0000) Subject: removed useless "changes saved" messages from redirects in administration and user... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=55f3a4db69315ef3900b7e32cccd86ad4f75adc1;p=moodle.git removed useless "changes saved" messages from redirects in administration and user management --- diff --git a/admin/index.php b/admin/index.php index b687140c33..d07929a9fa 100644 --- a/admin/index.php +++ b/admin/index.php @@ -430,7 +430,7 @@ /// check that site is properly customized if (empty($site->shortname) or empty($site->shortname)) { - redirect('settings.php?section=frontpage&return=site'); + redirect('settings.php?section=frontpage&return=site'); } /// Check if we are returning from moodle.org registration and if so, we mark that fact to remove reminders diff --git a/admin/settings.php b/admin/settings.php index d7c27e6995..500a7cdfc7 100644 --- a/admin/settings.php +++ b/admin/settings.php @@ -64,11 +64,13 @@ if ($data = data_submitted()) { if (empty($errors)) { switch ($return) { case 'site': - redirect("$CFG->wwwroot/", get_string('changessaved'),1); + redirect("$CFG->wwwroot/"); case 'admin': - redirect("$CFG->wwwroot/admin/", get_string('changessaved'),1); + redirect("$CFG->wwwroot/admin/"); default: - redirect("$CFG->wwwroot/admin/settings.php?section=" . $PAGE->section, get_string('changessaved'),1); + // following redirect should display confirmation message because it redirects + // to the same page, user might not know if save button worked + redirect("$CFG->wwwroot/admin/settings.php?section=" . $PAGE->section, get_string('changessaved'),2); } } else { error(get_string('errorwithsettings', 'admin') . '
' . $errors); diff --git a/user/edit.php b/user/edit.php index da6499eb5e..ce62bf236f 100644 --- a/user/edit.php +++ b/user/edit.php @@ -261,20 +261,19 @@ if (isset($USER->newadminuser)) { unset($USER->newadminuser); // redirect to admin/ to continue with installation - redirect("$CFG->wwwroot/$CFG->admin/", get_string('changessaved')); + redirect("$CFG->wwwroot/$CFG->admin/"); } if (!empty($SESSION->wantsurl)) { // User may have been forced to edit account, so let's // send them to where they wanted to go originally $wantsurl = $SESSION->wantsurl; $SESSION->wantsurl = ''; // In case unset doesn't work as expected unset($SESSION->wantsurl); - redirect($wantsurl, get_string('changessaved')); + redirect($wantsurl); } else { - redirect("$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id", - get_string("changessaved")); + redirect("$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id"); } } else { - redirect("$CFG->wwwroot/$CFG->admin/user.php", get_string("changessaved")); + redirect("$CFG->wwwroot/$CFG->admin/user.php"); } } else { error("Could not update the user record ($user->id)");