You are here

function theme_hosting_migrate_comparison in Hosting 7.4

Same name and namespace in other branches
  1. 6.2 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 271

Code

function theme_hosting_migrate_comparison($variables) {
  $packages = $variables['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' => array(
        '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 ? array(
        'hosting-success',
      ) : array(
        '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', array(
    'header' => $headers,
    'rows' => $rows,
  )) . $link . "</div>";
}