function l10n_update_get_project_name in Localization update 7
Same name and namespace in other branches
- 6 l10n_update.project.inc \l10n_update_get_project_name()
- 7.2 l10n_update.compare.inc \l10n_update_get_project_name()
Given a $file object (as returned by system_rebuild_module_data()), figure out what project it belongs to.
Based on update_get_project_name().
Parameters
$file:
Return value
string
See also
1 call to l10n_update_get_project_name()
- _l10n_update_project_info_list in ./
l10n_update.project.inc - Populate an array of project data.
File
- ./
l10n_update.project.inc, line 228 - Library for querying Drupal projects
Code
function l10n_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') === 0) {
$project_name = 'drupal';
}
return $project_name;
}