function drupal_check_profile in Drupal 6
Same name and namespace in other branches
- 8 core/includes/install.inc \drupal_check_profile()
- 5 includes/install.inc \drupal_check_profile()
- 7 includes/install.inc \drupal_check_profile()
- 9 core/includes/install.inc \drupal_check_profile()
Check a profile's requirements.
Parameters
profile: Name of profile to check.
1 call to drupal_check_profile()
- install_check_requirements in ./
install.php - Check installation requirements and report any errors.
File
- includes/
install.inc, line 668
Code
function drupal_check_profile($profile) {
include_once './includes/file.inc';
$profile_file = "./profiles/{$profile}/{$profile}.profile";
if (!isset($profile) || !file_exists($profile_file)) {
install_no_profile_error();
}
require_once $profile_file;
// Get a list of modules required by this profile.
$function = $profile . '_profile_modules';
$module_list = array_unique(array_merge(drupal_required_modules(), $function()));
// Get a list of all .install files.
$installs = drupal_get_install_files($module_list);
// Collect requirement testing results
$requirements = array();
foreach ($installs as $install) {
require_once $install->filename;
if (module_hook($install->name, 'requirements')) {
$requirements = array_merge($requirements, module_invoke($install->name, 'requirements', 'install'));
}
}
return $requirements;
}