From fc4f046efa8143ebc84c4ed5c44239fa0ea6f362 Mon Sep 17 00:00:00 2001 From: donncha Date: Tue, 7 Aug 2007 09:39:00 +0000 Subject: Fix the allowed_themes loop (fixes #369, props aydos) git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1019 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-admin/admin-db.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'wp-admin/admin-db.php') diff --git a/wp-admin/admin-db.php b/wp-admin/admin-db.php index d296e74..662d56f 100644 --- a/wp-admin/admin-db.php +++ b/wp-admin/admin-db.php @@ -676,15 +676,15 @@ function get_site_allowed_themes() { $allowed_themes = get_site_option( "allowed_themes" ); // convert old allowed_themes format if( !is_array( $allowed_themes ) ) { $allowed_themes = array(); - continue; - } - foreach( $themes as $key => $theme ) { - $theme_key = wp_specialchars( $theme[ 'Stylesheet' ] ); - if( isset( $allowed_themes[ $key ] ) == true ) { - $allowedthemes[ $theme_key ] = 1; + } else { + foreach( $themes as $key => $theme ) { + $theme_key = wp_specialchars( $theme[ 'Stylesheet' ] ); + if( isset( $allowed_themes[ $key ] ) == true ) { + $allowedthemes[ $theme_key ] = 1; + } } + $allowed_themes = $allowedthemes; } - $allowed_themes = $allowedthemes; } return $allowed_themes; -- cgit