[wp-trac] [WordPress Trac] #8584: Update pagination links on
edit-comments when approving/deleting/etc
WordPress Trac
wp-trac at lists.automattic.com
Fri Dec 12 00:58:34 GMT 2008
#8584: Update pagination links on edit-comments when approving/deleting/etc
-------------------------+--------------------------------------------------
Reporter: mdawaffe | Owner: anonymous
Type: enhancement | Status: new
Priority: normal | Milestone: 2.8
Component: General | Version:
Severity: normal | Keywords: has-patch needs-testing
-------------------------+--------------------------------------------------
If you have 23 comments pending approval, and you approve 3 of them, the
pagination links should reflect the fact that there is now only 1 page
worth of comments.
Attached keeps track of how many total comments there are (for that
comment view: all, pending, approved...) and keeps the displayed total and
displayed page links up to date.
This also keeps the total and the pagination links up to date in the event
of new comments coming in.
Method:
1. When a comment is removed, the total decrements: no DB access needed.
2. Comment totals are calculated explicitly from the DB when:
1. The browser thinks the total number of pages is about to change.
2. Randomly at a frequency of {{{1/$per_page}}}.
The first time to reset the total and page links to the real value, the
second time to keep everyone honest.
3. All AJAX data is sent back to the browser with a timestamp, so the JS
can decide if the new total is more or less up to date than what it
thinks.
--
Ticket URL: <http://trac.wordpress.org/ticket/8584>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list