Make WordPress Core

Ticket #14897: 14897.11.diff

File 14897.11.diff, 828 bytes (added by PeteMall, 14 years ago)

Use bool for allowed themes.

  • wp-admin/network/themes.php

     
    2323        $allowed_themes = get_site_option( 'allowedthemes' );   
    2424        switch ( $action ) {
    2525                case 'network-enable':
    26                         $allowed_themes[ $_GET['theme'] ] = 1;
     26                        $allowed_themes[ $_GET['theme'] ] = true;
    2727                        update_site_option( 'allowedthemes', $allowed_themes );
    2828                        wp_redirect( wp_get_referer() ); // @todo add_query_arg for update message
    2929                        exit;                   
     
    4141                                exit;
    4242                        }                                               
    4343                        foreach( (array) $themes as $theme )
    44                                 $allowed_themes[ $theme ] = 1;
     44                                $allowed_themes[ $theme ] = true;
    4545                        update_site_option( 'allowedthemes', $allowed_themes );
    4646                        break;
    4747                case 'network-disable-selected':