You are here

function block_inject_green_light in Block Inject 7

Checks to see if there is an exception in the block_inject_exceptions table

Parameters

int $nid: The node ID of the node to check for

Returns an array with the ID of the block_inject rule

3 calls to block_inject_green_light()
block_inject_do_injection in ./block_inject.module
Helper function that prepares and calls the injection on a node.
block_inject_exceptions_list in ./block_inject.admin.inc
Callback for the Block Inject Exceptions page.
block_inject_form_node_form_alter in ./block_inject.module
Implements hook_form_FORM-ID_alter().

File

./block_inject.module, line 755
The Block Inject module functions.

Code

function block_inject_green_light($nid) {
  $result = db_select('block_inject_exceptions', 'bie')
    ->fields('bie', array(
    'bi_id',
    'except_injection',
  ))
    ->condition('nid', $nid)
    ->condition('except_injection', 1)
    ->execute()
    ->fetchAssoc();
  return $result;
}