You are here

function privatemsg_devel_generate_threads in Privatemsg 7.2

Same name and namespace in other branches
  1. 6.2 privatemsg.devel_generate.inc \privatemsg_devel_generate_threads()

Mass Message Generation

1 call to privatemsg_devel_generate_threads()
privatemsg_devel_generate_form_submit in ./privatemsg.devel_generate.inc
Submit; Integrates with Devel Generate.

File

./privatemsg.devel_generate.inc, line 139

Code

function privatemsg_devel_generate_threads($form_state) {
  if ($form_state['values']['kill_content']) {
    privatemsg_devel_generate_kill_threads();
  }

  // Generate threads.
  for ($i = 1; $i <= $form_state['values']['num_threads']; $i++) {
    privatemsg_devel_generate_new_thread($form_state['values']);
  }
  drupal_set_message(format_plural($form_state['values']['num_threads'], '1 thread created.', '@count threads created'));
}