Index: wp-admin/includes/plugin.php
===================================================================
--- wp-admin/includes/plugin.php	(revision 30027)
+++ wp-admin/includes/plugin.php	(working copy)
@@ -650,6 +650,23 @@
 			 *                                     or just the current site. Multisite only. Default is false.
 			 */
 			do_action( 'deactivate_plugin', $plugin, $network_deactivating );
+
+			/**
+			 * Fires as a specific plugin is being deactivated.
+			 *
+			 * This hook is the "deactivation" hook used internally by
+			 * register_deactivation_hook(). The dynamic portion of the
+			 * hook name, $plugin, refers to the plugin basename.
+			 *
+			 * If a plugin is silently deactivated (such as during an update),
+			 * this hook does not fire.
+			 *
+			 * @since 2.0.0
+			 *
+			 * @param bool $network_deactivating Whether the plugin is deactivated for all sites in the network
+			 *                                   or just the current site. Multisite only. Default is false.
+			 */
+			do_action( 'deactivate_' . $plugin, $network_deactivating );
 		}
 
 		if ( false !== $network_wide ) {
@@ -669,24 +686,17 @@
 			}
 		}
 
-		if ( ! $silent ) {
-			/**
-			 * Fires as a specific plugin is being deactivated.
-			 *
-			 * This hook is the "deactivation" hook used internally by
-			 * register_deactivation_hook(). The dynamic portion of the
-			 * hook name, $plugin, refers to the plugin basename.
-			 *
-			 * If a plugin is silently deactivated (such as during an update),
-			 * this hook does not fire.
-			 *
-			 * @since 2.0.0
-			 *
-			 * @param bool $network_deactivating Whether the plugin is deactivated for all sites in the network
-			 *                                   or just the current site. Multisite only. Default is false.
-			 */
-			do_action( 'deactivate_' . $plugin, $network_deactivating );
+	}
 
+	if ( $do_blog ) {
+		update_option('active_plugins', $current);
+	}
+	if ( $do_network ) {
+		update_site_option( 'active_sitewide_plugins', $network_current );
+	}
+
+	if ( ! $silent ) {
+
 			/**
 			 * Fires after a plugin is deactivated.
 			 *
@@ -701,12 +711,6 @@
 			 */
 			do_action( 'deactivated_plugin', $plugin, $network_deactivating );
 		}
-	}
-
-	if ( $do_blog )
-		update_option('active_plugins', $current);
-	if ( $do_network )
-		update_site_option( 'active_sitewide_plugins', $network_current );
 }
 
 /**
