Commit 7ba5da8f authored by anarcat's avatar anarcat Committed by anarcat

forward port last $key fix

parent d0a37e40
......@@ -500,14 +500,14 @@ function _provision_find_profiles() {
$languages['en'] = 1;
// Find languages available
$files = array_keys(file_scan_directory('./profiles/' . $key . '/translations', '\.po$', array('.', '..', 'CVS'), 0, FALSE, 'filepath'));
$files = array_keys(file_scan_directory('./profiles/' . $name . '/translations', '\.po$', array('.', '..', 'CVS'), 0, FALSE, 'filepath'));
foreach ($files as $file) {
if (preg_match('!(/|\.)([^\./]+)\.po$!', $file, $langcode)) {
$languages[$langcode[2]] = 1; // use the language name as an index to weed out duplicates
}
}
$profile->info['languages'] = array_keys($languages);
$return[$key] = $profile;
$return[$name] = $profile;
provision_log('notice', t('found install profile %name', array('%name' => $name)));
}
......
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