function filebrowser_form_create_folder_validate in Filebrowser 7.4
Same name and namespace in other branches
- 8 filebrowser.module \filebrowser_form_create_folder_validate()
- 6.2 filebrowser.form.create_folder.inc \filebrowser_form_create_folder_validate()
- 7.2 filebrowser.module \filebrowser_form_create_folder_validate()
- 7.3 filebrowser.module \filebrowser_form_create_folder_validate()
Implements hook_validate() for creating a folder @inheritdoc
1 string reference to 'filebrowser_form_create_folder_validate'
File
- ./
filebrowser.module, line 783
Code
function filebrowser_form_create_folder_validate($form, $form_state) {
$node = $form_state['values']['node'];
_filebrowser_load_files($node);
$target = _filebrowser_encoding_to_fs($node, "{$node->file_listing['.']['full-path']}/{$form_state['values']['folder_name']}");
if (file_exists($target)) {
form_error($form['filebrowser_create_folder']['folder_name'], t("This folder already exists."));
}
}