You are here

function shoutbox_shout_load in Shoutbox 7.2

Same name and namespace in other branches
  1. 7 shoutbox.module \shoutbox_shout_load()

Load a shout by shout id.

Parameters

$shout_id: The shout ID

Return value

The shout object, or FALSE is none

3 calls to shoutbox_shout_load()
shoutbox_delete_form_submit in ./shoutbox.pages.inc
Handle the delete form submission.
shoutbox_edit_form_submit in ./shoutbox.pages.inc
Handle the edit form submission.
shoutbox_moderate_shout in ./shoutbox.module
Alter the moderation status of a shout.

File

./shoutbox.module, line 119
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_shout_load($shout_id) {
  $shout = FALSE;
  if (is_numeric($shout_id)) {
    $shout = db_query("SELECT * FROM {shoutbox} WHERE shout_id = :shout_id", array(
      ':shout_id' => $shout_id,
    ))
      ->fetchObject();
  }
  return $shout;
}