You are here

function apps_profile_apps_select_form_submit in Apps 7

Submit function for apps_profile_apps_select_form.

File

./apps.profile.inc, line 247
The install functions for the Apps module.

Code

function apps_profile_apps_select_form_submit($form, &$form_state) {
  $_SESSION['apps'] = array();

  // Checking to make sure that skip was not clicked. Proceed if op is empty
  // to cover the non-interactive case where there is no op.
  if (empty($form_state['values']['op']) || $form_state['values']['op'] == t('Install Apps')) {
    $_SESSION['apps'] = array_filter($form_state['values']['apps']);

    // Determine if any apps need to be downloaded.
    apps_include('manifest');
    $installed_apps = apps_apps($_SESSION['apps_server']['machine name'], array(
      'installed' => TRUE,
    ), TRUE);
    $_SESSION['apps_downloads'] = array_diff_key($_SESSION['apps'], $installed_apps) ? TRUE : FALSE;
    $_SESSION['apps_default_content'] = $form_state['values']['default_content'];
  }
}