You are here

function _simpleads_get_node_status in SimpleAds 7

Check SimpleAds node status

1 call to _simpleads_get_node_status()
_simpleads_activate_deactive_ad in includes/simpleads.helper.inc
Helper function. Returns node object if not executed in hook_cron().

File

includes/simpleads.helper.inc, line 499
SimpleAds Helper functions.

Code

function _simpleads_get_node_status($nid) {
  $node_status = db_select('node', 'n')
    ->fields('n', array(
    'status',
  ))
    ->condition('n.nid', $nid)
    ->execute()
    ->fetchField();
  return (int) $node_status;
}