mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-19 08:32:14 +00:00
Language editor refactoring part 1 (nackend)
This commit is contained in:
@@ -59,15 +59,15 @@ class HelperService
|
||||
$accessible_folder_ids = Arr::flatten([filter_folders_ids($foldersIds), $shared->item_id]);
|
||||
|
||||
// Check user access
|
||||
if ( is_array($requested_id) ) {
|
||||
if (is_array($requested_id)) {
|
||||
foreach ($requested_id as $id) {
|
||||
if (!in_array($id, $accessible_folder_ids))
|
||||
abort(403);
|
||||
}
|
||||
}
|
||||
|
||||
if (! is_array($requested_id)) {
|
||||
if (! in_array($requested_id, $accessible_folder_ids))
|
||||
if (!is_array($requested_id)) {
|
||||
if (!in_array($requested_id, $accessible_folder_ids))
|
||||
abort(403);
|
||||
}
|
||||
}
|
||||
@@ -323,4 +323,23 @@ class HelperService
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $license
|
||||
* @param $locale
|
||||
*/
|
||||
function create_default_language_strings($license, $locale)
|
||||
{
|
||||
$strings = collect(config('language_strings.' . strtolower($license)))
|
||||
->map(function ($value, $key) use ($locale) {
|
||||
|
||||
return [
|
||||
'lang' => $locale,
|
||||
'value' => $value,
|
||||
'key' => $key,
|
||||
];
|
||||
})->toArray();
|
||||
|
||||
DB::table('language_strings')->insert($strings);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user