[wp-trac] [WordPress Trac] #17285: Pagination of plugins search results does not work

WordPress Trac wp-trac at lists.automattic.com
Thu May 5 05:37:07 UTC 2011


#17285: Pagination of plugins search results does not work
----------------------------+-----------------------
 Reporter:  pavelevap       |       Owner:  dd32
     Type:  defect (bug)    |      Status:  accepted
 Priority:  normal          |   Milestone:  3.2
Component:  Administration  |     Version:  3.1
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |
----------------------------+-----------------------
Changes (by dd32):

 * keywords:  needs-patch => has-patch
 * owner:   => dd32
 * status:  new => accepted


Comment:

 Since the list tables have no filters of any kind on the pagination, it's
 a bit hard to do this any other way.

 I seem to recall something bad about modifying $_SERVER['REQUEST_URI']
 with add_query_arg(), but I can't remember what it was; So this is my
 patch: (Any comments?)

 {{{
 #!text/x-diff
 Index: /wp-admin/includes/class-wp-plugins-list-table.php
 ===================================================================
 --- /wp-admin/includes/class-wp-plugins-list-table.php  (revision 17806)
 +++ /wp-admin/includes/class-wp-plugins-list-table.php  (working copy)
 @@ -21,6 +21,10 @@
                 if ( $status != $default_status && 'search' != $status )
                         update_user_meta( get_current_user_id(),
 'plugins_last_view', $status );

 +
 +               if ( isset($_REQUEST['s']) )
 +                       $_SERVER['REQUEST_URI'] = add_query_arg('s',
 stripslashes($_REQUEST['s']) );
 +
                 $page = $this->get_pagenum();

                 parent::__construct( array(
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17285#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list