diff -r 07239de796bb -r e756a8c72c3d cms/drupal/authorize.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cms/drupal/authorize.php Fri Sep 08 12:04:06 2017 +0200 @@ -0,0 +1,174 @@ + $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)); +}