Fix Right Now comments counts when only one comment exists

git-svn-id: http://svn.automattic.com/wordpress/trunk@12294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2009-11-30 01:53:25 +00:00
parent dafb319ebe
commit 1d9c71611a
2 changed files with 6 additions and 8 deletions

View File

@ -106,14 +106,12 @@ setCommentsList = function() {
total = $('span.total-count', dash); total = $('span.total-count', dash);
appr = $('span.approved-count', dash); appr = $('span.approved-count', dash);
totalN = getCount(total); totalN = getCount(total);
apprN = getCount(appr);
if ( totalN ) {
totalN = totalN + n; totalN = totalN + n;
apprN = totalN - getCount( $('span.pending-count', dash) ) - getCount( $('span.spam-count', dash) ); apprN = totalN - getCount( $('span.pending-count', dash) ) - getCount( $('span.spam-count', dash) );
updateCount(total, totalN); updateCount(total, totalN);
updateCount(appr, apprN); updateCount(appr, apprN);
}
} }
function getCount(el) { function getCount(el) {

File diff suppressed because one or more lines are too long