function _filebrowser_save_description_file in Filebrowser 7.2
Same name and namespace in other branches
- 8 filebrowser.common.inc \_filebrowser_save_description_file()
- 6.2 includes/metadata.inc \_filebrowser_save_description_file()
- 7.4 filebrowser.common.inc \_filebrowser_save_description_file()
- 7.3 filebrowser.common.inc \_filebrowser_save_description_file()
1 call to _filebrowser_save_description_file()
File
- ./
filebrowser.common.inc, line 506 - Misc filebrowser common functions.
Code
function _filebrowser_save_description_file($data) {
$output = array();
foreach ($data['data'] as $key => $value) {
$value = str_replace(array(
"\r\n",
"\n",
), array(
'\\n',
'\\n',
), $value);
$output[] = "\"{$key}\"\t{$value}";
}
file_put_contents($data['file'], implode("\n", $output));
}