Make WordPress Core

Changeset 12974


Ignore:
Timestamp:
02/05/2010 06:10:30 PM (15 years ago)
Author:
ryan
Message:

Network plugin activation cleanup. Props nacin. see #12139

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/plugin.php

    r12970 r12974  
    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
     
    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
  • trunk/wp-admin/plugins.php

    r12903 r12974  
    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() )
Note: See TracChangeset for help on using the changeset viewer.