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

git-svn-id: http://svn.automattic.com/wordpress/trunk@12293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz
2009-11-30 00:49:33 +00:00
parent 6aeb3bd273
commit dafb319ebe
3 changed files with 5 additions and 8 deletions

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;

File diff suppressed because one or more lines are too long