function filebrowser_form_rename_validate in Filebrowser 7.3
Same name and namespace in other branches
- 7.4 filebrowser.module \filebrowser_form_rename_validate()
Validate rename form values.
File
- ./
filebrowser.module, line 986
Code
function filebrowser_form_rename_validate($form, &$form_state) {
// Do not accept path separators into new filenames.
foreach ($form_state['values']['new_names'] as $fid => $new_name) {
if (strpos($new_name, '/') !== FALSE || strpos($new_name, "\\") !== FALSE) {
form_set_error('new_names[' . $fid . ']', t('Invalid filename: :filename', array(
':filename' => $new_name,
)));
}
}
}