You are here

function _privatemsg_move_folder in Privatemsg 5.3

Same name and namespace in other branches
  1. 5 privatemsg.module \_privatemsg_move_folder()
1 call to _privatemsg_move_folder()
privatemsg_list_form_submit in ./privatemsg.module

File

./privatemsg.module, line 1087

Code

function _privatemsg_move_folder($where, $args, $fid, $extra_folders) {
  array_unshift($args, $fid);
  db_query('UPDATE {privatemsg} SET folder = %d ' . $where, $args);
  $msg_count = count($args);
  $folder = $extra_folders[$fid];
  $link = l(t('%folder', array(
    '%folder' => $folder,
  )), 'privatemsg/list/' . $fid, array(), NULL, NULL, FALSE, TRUE);
  if ($msg_count == 1) {
    drupal_set_message(t('Your message has been moved to !link.', array(
      '!link' => $link,
    )));
  }
  elseif ($msg_count > 1) {
    drupal_set_message(t('Your messages have been moved to !link.', array(
      '!link' => $link,
    )));
  }
}