Ticket #3930 (closed enhancement: fixed)

Opened 2 years ago

Last modified 1 year ago

get_pagenum_link() needs some love

Reported by: markjaquith Assigned to: rob1n
Priority: low Milestone: 2.3
Component: Administration Version: 2.1.2
Severity: normal Keywords: has-patch needs-testing
Cc: rob1n

Description

get_pagenum_link() is fairly Frankenstein's Monster-ish. It isn't even using add_query_arg()

Enclosed patch is just a first attempt... I'll revisit it and clean it up, as well as address XSS-escaping.

Attachments

link-template.php.diff (4.2 kB) - added by markjaquith on 03/08/07 00:36:48.
First attempt
link-template.php.002.diff (4.2 kB) - added by markjaquith on 03/16/07 04:06:37.
Refresh
3930.diff (4.0 kB) - added by rob1n on 05/12/07 00:06:38.
fix.diff (1.7 kB) - added by rob1n on 05/15/07 14:35:05.

Change History

03/08/07 00:36:48 changed by markjaquith

  • attachment link-template.php.diff added.

First attempt

03/08/07 01:30:37 changed by ryan

Looking good so far. It's as ugly as it is because touching it often breaks something, so watch out. :-)

03/16/07 04:06:37 changed by markjaquith

  • attachment link-template.php.002.diff added.

Refresh

03/27/07 17:39:35 changed by foolswisdom

  • milestone changed from 2.2 to 2.3.

05/05/07 04:33:14 changed by rob1n

  • owner changed from markjaquith to rob1n.

Look at all that red...

05/09/07 03:02:50 changed by rob1n

  • keywords set to has-patch needs-testing.

Patch refreshed.

05/12/07 00:06:38 changed by rob1n

  • attachment 3930.diff added.

05/12/07 00:07:01 changed by rob1n

  • keywords changed from has-patch needs-testing to has-patch commit.
  • status changed from new to assigned.

Patch works fine for me.

05/12/07 00:17:34 changed by rob1n

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [5454]) Bring get_pagenum_link() into this century. Props Mark Jaquith. fixes #3930

05/14/07 22:58:07 changed by josephscott

  • status changed from closed to reopened.
  • resolution deleted.

This breaks the 'Previous Entries' link paging for categories.

05/15/07 13:41:38 changed by rob1n

  • status changed from reopened to new.

Breaks author view too.

I think remove_query_arg( 'paged' ) is removing more than paged, but I'm going to keep digging.

05/15/07 13:41:49 changed by rob1n

  • keywords deleted.

05/15/07 14:09:24 changed by rob1n

Nope. remove_query_arg() works fine. Still digging...

05/15/07 14:35:05 changed by rob1n

  • attachment fix.diff added.

05/15/07 14:35:31 changed by rob1n

  • cc set to rob1n.
  • keywords set to has-patch needs-testing.
  • status changed from new to assigned.

Alright, that seems to take care of it. Please test and report back.

05/16/07 02:47:25 changed by rob1n

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [5481]) Fix get_pagenum_link(). fixes #3930

05/26/07 11:07:10 changed by snakefoot

Just tried this new get_pagenum_link() on a Wordpress 2.0 blog, and it works fine with everything except when doing a search where it adds /page/2/ instead of &paged=2 for the following pages.

Not sure if this is an issue for Wordpress 2.3

05/30/07 17:46:16 changed by ryan

  • status changed from closed to reopened.
  • resolution deleted.

Yep, it does funky things to paging, especially once you get to page 3.

05/31/07 03:29:44 changed by rob1n

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [5610]) Fix get_pagenum_link() for query strings. fixes #3930