function privatemsg_rename_folder_form_validate in Privatemsg 5.3
Same name and namespace in other branches
- 5 privatemsg.module \privatemsg_rename_folder_form_validate()
File
- ./
privatemsg.module, line 1303
Code
function privatemsg_rename_folder_form_validate($form_id, $form_values) {
global $user;
if (!empty($form_values['new_name']) && $form_values['new_name'] != $form_values['old_name'] && db_result(db_query("SELECT name FROM {privatemsg_folder} WHERE name = '%s' AND uid = %d", $form_values['new_name'], $user->uid))) {
form_set_error('new_name', t('A folder with this name already exists.'));
}
if (empty($form_values['new_name'])) {
form_set_error('new_name', t('You must specify a name for the new folder.'));
}
}