You are here

function hosting_wizard_hosting_init in Hosting 5

Form that confirms that cron is running, and that the platform has been successfuly verified

This page is essentially one huge page of contextual help, to ensure that everything is up and running.

File

./hosting.wizard.inc, line 399

Code

function hosting_wizard_hosting_init() {

  // @ TODO: make this coherent, and add error reporting about what went wrong, and how it needs to be fixed.
  $form = array();
  $form['intro']['#value'] = t('<p>The hosting framework provides the user interface used to administer your sites.
    All components of the managed sites from the database and web servers, to the packages installed
    on them, to the sites themselves are represented by the hosting framework as nodes.
    This step is going to ensure that it is correctly initialized.</p>');
  $form['cron'] = array(
    '#type' => 'requirement_help',
    '#requirement' => 'hosting_setup',
    '#configuration' => HOSTING_HELP_COLLAPSIBLE,
  );
  if (!variable_get('hosting_dispatch_enabled', FALSE)) {
    $form['cron']['#status'] = HOSTING_STATUS_WARNING;
    $form['cron']['#message'] = t('Please follow the configuration help below to initialize the system.');
  }
  elseif (!variable_get('hosting_dispatch_last_run', false)) {
    $form['cron']['#status'] = HOSTING_STATUS_ERROR;
    $form['cron']['#message'] = t('The dispatch process has not been run. Please follow the instructions below.');
  }
  else {
    $form['cron']['#status'] = HOSTING_STATUS_SUCCESS;
    $form['cron']['#message'] = t('The dispatch process has been succesfully executed');
  }
  return hosting_wizard_form('hosting', $form);
}