$results['messages'])); $links = array(); if (is_array($results['tasks'])) { $links += $results['tasks']; } else { $links = array_merge($links, array( l(t('Administration pages'), 'admin'), l(t('Front page'), ''), )); } $output .= theme('item_list', array('items' => $links, 'title' => t('Next steps'))); } // If a batch is running, let it run. elseif (isset($_GET['batch'])) { $output = _batch_page(); } else { if (empty($_SESSION['authorize_operation']) || empty($_SESSION['authorize_filetransfer_info'])) { $output = t('It appears you have reached this page in error.'); } elseif (!$batch = batch_get()) { // We have a batch to process, show the filetransfer form. $elements = drupal_get_form('authorize_filetransfer_form'); $output = drupal_render($elements); } } // We defer the display of messages until all operations are done. $show_messages = !(($batch = batch_get()) && isset($batch['running'])); } else { $output = authorize_access_denied_page(); } if (!empty($output)) { print theme('update_page', array('content' => $output, 'show_messages' => $show_messages)); }