Fix Right Now comments counts when only one comment exists

git-svn-id: https://develop.svn.wordpress.org/trunk@12294 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2009-11-30 01:53:25 +00:00
parent a03d21af84
commit b83aada923
2 changed files with 6 additions and 8 deletions

View File

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

File diff suppressed because one or more lines are too long