function webformblock_exists in Webform Block 6.3
Same name and namespace in other branches
- 6 webformblock.module \webformblock_exists()
Calculates whether a webformblock exists for a node id.
Return value
TRUE if the webform node id is listed in the webform_block table.
6 calls to webformblock_exists()
- webformblock_delete in ./
webformblock.module - Delete a block and the reference to the webform node from the database.
- webformblock_form_alter in ./
webformblock.module - Add a checkbox on webform node editing page under 'advanced'. Allows the activating of a corresponding block
- webformblock_insert in ./
webformblock.module - Insert a block and a reference to the webform node into the database.
- webformblock_nodeapi in ./
webformblock.module - Implements hook_nodeapi().
- webformblock_nodestatus in ./
webformblock.module - Legacy function to avoid breaking sites that use this old function.
File
- ./
webformblock.module, line 201 - Expose webform nodes as Drupal blocks.
Code
function webformblock_exists($nid) {
$result = db_result(db_query("SELECT nid FROM {webform_block} WHERE nid = %d", $nid));
return $result > 0 ? TRUE : FALSE;
}