Use bool for allowed themes. Props PeteMall. see #14897

git-svn-id: http://svn.automattic.com/wordpress/trunk@16241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan
2010-11-08 19:40:05 +00:00
parent 0ea71e1e45
commit 39c1f5dc43
2 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -23,7 +23,7 @@ if ( $action ) {
$allowed_themes = get_site_option( 'allowedthemes' );
switch ( $action ) {
case 'network-enable':
$allowed_themes[ $_GET['theme'] ] = 1;
$allowed_themes[ $_GET['theme'] ] = true;
update_site_option( 'allowedthemes', $allowed_themes );
wp_redirect( wp_get_referer() ); // @todo add_query_arg for update message
exit;
@@ -41,7 +41,7 @@ if ( $action ) {
exit;
}
foreach( (array) $themes as $theme )
$allowed_themes[ $theme ] = 1;
$allowed_themes[ $theme ] = true;
update_site_option( 'allowedthemes', $allowed_themes );
break;
case 'network-disable-selected':