diff --git a/apps.profile.inc b/apps.profile.inc index 4fd3433..3cd6205 100755 --- a/apps.profile.inc +++ b/apps.profile.inc @@ -13,7 +13,7 @@ function apps_profile_install_tasks($install_state, $apps_server) { // Only use apps forms during interactive installs. $tasks = array(); - if ($install_state['interactive']) { + if ($install_state['interactive'] || is_writable(drupal_realpath('sites/all/modules'))) { $apps_server_name = $apps_server['machine name']; $task_screen = 'apps_profile_apps_select_form_' . $apps_server_name; @@ -144,7 +144,10 @@ function apps_profile_apps_select_form($form, $form_state, &$install_state) { */ function apps_profile_apps_select_form_submit($form, &$form_state) { $_SESSION['apps'] = array(); - if ($form_state['values']['op'] == t('Install Apps')) { + // Checking to make sure that skip was not clicked. We compare the op + // against the form_state for click to handle both the interactive case + // where op is set and the non-interactive case where there is no op. + if ($form_state['values']['op'] != $form_state['values']['skip']) { $_SESSION['apps'] = array_filter($form_state['values']['apps']); $_SESSION['apps_default_content'] = $form_state['values']['default_content']; } @@ -160,7 +163,7 @@ function apps_profile_download_app_modules(&$install_state) { $apps[] = $_SESSION['apps_manifest'][$name]; } $batch = apps_download_apps_batch($apps); - + $batch['finished'] = 'apps_profile_download_batch_finished'; return $batch; } @@ -407,4 +410,4 @@ function apps_profile_get_server_name($server) { ? $t('Install @name Apps', array('@name' => $server['title'])) : $t('Install Apps'); -} \ No newline at end of file +}