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:
parent
dafb319ebe
commit
1d9c71611a
|
@ -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
Loading…
Reference in New Issue