You are here

function shoutbox_delete_shout in Shoutbox 7.2

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

Delete a shout.

Parameters

$shout: A shout object

3 calls to shoutbox_delete_shout()
shoutbox_cron in ./shoutbox.module
Implements hook_cron().
shoutbox_delete_form_submit in ./shoutbox.pages.inc
Handle the delete form submission.
shoutbox_group_node_delete in shoutbox_group/shoutbox_group.module
Implementation of hook_node_delete()

File

./shoutbox.module, line 212
Shoutbox module displays a block for users to create short messages for the whole site. Uses AHAH to update the database and display content.

Code

function shoutbox_delete_shout($shout) {

  // Alert other modules.
  shoutbox_invoke('delete', $shout);

  // Delete shout.
  // TODO Please review the conversion of this statement to the D7 database API syntax.

  /* db_query("DELETE FROM {shoutbox} WHERE shout_id = %d", $shout->shout_id) */
  db_delete('shoutbox')
    ->condition('shout_id', $shout->shout_id)
    ->execute();
}