You are here

function _simplenews_scheduler_get_pid in Simplenews Scheduler 6

Same name and namespace in other branches
  1. 6.2 simplenews_scheduler.module \_simplenews_scheduler_get_pid()
  2. 7 simplenews_scheduler.module \_simplenews_scheduler_get_pid()

Helper fucntion to get the identifier of newsletter.

2 calls to _simplenews_scheduler_get_pid()
simplenews_scheduler_node_page in ./simplenews_scheduler.module
Menu callback to provide an overview page with the scheduled newsletters.
_simplenews_scheduler_tab_permission in ./simplenews_scheduler.module
Check whether to display the Scheduled Newsletter tab.

File

./simplenews_scheduler.module, line 393
Simplenews Scheduler module allows a schedule to be set for sending (and resending) a Simplenews item.

Code

function _simplenews_scheduler_get_pid($node) {

  // First assume this is a newsletter edition,
  if ($node->simplenews_scheduler_edition) {
    $nid = $node->simplenews_scheduler_edition['pid'];
  }
  elseif ($node->simplenews_scheduler) {
    $nid = $node->nid;
  }
  return $nid;
}