Use correct directory in loadLanguagePackFrom API

This commit is contained in:
Toby Zerner 2016-01-12 18:35:37 +10:30
parent 94a62293eb
commit 8506d095db

View File

@ -38,7 +38,7 @@ class ConfigureLocales
{ {
$name = $title = basename($directory); $name = $title = basename($directory);
if (file_exists($manifest = __DIR__.'/composer.json')) { if (file_exists($manifest = $directory.'/composer.json')) {
$json = json_decode(file_get_contents($manifest), true); $json = json_decode(file_get_contents($manifest), true);
if (empty($json)) { if (empty($json)) {
@ -55,7 +55,7 @@ class ConfigureLocales
$this->locales->addLocale($locale, $title); $this->locales->addLocale($locale, $title);
if (! is_dir($localeDir = __DIR__.'/locale')) { if (! is_dir($localeDir = $directory.'/locale')) {
throw new RuntimeException("Language pack $name must have a \"locale\" subdirectory."); throw new RuntimeException("Language pack $name must have a \"locale\" subdirectory.");
} }