You are here

function _openatrium_intranet_configure_check in Open Atrium 6

Configuration. Second stage.

1 string reference to '_openatrium_intranet_configure_check'
openatrium_profile_tasks in ./openatrium.profile
Implementation of hook_profile_tasks().

File

./openatrium.profile, line 268

Code

function _openatrium_intranet_configure_check() {

  // This isn't actually necessary as there are no node_access() entries,
  // but we run it to prevent the "rebuild node access" message from being
  // shown on install.
  node_access_rebuild();

  // Rebuild key tables/caches
  drupal_flush_all_caches();

  // Set default theme. This must happen after drupal_flush_all_caches(), which
  // will run system_theme_data() without detecting themes in the install
  // profile directory.
  _openatrium_system_theme_data();
  db_query("UPDATE {blocks} SET status = 0, region = ''");

  // disable all DB blocks
  db_query("UPDATE {system} SET status = 0 WHERE type = 'theme' and name ='%s'", 'garland');
  db_query("UPDATE {system} SET status = 0 WHERE type = 'theme' and name ='%s'", 'ginkgo');
  variable_set('theme_default', 'ginkgo');

  // In Aegir install processes, we need to init strongarm manually as a
  // separate page load isn't available to do this for us.
  if (function_exists('strongarm_init')) {
    strongarm_init();
  }

  // Revert key components that are overridden by others on install.
  // Note that this comes after all other processes have run, as some cache
  // clears/rebuilds actually set variables or other settings that would count
  // as overrides. See `og_node_type()`.
  $revert = array(
    'atrium' => array(
      'user_role',
      'user_permission',
      'variable',
      'filter',
    ),
    'atrium_blog' => array(
      'user_permission',
      'variable',
    ),
    'atrium_book' => array(
      'user_permission',
      'variable',
    ),
    'atrium_calendar' => array(
      'user_permission',
      'variable',
    ),
    'atrium_casetracker' => array(
      'user_permission',
      'variable',
    ),
    'atrium_groups' => array(
      'user_permission',
      'variable',
    ),
    'atrium_members' => array(
      'user_permission',
      'variable',
    ),
    'atrium_profile' => array(
      'user_permission',
      'variable',
    ),
    'atrium_shoutbox' => array(
      'user_permission',
      'variable',
    ),
  );
  features_revert($revert);
}