[wp-trac] [WordPress Trac] #15530: AJAX trashing of comments doesn't update on screen comment count
WordPress Trac
wp-trac at lists.automattic.com
Sat Jan 22 06:10:56 UTC 2011
#15530: AJAX trashing of comments doesn't update on screen comment count
-----------------------------------------------+-----------------------
Reporter: johnbillion | Owner: garyc40
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 3.1
Component: Administration | Version: 3.1
Severity: minor | Resolution:
Keywords: has-patch commit no-really-commit |
-----------------------------------------------+-----------------------
Changes (by nacin):
* keywords: has-patch commit => has-patch commit no-really-commit
Comment:
Latest patch, [attachment:15530.6.diff], is the result of more than four
hours of iterations. koopersmith assisted. I also pulled in mdawaffe as he
knew the history of the comment counts: [10204/trunk/wp-admin/admin-
ajax.php]. As we continued, we noticed particular bugs that garyc40 also
ran into, and thus I largely incorporated his fixes where appropriate.
In a nutshell, this patch fixes pagination for comment moderation. Some
major points:
- It does not remove a chunk of code from the ajax handler. It keeps the
client in sync as before, using the original code with a twist. We now
always send an ajax response, rather than a `die( time() )`, but still
avoids the comment counts in most situations.
- It avoids touching any list table logic, as we can play dumb and just
use the arguments we get from the client.
- It avoids messing with any pagination links themselves, with the
exception of the disabled class for the next and last links. Clicking
these will redirect you to the last page anyway (even if out of bounds),
so I'm perfectly happy with that behavior for 3.1.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15530#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list