Index: modules/filter/filter.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.admin.inc,v
retrieving revision 1.64
diff -u -p -r1.64 filter.admin.inc
--- modules/filter/filter.admin.inc	17 Aug 2010 13:50:52 -0000	1.64
+++ modules/filter/filter.admin.inc	25 Aug 2010 21:08:45 -0000
@@ -302,14 +302,11 @@ function filter_admin_format_form_submit
     }
   }
 
-  switch ($status) {
-    case SAVED_NEW:
-      drupal_set_message(t('Added text format %format.', array('%format' => $format->name)));
-      break;
-
-    case SAVED_UPDATED:
-      drupal_set_message(t('The text format %format has been updated.', array('%format' => $format->name)));
-      break;
+  if ($status == SAVED_NEW) {
+    drupal_set_message(t('Added text format %format.', array('%format' => $format->name)));
+  }
+  else {
+    drupal_set_message(t('The text format %format has been updated.', array('%format' => $format->name)));
   }
 }
 
Index: modules/forum/forum.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.admin.inc,v
retrieving revision 1.36
diff -u -p -r1.36 forum.admin.inc
--- modules/forum/forum.admin.inc	8 Aug 2010 19:21:25 -0000	1.36
+++ modules/forum/forum.admin.inc	25 Aug 2010 21:12:58 -0000
@@ -82,24 +82,28 @@ function forum_form_submit($form, &$form
 
   $term = (object) $form_state['values'];
   $status = taxonomy_term_save($term);
-  switch ($status) {
-    case SAVED_NEW:
-      if ($container) {
-        $containers = variable_get('forum_containers', array());
-        $containers[] = $term->tid;
-        variable_set('forum_containers', $containers);
-      }
-      $form_state['values']['tid'] = $term->tid;
-      drupal_set_message(t('Created new @type %term.', array('%term' => $form_state['values']['name'], '@type' => $type)));
-      break;
-    case SAVED_UPDATED:
-      drupal_set_message(t('The @type %term has been updated.', array('%term' => $form_state['values']['name'], '@type' => $type)));
-      // Clear the page and block caches to avoid stale data.
-      cache_clear_all();
-      break;
+  if ($status == SAVED_NEW) {
+    if ($container) {
+      $containers = variable_get('forum_containers', array());
+      $containers[] = $term->tid;
+      variable_set('forum_containers', $containers);
+    }
+    $form_state['values']['tid'] = $term->tid;
+    drupal_set_message(t('Created new @type %term.', array(
+      '%term' => $form_state['values']['name'],
+      '@type' => $type,
+    )));
+  }
+  else {
+    drupal_set_message(t('The @type %term has been updated.', array(
+      '%term' => $form_state['values']['name'],
+      '@type' => $type,
+    )));
+    // Clear the page and block caches to avoid stale data.
+    cache_clear_all();
   }
+
   $form_state['redirect'] = 'admin/structure/forum';
-  return;
 }
 
 /**
Index: modules/menu/menu.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/menu/menu.module,v
retrieving revision 1.231
diff -u -p -r1.231 menu.module
--- modules/menu/menu.module	1 Aug 2010 23:33:18 -0000	1.231
+++ modules/menu/menu.module	25 Aug 2010 21:11:43 -0000
@@ -265,15 +265,18 @@ function menu_save($menu) {
     ->execute();
   menu_cache_clear_all();
 
-  switch ($status) {
-    case SAVED_NEW:
-      module_invoke_all('menu_insert', $menu);
-      break;
-
-    case SAVED_UPDATED:
-      module_invoke_all('menu_update', $menu);
-      break;
+  if ($status == SAVED_NEW) {
+    module_invoke_all('menu_insert', $menu);
   }
+  else {
+    module_invoke_all('menu_update', $menu);
+    // Explicitly indicate that the menu was updated. Required, since the menu
+    // record may not have been actually updated, so drupal_write_record() would
+    // not return an indication that anything had changed.
+    $status = SAVED_UPDATED;
+  }
+
+  return $status;
 }
 
 /**
Index: modules/node/content_types.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/content_types.inc,v
retrieving revision 1.116
diff -u -p -r1.116 content_types.inc
--- modules/node/content_types.inc	8 Aug 2010 13:02:37 -0000	1.116
+++ modules/node/content_types.inc	25 Aug 2010 21:14:13 -0000
@@ -358,17 +358,16 @@ function node_type_form_submit($form, &$
   menu_rebuild();
   $t_args = array('%name' => $type->name);
 
-  if ($status == SAVED_UPDATED) {
-    drupal_set_message(t('The content type %name has been updated.', $t_args));
-  }
-  elseif ($status == SAVED_NEW) {
+  if ($status == SAVED_NEW) {
     node_add_body_field($type);
     drupal_set_message(t('The content type %name has been added.', $t_args));
     watchdog('node', 'Added content type %name.', $t_args, WATCHDOG_NOTICE, l(t('view'), 'admin/structure/types'));
   }
+  else {
+    drupal_set_message(t('The content type %name has been updated.', $t_args));
+  }
 
   $form_state['redirect'] = 'admin/structure/types';
-  return;
 }
 
 /**
Index: modules/taxonomy/taxonomy.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.admin.inc,v
retrieving revision 1.107
diff -u -p -r1.107 taxonomy.admin.inc
--- modules/taxonomy/taxonomy.admin.inc	31 Jul 2010 13:01:50 -0000	1.107
+++ modules/taxonomy/taxonomy.admin.inc	25 Aug 2010 21:17:25 -0000
@@ -229,16 +229,15 @@ function taxonomy_form_vocabulary_submit
   if ($vocabulary->machine_name != $old_machine_name) {
     field_attach_rename_bundle('taxonomy_term', $old_machine_name, $vocabulary->machine_name);
   }
-  switch (taxonomy_vocabulary_save($vocabulary)) {
-    case SAVED_NEW:
-      drupal_set_message(t('Created new vocabulary %name.', array('%name' => $vocabulary->name)));
-      watchdog('taxonomy', 'Created new vocabulary %name.', array('%name' => $vocabulary->name), WATCHDOG_NOTICE, l(t('edit'), 'admin/structure/taxonomy/' . $vocabulary->machine_name . '/edit'));
-      break;
 
-    case SAVED_UPDATED:
-      drupal_set_message(t('Updated vocabulary %name.', array('%name' => $vocabulary->name)));
-      watchdog('taxonomy', 'Updated vocabulary %name.', array('%name' => $vocabulary->name), WATCHDOG_NOTICE, l(t('edit'), 'admin/structure/taxonomy/' . $vocabulary->machine_name . '/edit'));
-      break;
+  $status = taxonomy_vocabulary_save($vocabulary);
+  if ($status == SAVED_NEW) {
+    drupal_set_message(t('Created new vocabulary %name.', array('%name' => $vocabulary->name)));
+    watchdog('taxonomy', 'Created new vocabulary %name.', array('%name' => $vocabulary->name), WATCHDOG_NOTICE, l(t('edit'), 'admin/structure/taxonomy/' . $vocabulary->machine_name . '/edit'));
+  }
+  else {
+    drupal_set_message(t('Updated vocabulary %name.', array('%name' => $vocabulary->name)));
+    watchdog('taxonomy', 'Updated vocabulary %name.', array('%name' => $vocabulary->name), WATCHDOG_NOTICE, l(t('edit'), 'admin/structure/taxonomy/' . $vocabulary->machine_name . '/edit'));
   }
 
   $form_state['values']['vid'] = $vocabulary->vid;
@@ -833,17 +832,15 @@ function taxonomy_form_term_submit($form
   $term = $form['#builder_function']($form, $form_state);
 
   $status = taxonomy_term_save($term);
-  switch ($status) {
-    case SAVED_NEW:
-      drupal_set_message(t('Created new term %term.', array('%term' => $term->name)));
-      watchdog('taxonomy', 'Created new term %term.', array('%term' => $term->name), WATCHDOG_NOTICE, l(t('edit'), 'taxonomy/term/' . $term->tid . '/edit'));
-      break;
-    case SAVED_UPDATED:
-      drupal_set_message(t('Updated term %term.', array('%term' => $term->name)));
-      watchdog('taxonomy', 'Updated term %term.', array('%term' => $term->name), WATCHDOG_NOTICE, l(t('edit'), 'taxonomy/term/' . $term->tid . '/edit'));
-      // Clear the page and block caches to avoid stale data.
-      cache_clear_all();
-      break;
+  if ($status == SAVED_NEW) {
+    drupal_set_message(t('Created new term %term.', array('%term' => $term->name)));
+    watchdog('taxonomy', 'Created new term %term.', array('%term' => $term->name), WATCHDOG_NOTICE, l(t('edit'), 'taxonomy/term/' . $term->tid . '/edit'));
+  }
+  else {
+    drupal_set_message(t('Updated term %term.', array('%term' => $term->name)));
+    watchdog('taxonomy', 'Updated term %term.', array('%term' => $term->name), WATCHDOG_NOTICE, l(t('edit'), 'taxonomy/term/' . $term->tid . '/edit'));
+    // Clear the page and block caches to avoid stale data.
+    cache_clear_all();
   }
 
   $current_parent_count = count($form_state['values']['parent']);
Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.1195
diff -u -p -r1.1195 user.module
--- modules/user/user.module	23 Aug 2010 14:53:50 -0000	1.1195
+++ modules/user/user.module	25 Aug 2010 21:18:14 -0000
@@ -2743,12 +2743,14 @@ function user_role_save($role) {
     $role->weight = $query->execute()->fetchField() + 1;
   }
   if (!empty($role->rid) && $role->name) {
-    $status = drupal_write_record('role', $role, 'rid');
+    drupal_write_record('role', $role, 'rid');
     module_invoke_all('user_role_update', $role);
+    $status = SAVED_UPDATED;
   }
   else {
-    $status = drupal_write_record('role', $role);
+    drupal_write_record('role', $role);
     module_invoke_all('user_role_insert', $role);
+    $status = SAVED_NEW;
   }
 
   // Clear the user access cache.
