Same name and namespace in other branches
- 7.x modules/update/update.compare.inc \update_filter_project_info()
Filter the project .info data to only save attributes we need.
Parameters
array $info: Array of .info file data as returned by drupal_parse_info_file().
Return value
Array of .info file data we need for the Update manager.
See also
1 call to update_filter_project_info()
- _update_process_info_list in modules/
update/ update.compare.inc - Populate an array of project data.
File
- modules/
update/ update.compare.inc, line 683 - Code required only when comparing available updates to existing data.
Code
function update_filter_project_info($info) {
$whitelist = array(
'_info_file_ctime',
'datestamp',
'major',
'name',
'package',
'project',
'project status url',
'version',
);
$whitelist = array_flip($whitelist);
foreach ($info as $key => $value) {
if (!isset($whitelist[$key])) {
unset($info[$key]);
}
}
return $info;
}