diff --git a/includes/media.browser.inc b/includes/media.browser.inc index 3329c96..fd91c17 100644 --- a/includes/media.browser.inc +++ b/includes/media.browser.inc @@ -26,7 +26,7 @@ function media_browser($selected = NULL) { elseif ($v === 'false') { $params[$k] = FALSE; } } - array_walk_recursive($params, '_media_recursive_check_plain'); + array_walk_recursive($params, 'media_recursive_check_plain'); $params = media_set_browser_params($params); // If one or more files have been selected, the browser interaction is now @@ -197,18 +197,6 @@ function media_get_browser_params() { } /** - * Silly function to recursively run check_plain on an array. - * - * There is probably something in core I am not aware of that does this. - * - * @param $value - * @param $key - */ -function _media_recursive_check_plain(&$value, $key) { - $value = check_plain($value); -} - -/** * Attaches media browser javascript to an element. * * @param $element diff --git a/media.media.inc b/media.media.inc index 8e3e0cb..655bfca 100644 --- a/media.media.inc +++ b/media.media.inc @@ -52,7 +52,7 @@ function media_query_media_browser_alter($query) { $params = drupal_get_query_parameters(); // How do we validate these? I don't know. // I think PDO should protect them, but I'm not 100% certain. - array_walk_recursive($params, '_media_recursive_check_plain'); + array_walk_recursive($params, 'media_recursive_check_plain'); $remote_types = !empty($params['types']) ? $params['types'] : NULL; $url_include_patterns = !empty($params['url_include_patterns']) ? $params['url_include_patterns'] : NULL; diff --git a/media.module b/media.module index 4ef9f00..3ed6409 100644 --- a/media.module +++ b/media.module @@ -886,6 +886,18 @@ function media_parse_to_file($url) { } /** + * Silly function to recursively run check_plain on an array. + * + * There is probably something in core I am not aware of that does this. + * + * @param $value + * @param $key + */ +function media_recursive_check_plain(&$value, $key) { + $value = check_plain($value); +} + +/** * Implements hook_element_info(). */ function media_element_info() {