diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/file/file.field.inc | 6 | ||||
-rw-r--r-- | modules/image/image.field.inc | 6 | ||||
-rw-r--r-- | modules/system/system.admin.inc | 10 | ||||
-rw-r--r-- | modules/system/system.module | 1 |
4 files changed, 10 insertions, 13 deletions
diff --git a/modules/file/file.field.inc b/modules/file/file.field.inc index 5a85bc0c7..97002f5ad 100644 --- a/modules/file/file.field.inc +++ b/modules/file/file.field.inc @@ -86,10 +86,8 @@ function file_field_settings_form($field, $instance, $has_data) { ); $scheme_options = array(); - foreach (file_get_stream_wrappers() as $scheme => $stream_wrapper) { - if ($scheme != 'temporary') { - $scheme_options[$scheme] = $stream_wrapper['name']; - } + foreach (file_get_stream_wrappers(STREAM_WRAPPERS_WRITE_VISIBLE) as $scheme => $stream_wrapper) { + $scheme_options[$scheme] = $stream_wrapper['name']; } $form['uri_scheme'] = array( '#type' => 'radios', diff --git a/modules/image/image.field.inc b/modules/image/image.field.inc index 1b4a96852..39fcf2c10 100644 --- a/modules/image/image.field.inc +++ b/modules/image/image.field.inc @@ -72,10 +72,8 @@ function image_field_settings_form($field, $instance) { $settings = array_merge($defaults, $field['settings']); $scheme_options = array(); - foreach (file_get_stream_wrappers() as $scheme => $stream_wrapper) { - if ($scheme != 'temporary') { - $scheme_options[$scheme] = $stream_wrapper['name']; - } + foreach (file_get_stream_wrappers(STREAM_WRAPPERS_WRITE_VISIBLE) as $scheme => $stream_wrapper) { + $scheme_options[$scheme] = $stream_wrapper['name']; } $form['uri_scheme'] = array( '#type' => 'radios', diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index be9597fdf..284d8a55f 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -1743,11 +1743,11 @@ function system_file_system_settings() { '#description' => t('A local file system path where temporary files will be stored. This directory should not be accessible over the web.'), '#after_build' => array('system_check_directory'), ); - $wrappers = file_get_stream_wrappers(); - $options = array( - 'public' => $wrappers['public']['description'], - 'private' => $wrappers['private']['description'] - ); + // Any visible, writeable wrapper can potentially be used for the files + // directory, including a remote file system that integrates with a CDN. + foreach(file_get_stream_wrappers(STREAM_WRAPPERS_WRITE_VISIBLE) as $scheme => $info) { + $options[$scheme] = $info['description']; + } $form['file_default_scheme'] = array( '#type' => 'radios', '#title' => t('Default download method'), diff --git a/modules/system/system.module b/modules/system/system.module index 3e3702746..cae7a1bb4 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -1458,6 +1458,7 @@ function system_stream_wrappers() { 'name' => t('Temporary files'), 'class' => 'DrupalTemporaryStreamWrapper', 'description' => t('Temporary local files for upload and previews.'), + 'type' => STREAM_WRAPPERS_HIDDEN, ) ); } |