Skip to:
Content

bbPress.org

Changeset 4999


Ignore:
Timestamp:
06/24/2013 05:09:00 AM (11 years ago)
Author:
johnjamesjacoby
Message:

Since search requests get existing data, and do not post new data, revert part of r4997 and switch request method back to "get".

Add hidden 'action' field to form-search.php template-part, and move 'bbp_search_results_redirect' action from 'bbp_post_request' to 'bbp_get_request'.

Fixes issue with request not redirecting properly, and uses more accurate form method. See #2337.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/core/actions.php

    r4997 r4999  
    284284
    285285// Theme-side POST requests
    286 add_action( 'bbp_post_request', 'bbp_do_ajax',                 1  );
    287 add_action( 'bbp_post_request', 'bbp_edit_topic_tag_handler',  1  );
    288 add_action( 'bbp_post_request', 'bbp_edit_user_handler',       1  );
    289 add_action( 'bbp_post_request', 'bbp_edit_forum_handler',      1  );
    290 add_action( 'bbp_post_request', 'bbp_edit_reply_handler',      1  );
    291 add_action( 'bbp_post_request', 'bbp_edit_topic_handler',      1  );
    292 add_action( 'bbp_post_request', 'bbp_merge_topic_handler',     1  );
    293 add_action( 'bbp_post_request', 'bbp_split_topic_handler',     1  );
    294 add_action( 'bbp_post_request', 'bbp_move_reply_handler',      1  );
    295 add_action( 'bbp_post_request', 'bbp_new_forum_handler',       10 );
    296 add_action( 'bbp_post_request', 'bbp_new_reply_handler',       10 );
    297 add_action( 'bbp_post_request', 'bbp_new_topic_handler',       10 );
    298 add_action( 'bbp_post_request', 'bbp_search_results_redirect', 10 );
     286add_action( 'bbp_post_request', 'bbp_do_ajax',                1  );
     287add_action( 'bbp_post_request', 'bbp_edit_topic_tag_handler', 1  );
     288add_action( 'bbp_post_request', 'bbp_edit_user_handler',      1  );
     289add_action( 'bbp_post_request', 'bbp_edit_forum_handler',     1  );
     290add_action( 'bbp_post_request', 'bbp_edit_reply_handler',     1  );
     291add_action( 'bbp_post_request', 'bbp_edit_topic_handler',     1  );
     292add_action( 'bbp_post_request', 'bbp_merge_topic_handler',    1  );
     293add_action( 'bbp_post_request', 'bbp_split_topic_handler',    1  );
     294add_action( 'bbp_post_request', 'bbp_move_reply_handler',     1  );
     295add_action( 'bbp_post_request', 'bbp_new_forum_handler',      10 );
     296add_action( 'bbp_post_request', 'bbp_new_reply_handler',      10 );
     297add_action( 'bbp_post_request', 'bbp_new_topic_handler',      10 );
    299298
    300299// Theme-side GET requests
    301 add_action( 'bbp_get_request', 'bbp_toggle_topic_handler',   1  );
    302 add_action( 'bbp_get_request', 'bbp_toggle_reply_handler',   1  );
    303 add_action( 'bbp_get_request', 'bbp_favorites_handler',      1  );
    304 add_action( 'bbp_get_request', 'bbp_subscriptions_handler',  1  );
     300add_action( 'bbp_get_request', 'bbp_toggle_topic_handler',    1  );
     301add_action( 'bbp_get_request', 'bbp_toggle_reply_handler',    1  );
     302add_action( 'bbp_get_request', 'bbp_favorites_handler',       1  );
     303add_action( 'bbp_get_request', 'bbp_subscriptions_handler',   1  );
     304add_action( 'bbp_get_request', 'bbp_search_results_redirect', 10 );
    305305
    306306// Maybe convert the users password
  • trunk/templates/default/bbpress/form-search.php

    r4997 r4999  
    1010?>
    1111
    12 <form role="search" method="post" id="bbp-search-form" action="<?php bbp_search_url(); ?>">
     12<form role="search" method="get" id="bbp-search-form" action="<?php bbp_search_url(); ?>">
    1313    <div>
    1414        <label class="screen-reader-text hidden" for="bbp_search"><?php _e( 'Search for:', 'bbpress' ); ?></label>
     15        <input type="hidden" name="action" value="bbp-search-request" />
    1516        <input tabindex="<?php bbp_tab_index(); ?>" type="text" value="<?php echo esc_attr( bbp_get_search_terms() ); ?>" name="bbp_search" id="bbp_search" />
    1617        <input tabindex="<?php bbp_tab_index(); ?>" class="button" type="submit" id="bbp_search_submit" value="<?php esc_attr_e( 'Search', 'bbpress' ); ?>" />
Note: See TracChangeset for help on using the changeset viewer.