You are here

function privatemsg_rename_folder_form_submit in Privatemsg 5

Same name and namespace in other branches
  1. 5.3 privatemsg.module \privatemsg_rename_folder_form_submit()

File

./privatemsg.module, line 1332

Code

function privatemsg_rename_folder_form_submit($form_id, $form_values) {
  if ($form_values['new_name'] != $form_values['old_name']) {
    db_query("UPDATE {privatemsg_folder} SET name = '%s' WHERE fid = %d", $form_values['new_name'], intval(arg(2)));
    drupal_set_message(t('Folder name changed from %old_name to %new_name.', array(
      '%old_name' => $form_values['old_name'],
      '%new_name' => $form_values['new_name'],
    )));
  }
  else {
    drupal_set_message(t('Folder name left the same.'));
  }
  drupal_goto('privatemsg/folders');
}