Ejemplo n.º 1
0
/**
 * Renders form with a list of available database updates.
 */
function update_selection_page()
{
    backdrop_set_title('Backdrop database update');
    $elements = backdrop_get_form('update_script_selection_form');
    $output = backdrop_render($elements);
    update_task_list('select');
    return $output;
}
Ejemplo n.º 2
0
        }
        if (!empty($results['page_message'])) {
            backdrop_set_message($results['page_message']['message'], $results['page_message']['type']);
        }
        $output = theme('authorize_report', array('messages' => $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'), '<front>')));
        }
        $output .= theme('item_list', array('items' => $links, 'title' => t('Next steps')));
    } 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 = backdrop_get_form('authorize_filetransfer_form');
            $output = backdrop_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));
}