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:
michelvaldrighi 2004-09-26 18:12:12 +00:00
parent 8379f2deed
commit be1a61f241
1 changed files with 3 additions and 1 deletions

View File

@ -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');