Network plugin activation cleanup. Props nacin. see #12139

git-svn-id: http://svn.automattic.com/wordpress/trunk@12974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-02-05 18:10:30 +00:00
parent 908a280df4
commit df305b7893
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 ) )

View File

@ -477,8 +477,8 @@ function print_plugins_table($plugins, $context = '') {
}
foreach ( (array)$plugins as $plugin_file => $plugin_data) {
$actions = array();
$is_active = is_plugin_active($plugin_file);
$is_active_for_network = is_plugin_active_for_network($plugin_file);
$is_active = $is_active_for_network || is_plugin_active( $plugin_file );
if ( $is_active_for_network && !is_super_admin() )
continue;