You are here

function simplenews_statistics_is_archived in Simplenews Statistics 7.2

Same name and namespace in other branches
  1. 7 simplenews_statistics.module \simplenews_statistics_is_archived()

Check if a given newsletter is archived.

1 call to simplenews_statistics_is_archived()
simplenews_statistics_count_opens in ./simplenews_statistics.module
Get open count for the given node.

File

./simplenews_statistics.module, line 523
Main simplenews statistics file.

Code

function simplenews_statistics_is_archived($nid) {
  $query = db_select('simplenews_statistics', 'ss')
    ->fields('ss', array(
    'archived',
  ))
    ->condition('ss.nid', $nid);
  if ($query
    ->execute()
    ->fetchField() == 1) {
    return TRUE;
  }
  return FALSE;
}