You are here

function _publication_date_get_date in Publication Date 6

Same name and namespace in other branches
  1. 7.2 publication_date.module \_publication_date_get_date()
  2. 7 publication_date.module \_publication_date_get_date()

Return value

the publication date for the given node, or false if the node is not published

1 call to _publication_date_get_date()
publication_date_nodeapi in ./publication_date.module
Implementation of hook_nodeapi(). After each modification / insert / delete, update the publication date

File

./publication_date.module, line 53
Add a field containing the publication date.

Code

function _publication_date_get_date($nid) {
  $date = db_result(db_query("SELECT published_at FROM {publication_date} WHERE nid = %d", $nid));
  return $date;
}