Only count "posts contributed" on nodes that are published

(DBOINCP-198)
This commit is contained in:
Tristan Olive 2015-06-23 11:37:48 -04:00
parent 3f0db933e0
commit 190c2e7436
1 changed files with 5 additions and 1 deletions

View File

@ -220,9 +220,13 @@ function boincuser_user($op, &$edit, &$account, $category = NULL) {
SELECT COUNT(*) FROM {node}
WHERE uid = '%d'
AND type IN('page','story','forum','news')
AND status = 1
) AS total_posts
FROM {comments}
WHERE uid = '%d'", $account->uid, $account->uid
INNER JOIN node ON comments.nid = node.nid
WHERE comments.uid = '%d'
AND node.status = 1",
$account->uid, $account->uid
));
break;