Index: src/wp-admin/network/themes.php
===================================================================
--- src/wp-admin/network/themes.php	(revisión: 30738)
+++ src/wp-admin/network/themes.php	(copia de trabajo)
@@ -29,12 +29,10 @@
 $referer = remove_query_arg( $temp_args, wp_get_referer() );
 
 if ( $action ) {
-	$allowed_themes = get_site_option( 'allowedthemes' );
 	switch ( $action ) {
 		case 'enable':
 			check_admin_referer('enable-theme_' . $_GET['theme']);
-			$allowed_themes[ $_GET['theme'] ] = true;
-			update_site_option( 'allowedthemes', $allowed_themes );
+			wp_network_enable_themes( $_GET['theme'] );
 			if ( false === strpos( $referer, '/network/themes.php' ) )
 				wp_redirect( network_admin_url( 'themes.php?enabled=1' ) );
 			else
@@ -42,8 +40,7 @@
 			exit;
 		case 'disable':
 			check_admin_referer('disable-theme_' . $_GET['theme']);
-			unset( $allowed_themes[ $_GET['theme'] ] );
-			update_site_option( 'allowedthemes', $allowed_themes );
+			wp_network_disable_themes( $_GET['theme'] );
 			wp_safe_redirect( add_query_arg( 'disabled', '1', $referer ) );
 			exit;
 		case 'enable-selected':
@@ -53,9 +50,7 @@
 				wp_safe_redirect( add_query_arg( 'error', 'none', $referer ) );
 				exit;
 			}
-			foreach( (array) $themes as $theme )
-				$allowed_themes[ $theme ] = true;
-			update_site_option( 'allowedthemes', $allowed_themes );
+			wp_network_enable_themes( (array) $themes );
 			wp_safe_redirect( add_query_arg( 'enabled', count( $themes ), $referer ) );
 			exit;
 		case 'disable-selected':
@@ -65,9 +60,7 @@
 				wp_safe_redirect( add_query_arg( 'error', 'none', $referer ) );
 				exit;
 			}
-			foreach( (array) $themes as $theme )
-				unset( $allowed_themes[ $theme ] );
-			update_site_option( 'allowedthemes', $allowed_themes );
+			wp_network_disable_themes( (array) $themes );
 			wp_safe_redirect( add_query_arg( 'disabled', count( $themes ), $referer ) );
 			exit;
 		case 'update-selected' :
Index: src/wp-includes/ms-functions.php
===================================================================
--- src/wp-includes/ms-functions.php	(revisión: 30738)
+++ src/wp-includes/ms-functions.php	(copia de trabajo)
@@ -2434,3 +2434,41 @@
 
 	return $site_results;
 }
+
+/**
+ * Enable a theme network widly
+ * 
+ * @param string $stylesheet Stylesheet name
+ */
+function wp_network_enable_themes( $stylesheets ) {
+
+	if ( ! is_array( $stylesheets ) )
+		$stylesheets = array( $stylesheets );
+
+	$allowed_themes = get_site_option( 'allowedthemes' );
+
+	foreach ( $stylesheets as $stylesheet )
+		$allowed_themes[ $stylesheet ] = true;
+			
+	update_site_option( 'allowedthemes', $allowed_themes );
+}
+
+/**
+ * Disable a theme network widly
+ * 
+ * @param string $stylesheet Stylesheet name
+ */
+function wp_network_disable_themes( $stylesheets ) {
+
+	if ( ! is_array( $stylesheets ) )
+		$stylesheets = array( $stylesheets );
+	
+	$allowed_themes = get_site_option( 'allowedthemes' );
+
+	foreach ( $stylesheets as $stylesheet ) {
+		if ( isset( $allowed_themes[ $stylesheet ] ) )
+			unset( $allowed_themes[ $stylesheet ] );
+	}
+
+	update_site_option( 'allowedthemes', $allowed_themes );
+}
