summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchrisgross2018-04-17 11:38:28 (GMT)
committerolstjos2018-04-17 11:38:28 (GMT)
commit0d6a770444d7061a179caf61e6b0da7d5b3fac5e (patch)
tree1a9dfe7af65caed71dfc22bd9c1486ab0394d561
parentcf39a19fb8e4348aa2cfac17bd6f945368c2bb19 (diff)
REVERT Issue #2297685 by chrisgross, joseph.olstad: Edit URI for remote files see regression #29616677.x-2.18
-rw-r--r--modules/media_internet/media_internet.module44
1 files changed, 0 insertions, 44 deletions
diff --git a/modules/media_internet/media_internet.module b/modules/media_internet/media_internet.module
index f6fd11f..a6bf5f2 100644
--- a/modules/media_internet/media_internet.module
+++ b/modules/media_internet/media_internet.module
@@ -321,47 +321,3 @@ function media_internet_add_submit($form, &$form_state) {
$form_state['storage']['upload'] = $file->fid;
}
}
-
-/**
- * Implements hook_form_FORM_ID_alter().
- */
-function media_internet_form_file_entity_edit_alter(&$form, &$form_state) {
- if (!empty($form['#entity'])) {
- $embed_code = file_create_url($form['#entity']->uri);
-
- try {
- $provider = get_class(media_internet_get_provider($embed_code));
- }
- catch (Exception $e) {
- form_set_error('embed_code', $e->getMessage());
- $provider = NULL;
- }
- if (!empty($provider) && $provider != 'MediaInternetFileHandler') {
- $form['embed_code'] = array(
- '#type' => 'textfield',
- '#title' => t('File URL'),
- '#description' => t('Enter the URL of this file.'),
- '#attributes' => array('class' => array('media-add-from-url')),
- '#maxlength' => 2083,
- '#required' => TRUE,
- '#default_value' => $embed_code,
- );
-
- $form['#validators'] = array();
-
- array_unshift($form['actions']['submit']['#validate'], 'media_internet_add_validate');
- array_unshift($form['actions']['submit']['#submit'], 'media_internet_edit_submit');
- }
- }
-}
-
-/**
- * Submit callback that updates managed file URI.
- */
-function media_internet_edit_submit($form, &$form_state) {
- $embed_code = $form_state['values']['embed_code'];
- $provider = get_class(media_internet_get_provider($embed_code));
- $handler = new $provider($embed_code);
-
- $form_state['values']['uri'] = $handler->parse($embed_code);
-}