Fix Right Now comments counts for trash, spam or undo.

git-svn-id: https://develop.svn.wordpress.org/trunk@12293 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2009-11-30 00:49:33 +00:00
parent 2a1dcbf551
commit a03d21af84
3 changed files with 5 additions and 8 deletions
+3 -6
View File
@@ -110,7 +110,7 @@ setCommentsList = function() {
if ( totalN ) {
totalN = totalN + n;
apprN = totalN - getCount( $('span.pending-count', dash) );
apprN = totalN - getCount( $('span.pending-count', dash) ) - getCount( $('span.spam-count', dash) );
updateCount(total, totalN);
updateCount(appr, apprN);
}
@@ -183,11 +183,8 @@ setCommentsList = function() {
});
if ( $('#dashboard_right_now').length ) {
N = spam || trash || 0;
if ( N > 0 )
dashboardTotals(-1);
else if ( N < 0 )
dashboardTotals(1);
N = trash ? -1 * trash : 0;
dashboardTotals(N);
} else {
total = totalInput.val() ? parseInt( totalInput.val(), 10 ) : 0;
total = total - spam - trash;