You are here

function filebrowser_form_create_folder_validate in Filebrowser 7.3

Same name and namespace in other branches
  1. 8 filebrowser.module \filebrowser_form_create_folder_validate()
  2. 6.2 filebrowser.form.create_folder.inc \filebrowser_form_create_folder_validate()
  3. 7.4 filebrowser.module \filebrowser_form_create_folder_validate()
  4. 7.2 filebrowser.module \filebrowser_form_create_folder_validate()

Implements hook_validate() for creating a folder

1 string reference to 'filebrowser_form_create_folder_validate'
filebrowser_form_create_folder in ./filebrowser.module

File

./filebrowser.module, line 707

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."));
  }
}