WordPress 3.4.1
[autoinstalls/wordpress.git] / wp-admin / themes.php
index c892705ee48750b80d57285edf244877d5175ac7..cbcde87cad97217fa92f742422e85d103220db4d 100644 (file)
@@ -20,7 +20,7 @@ if ( current_user_can( 'switch_themes' ) && isset($_GET['action'] ) ) {
                $theme = wp_get_theme( $_GET['stylesheet'] );
                if ( ! $theme->exists() || ! $theme->is_allowed() )
                        wp_die( __( 'Cheatin’ uh?' ) );
-               switch_theme($_GET['template'], $_GET['stylesheet']);
+               switch_theme( $theme->get_template(), $theme->get_stylesheet() );
                wp_redirect( admin_url('themes.php?activated=true') );
                exit;
        } elseif ( 'delete' == $_GET['action'] ) {
@@ -64,6 +64,8 @@ if ( current_user_can( 'install_themes' ) ) {
        ) );
 }
 
+add_thickbox();
+
 endif; // switch_themes
 
 if ( current_user_can( 'edit_theme_options' ) ) {