From 61059a3dc7e4b716ced355c24c2c50749bb4d83a Mon Sep 17 00:00:00 2001 From: rob1n Date: Sun, 29 Apr 2007 21:00:54 +0000 Subject: [PATCH] Check basename(). see #4169 git-svn-id: http://svn.automattic.com/wordpress/trunk@5345 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/upgrade-functions.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/wp-admin/upgrade-functions.php b/wp-admin/upgrade-functions.php index 055af65318..85a1cc478b 100644 --- a/wp-admin/upgrade-functions.php +++ b/wp-admin/upgrade-functions.php @@ -1116,9 +1116,12 @@ function wp_check_mysql_version() { function maybe_disable_automattic_widgets() { $plugins = __get_option( 'active_plugins' ); - if ( in_array( 'widgets/widgets.php', $plugins ) ) { - array_splice( $plugins, array_search( 'widgets/widgets.php', $plugins ), 1 ); - update_option( 'active_plugins', $plugins ); + foreach ( $plugins as $plugin ) { + if ( basename( $plugin ) == 'widgets.php' ) { + array_splice( $plugins, array_search( $plugin, $plugins ), 1 ); + update_option( 'active_plugins', $plugins ); + break; + } } }