update_get_project_name
- Versions
- 6 – 7
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
Code
modules/update/update.compare.inc, line 150
<?php
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 