You are here

function shurly_confirm_delete_form in ShURLy 6

Same name and namespace in other branches
  1. 7 shurly.module \shurly_confirm_delete_form()

Confirmation form to delete a link

1 string reference to 'shurly_confirm_delete_form'
shurly_menu in ./shurly.module
Implementation of hook_menu()

File

./shurly.module, line 157
description http://www.youtube.com/watch?v=Qo7qoonzTCE

Code

function shurly_confirm_delete_form(&$form_state, $rid) {
  $row = db_fetch_object(db_query('SELECT destination FROM {shurly} WHERE rid = %d', $rid));
  $form['rid'] = array(
    '#type' => 'value',
    '#value' => $rid,
  );

  // the 'destination' argument here is a bit of a hack...
  return confirm_form($form, t('Are you sure you want to delete and deactivate this URL?'), rawurldecode($_GET['destination']), t('You are about to deactivate the link which redirects to %url. Once this item is deleted, you will not be able to create another link with the same short URL.', array(
    '%url' => $row->destination,
  )));
}