function media_browser_form_submit

cis7 media.module media_browser_form_submit($form, &$form_state)
cle7 media.module media_browser_form_submit($form, &$form_state)
elmsmedia7 media.module media_browser_form_submit($form, &$form_state)
icor7 media.module media_browser_form_submit($form, &$form_state)
meedjum_blog7 media.module media_browser_form_submit($form, &$form_state)
mooc7 media.module media_browser_form_submit($form, &$form_state)

Submit handler; direction form submissions in the media browser.

1 string reference to 'media_browser_form_submit'
media_form_alter in sites/all/modules/ulmus/media/media.module
Implements hook_form_alter().

File

sites/all/modules/ulmus/media/media.module, line 526
Media API

Code

function media_browser_form_submit($form, &$form_state) {
  $url = NULL;
  $parameters = array();

  // Single upload.
  if (!empty($form_state['file'])) {
    $file = $form_state['file'];
    $url = 'media/browser';
    $parameters = array('query' => array(
      'render' => 'media-popup',
      'fid' => $file->fid,
    ));
  }

  // Multi upload.
  if (!empty($form_state['files'])) {
    $files = $form_state['files'];
    $url = 'media/browser';
    $parameters = array('query' => array(
      'render' => 'media-popup',
      'fid' => array_keys($files),
    ));
  }

  // If $url is set, we had some sort of upload, so redirect the form.
  if (!empty($url)) {
    $form_state['redirect'] = array($url, $parameters);
  }
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.