You are here

function update_get_project_name in Drupal 6

Same name and namespace in other branches
  1. 7 modules/update/update.compare.inc \update_get_project_name()

Given a $file object (as returned by system_get_files_database()), figure out what project it belongs to.

See also

system_get_files_database()

1 call to update_get_project_name()
_update_process_info_list in modules/update/update.compare.inc
Populate an array of project data.

File

modules/update/update.compare.inc, line 152
Code required only when comparing available updates to existing data.

Code

function update_get_project_name($file) {
  $project_name = '';
  if (isset($file->info['project'])) {
    $project_name = $file->info['project'];
  }
  elseif (isset($file->info['package']) && strpos($file->info['package'], 'Core -') !== FALSE) {
    $project_name = 'drupal';
  }
  elseif (in_array($file->name, array(
    'bluemarine',
    'chameleon',
    'garland',
    'marvin',
    'minnelli',
    'pushbutton',
  ))) {

    // Unfortunately, there's no way to tell if a theme is part of core,
    // so we must hard-code a list here.
    $project_name = 'drupal';
  }
  return $project_name;
}