Make WordPress Core

Ticket #12139: 12139.diff

File 12139.diff, 1.6 KB (added by nacin, 15 years ago)
  • wp-admin/includes/plugin.php

     
    395395                if ( is_plugin_active_for_network($plugin) ) {
    396396                        // Deactivate network wide
    397397                        $do_network = true;
    398                         unset($network_current[$plugin]);
     398                        unset( $network_current[ $plugin ] );
    399399                } else {
    400400                        // Deactivate for this blog only
    401                         $do_blog = true;
    402401                        $key = array_search( $plugin, (array) $current );
    403 
    404                         if ( false !== $key )
     402                        if ( false !== $key ) {
     403                                $do_blog = true;
    405404                                array_splice( $current, $key, 1 );
     405                        }
    406406                }
    407407
    408408                //Used by Plugin updater to internally deactivate plugin, however, not to notify plugins of the fact to prevent plugin output.
     
    562562
    563563        if ( is_multisite() && is_super_admin() ) {
    564564                $network_plugins = (array) get_site_option( 'active_sitewide_plugins', array() );
    565                 $plugins = array_merge( $plugins, $network_plugins );
     565                $plugins = array_merge( $plugins, array_keys( $network_plugins ) );
    566566        }
    567567
    568568        if ( empty( $plugins ) )
  • wp-admin/plugins.php

     
    477477        }
    478478        foreach ( (array)$plugins as $plugin_file => $plugin_data) {
    479479                $actions = array();
    480                 $is_active = is_plugin_active($plugin_file);
    481480                $is_active_for_network = is_plugin_active_for_network($plugin_file);
     481                $is_active = $is_active_for_network || is_plugin_active( $plugin_file );
    482482
    483483                if ( $is_active_for_network && !is_super_admin() )
    484484                        continue;