]> git.mjollnir.org Git - moodle.git/commitdiff
removed useless "changes saved" messages from redirects in administration and user...
authorskodak <skodak>
Mon, 11 Sep 2006 18:56:41 +0000 (18:56 +0000)
committerskodak <skodak>
Mon, 11 Sep 2006 18:56:41 +0000 (18:56 +0000)
admin/index.php
admin/settings.php
user/edit.php

index b687140c33d0f6d6b913b3701fc2bcee254f7433..d07929a9fab0d8e545fb2bc17c2a872f888fce5d 100644 (file)
 
 /// 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&amp;return=site');
     }
 
 /// Check if we are returning from moodle.org registration and if so, we mark that fact to remove reminders
index d7c27e69958a61af00deef00857ae96c93ec4575..500a7cdfc7a8ef52600beeec9f8f6977a794ae8c 100644 (file)
@@ -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') . ' <br />' . $errors);
index da6499eb5e50c440ea929f883eab89e3840ce0af..ce62bf236f6984c4cb8b3db49da3bc33401ff885 100644 (file)
                     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)");