You are here

function smileys_admin_delete in Smileys 5

Same name and namespace in other branches
  1. 6 smileys.admin.inc \smileys_admin_delete()
2 calls to smileys_admin_delete()
smileys_admin_delete_confirm_submit in ./smileys.module
smileys_admin_form_submit in ./smileys.module
Implementation of hook_submit().

File

./smileys.module, line 461

Code

function smileys_admin_delete($sid) {
  $smiley_id = $sid ? $sid : arg(4);
  $smiley = db_fetch_array(db_query('SELECT * FROM {smileys} WHERE id = %d', $smiley_id));
  if ($smiley_id) {
    db_query("DELETE FROM {smileys} WHERE id = %d", $smiley_id);
    $message = t('Deleted smiley: %smiley', array(
      '%smiley' => $smiley['acronyms'],
    ));
    drupal_set_message($message);
  }
  drupal_goto('admin/settings/smileys');
}