function _commerce_file_default_system_scheme in Commerce File 7
Returns system default file scheme
5 calls to _commerce_file_default_system_scheme()
- commerce_file_configure_line_item_type in ./
commerce_file.module - Configure a line item type
- commerce_file_field_info in includes/
commerce_file.field.inc - Implements hook_field_info().
- commerce_file_license_configure_types in includes/
commerce_file.entities.inc - Set default fields for license types
- commerce_file_update_7101 in ./
commerce_file.install - Update fields for file scheme setting on field settings only
- commerce_file_update_7109 in ./
commerce_file.install - Ensure that a default is set for progammatically created fields
File
- ./
commerce_file.module, line 1256 - Provides integration of file licenses with Commerce
Code
function _commerce_file_default_system_scheme() {
$private_schemes = _commerce_file_get_private_stream_wrappers();
$default_scheme = variable_get('file_default_scheme', NULL);
if (empty($default_scheme)) {
$default_scheme = COMMERCE_FILE_DEFAULT_SCHEME;
}
if (isset($private_schemes[$default_scheme])) {
return $default_scheme;
}
elseif (!empty($private_schemes)) {
return key($private_schemes);
}
return 'private';
}