function filebrowser_filebrowser_metadata_set in Filebrowser 8
Same name and namespace in other branches
- 6.2 filebrowser.module \filebrowser_filebrowser_metadata_set()
- 7.4 filebrowser.module \filebrowser_filebrowser_metadata_set()
- 7.2 filebrowser.module \filebrowser_filebrowser_metadata_set()
- 7.3 filebrowser.module \filebrowser_filebrowser_metadata_set()
File
- ./
filebrowser.module, line 974 - Validates file path input on node form
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);
}