You are here

function _notify_count in Notify 7

Same name and namespace in other branches
  1. 8 notify.module \_notify_count()
  2. 2.0.x notify.module \_notify_count()
  3. 1.0.x notify.module \_notify_count()

Count the carious types of content.

1 call to _notify_count()
notify_admin_queue in ./notify.admin.inc
Menu callback, show admin list of queue status.

File

./notify.module, line 516
Notify module sends e-mail digests of new content and comments.

Code

function _notify_count() {
  $np = $cp = $nn = $cn = $bu = $cu = 0;

  // Just in case.
  list($res_nodes, $res_comms, $res_nopub, $res_copub, $res_nounp, $res_counp) = _notify_select_content();
  if ($res_nodes) {
    $np = $res_nodes
      ->rowCount();
  }
  if ($res_comms) {
    $cp = $res_comms
      ->rowCount();
  }
  if ($res_nopub) {
    $nn = $res_nopub
      ->rowCount();
  }
  if ($res_copub) {
    $cn = $res_copub
      ->rowCount();
  }
  if ($res_nounp) {
    $nu = $res_nounp
      ->rowCount();
  }
  if ($res_counp) {
    $cu = $res_counp
      ->rowCount();
  }
  return array(
    $np,
    $cp,
    $nn,
    $cn,
    $nu,
    $cu,
  );
}