You are here

function reviews_reviews_pending_count in Reviews 7

Helper function to return the number of pending reviews for the current node.

1 call to reviews_reviews_pending_count()
reviews_get_reviews in includes/reviews.pages.inc
Gather reviews for current displayed node and pass to theming function.

File

includes/reviews.api.inc, line 65
This file contains API functions for the reviews system.

Code

function reviews_reviews_pending_count($nid) {
  $results = db_select('reviews', 'r')
    ->fields('r')
    ->condition('nid', $nid, '=')
    ->condition('status', 0, '=')
    ->execute()
    ->fetchAll();
  return count($results);
}