mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-05-03 05:06:05 +02:00
Add more front-end controllers, language file cleanup
This commit is contained in:
@@ -63,7 +63,7 @@ class InstallScriptUpdateService
|
||||
|
||||
if (! is_null(array_get($data, 'copy_script_from'))) {
|
||||
if (! $this->repository->isCopiableScript(array_get($data, 'copy_script_from'), $option->service_id)) {
|
||||
throw new InvalidCopyFromException(trans('admin/exceptions.service.options.invalid_copy_id'));
|
||||
throw new InvalidCopyFromException(trans('exceptions.service.options.invalid_copy_id'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ class OptionCreationService
|
||||
]);
|
||||
|
||||
if ($results !== 1) {
|
||||
throw new NoParentConfigurationFoundException(trans('admin/exceptions.service.options.must_be_child'));
|
||||
throw new NoParentConfigurationFoundException(trans('exceptions.service.options.must_be_child'));
|
||||
}
|
||||
} else {
|
||||
$data['config_from'] = null;
|
||||
|
||||
@@ -69,7 +69,7 @@ class OptionDeletionService
|
||||
]);
|
||||
|
||||
if ($servers > 0) {
|
||||
throw new HasActiveServersException(trans('admin/exceptions.service.options.delete_has_servers'));
|
||||
throw new HasActiveServersException(trans('exceptions.service.options.delete_has_servers'));
|
||||
}
|
||||
|
||||
return $this->repository->delete($option);
|
||||
|
||||
@@ -68,7 +68,7 @@ class OptionUpdateService
|
||||
]);
|
||||
|
||||
if ($results !== 1) {
|
||||
throw new NoParentConfigurationFoundException(trans('admin/exceptions.service.options.must_be_child'));
|
||||
throw new NoParentConfigurationFoundException(trans('exceptions.service.options.must_be_child'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ class ServiceDeletionService
|
||||
{
|
||||
$count = $this->serverRepository->findCountWhere([['service_id', '=', $service]]);
|
||||
if ($count > 0) {
|
||||
throw new HasActiveServersException(trans('admin/exceptions.service.delete_has_servers'));
|
||||
throw new HasActiveServersException(trans('exceptions.service.delete_has_servers'));
|
||||
}
|
||||
|
||||
return $this->repository->delete($service);
|
||||
|
||||
@@ -66,7 +66,7 @@ class VariableUpdateService
|
||||
|
||||
if (! is_null(array_get($data, 'env_variable'))) {
|
||||
if (in_array(strtoupper(array_get($data, 'env_variable')), explode(',', ServiceVariable::RESERVED_ENV_NAMES))) {
|
||||
throw new ReservedVariableNameException(trans('admin/exceptions.service.variables.reserved_name', [
|
||||
throw new ReservedVariableNameException(trans('exceptions.service.variables.reserved_name', [
|
||||
'name' => array_get($data, 'env_variable'),
|
||||
]));
|
||||
}
|
||||
@@ -78,7 +78,7 @@ class VariableUpdateService
|
||||
]);
|
||||
|
||||
if ($search > 0) {
|
||||
throw new DisplayException(trans('admin/exceptions.service.variables.env_not_unique', [
|
||||
throw new DisplayException(trans('exceptions.service.variables.env_not_unique', [
|
||||
'name' => array_get($data, 'env_variable'),
|
||||
]));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user