function clamav_scheme_options_defaults in ClamAV 7
Return defaults for scheme checkboxes.
Parameters
string $type: Type of schemes; either 'local' or 'remote'.
Return value
Array of schemes which should be selected by default.
1 call to clamav_scheme_options_defaults()
- clamav_admin_settings in ./
clamav.admin.inc - Admin settings page for ClamAV
File
- ./
clamav.admin.inc, line 244 - Admin-pages for managing the ClamAV module.
Code
function clamav_scheme_options_defaults($type) {
switch ($type) {
case 'local':
$schemes = array_keys(file_get_stream_wrappers(STREAM_WRAPPERS_LOCAL));
break;
case 'remote':
$schemes = clamav_get_remote_schemes();
break;
default:
$schemes = array();
}
$defaults = array();
foreach ($schemes as $scheme) {
if (clamav_scheme_is_scannable($scheme)) {
$defaults[] = $scheme;
}
}
return $defaults;
}