>>> if (file_exists(Director::getAbsFile("$module/_config.php")) &&
My server provider said this:
The script thinks that .htacce is a folder/map and he thinks that in that folder stand a file with the name _config.php .
Do I have to change this script, why goes this only goes wrong with modules event_calendar & image_gallery en not with the Blog module?
Thanks again for your feedback, I'm not a scripter and that makes this not easy.
/**
* Includes all available language files for a certain defined locale
*
* @param string $locale All resources from any module in locale $locale will be loaded
*/
static function include_by_locale($locale) {
$topLevel = scandir(Director::baseFolder());
foreach($topLevel as $module) {
//$topLevel is the website root, some server is configurated not to allow excess website root's parent level
//and we don't need to check website root's parent level and websit root level for its lang folder, so we skip these 2 levels checking.
if($module == ".." || $module == ".") continue;
if (file_exists(Director::getAbsFile("$module/_config.php")) &&
file_exists($file = Director::getAbsFile("$module/lang/$locale.php"))) {
include_once($file);
}
}
}