| 6 update.compare.inc | update_get_project_name($file) |
| 7 update.compare.inc | update_get_project_name($file) |
| 8 update.compare.inc | update_get_project_name($file) |
Given a $file object (as returned by system_get_files_database()), figure out what project it belongs to.
See also
1 call to update_get_project_name()
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;
}
Login or register to post comments