You are here

function theme_hosting_migrate_comparison in Hosting 6.2

Same name and namespace in other branches
  1. 7.4 migrate/hosting_migrate.module \theme_hosting_migrate_comparison()
  2. 7.3 migrate/hosting_migrate.module \theme_hosting_migrate_comparison()

Render a list of compared packages for migration.

1 theme call to theme_hosting_migrate_comparison()
hosting_migrate_comparison in migrate/hosting_migrate.module
Compare package schema versions between the current and target platform in temp tables

File

migrate/hosting_migrate.module, line 256

Code

function theme_hosting_migrate_comparison($packages) {
  $rows = array();
  $headers = array(
    t("Package"),
    t("Current"),
    t("Target"),
  );
  foreach ($packages as $key => $instance) {
    $row = array();
    $row[] = array(
      'data' => $instance->short_name,
      'class' => 'hosting-status',
    );
    $target_schema = (int) $instance->target_schema == 0 ? $instance->current_schema : $instance->target_schema;
    $row[] = _hosting_migrate_version_display($instance->current_version, $instance->current_schema);
    $row[] = _hosting_migrate_version_display($instance->target_version, $target_schema, $instance->status);
    $rows[] = array(
      'data' => $row,
      'class' => $instance->enabled ? 'hosting-success' : 'hosting-info',
    );
  }
  $options['attributes']['class'] = 'hosting-migrate-comparison-return';
  $link = l(t('Go back'), 'node/' . arg(3) . '/site_migrate', $options);
  return "<div id='hosting-package-comparison'>" . $link . theme('table', $headers, $rows) . $link . "</div>";
}