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']) {
|
if ('activate' == $_GET['action']) {
|
||||||
$current = get_settings('active_plugins');
|
$current = get_settings('active_plugins');
|
||||||
$current[] = trim( $_GET['plugin'] );
|
if (!in_array($_GET['plugin'], $current)) {
|
||||||
|
$current[] = trim( $_GET['plugin'] );
|
||||||
|
}
|
||||||
sort($current);
|
sort($current);
|
||||||
update_option('active_plugins', $current);
|
update_option('active_plugins', $current);
|
||||||
header('Location: plugins.php?activate=true');
|
header('Location: plugins.php?activate=true');
|
||||||
|
|
Loading…
Reference in New Issue