You are here

function filebrowser_filebrowser_metadata_set in Filebrowser 6.2

Same name and namespace in other branches
  1. 8 filebrowser.module \filebrowser_filebrowser_metadata_set()
  2. 7.4 filebrowser.module \filebrowser_filebrowser_metadata_set()
  3. 7.2 filebrowser.module \filebrowser_filebrowser_metadata_set()
  4. 7.3 filebrowser.module \filebrowser_filebrowser_metadata_set()

File

./filebrowser.module, line 626

Code

function filebrowser_filebrowser_metadata_set($file, $metadata) {
  $base_path = _filebrowser_safe_dirname($file['full-path']);
  $data = _filebrowser_load_description_file($base_path);
  if (!isset($data['file'])) {
    $data['file'] = "{$base_path}/descript.ion";
  }
  $data['data'][$file['display-name']] = $metadata['description'];
  _filebrowser_save_description_file($data, $base_path);
  _filebrowser_load_description_file($base_path, $data);
}