WordPress.org

Make WordPress Core

Changeset 20639


Ignore:
Timestamp:
04/30/12 00:44:47 (3 years ago)
Author:
nacin
Message:

Default to keyword searches for the plugin and theme installers in case no search type is posted back. fixes #19619.

props georgestephanis, SergeyBiryukov for initial patches.

Location:
trunk/wp-admin/includes
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-plugin-install-list-table.php

    r20592 r20639  
    4848        switch ( $tab ) { 
    4949            case 'search': 
    50                 $type = isset( $_REQUEST['type'] ) ? stripslashes( $_REQUEST['type'] ) : ''; 
     50                $type = isset( $_REQUEST['type'] ) ? stripslashes( $_REQUEST['type'] ) : 'term'; 
    5151                $term = isset( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : ''; 
    5252 
  • trunk/wp-admin/includes/class-wp-theme-install-list-table.php

    r20592 r20639  
    6060        switch ( $tab ) { 
    6161            case 'search': 
    62                 $type = isset( $_REQUEST['type'] ) ? stripslashes( $_REQUEST['type'] ) : ''; 
     62                $type = isset( $_REQUEST['type'] ) ? stripslashes( $_REQUEST['type'] ) : 'term'; 
    6363                switch ( $type ) { 
    6464                    case 'tag': 
  • trunk/wp-admin/includes/plugin-install.php

    r20592 r20639  
    117117 */ 
    118118function install_search_form( $type_selector = true ) { 
    119     $type = isset($_REQUEST['type']) ? stripslashes( $_REQUEST['type'] ) : ''; 
     119    $type = isset($_REQUEST['type']) ? stripslashes( $_REQUEST['type'] ) : 'term'; 
    120120    $term = isset($_REQUEST['s']) ? stripslashes( $_REQUEST['s'] ) : ''; 
    121121 
  • trunk/wp-admin/includes/theme-install.php

    r20592 r20639  
    5151 */ 
    5252function install_theme_search_form( $type_selector = true ) { 
    53     $type = isset( $_REQUEST['type'] ) ? stripslashes( $_REQUEST['type'] ) : ''; 
     53    $type = isset( $_REQUEST['type'] ) ? stripslashes( $_REQUEST['type'] ) : 'term'; 
    5454    $term = isset( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : ''; 
    5555    if ( ! $type_selector ) 
Note: See TracChangeset for help on using the changeset viewer.