function webfm_default_file_perm in Web File Manager 5
Helper function to set default file permissions
1 call to webfm_default_file_perm()
- webfm_dbinsert_file in ./
webfm.module - webfm_dbinsert_file - inserts a file object into the webfm_file table
File
- ./
webfm.module, line 2039
Code
function webfm_default_file_perm() {
$perm = (int) (variable_get('webfm_file_perm_role', '') ? WEBFM_FILE_ACCESS_ROLE_VIEW : 0);
$perm += (int) (variable_get('webfm_file_perm_mod', '') ? WEBFM_FILE_ACCESS_ROLE_FULL : 0);
$perm += (int) (variable_get('webfm_file_perm_attach', '') ? WEBFM_FILE_ACCESS_ROLE_ATTACH : 0);
$perm += (int) (variable_get('webfm_file_public', '') ? WEBFM_FILE_ACCESS_PUBLIC_VIEW : 0);
return $perm;
}