bugfixes
This commit is contained in:
parent
d84c9f9c8a
commit
50c7e9562b
@ -27,9 +27,6 @@ class LanguageService extends MediaService
|
|||||||
$langDir = $langPath . "/" . $data['code'];
|
$langDir = $langPath . "/" . $data['code'];
|
||||||
$appLangPath = storage_path('app/lang/default');
|
$appLangPath = storage_path('app/lang/default');
|
||||||
|
|
||||||
if (is_dir($langDir)) {
|
|
||||||
throw new Exception("Language already exist");
|
|
||||||
}
|
|
||||||
|
|
||||||
$groups = [
|
$groups = [
|
||||||
'auth' => require storage_path('app/lang/groups/auth.php'),
|
'auth' => require storage_path('app/lang/groups/auth.php'),
|
||||||
@ -53,8 +50,12 @@ class LanguageService extends MediaService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
File::makeDirectory($langDir, 0777, true, true);
|
$alreadyExists = is_dir($langDir);
|
||||||
File::copyDirectory($appLangPath, $langDir);
|
|
||||||
|
if (! $alreadyExists) {
|
||||||
|
File::makeDirectory($langDir, 0777, true, true);
|
||||||
|
File::copyDirectory($appLangPath, $langDir);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateLanguage($id, $data)
|
function updateLanguage($id, $data)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user