summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlarowlan2017-06-06 16:18:15 (GMT)
committerolstjos2017-06-06 16:18:15 (GMT)
commit621c51e752c2963e3755286c237948294c1d6005 (patch)
tree6e266a98d6472766700118ff80913d5dd7867f6b
parent9f95d03e3fc4259246af88faf9d521dc02627d89 (diff)
Issue #2479473 by deviantintegral, larowlan: Add the field name to the media upload parameters
-rw-r--r--includes/media.fields.inc1
-rw-r--r--media.module1
-rw-r--r--tests/media.test1
3 files changed, 3 insertions, 0 deletions
diff --git a/includes/media.fields.inc b/includes/media.fields.inc
index 65e0e74..e4f7a2e 100644
--- a/includes/media.fields.inc
+++ b/includes/media.fields.inc
@@ -116,6 +116,7 @@ function media_field_widget_form(&$form, &$form_state, $field, $instance, $langc
'max_filesize' => isset($field_settings['max_filesize']) ? $field_settings['max_filesize'] : 0,
'uri_scheme' => !empty($field['settings']['uri_scheme']) ? $field['settings']['uri_scheme'] : file_default_scheme(),
'multiselect' => $multiselect,
+ 'field' => $field['field_name'],
),
),
// Allows this field to return an array instead of a single value.
diff --git a/media.module b/media.module
index f008116..ba986a3 100644
--- a/media.module
+++ b/media.module
@@ -1221,6 +1221,7 @@ function media_set_browser_params() {
'fid',
'id',
'multiselect',
+ 'field',
'options',
'plugins',
'render',
diff --git a/tests/media.test b/tests/media.test
index a60e3ad..1e822ea 100644
--- a/tests/media.test
+++ b/tests/media.test
@@ -1001,6 +1001,7 @@ class MediaElementSettingsTestCase extends MediaFileFieldTestCase {
'max_filesize' => '',
'uri_scheme' => 'public',
'multiselect' => $multiselect,
+ 'field' => $field_name,
),
),
),