<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[33655] trunk/src/wp-admin: Comments List Table:</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/33655">33655</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/33655","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>wonderboymusic</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2015-08-20 02:50:20 +0000 (Thu, 20 Aug 2015)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Comments List Table:
* Show count next to "Approved"
* Properly increment/decrement counts when row actions are clicked
* In `_wp_ajax_delete_comment_response()`, return the comment's `status` with the `supplemental` data
* Handle counts properly on each scenario of `undo`
See <a href="https://core.trac.wordpress.org/ticket/11200">#11200</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadminincludesajaxactionsphp">trunk/src/wp-admin/includes/ajax-actions.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpcommentslisttablephp">trunk/src/wp-admin/includes/class-wp-comments-list-table.php</a></li>
<li><a href="#trunksrcwpadminjseditcommentsjs">trunk/src/wp-admin/js/edit-comments.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadminincludesajaxactionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/ajax-actions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/ajax-actions.php 2015-08-20 02:44:39 UTC (rev 33654)
+++ trunk/src/wp-admin/includes/ajax-actions.php 2015-08-20 02:50:20 UTC (rev 33655)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -347,9 +347,22 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $url = isset( $_POST['_url'] ) ? esc_url_raw( $_POST['_url'] ) : '';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // JS didn't send us everything we need to know. Just die with success message
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( !$total || !$per_page || !$page || !$url )
- wp_die( time() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! $total || ! $per_page || ! $page || ! $url ) {
+ $time = time();
+ $comment = get_comment( $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $x = new WP_Ajax_Response( array(
+ 'what' => 'comment',
+ // Here for completeness - not used.
+ 'id' => $comment_id,
+ 'supplemental' => array(
+ 'status' => $comment ? $comment->comment_approved : '',
+ 'time' => $time
+ )
+ ) );
+ $x->send();
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> $total += $delta;
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $total < 0 )
</span><span class="cx" style="display: block; padding: 0 10px"> $total = 0;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -377,12 +390,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // The time since the last comment count.
</span><span class="cx" style="display: block; padding: 0 10px"> $time = time();
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $comment = get_comment( $comment_id );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $x = new WP_Ajax_Response( array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'what' => 'comment',
</span><span class="cx" style="display: block; padding: 0 10px"> // Here for completeness - not used.
</span><span class="cx" style="display: block; padding: 0 10px"> 'id' => $comment_id,
</span><span class="cx" style="display: block; padding: 0 10px"> 'supplemental' => array(
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'status' => $comment ? $comment->comment_approved : '',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'total_items_i18n' => sprintf( _n( '%s item', '%s items', $total ), number_format_i18n( $total ) ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'total_pages' => ceil( $total / $per_page ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'total_pages_i18n' => number_format_i18n( ceil( $total / $per_page ) ),
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpcommentslisttablephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-wp-comments-list-table.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-comments-list-table.php 2015-08-20 02:44:39 UTC (rev 33654)
+++ trunk/src/wp-admin/includes/class-wp-comments-list-table.php 2015-08-20 02:50:20 UTC (rev 33655)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -198,7 +198,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $stati = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'all' => _nx_noop('All', 'All', 'comments'), // singular not used
</span><span class="cx" style="display: block; padding: 0 10px"> 'moderated' => _n_noop('Pending <span class="count">(<span class="pending-count">%s</span>)</span>', 'Pending <span class="count">(<span class="pending-count">%s</span>)</span>'),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'approved' => _n_noop('Approved', 'Approved'), // singular not used
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'approved' => _n_noop('Approved <span class="count">(<span class="approved-count">%s</span>)</span>', 'Approved <span class="count">(<span class="approved-count">%s</span>)</span>'),
</ins><span class="cx" style="display: block; padding: 0 10px"> 'spam' => _n_noop('Spam <span class="count">(<span class="spam-count">%s</span>)</span>', 'Spam <span class="count">(<span class="spam-count">%s</span>)</span>'),
</span><span class="cx" style="display: block; padding: 0 10px"> 'trash' => _n_noop('Trash <span class="count">(<span class="trash-count">%s</span>)</span>', 'Trash <span class="count">(<span class="trash-count">%s</span>)</span>')
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span></span></pre></div>
<a id="trunksrcwpadminjseditcommentsjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/js/edit-comments.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/js/edit-comments.js 2015-08-20 02:44:39 UTC (rev 33654)
+++ trunk/src/wp-admin/js/edit-comments.js 2015-08-20 02:50:20 UTC (rev 33655)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -12,6 +12,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> perPageInput = $('input[name="_per_page"]', '#comments-form');
</span><span class="cx" style="display: block; padding: 0 10px"> pageInput = $('input[name="_page"]', '#comments-form');
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // this fires when viewing "All"
</ins><span class="cx" style="display: block; padding: 0 10px"> dimAfter = function( r, settings ) {
</span><span class="cx" style="display: block; padding: 0 10px"> var editRow, replyID, replyButton,
</span><span class="cx" style="display: block; padding: 0 10px"> c = $( '#' + settings.element );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -34,6 +35,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> diff = $('#' + settings.element).is('.' + settings.dimClass) ? 1 : -1;
</span><span class="cx" style="display: block; padding: 0 10px"> updatePending( diff );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ updateCountText( 'span.approved-count', -1 * diff );
</ins><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Send current total, page, per_page and url
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -137,54 +139,167 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ updateCountText = function( selector, diff ) {
+ $( selector ).each(function() {
+ var a = $(this), n = getCount(a) + diff;
+ if ( n < 1 ) {
+ n = 0;
+ }
+ updateCount( a, n );
+ });
+ };
+
</ins><span class="cx" style="display: block; padding: 0 10px"> // In admin-ajax.php, we send back the unix time stamp instead of 1 on success
</span><span class="cx" style="display: block; padding: 0 10px"> delAfter = function( r, settings ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- var total_items_i18n, total, spam, trash, pending,
- untrash = $(settings.target).parent().is('span.untrash'),
- unspam = $(settings.target).parent().is('span.unspam'),
- unapproved = $('#' + settings.element).is('.unapproved');
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ var total_items_i18n, total,
+ response = true === settings.parsed ? {} : settings.parsed.responses[0],
+ commentStatus = true === settings.parsed ? '' : response.supplemental.status,
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function getUpdate(s) {
- if ( $(settings.target).parent().is('span.' + s) )
- return 1;
- else if ( $('#' + settings.element).is('.' + s) )
- return -1;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ targetParent = $( settings.target ).parent(),
+ commentRow = $('#' + settings.element),
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return 0;
- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ spamDiff, trashDiff, pendingDiff, approvedDiff,
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( untrash )
- trash = -1;
- else
- trash = getUpdate('trash');
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ approved = commentRow.hasClass( 'approved' ),
+ unapproved = commentRow.hasClass( 'unapproved' ),
+ spammed = commentRow.hasClass( 'spam' ),
+ trashed = commentRow.hasClass( 'trash' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( unspam )
- spam = -1;
- else
- spam = getUpdate('spam');
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // the order of these checks is important
+ // .unspam can also have .approve or .unapprove
+ // .untrash can also have .approve or .unapprove
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $(settings.target).parent().is('span.unapprove') || ( ( untrash || unspam ) && unapproved ) ) {
- // a comment was 'deleted' from another list (e.g. approved, spam, trash) and moved to pending,
- // or a trash/spam of a pending comment was undone
- pending = 1;
- } else if ( unapproved ) {
- // a pending comment was trashed/spammed/approved
- pending = -1;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( targetParent.is( 'span.undo' ) ) {
+ // the comment was spammed
+ if ( targetParent.hasClass( 'unspam' ) ) {
+ spamDiff = -1;
+
+ if ( 'trash' === commentStatus ) {
+ trashDiff = 1;
+ } else if ( '1' === commentStatus ) {
+ approvedDiff = 1;
+ } else if ( '0' === commentStatus ) {
+ pendingDiff = 1;
+ }
+
+ // the comment was trashed
+ } else if ( targetParent.hasClass( 'untrash' ) ) {
+ trashDiff = -1;
+
+ if ( 'spam' === commentStatus ) {
+ spamDiff = 1;
+ } else if ( '1' === commentStatus ) {
+ approvedDiff = 1;
+ } else if ( '0' === commentStatus ) {
+ pendingDiff = 1;
+ }
+ }
+
+ // user clicked "Spam"
+ } else if ( targetParent.is( 'span.spam' ) ) {
+ // the comment is currently approved
+ if ( approved ) {
+ approvedDiff = -1;
+ // the comment is currently pending
+ } else if ( unapproved ) {
+ pendingDiff = -1;
+ // the comment was in the trash
+ } else if ( trashed ) {
+ trashDiff = -1;
+ }
+ // you can't spam an item on the spam screen
+ spamDiff = 1;
+
+ // user clicked "Unspam"
+ } else if ( targetParent.is( 'span.unspam' ) ) {
+ if ( approved ) {
+ pendingDiff = 1;
+ } else if ( unapproved ) {
+ approvedDiff = 1;
+ } else if ( trashed ) {
+ // the comment was previously approved
+ if ( targetParent.hasClass( 'approve' ) ) {
+ approvedDiff = 1;
+ // the comment was previously pending
+ } else if ( targetParent.hasClass( 'unapprove' ) ) {
+ pendingDiff = 1;
+ }
+ } else if ( spammed ) {
+ if ( targetParent.hasClass( 'approve' ) ) {
+ approvedDiff = 1;
+
+ } else if ( targetParent.hasClass( 'unapprove' ) ) {
+ pendingDiff = 1;
+ }
+ }
+ // you can Unspam an item on the spam screen
+ spamDiff = -1;
+
+ // user clicked "Trash"
+ } else if ( targetParent.is( 'span.trash' ) ) {
+ if ( approved ) {
+ approvedDiff = -1;
+ } else if ( unapproved ) {
+ pendingDiff = -1;
+ // the comment was in the spam queue
+ } else if ( spammed ) {
+ spamDiff = -1;
+ }
+ // you can't trash an item on the trash screen
+ trashDiff = 1;
+
+ // user clicked "Restore"
+ } else if ( targetParent.is( 'span.untrash' ) ) {
+ if ( approved ) {
+ pendingDiff = 1;
+ } else if ( unapproved ) {
+ approvedDiff = 1;
+ } else if ( trashed ) {
+ if ( targetParent.hasClass( 'approve' ) ) {
+ approvedDiff = 1;
+ } else if ( targetParent.hasClass( 'unapprove' ) ) {
+ pendingDiff = 1;
+ }
+ }
+ // you can't go from trash to spam
+ // you can untrash on the trash screen
+ trashDiff = -1;
+
+ // User clicked "Approve"
+ } else if ( targetParent.is( 'span.approve:not(.unspam):not(.untrash)' ) ) {
+ approvedDiff = 1;
+ pendingDiff = -1;
+
+ // User clicked "Unapprove"
+ } else if ( targetParent.is( 'span.unapprove:not(.unspam):not(.untrash)' ) ) {
+ approvedDiff = -1;
+ pendingDiff = 1;
+
+ // User clicked "Delete Permanently"
+ } else if ( targetParent.is( 'span.delete' ) ) {
+ if ( spammed ) {
+ spamDiff = -1;
+ } else if ( trashed ) {
+ trashDiff = -1;
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( pending )
- updatePending(pending);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( pendingDiff ) {
+ updatePending( pendingDiff );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $('span.spam-count').each( function() {
- var a = $(this), n = getCount(a) + spam;
- updateCount(a, n);
- });
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( approvedDiff ) {
+ updateCountText( 'span.approved-count', approvedDiff );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $('span.trash-count').each( function() {
- var a = $(this), n = getCount(a) + trash;
- updateCount(a, n);
- });
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( spamDiff ) {
+ updateCountText( 'span.spam-count', spamDiff );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( trashDiff ) {
+ updateCountText( 'span.trash-count', trashDiff );
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! $('#dashboard_right_now').length ) {
</span><span class="cx" style="display: block; padding: 0 10px"> total = totalInput.val() ? parseInt( totalInput.val(), 10 ) : 0;
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $(settings.target).parent().is('span.undo') )
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -195,20 +310,24 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( total < 0 )
</span><span class="cx" style="display: block; padding: 0 10px"> total = 0;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ( 'object' == typeof r ) && lastConfidentTime < settings.parsed.responses[0].supplemental.time ) {
- total_items_i18n = settings.parsed.responses[0].supplemental.total_items_i18n || '';
- if ( total_items_i18n ) {
- $('.displaying-num').text( total_items_i18n );
- $('.total-pages').text( settings.parsed.responses[0].supplemental.total_pages_i18n );
- $('.tablenav-pages').find('.next-page, .last-page').toggleClass('disabled', settings.parsed.responses[0].supplemental.total_pages == $('.current-page').val());
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( 'object' === typeof r ) {
+ if ( response.supplemental.total_items_i18n && lastConfidentTime < response.supplemental.time ) {
+ total_items_i18n = response.supplemental.total_items_i18n || '';
+ if ( total_items_i18n ) {
+ $('.displaying-num').text( total_items_i18n );
+ $('.total-pages').text( response.supplemental.total_pages_i18n );
+ $('.tablenav-pages').find('.next-page, .last-page').toggleClass('disabled', response.supplemental.total_pages == $('.current-page').val());
+ }
+ updateTotalCount( total, response.supplemental.time, true );
+ } else if ( response.supplemental.time ) {
+ updateTotalCount( total, response.supplemental.time, false );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- updateTotalCount( total, settings.parsed.responses[0].supplemental.time, true );
</del><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> updateTotalCount( total, r, false );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! theExtraList || theExtraList.size() === 0 || theExtraList.children().size() === 0 || untrash || unspam ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! theExtraList || theExtraList.size() === 0 || theExtraList.children().size() === 0 ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre>
</div>
</div>
</body>
</html>