Commit b8ef181b authored by ergonlogic's avatar ergonlogic

Find profiles correctly in Drupal 8.

'example.profile' files are no longer required for Drupal 8 profiles,
and are thus no longer reliable when searching for profiles on a platform.
Presumably, 'example.info.yml' will remain a requirement, so let's
check on that instead.
parent e1412061
......@@ -381,10 +381,12 @@ function _provision_find_profiles() {
include_once('core/includes/install.inc');
$profiles_subdirs[] = "./core/profiles";
$profiles_subdirs[] = "./profiles";
$profile_search_ext = "info.yml";
}
else {
include_once('includes/install.inc');
$profiles_subdirs[] = "./profiles";
$profile_search_ext = "profile";
}
foreach($profiles_subdirs as $profiles_subdir) {
if (!$dir = opendir($profiles_subdir)) {
......@@ -393,7 +395,7 @@ function _provision_find_profiles() {
}
while (FALSE !== ($name = readdir($dir))) {
$languages = array();
$file = "$profiles_subdir/$name/$name.profile";
$file = "$profiles_subdir/$name/$name.$profile_search_ext";
if ($name == '..' || $name == '.' || !file_exists($file)) {
continue;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment