Network plugin activation cleanup. Props nacin. see #12139

git-svn-id: https://develop.svn.wordpress.org/trunk@12974 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2010-02-05 18:10:30 +00:00
parent 9db8d54976
commit 49bce47b8d
2 changed files with 6 additions and 6 deletions

View File

@@ -395,14 +395,14 @@ function deactivate_plugins( $plugins, $silent = false ) {
if ( is_plugin_active_for_network($plugin) ) {
// Deactivate network wide
$do_network = true;
unset($network_current[$plugin]);
unset( $network_current[ $plugin ] );
} else {
// Deactivate for this blog only
$do_blog = true;
$key = array_search( $plugin, (array) $current );
if ( false !== $key )
if ( false !== $key ) {
$do_blog = true;
array_splice( $current, $key, 1 );
}
}
//Used by Plugin updater to internally deactivate plugin, however, not to notify plugins of the fact to prevent plugin output.
@@ -562,7 +562,7 @@ function validate_active_plugins() {
if ( is_multisite() && is_super_admin() ) {
$network_plugins = (array) get_site_option( 'active_sitewide_plugins', array() );
$plugins = array_merge( $plugins, $network_plugins );
$plugins = array_merge( $plugins, array_keys( $network_plugins ) );
}
if ( empty( $plugins ) )