﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
10839,Active plugins filtering for site wide plugin support,apeatling,westi,"This ticket contains the core changes needed for more robust support for site wide level plugin activation in WordPress MU.

The ticket this relates to is here:
http://trac.mu.wordpress.org/ticket/1101

By filtering the active_plugins array, we can inject site wide activated plugins into all blogs at include time. This will also allow for site wide plugins to correctly run though activate_ and deactivate_ hooks. This is important to allow the plugin manager to correctly handle site wide plugins on first install or upgrade.

There needs to be a change to the deactivate_plugins() function to accommodate for the fact that site wide plugins will not exist in the $current plugins array.

array_search() will return a value that is interpreted by array_splice() as 0 (zero) when a plugin is not found. This will then perform an incorrect splice on the $current array and cause many problems. By performing an identical check on the array_search() result we can ensure that this doesn't happen.

Patch attached for review and testing.",enhancement,closed,normal,2.9,Plugins,2.9,normal,fixed,has-patch,
