function privatemsg_cur_folder_form_submit in Privatemsg 5
Same name and namespace in other branches
- 5.3 privatemsg.module \privatemsg_cur_folder_form_submit()
File
- ./
privatemsg.module, line 857
Code
function privatemsg_cur_folder_form_submit($form_id, $form_values) {
switch ($form_values['op']) {
case t('Go'):
$redirect = 'privatemsg';
if ($form_values['folder_select']) {
$redirect .= '/' . (is_numeric(arg(1)) ? arg(1) : 'list');
$redirect .= '/' . $form_values['folder_select'];
}
unset($_SESSION['privatemsg_type']);
return $redirect;
case t('Filter'):
$type = $form_values['filter_type'];
// all other '_' will be handled by JS.
if ($type[0] != '_') {
if ($type == 'all types') {
unset($_SESSION['privatemsg_type']);
}
else {
$_SESSION['privatemsg_type'] = $form_values['filter_type'];
}
}
break;
}
}