Logo Search packages:      
Sourcecode: aegir-provision version File versions  Download package

provision_drupal_system_map (  ) 

Map the system table to a packages multi-dimensional array component

Definition at line 452 of file provision_drupal.drush.inc.

References _provision_cvs_deploy(), and _provision_find_profiles().

Referenced by drush_provision_drupal_post_provision_install().

                                       {
  // Load the version specific include files.
  drush_include_engine('drupal', 'packages');

  $profiles = _provision_find_profiles();
  foreach ($profiles as $profile => $info) {
    _provision_cvs_deploy($info);
    if (!$info->version) {
      $info->version = drush_drupal_version();
    }
    $profiles[$profile] = $info;
  }
  $packages['platforms'] = _provision_find_platforms();

  $profile = drush_get_option('profile');
  $packages['profiles'][$profile] = $profiles[$profile];
  $packages['profiles'][$profile]->status = 1;
  
  $result = db_query("SELECT * FROM {system} WHERE type='module'");
  while ($module = db_fetch_object($result)) {
    $info_file = sprintf("%s/%s.info", dirname($module->filename), $module->name);
    $module->info = provision_parse_info_file($info_file);

    _provision_cvs_deploy($module);
    $module->filename = realpath($module->filename);
    $packages['modules'][$module->name] = $module;
  }

  drush_log(dt("Found !count modules", array('!count' => sizeof($packages['modules']))));

  $result = db_query("SELECT * FROM {system} WHERE type='theme'");
  while ($theme = db_fetch_object($result)) {
    $info_file = sprintf("%s/%s.info", dirname($theme->filename), $theme->name);
    $theme->info = provision_parse_info_file($info_file);
    _provision_cvs_deploy($theme);
    $theme->filename = realpath($theme->filename);
    $packages['themes'][$theme->name] = $theme;
  }
  drush_log(dt("Found !count themes", array('!count' => sizeof($packages['themes']))));
  return $packages;
}


Generated by  Doxygen 1.6.0   Back to index