mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
fix for #317: part one, avoid activating the same plugin twice
git-svn-id: http://svn.automattic.com/wordpress/trunk@1711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8379f2deed
commit
be1a61f241
@ -8,7 +8,9 @@ if ( isset($_GET['action']) ) {
|
||||
|
||||
if ('activate' == $_GET['action']) {
|
||||
$current = get_settings('active_plugins');
|
||||
$current[] = trim( $_GET['plugin'] );
|
||||
if (!in_array($_GET['plugin'], $current)) {
|
||||
$current[] = trim( $_GET['plugin'] );
|
||||
}
|
||||
sort($current);
|
||||
update_option('active_plugins', $current);
|
||||
header('Location: plugins.php?activate=true');
|
||||
|
Loading…
x
Reference in New Issue
Block a user