You are here

function privatemsg_delete_multiple_form in Privatemsg 5

Same name and namespace in other branches
  1. 5.3 privatemsg.module \privatemsg_delete_multiple_form()
1 string reference to 'privatemsg_delete_multiple_form'
privatemsg_delete in ./privatemsg.module

File

./privatemsg.module, line 2044

Code

function privatemsg_delete_multiple_form() {
  foreach ($_SESSION['privatemsg'] as $mid => $message) {
    if ($message['selected']) {
      $messages[] = $message['subject'];
    }
  }
  if ($_SESSION['fromfolder'] == 0) {
    $cancel_path = 'privatemsg';
  }
  else {
    $cancel_path = 'privatemsg/list/' . $_SESSION['fromfolder'];
  }
  $message = t('Are you sure you wish to delete the following messages?') . theme('item_list', $messages);
  $form = confirm_form(array(), t('Delete messages?'), $cancel_path, $message, t('Delete'), t('Cancel'), 'delete');
  return $form;
}