mirror of
https://github.com/Karaka-Management/oms-Admin.git
synced 2026-02-15 03:58:41 +00:00
phpcs autofixes
This commit is contained in:
parent
cb76b873e1
commit
94b2a4d0a2
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
|
|
@ -26,7 +26,7 @@ jobs:
|
||||||
- name: Setup Composer
|
- name: Setup Composer
|
||||||
run: composer install
|
run: composer install
|
||||||
- name: Autoformat
|
- name: Autoformat
|
||||||
run: 'vendor/bin/php-cs-fixer fix ./ --rules=''{"array_syntax": {"syntax": "short"}, "blank_line_after_namespace": true, "global_namespace_import": {"import_classes": false, "import_constants": false, "import_functions": false}, "binary_operator_spaces": {"operators": {"=": "align", ".=": "align", "+=": "align", "-=": "align", "*=": "align", "/=": "align", "|=": "align", "&=": "align", "=>": "align", "??=": "align"}}, "cast_spaces": {"space": "single"}, "class_attributes_separation": { "elements": {"const": "one", "method": "one", "property": "one"} }, "combine_consecutive_issets": true, "compact_nullable_typehint": true, "declare_strict_types": true, "declare_equal_normalize": {"space": "none"}, "elseif": true, "encoding": true, "explicit_indirect_variable": true, "explicit_string_variable": true, "function_to_constant": true, "implode_call": true, "increment_style": {"style": "pre"}, "is_null": true, "yoda_style": {"equal": false, "identical": false, "less_and_greater": false}, "line_ending": true, "logical_operators": true, "lowercase_cast": true, "constant_case": {"case": "lower"}, "lowercase_keywords": true, "modernize_types_casting": true, "native_constant_invocation": true, "native_function_casing": true, "native_function_invocation": {"include": ["@all"]}, "new_with_braces": true, "no_extra_blank_lines": {"tokens": ["break", "case", "continue", "curly_brace_block", "extra", "return", "switch", "throw", "use"]}, "no_spaces_after_function_name": true, "no_alias_functions": true, "no_closing_tag": true, "no_empty_comment": true, "no_empty_phpdoc": true, "no_empty_statement": true, "no_homoglyph_names": true, "no_mixed_echo_print": {"use": "echo"}, "no_php4_constructor": true, "no_singleline_whitespace_before_semicolons": true, "no_spaces_inside_parenthesis": true, "no_trailing_whitespace": true, "no_unneeded_final_method": true, "no_unused_imports": true, "no_useless_return": true, "no_whitespace_before_comma_in_array": true, "no_whitespace_in_blank_line": true, "non_printable_character": true, "normalize_index_brace": true, "ordered_imports": {"sort_algorithm": "alpha"}, "ordered_interfaces": {"order": "alpha"}, "php_unit_construct": true, "php_unit_internal_class": true, "php_unit_set_up_tear_down_visibility": true, "phpdoc_indent": true, "phpdoc_align": {"align": "vertical"}, "phpdoc_annotation_without_dot": true, "phpdoc_scalar": true, "phpdoc_return_self_reference": {"replacements": {"this": "self"}}, "phpdoc_trim": true, "phpdoc_trim_consecutive_blank_line_separation": true, "random_api_migration": true, "self_accessor": true, "return_type_declaration": {"space_before": "one"}, "semicolon_after_instruction": true, "set_type_to_cast": true, "short_scalar_cast": true, "single_blank_line_at_eof": true, "single_line_after_imports": true, "standardize_increment": true, "trailing_comma_in_multiline": true, "trim_array_spaces": true, "visibility_required": true, "void_return": true}'' --allow-risky=yes'
|
run: 'vendor/bin/php-cs-fixer fix ./ --rules=''{"array_syntax": {"syntax": "short"}, "blank_line_after_namespace": true, "global_namespace_import": {"import_classes": false, "import_constants": false, "import_functions": false}, "binary_operator_spaces": {"operators": {"=": "align", ".=": "align", "+=": "align", "-=": "align", "*=": "align", "/=": "align", "|=": "align", "&=": "align", "=>": "align", "??=": "align", ">>=": "align", "<<=": "align"}}, "cast_spaces": {"space": "single"}, "class_attributes_separation": { "elements": {"const": "one", "method": "one", "property": "one"} }, "combine_consecutive_issets": true, "compact_nullable_typehint": true, "declare_strict_types": true, "declare_equal_normalize": {"space": "none"}, "elseif": true, "encoding": true, "explicit_indirect_variable": true, "explicit_string_variable": true, "function_to_constant": true, "implode_call": true, "increment_style": {"style": "pre"}, "is_null": true, "yoda_style": {"equal": false, "identical": false, "less_and_greater": false}, "line_ending": true, "logical_operators": true, "lowercase_cast": true, "constant_case": {"case": "lower"}, "lowercase_keywords": true, "modernize_types_casting": true, "native_constant_invocation": true, "native_function_casing": true, "native_function_invocation": {"include": ["@all"]}, "new_with_braces": true, "no_extra_blank_lines": {"tokens": ["break", "case", "continue", "curly_brace_block", "extra", "return", "switch", "throw", "use"]}, "no_spaces_after_function_name": true, "no_alias_functions": true, "no_closing_tag": true, "no_empty_comment": true, "no_empty_phpdoc": true, "no_empty_statement": true, "no_homoglyph_names": true, "no_mixed_echo_print": {"use": "echo"}, "no_php4_constructor": true, "no_singleline_whitespace_before_semicolons": true, "no_spaces_inside_parenthesis": true, "no_trailing_whitespace": true, "no_unneeded_final_method": true, "no_unused_imports": true, "no_useless_return": true, "no_whitespace_before_comma_in_array": true, "no_whitespace_in_blank_line": true, "non_printable_character": true, "normalize_index_brace": true, "ordered_imports": {"sort_algorithm": "alpha"}, "ordered_interfaces": {"order": "alpha"}, "php_unit_construct": true, "php_unit_internal_class": true, "php_unit_set_up_tear_down_visibility": true, "phpdoc_indent": true, "phpdoc_align": {"align": "vertical"}, "phpdoc_annotation_without_dot": true, "phpdoc_scalar": true, "phpdoc_return_self_reference": {"replacements": {"this": "self"}}, "phpdoc_trim": true, "phpdoc_trim_consecutive_blank_line_separation": true, "random_api_migration": true, "self_accessor": true, "return_type_declaration": {"space_before": "one"}, "semicolon_after_instruction": true, "set_type_to_cast": true, "short_scalar_cast": true, "single_blank_line_at_eof": true, "single_line_after_imports": true, "standardize_increment": true, "trailing_comma_in_multiline": true, "trim_array_spaces": true, "visibility_required": true, "void_return": true}'' --allow-risky=yes'
|
||||||
- name: Check for modified files
|
- name: Check for modified files
|
||||||
id: git-check
|
id: git-check
|
||||||
run: echo ::set-output name=modified::$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi)
|
run: echo ::set-output name=modified::$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi)
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,6 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\Admin\Admin\Install;
|
namespace Modules\Admin\Admin\Install;
|
||||||
|
|
||||||
use Model\Setting;
|
|
||||||
use Model\SettingMapper;
|
|
||||||
use Modules\Admin\Models\SettingsEnum;
|
use Modules\Admin\Models\SettingsEnum;
|
||||||
use phpOMS\Application\ApplicationAbstract;
|
use phpOMS\Application\ApplicationAbstract;
|
||||||
|
|
||||||
|
|
@ -47,34 +45,34 @@ class Media
|
||||||
[
|
[
|
||||||
'data' => [
|
'data' => [
|
||||||
[
|
[
|
||||||
'type' => 'setting',
|
'type' => 'setting',
|
||||||
'name' => SettingsEnum::DEFAULT_LIST_EXPORTS,
|
'name' => SettingsEnum::DEFAULT_LIST_EXPORTS,
|
||||||
'content' => (string) $media['collection'][4]['id'],
|
'content' => (string) $media['collection'][4]['id'],
|
||||||
'pattern' => '\\d+',
|
'pattern' => '\\d+',
|
||||||
'module' => 'Admin'
|
'module' => 'Admin',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'type' => 'setting',
|
'type' => 'setting',
|
||||||
'name' => SettingsEnum::DEFAULT_LETTERS,
|
'name' => SettingsEnum::DEFAULT_LETTERS,
|
||||||
'content' => (string) $media['collection'][5]['id'],
|
'content' => (string) $media['collection'][5]['id'],
|
||||||
'pattern' => '\\d+',
|
'pattern' => '\\d+',
|
||||||
'module' => 'Admin'
|
'module' => 'Admin',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'type' => 'setting',
|
'type' => 'setting',
|
||||||
'name' => SettingsEnum::DEFAULT_ASSETS,
|
'name' => SettingsEnum::DEFAULT_ASSETS,
|
||||||
'content' => (string) $media['upload'][0]['id'],
|
'content' => (string) $media['upload'][0]['id'],
|
||||||
'pattern' => '\\d+',
|
'pattern' => '\\d+',
|
||||||
'module' => 'Admin'
|
'module' => 'Admin',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'type' => 'setting',
|
'type' => 'setting',
|
||||||
'name' => SettingsEnum::DEFAULT_TEMPLATES,
|
'name' => SettingsEnum::DEFAULT_TEMPLATES,
|
||||||
'content' => (string) $media['upload'][1]['id'],
|
'content' => (string) $media['upload'][1]['id'],
|
||||||
'pattern' => '\\d+',
|
'pattern' => '\\d+',
|
||||||
'module' => 'Admin'
|
'module' => 'Admin',
|
||||||
]
|
],
|
||||||
]
|
],
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ declare(strict_types=1);
|
||||||
use PhpOffice\PhpSpreadsheet\Worksheet\HeaderFooter;
|
use PhpOffice\PhpSpreadsheet\Worksheet\HeaderFooter;
|
||||||
use PhpOffice\PhpSpreadsheet\Worksheet\HeaderFooterDrawing;
|
use PhpOffice\PhpSpreadsheet\Worksheet\HeaderFooterDrawing;
|
||||||
use PhpOffice\PhpSpreadsheet\Worksheet\PageSetup;
|
use PhpOffice\PhpSpreadsheet\Worksheet\PageSetup;
|
||||||
use phpOMS\Autoloader;
|
|
||||||
|
|
||||||
class DefaultExcel extends \PhpOffice\PhpSpreadsheet\Spreadsheet
|
class DefaultExcel extends \PhpOffice\PhpSpreadsheet\Spreadsheet
|
||||||
{
|
{
|
||||||
|
|
@ -48,5 +47,4 @@ class DefaultExcel extends \PhpOffice\PhpSpreadsheet\Spreadsheet
|
||||||
->addImage($drawing, HeaderFooter::IMAGE_HEADER_LEFT);
|
->addImage($drawing, HeaderFooter::IMAGE_HEADER_LEFT);
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,40 +52,40 @@ class DefaultPdf extends TCPDF
|
||||||
|
|
||||||
public array $lang = [
|
public array $lang = [
|
||||||
'en' => [
|
'en' => [
|
||||||
'Page' => 'Page',
|
'Page' => 'Page',
|
||||||
'CEO' => 'CEO',
|
'CEO' => 'CEO',
|
||||||
'TaxOffice' => 'Tax office',
|
'TaxOffice' => 'Tax office',
|
||||||
'TaxNumber' => 'Tax number',
|
'TaxNumber' => 'Tax number',
|
||||||
'Swift' => 'BIC',
|
'Swift' => 'BIC',
|
||||||
'BankAccount' => 'Account',
|
'BankAccount' => 'Account',
|
||||||
],
|
],
|
||||||
'de' => [
|
'de' => [
|
||||||
'Page' => 'Seite',
|
'Page' => 'Seite',
|
||||||
'CEO' => 'Geschäftsführer',
|
'CEO' => 'Geschäftsführer',
|
||||||
'TaxOffice' => 'Finanzamt',
|
'TaxOffice' => 'Finanzamt',
|
||||||
'TaxNumber' => 'Steuernummer',
|
'TaxNumber' => 'Steuernummer',
|
||||||
'Swift' => 'BIC',
|
'Swift' => 'BIC',
|
||||||
'BankAccount' => 'IBAN',
|
'BankAccount' => 'IBAN',
|
||||||
]
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
public array $attributes = [
|
public array $attributes = [
|
||||||
'logo' => __DIR__ . '/../Web/Backend/img/logo.png',
|
'logo' => __DIR__ . '/../Web/Backend/img/logo.png',
|
||||||
'title_name' => 'Jingga',
|
'title_name' => 'Jingga',
|
||||||
'slogan' => 'Business solutions made simple.',
|
'slogan' => 'Business solutions made simple.',
|
||||||
'legal_name' => '',
|
'legal_name' => '',
|
||||||
'address' => '',
|
'address' => '',
|
||||||
'city' => '',
|
'city' => '',
|
||||||
'country' => '',
|
'country' => '',
|
||||||
'ceo' => '',
|
'ceo' => '',
|
||||||
'tax_office' => '',
|
'tax_office' => '',
|
||||||
'tax_number' => '',
|
'tax_number' => '',
|
||||||
'bank_name' => '',
|
'bank_name' => '',
|
||||||
'swift' => '',
|
'swift' => '',
|
||||||
'bank_account' => '',
|
'bank_account' => '',
|
||||||
'website' => '',
|
'website' => '',
|
||||||
'email' => '',
|
'email' => '',
|
||||||
'phone' => '',
|
'phone' => '',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -154,7 +154,7 @@ class DefaultPdf extends TCPDF
|
||||||
$x = 0;
|
$x = 0;
|
||||||
$dx = 0;
|
$dx = 0;
|
||||||
|
|
||||||
if (!$this->header_xobj_autoreset AND $this->booklet AND (($this->page % 2) == 0)) {
|
if (!$this->header_xobj_autoreset && $this->booklet && (($this->page % 2) == 0)) {
|
||||||
// adjust margins for booklet mode
|
// adjust margins for booklet mode
|
||||||
$dx = ($this->original_lMargin - $this->original_rMargin);
|
$dx = ($this->original_lMargin - $this->original_rMargin);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,40 +42,40 @@ class DefaultWord extends \PhpOffice\PhpWord\PhpWord
|
||||||
|
|
||||||
public array $lang = [
|
public array $lang = [
|
||||||
'en' => [
|
'en' => [
|
||||||
'Page' => 'Page',
|
'Page' => 'Page',
|
||||||
'CEO' => 'CEO',
|
'CEO' => 'CEO',
|
||||||
'TaxOffice' => 'Tax office',
|
'TaxOffice' => 'Tax office',
|
||||||
'TaxNumber' => 'Tax number',
|
'TaxNumber' => 'Tax number',
|
||||||
'Swift' => 'BIC',
|
'Swift' => 'BIC',
|
||||||
'BankAccount' => 'Account',
|
'BankAccount' => 'Account',
|
||||||
],
|
],
|
||||||
'de' => [
|
'de' => [
|
||||||
'Page' => 'Seite',
|
'Page' => 'Seite',
|
||||||
'CEO' => 'Geschäftsführer',
|
'CEO' => 'Geschäftsführer',
|
||||||
'TaxOffice' => 'Finanzamt',
|
'TaxOffice' => 'Finanzamt',
|
||||||
'TaxNumber' => 'Steuernummer',
|
'TaxNumber' => 'Steuernummer',
|
||||||
'Swift' => 'BIC',
|
'Swift' => 'BIC',
|
||||||
'BankAccount' => 'IBAN',
|
'BankAccount' => 'IBAN',
|
||||||
]
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
public array $attributes = [
|
public array $attributes = [
|
||||||
'logo' => __DIR__ . '/../Web/Backend/img/logo.png',
|
'logo' => __DIR__ . '/../Web/Backend/img/logo.png',
|
||||||
'title_name' => 'Jingga',
|
'title_name' => 'Jingga',
|
||||||
'slogan' => 'Business solutions made simple.',
|
'slogan' => 'Business solutions made simple.',
|
||||||
'legal_name' => '',
|
'legal_name' => '',
|
||||||
'address' => '',
|
'address' => '',
|
||||||
'city' => '',
|
'city' => '',
|
||||||
'country' => '',
|
'country' => '',
|
||||||
'ceo' => '',
|
'ceo' => '',
|
||||||
'tax_office' => '',
|
'tax_office' => '',
|
||||||
'tax_number' => '',
|
'tax_number' => '',
|
||||||
'bank_name' => '',
|
'bank_name' => '',
|
||||||
'swift' => '',
|
'swift' => '',
|
||||||
'bank_account' => '',
|
'bank_account' => '',
|
||||||
'website' => '',
|
'website' => '',
|
||||||
'email' => '',
|
'email' => '',
|
||||||
'phone' => '',
|
'phone' => '',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -94,9 +94,9 @@ class DefaultWord extends \PhpOffice\PhpWord\PhpWord
|
||||||
public function createFirstPage()
|
public function createFirstPage()
|
||||||
{
|
{
|
||||||
$section = $this->addSection([
|
$section = $this->addSection([
|
||||||
'marginLeft' => 1000,
|
'marginLeft' => 1000,
|
||||||
'marginRight' => 1000,
|
'marginRight' => 1000,
|
||||||
'marginTop' => 2000,
|
'marginTop' => 2000,
|
||||||
'marginBottom' => 2000,
|
'marginBottom' => 2000,
|
||||||
// 'headerHeight' => 50,
|
// 'headerHeight' => 50,
|
||||||
// 'footerHeight' => 50,
|
// 'footerHeight' => 50,
|
||||||
|
|
@ -170,9 +170,9 @@ class DefaultWord extends \PhpOffice\PhpWord\PhpWord
|
||||||
public function createSecondPage()
|
public function createSecondPage()
|
||||||
{
|
{
|
||||||
$section = $this->addSection([
|
$section = $this->addSection([
|
||||||
'marginLeft' => 1000,
|
'marginLeft' => 1000,
|
||||||
'marginRight' => 1000,
|
'marginRight' => 1000,
|
||||||
'marginTop' => 2000,
|
'marginTop' => 2000,
|
||||||
'marginBottom' => 2000,
|
'marginBottom' => 2000,
|
||||||
// 'headerHeight' => 50,
|
// 'headerHeight' => 50,
|
||||||
// 'footerHeight' => 50,
|
// 'footerHeight' => 50,
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,6 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\Admin\Admin\Install;
|
namespace Modules\Admin\Admin\Install;
|
||||||
|
|
||||||
use Model\Setting;
|
|
||||||
use Model\SettingMapper;
|
|
||||||
use Modules\Admin\Models\SettingsEnum;
|
use Modules\Admin\Models\SettingsEnum;
|
||||||
use phpOMS\Application\ApplicationAbstract;
|
use phpOMS\Application\ApplicationAbstract;
|
||||||
use phpOMS\Message\Http\HttpRequest;
|
use phpOMS\Message\Http\HttpRequest;
|
||||||
|
|
@ -51,22 +49,22 @@ class Messages
|
||||||
|
|
||||||
$settings = [
|
$settings = [
|
||||||
[
|
[
|
||||||
'id' => null,
|
'id' => null,
|
||||||
'name' => SettingsEnum::LOGIN_MAIL_REGISTRATION_TEMPLATE,
|
'name' => SettingsEnum::LOGIN_MAIL_REGISTRATION_TEMPLATE,
|
||||||
'content' => (string) $messages['email_template'][0]['id'],
|
'content' => (string) $messages['email_template'][0]['id'],
|
||||||
'module' => 'Admin',
|
'module' => 'Admin',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'id' => null,
|
'id' => null,
|
||||||
'name' => SettingsEnum::LOGIN_MAIL_FORGOT_PASSWORD_TEMPLATE,
|
'name' => SettingsEnum::LOGIN_MAIL_FORGOT_PASSWORD_TEMPLATE,
|
||||||
'content' => (string) $messages['email_template'][1]['id'],
|
'content' => (string) $messages['email_template'][1]['id'],
|
||||||
'module' => 'Admin',
|
'module' => 'Admin',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'id' => null,
|
'id' => null,
|
||||||
'name' => SettingsEnum::LOGIN_MAIL_FAILED_TEMPLATE,
|
'name' => SettingsEnum::LOGIN_MAIL_FAILED_TEMPLATE,
|
||||||
'content' => (string) $messages['email_template'][2]['id'],
|
'content' => (string) $messages['email_template'][2]['id'],
|
||||||
'module' => 'Admin',
|
'module' => 'Admin',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -142,10 +142,10 @@ return [
|
||||||
'module' => 'Admin',
|
'module' => 'Admin',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'type' => 'setting',
|
'type' => 'setting',
|
||||||
'name' => SettingsEnum::MAIL_SERVER_PASS,
|
'name' => SettingsEnum::MAIL_SERVER_PASS,
|
||||||
'content' => '',
|
'content' => '',
|
||||||
'module' => 'Admin',
|
'module' => 'Admin',
|
||||||
'encrypted' => true,
|
'encrypted' => true,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
|
@ -155,17 +155,17 @@ return [
|
||||||
'module' => 'Admin',
|
'module' => 'Admin',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'type' => 'setting',
|
'type' => 'setting',
|
||||||
'name' => SettingsEnum::MAIL_SERVER_KEY,
|
'name' => SettingsEnum::MAIL_SERVER_KEY,
|
||||||
'content' => '',
|
'content' => '',
|
||||||
'module' => 'Admin',
|
'module' => 'Admin',
|
||||||
'encrypted' => true,
|
'encrypted' => true,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'type' => 'setting',
|
'type' => 'setting',
|
||||||
'name' => SettingsEnum::MAIL_SERVER_KEYPASS,
|
'name' => SettingsEnum::MAIL_SERVER_KEYPASS,
|
||||||
'content' => '',
|
'content' => '',
|
||||||
'module' => 'Admin',
|
'module' => 'Admin',
|
||||||
'encrypted' => true,
|
'encrypted' => true,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
|
|
||||||
|
|
@ -279,7 +279,7 @@ final class ApiController extends Controller
|
||||||
$response->set($request->uri->__toString(), [
|
$response->set($request->uri->__toString(), [
|
||||||
'status' => NotificationLevel::ERROR,
|
'status' => NotificationLevel::ERROR,
|
||||||
'title' => $this->app->l11nManager->getText($response->getLanguage(), 'Admin', 'Api', 'PasswordResetTitle'),
|
'title' => $this->app->l11nManager->getText($response->getLanguage(), 'Admin', 'Api', 'PasswordResetTitle'),
|
||||||
'message' => $this->app->l11nManager->getText($response->getLanguage(), 'Admin', 'Api', 'PasswordResetMsg'),
|
'message' => $this->app->l11nManager->getText($response->getLanguage(), 'Admin', 'Api', 'PasswordResetMsg'),
|
||||||
'response' => null,
|
'response' => null,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
@ -333,8 +333,8 @@ final class ApiController extends Controller
|
||||||
$response->header->set('Content-Type', MimeType::M_JSON . '; charset=utf-8', true);
|
$response->header->set('Content-Type', MimeType::M_JSON . '; charset=utf-8', true);
|
||||||
$response->set($request->uri->__toString(), [
|
$response->set($request->uri->__toString(), [
|
||||||
'status' => NotificationLevel::OK,
|
'status' => NotificationLevel::OK,
|
||||||
'title' => $this->app->l11nManager->getText($response->getLanguage(), 'Admin', 'Api', 'PasswordResetTitle'),
|
'title' => $this->app->l11nManager->getText($response->getLanguage(), 'Admin', 'Api', 'PasswordResetTitle'),
|
||||||
'message' => $this->app->l11nManager->getText($response->getLanguage(), 'Admin', 'Api', 'PasswordResetEmailMsg'),
|
'message' => $this->app->l11nManager->getText($response->getLanguage(), 'Admin', 'Api', 'PasswordResetEmailMsg'),
|
||||||
'response' => null,
|
'response' => null,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
@ -372,7 +372,7 @@ final class ApiController extends Controller
|
||||||
$response->set($request->uri->__toString(), [
|
$response->set($request->uri->__toString(), [
|
||||||
'status' => NotificationLevel::OK,
|
'status' => NotificationLevel::OK,
|
||||||
'title' => $this->app->l11nManager->getText($response->getLanguage(), 'Admin', 'Api', 'PasswordResetTitle'),
|
'title' => $this->app->l11nManager->getText($response->getLanguage(), 'Admin', 'Api', 'PasswordResetTitle'),
|
||||||
'message' => $this->app->l11nManager->getText($response->getLanguage(), 'Admin', 'Api', 'PasswordResetInvalidMsg'),
|
'message' => $this->app->l11nManager->getText($response->getLanguage(), 'Admin', 'Api', 'PasswordResetInvalidMsg'),
|
||||||
'response' => null,
|
'response' => null,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
@ -523,22 +523,22 @@ final class ApiController extends Controller
|
||||||
$dataSettings = $request->getDataJson('settings');
|
$dataSettings = $request->getDataJson('settings');
|
||||||
|
|
||||||
foreach ($dataSettings as $data) {
|
foreach ($dataSettings as $data) {
|
||||||
$id = isset($data['id']) && !empty($data['id']) ? (int) $data['id'] : null;
|
$id = isset($data['id']) && !empty($data['id']) ? (int) $data['id'] : null;
|
||||||
$name = $data['name'] ?? null;
|
$name = $data['name'] ?? null;
|
||||||
$content = $data['content'] ?? null;
|
$content = $data['content'] ?? null;
|
||||||
$unit = $data['unit'] ?? null;
|
$unit = $data['unit'] ?? null;
|
||||||
$app = $data['app'] ?? null;
|
$app = $data['app'] ?? null;
|
||||||
$module = $data['module'] ?? null;
|
$module = $data['module'] ?? null;
|
||||||
$pattern = $data['pattern'] ?? '';
|
$pattern = $data['pattern'] ?? '';
|
||||||
$encrypted = $data['encrypted'] ?? null;
|
$encrypted = $data['encrypted'] ?? null;
|
||||||
$group = isset($data['group']) ? (int) $data['group'] : null;
|
$group = isset($data['group']) ? (int) $data['group'] : null;
|
||||||
$account = isset($data['account']) ? (int) $data['account'] : null;
|
$account = isset($data['account']) ? (int) $data['account'] : null;
|
||||||
|
|
||||||
/** @var \Model\Setting $old */
|
/** @var \Model\Setting $old */
|
||||||
$old = $this->app->appSettings->get($id, $name, $unit, $app, $module, $group, $account);
|
$old = $this->app->appSettings->get($id, $name, $unit, $app, $module, $group, $account);
|
||||||
if ($old->id === 0) {
|
if ($old->id === 0) {
|
||||||
$internalResponse = new HttpResponse();
|
$internalResponse = new HttpResponse();
|
||||||
$internalRequest = new HttpRequest($request->uri);
|
$internalRequest = new HttpRequest($request->uri);
|
||||||
|
|
||||||
$internalRequest->header->account = $request->header->account;
|
$internalRequest->header->account = $request->header->account;
|
||||||
$internalRequest->setData('id', $id);
|
$internalRequest->setData('id', $id);
|
||||||
|
|
@ -559,30 +559,30 @@ final class ApiController extends Controller
|
||||||
|
|
||||||
$new = clone $old;
|
$new = clone $old;
|
||||||
|
|
||||||
$new->name = $name ?? $new->name;
|
$new->name = $name ?? $new->name;
|
||||||
$new->isEncrypted = $encrypted ?? $new->isEncrypted;
|
$new->isEncrypted = $encrypted ?? $new->isEncrypted;
|
||||||
$new->content = $new->isEncrypted && !empty($content) && !empty($_SERVER['OMS_PRIVATE_KEY_I'] ?? '')
|
$new->content = $new->isEncrypted && !empty($content) && !empty($_SERVER['OMS_PRIVATE_KEY_I'] ?? '')
|
||||||
? EncryptionHelper::encryptShared($content, $_SERVER['OMS_PRIVATE_KEY_I'])
|
? EncryptionHelper::encryptShared($content, $_SERVER['OMS_PRIVATE_KEY_I'])
|
||||||
: $content ?? $new->content;
|
: $content ?? $new->content;
|
||||||
$new->unit = $unit ?? $new->unit;
|
$new->unit = $unit ?? $new->unit;
|
||||||
$new->app = $app ?? $new->app;
|
$new->app = $app ?? $new->app;
|
||||||
$new->module = $module ?? $new->module;
|
$new->module = $module ?? $new->module;
|
||||||
$new->group = $group ?? $new->group;
|
$new->group = $group ?? $new->group;
|
||||||
$new->account = $account ?? $new->account;
|
$new->account = $account ?? $new->account;
|
||||||
|
|
||||||
// @todo: this function call seems stupid, it should just pass the $new object.
|
// @todo: this function call seems stupid, it should just pass the $new object.
|
||||||
$this->app->appSettings->set([
|
$this->app->appSettings->set([
|
||||||
[
|
[
|
||||||
'id' => $new->id,
|
'id' => $new->id,
|
||||||
'name' => $new->name,
|
'name' => $new->name,
|
||||||
'content' => $new->content,
|
'content' => $new->content,
|
||||||
'unit' => $new->unit,
|
'unit' => $new->unit,
|
||||||
'app' => $new->app,
|
'app' => $new->app,
|
||||||
'module' => $new->module,
|
'module' => $new->module,
|
||||||
'group' => $new->group,
|
'group' => $new->group,
|
||||||
'account' => $new->account,
|
'account' => $new->account,
|
||||||
'isEncrypted' => $new->isEncrypted,
|
'isEncrypted' => $new->isEncrypted,
|
||||||
]
|
],
|
||||||
], false);
|
], false);
|
||||||
|
|
||||||
$this->updateModel($request->header->account, $old, $new, SettingMapper::class, 'settings', $request->getOrigin());
|
$this->updateModel($request->header->account, $old, $new, SettingMapper::class, 'settings', $request->getOrigin());
|
||||||
|
|
@ -1758,7 +1758,7 @@ final class ApiController extends Controller
|
||||||
$dataChange->createdBy = $account->id;
|
$dataChange->createdBy = $account->id;
|
||||||
|
|
||||||
$dataChange->data = \json_encode([
|
$dataChange->data = \json_encode([
|
||||||
'status' => AccountStatus::ACTIVE
|
'status' => AccountStatus::ACTIVE,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$tries = 0;
|
$tries = 0;
|
||||||
|
|
@ -1827,7 +1827,7 @@ final class ApiController extends Controller
|
||||||
UriFactory::hasQuery('/' . \strtolower($app->name))
|
UriFactory::hasQuery('/' . \strtolower($app->name))
|
||||||
? UriFactory::build('{/' . \strtolower($app->name) . '}/' . \strtolower($app->name) . '/signup/confirmation?hash=' . $dataChange->getHash())
|
? UriFactory::build('{/' . \strtolower($app->name) . '}/' . \strtolower($app->name) . '/signup/confirmation?hash=' . $dataChange->getHash())
|
||||||
: UriFactory::build('{/tld}/{/lang}/' . \strtolower($app->name) . '/signup/confirmation?hash=' . $dataChange->getHash()),
|
: UriFactory::build('{/tld}/{/lang}/' . \strtolower($app->name) . '/signup/confirmation?hash=' . $dataChange->getHash()),
|
||||||
$account->login
|
$account->login,
|
||||||
],
|
],
|
||||||
$mailL11n->body
|
$mailL11n->body
|
||||||
);
|
);
|
||||||
|
|
@ -1841,7 +1841,7 @@ final class ApiController extends Controller
|
||||||
UriFactory::hasQuery('/' . \strtolower($app->name))
|
UriFactory::hasQuery('/' . \strtolower($app->name))
|
||||||
? UriFactory::build('{/' . \strtolower($app->name) . '}/' . \strtolower($app->name) . '/signup/confirmation?hash=' . $dataChange->getHash())
|
? UriFactory::build('{/' . \strtolower($app->name) . '}/' . \strtolower($app->name) . '/signup/confirmation?hash=' . $dataChange->getHash())
|
||||||
: UriFactory::build('{/tld}/{/lang}/' . \strtolower($app->name) . '/signup/confirmation?hash=' . $dataChange->getHash()),
|
: UriFactory::build('{/tld}/{/lang}/' . \strtolower($app->name) . '/signup/confirmation?hash=' . $dataChange->getHash()),
|
||||||
$account->login
|
$account->login,
|
||||||
],
|
],
|
||||||
$mailL11n->bodyAlt
|
$mailL11n->bodyAlt
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,7 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\Admin\Models;
|
namespace Modules\Admin\Models;
|
||||||
|
|
||||||
use phpOMS\Account\AccountStatus;
|
|
||||||
use phpOMS\Auth\LoginReturnType;
|
|
||||||
use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
|
use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
|
||||||
use phpOMS\DataStorage\Database\Query\Builder;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Account mapper class.
|
* Account mapper class.
|
||||||
|
|
@ -39,14 +36,14 @@ class AccountExternalMapper extends DataMapperFactory
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const COLUMNS = [
|
public const COLUMNS = [
|
||||||
'account_external_id' => ['name' => 'account_external_id', 'type' => 'int', 'internal' => 'id'],
|
'account_external_id' => ['name' => 'account_external_id', 'type' => 'int', 'internal' => 'id'],
|
||||||
'account_external_status' => ['name' => 'account_external_status', 'type' => 'int', 'internal' => 'status'],
|
'account_external_status' => ['name' => 'account_external_status', 'type' => 'int', 'internal' => 'status'],
|
||||||
'account_external_type' => ['name' => 'account_external_type', 'type' => 'int', 'internal' => 'type'],
|
'account_external_type' => ['name' => 'account_external_type', 'type' => 'int', 'internal' => 'type'],
|
||||||
'account_external_subtype' => ['name' => 'account_external_subtype', 'type' => 'int', 'internal' => 'subtype'],
|
'account_external_subtype' => ['name' => 'account_external_subtype', 'type' => 'int', 'internal' => 'subtype'],
|
||||||
'account_external_key' => ['name' => 'account_external_key', 'type' => 'string', 'internal' => 'key'],
|
'account_external_key' => ['name' => 'account_external_key', 'type' => 'string', 'internal' => 'key'],
|
||||||
'account_external_name' => ['name' => 'account_external_name', 'type' => 'string', 'internal' => 'name'],
|
'account_external_name' => ['name' => 'account_external_name', 'type' => 'string', 'internal' => 'name'],
|
||||||
'account_external_auth' => ['name' => 'account_external_auth', 'type' => 'string', 'internal' => 'auth', ],
|
'account_external_auth' => ['name' => 'account_external_auth', 'type' => 'string', 'internal' => 'auth', ],
|
||||||
'account_external_account' => ['name' => 'account_external_account', 'type' => 'int', 'internal' => 'account'],
|
'account_external_account' => ['name' => 'account_external_account', 'type' => 'int', 'internal' => 'account'],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,8 @@ final class AddressMapper extends DataMapperFactory
|
||||||
'address_city' => ['name' => 'address_city', 'type' => 'string', 'internal' => 'city'],
|
'address_city' => ['name' => 'address_city', 'type' => 'string', 'internal' => 'city'],
|
||||||
'address_country' => ['name' => 'address_country', 'type' => 'string', 'internal' => 'country'],
|
'address_country' => ['name' => 'address_country', 'type' => 'string', 'internal' => 'country'],
|
||||||
'address_type' => ['name' => 'address_type', 'type' => 'int', 'internal' => 'type'],
|
'address_type' => ['name' => 'address_type', 'type' => 'int', 'internal' => 'type'],
|
||||||
'address_lat' => ['name' => 'address_lat', 'type' => 'float', 'internal' => 'lat'],
|
'address_lat' => ['name' => 'address_lat', 'type' => 'float', 'internal' => 'lat'],
|
||||||
'address_lon' => ['name' => 'address_lon', 'type' => 'float', 'internal' => 'lon'],
|
'address_lon' => ['name' => 'address_lon', 'type' => 'float', 'internal' => 'lon'],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -36,11 +36,11 @@ final class AppMapper extends DataMapperFactory
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const COLUMNS = [
|
public const COLUMNS = [
|
||||||
'app_id' => ['name' => 'app_id', 'type' => 'int', 'internal' => 'id'],
|
'app_id' => ['name' => 'app_id', 'type' => 'int', 'internal' => 'id'],
|
||||||
'app_name' => ['name' => 'app_name', 'type' => 'string', 'internal' => 'name'],
|
'app_name' => ['name' => 'app_name', 'type' => 'string', 'internal' => 'name'],
|
||||||
'app_theme' => ['name' => 'app_theme', 'type' => 'string', 'internal' => 'theme'],
|
'app_theme' => ['name' => 'app_theme', 'type' => 'string', 'internal' => 'theme'],
|
||||||
'app_status' => ['name' => 'app_status', 'type' => 'int', 'internal' => 'status'],
|
'app_status' => ['name' => 'app_status', 'type' => 'int', 'internal' => 'status'],
|
||||||
'app_type' => ['name' => 'app_type', 'type' => 'int', 'internal' => 'type'],
|
'app_type' => ['name' => 'app_type', 'type' => 'int', 'internal' => 'type'],
|
||||||
'app_unit_default' => ['name' => 'app_unit_default', 'type' => 'int', 'internal' => 'defaultUnit'],
|
'app_unit_default' => ['name' => 'app_unit_default', 'type' => 'int', 'internal' => 'defaultUnit'],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ final class ContactMapper extends DataMapperFactory
|
||||||
'account_contact_subtype' => ['name' => 'account_contact_subtype', 'type' => 'int', 'internal' => 'subtype'],
|
'account_contact_subtype' => ['name' => 'account_contact_subtype', 'type' => 'int', 'internal' => 'subtype'],
|
||||||
'account_contact_order' => ['name' => 'account_contact_order', 'type' => 'int', 'internal' => 'order'],
|
'account_contact_order' => ['name' => 'account_contact_order', 'type' => 'int', 'internal' => 'order'],
|
||||||
'account_contact_content' => ['name' => 'account_contact_content', 'type' => 'string', 'internal' => 'content'],
|
'account_contact_content' => ['name' => 'account_contact_content', 'type' => 'string', 'internal' => 'content'],
|
||||||
'account_contact_module' => ['name' => 'account_contact_module', 'type' => 'string', 'internal' => 'module'],
|
'account_contact_module' => ['name' => 'account_contact_module', 'type' => 'string', 'internal' => 'module'],
|
||||||
'account_contact_account' => ['name' => 'account_contact_account', 'type' => 'int', 'internal' => 'account'],
|
'account_contact_account' => ['name' => 'account_contact_account', 'type' => 'int', 'internal' => 'account'],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,10 +36,10 @@ final class DataChangeMapper extends DataMapperFactory
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const COLUMNS = [
|
public const COLUMNS = [
|
||||||
'data_change_id' => ['name' => 'data_change_id', 'type' => 'int', 'internal' => 'id'],
|
'data_change_id' => ['name' => 'data_change_id', 'type' => 'int', 'internal' => 'id'],
|
||||||
'data_change_type' => ['name' => 'data_change_type', 'type' => 'string', 'internal' => 'type'],
|
'data_change_type' => ['name' => 'data_change_type', 'type' => 'string', 'internal' => 'type'],
|
||||||
'data_change_hash' => ['name' => 'data_change_hash', 'type' => 'string', 'internal' => 'hash'],
|
'data_change_hash' => ['name' => 'data_change_hash', 'type' => 'string', 'internal' => 'hash'],
|
||||||
'data_change_data' => ['name' => 'data_change_data', 'type' => 'string', 'internal' => 'data'],
|
'data_change_data' => ['name' => 'data_change_data', 'type' => 'string', 'internal' => 'data'],
|
||||||
'data_change_created_by' => ['name' => 'data_change_created_by', 'type' => 'int', 'internal' => 'createdBy'],
|
'data_change_created_by' => ['name' => 'data_change_created_by', 'type' => 'int', 'internal' => 'createdBy'],
|
||||||
'data_change_created_at' => ['name' => 'data_change_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt'],
|
'data_change_created_at' => ['name' => 'data_change_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt'],
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,8 @@ use phpOMS\Stdlib\Base\Enum;
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
abstract class SettingsEnum extends Enum
|
abstract class SettingsEnum extends Enum
|
||||||
{ /* Logging settings */
|
{
|
||||||
|
/* Logging settings */
|
||||||
public const PASSWORD_PATTERN = '1000000001';
|
public const PASSWORD_PATTERN = '1000000001';
|
||||||
|
|
||||||
public const LOGIN_TIMEOUT = '1000000002';
|
public const LOGIN_TIMEOUT = '1000000002';
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,6 @@ return ['Navigation' => [
|
||||||
'Pages' => 'Pages',
|
'Pages' => 'Pages',
|
||||||
'Permissions' => 'Permissions',
|
'Permissions' => 'Permissions',
|
||||||
'Routes' => 'Routes',
|
'Routes' => 'Routes',
|
||||||
'Hooks' => 'Hooks',
|
'Hooks' => 'Hooks',
|
||||||
'Settings' => 'Settings',
|
'Settings' => 'Settings',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -13,186 +13,186 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
return ['Admin' => [
|
return ['Admin' => [
|
||||||
':s1' => 'Active',
|
':s1' => 'Active',
|
||||||
':s2' => 'Inactive',
|
':s2' => 'Inactive',
|
||||||
':s3' => 'Timeout',
|
':s3' => 'Timeout',
|
||||||
':s4' => 'Banned',
|
':s4' => 'Banned',
|
||||||
'Account' => 'Account',
|
'Account' => 'Account',
|
||||||
'Account/Group' => 'Account/Group',
|
'Account/Group' => 'Account/Group',
|
||||||
'Accounts' => 'Accounts',
|
'Accounts' => 'Accounts',
|
||||||
'Activate' => 'Activate',
|
'Activate' => 'Activate',
|
||||||
'Active' => 'Active',
|
'Active' => 'Active',
|
||||||
'Activity' => 'Activity',
|
'Activity' => 'Activity',
|
||||||
'Address' => 'Address',
|
'Address' => 'Address',
|
||||||
'All' => 'All',
|
'All' => 'All',
|
||||||
'Amount' => 'Amount',
|
'Amount' => 'Amount',
|
||||||
'App' => 'App',
|
'App' => 'App',
|
||||||
'Area' => 'Area',
|
'Area' => 'Area',
|
||||||
'AuditLog' => 'Audit Log',
|
'AuditLog' => 'Audit Log',
|
||||||
'Available' => 'Available',
|
'Available' => 'Available',
|
||||||
'Banned' => 'Banned',
|
'Banned' => 'Banned',
|
||||||
'Cache' => 'Cache',
|
'Cache' => 'Cache',
|
||||||
'Change' => 'Change',
|
'Change' => 'Change',
|
||||||
'Children' => 'Children',
|
'Children' => 'Children',
|
||||||
'City' => 'City',
|
'City' => 'City',
|
||||||
'Close' => 'Close',
|
'Close' => 'Close',
|
||||||
'Comp' => 'Comp.',
|
'Comp' => 'Comp.',
|
||||||
'Component' => 'Component',
|
'Component' => 'Component',
|
||||||
'Country' => 'Country',
|
'Country' => 'Country',
|
||||||
'Create' => 'Create',
|
'Create' => 'Create',
|
||||||
'CreateProfile' => 'Create Profile',
|
'CreateProfile' => 'Create Profile',
|
||||||
'Created' => 'Created',
|
'Created' => 'Created',
|
||||||
'CreatedBy' => 'Created By',
|
'CreatedBy' => 'Created By',
|
||||||
'Currency' => 'Currency',
|
'Currency' => 'Currency',
|
||||||
'Currencyformat' => 'Currency Format',
|
'Currencyformat' => 'Currency Format',
|
||||||
'Customized' => 'Customized',
|
'Customized' => 'Customized',
|
||||||
'Deactivate' => 'Deactivate',
|
'Deactivate' => 'Deactivate',
|
||||||
'DecimalPoint' => 'Decimal Point',
|
'DecimalPoint' => 'Decimal Point',
|
||||||
'Defaults' => 'Defaults',
|
'Defaults' => 'Defaults',
|
||||||
'Delete' => 'Delete',
|
'Delete' => 'Delete',
|
||||||
'Description' => 'Description',
|
'Description' => 'Description',
|
||||||
'Design' => 'Design',
|
'Design' => 'Design',
|
||||||
'Destination' => 'Destination',
|
'Destination' => 'Destination',
|
||||||
'Ele' => 'Ele.',
|
'Ele' => 'Ele.',
|
||||||
'Element' => 'Element',
|
'Element' => 'Element',
|
||||||
'Email' => 'Email',
|
'Email' => 'Email',
|
||||||
'EmailAdmin' => 'Email Admin',
|
'EmailAdmin' => 'Email Admin',
|
||||||
'Fast' => 'Fast',
|
'Fast' => 'Fast',
|
||||||
'Features' => 'Features',
|
'Features' => 'Features',
|
||||||
'File' => 'File',
|
'File' => 'File',
|
||||||
'General' => 'General',
|
'General' => 'General',
|
||||||
'Glass' => 'Glass',
|
'Glass' => 'Glass',
|
||||||
'Group' => 'Group',
|
'Group' => 'Group',
|
||||||
'GroupStatus1' => 'Active',
|
'GroupStatus1' => 'Active',
|
||||||
'GroupStatus2' => 'Inactive',
|
'GroupStatus2' => 'Inactive',
|
||||||
'GroupStatus4' => 'Hidden',
|
'GroupStatus4' => 'Hidden',
|
||||||
'Groups' => 'Groups',
|
'Groups' => 'Groups',
|
||||||
'Heavy' => 'Heavy',
|
'Heavy' => 'Heavy',
|
||||||
'Images' => 'Images',
|
'Images' => 'Images',
|
||||||
'Inactive' => 'Inactive',
|
'Inactive' => 'Inactive',
|
||||||
'Install' => 'Install',
|
'Install' => 'Install',
|
||||||
'Installed' => 'Installed',
|
'Installed' => 'Installed',
|
||||||
'LAddress' => 'Local Address',
|
'LAddress' => 'Local Address',
|
||||||
'Language' => 'Language',
|
'Language' => 'Language',
|
||||||
'Large' => 'Large',
|
'Large' => 'Large',
|
||||||
'Length' => 'Length',
|
'Length' => 'Length',
|
||||||
'Light' => 'Light',
|
'Light' => 'Light',
|
||||||
'Load' => 'Load',
|
'Load' => 'Load',
|
||||||
'Localization' => 'Localization',
|
'Localization' => 'Localization',
|
||||||
'Log' => 'Log',
|
'Log' => 'Log',
|
||||||
'LogPath' => 'Log Path',
|
'LogPath' => 'Log Path',
|
||||||
'Logging' => 'Logging',
|
'Logging' => 'Logging',
|
||||||
'LoginImage' => 'Login Image',
|
'LoginImage' => 'Login Image',
|
||||||
'LoginRetries' => 'Login Retries',
|
'LoginRetries' => 'Login Retries',
|
||||||
'Loginname' => 'Login Name',
|
'Loginname' => 'Login Name',
|
||||||
'Long' => 'Long',
|
'Long' => 'Long',
|
||||||
'Lowercase' => 'Lowercase',
|
'Lowercase' => 'Lowercase',
|
||||||
'Maintenance' => 'Maintenance',
|
'Maintenance' => 'Maintenance',
|
||||||
'Medium' => 'Medium',
|
'Medium' => 'Medium',
|
||||||
'Member' => 'Member',
|
'Member' => 'Member',
|
||||||
'Members' => 'Members',
|
'Members' => 'Members',
|
||||||
'Memcache' => 'Memcache',
|
'Memcache' => 'Memcache',
|
||||||
'MemoryLimit' => 'Memory Limit',
|
'MemoryLimit' => 'Memory Limit',
|
||||||
'Message' => 'Message',
|
'Message' => 'Message',
|
||||||
'Module' => 'Module',
|
'Module' => 'Module',
|
||||||
'Modules' => 'Modules',
|
'Modules' => 'Modules',
|
||||||
'Name' => 'Name',
|
'Name' => 'Name',
|
||||||
'Name1' => 'Name 1',
|
'Name1' => 'Name 1',
|
||||||
'Name2' => 'Name 2',
|
'Name2' => 'Name 2',
|
||||||
'Name3' => 'Name 3',
|
'Name3' => 'Name 3',
|
||||||
'None' => 'None',
|
'None' => 'None',
|
||||||
'Numberformat' => 'Numberformat',
|
'Numberformat' => 'Numberformat',
|
||||||
'Numeric' => 'Numeric',
|
'Numeric' => 'Numeric',
|
||||||
'Organization' => 'Organization',
|
'Organization' => 'Organization',
|
||||||
'OrganizationName' => 'Organization Name',
|
'OrganizationName' => 'Organization Name',
|
||||||
'Page' => 'Page',
|
'Page' => 'Page',
|
||||||
'Parent' => 'Parent',
|
'Parent' => 'Parent',
|
||||||
'Parents' => 'Parents',
|
'Parents' => 'Parents',
|
||||||
'Password' => 'Password',
|
'Password' => 'Password',
|
||||||
'PasswordChangeInterval' => 'Password Change Interval (days)',
|
'PasswordChangeInterval' => 'Password Change Interval (days)',
|
||||||
'PasswordHistory' => 'Password History',
|
'PasswordHistory' => 'Password History',
|
||||||
'PasswordRegex' => 'Password Regex',
|
'PasswordRegex' => 'Password Regex',
|
||||||
'Perm' => 'Perm.',
|
'Perm' => 'Perm.',
|
||||||
'Permission' => 'Permission',
|
'Permission' => 'Permission',
|
||||||
'Permissions' => 'Permissions',
|
'Permissions' => 'Permissions',
|
||||||
'Person' => 'Person',
|
'Person' => 'Person',
|
||||||
'Precision' => 'Precision',
|
'Precision' => 'Precision',
|
||||||
'Profile' => 'Profile',
|
'Profile' => 'Profile',
|
||||||
'RAddress' => 'Remote Address',
|
'RAddress' => 'Remote Address',
|
||||||
'ReCache' => 'Re-Cache',
|
'ReCache' => 'Re-Cache',
|
||||||
'Read' => 'Read',
|
'Read' => 'Read',
|
||||||
'Release' => 'Release',
|
'Release' => 'Release',
|
||||||
'Reset' => 'Reset',
|
'Reset' => 'Reset',
|
||||||
'Route' => 'Route',
|
'Route' => 'Route',
|
||||||
'Routes' => 'Routes',
|
'Routes' => 'Routes',
|
||||||
'Hook' => 'Hook',
|
'Hook' => 'Hook',
|
||||||
'Hooks' => 'Hooks',
|
'Hooks' => 'Hooks',
|
||||||
'Running' => 'Running',
|
'Running' => 'Running',
|
||||||
'Sea' => 'Sea',
|
'Sea' => 'Sea',
|
||||||
'Search' => 'Search',
|
'Search' => 'Search',
|
||||||
'Security' => 'Security',
|
'Security' => 'Security',
|
||||||
'Settings' => 'Settings',
|
'Settings' => 'Settings',
|
||||||
'SettingsGeneral' => 'Settings - General',
|
'SettingsGeneral' => 'Settings - General',
|
||||||
'Short' => 'Short',
|
'Short' => 'Short',
|
||||||
'Single' => 'Single',
|
'Single' => 'Single',
|
||||||
'Slow' => 'Slow',
|
'Slow' => 'Slow',
|
||||||
'Small' => 'Small',
|
'Small' => 'Small',
|
||||||
'Specialchar' => 'Special character',
|
'Specialchar' => 'Special character',
|
||||||
'Speed' => 'Speed',
|
'Speed' => 'Speed',
|
||||||
'Status' => 'Status',
|
'Status' => 'Status',
|
||||||
'Status0' => 'None',
|
'Status0' => 'None',
|
||||||
'Status1' => 'Active',
|
'Status1' => 'Active',
|
||||||
'Status2' => 'Inactive',
|
'Status2' => 'Inactive',
|
||||||
'Status3' => 'Timehout',
|
'Status3' => 'Timehout',
|
||||||
'Status4' => 'Banned',
|
'Status4' => 'Banned',
|
||||||
'Tablespoon' => 'Tablespoon',
|
'Tablespoon' => 'Tablespoon',
|
||||||
'Teaspoon' => 'Teaspoon',
|
'Teaspoon' => 'Teaspoon',
|
||||||
'Temperature' => 'Temperature',
|
'Temperature' => 'Temperature',
|
||||||
'Theme' => 'Theme',
|
'Theme' => 'Theme',
|
||||||
'ThousandsSeparator' => 'Thousands Separator',
|
'ThousandsSeparator' => 'Thousands Separator',
|
||||||
'Time' => 'Time',
|
'Time' => 'Time',
|
||||||
'Timeformat' => 'Timeformat',
|
'Timeformat' => 'Timeformat',
|
||||||
'Timeout' => 'Timeout',
|
'Timeout' => 'Timeout',
|
||||||
'TimeoutPeriod' => 'Timeout Period (minutes)',
|
'TimeoutPeriod' => 'Timeout Period (minutes)',
|
||||||
'Timestamp' => 'Timestamp',
|
'Timestamp' => 'Timestamp',
|
||||||
'Timezone' => 'Timezone',
|
'Timezone' => 'Timezone',
|
||||||
'Total' => 'Total',
|
'Total' => 'Total',
|
||||||
'Type' => 'Type',
|
'Type' => 'Type',
|
||||||
'Uninstall' => 'Uninstall',
|
'Uninstall' => 'Uninstall',
|
||||||
'Unit' => 'Unit',
|
'Unit' => 'Unit',
|
||||||
'Update' => 'Update',
|
'Update' => 'Update',
|
||||||
'Uppercase' => 'Uppercase',
|
'Uppercase' => 'Uppercase',
|
||||||
'Username' => 'Username',
|
'Username' => 'Username',
|
||||||
'Value' => 'Value',
|
'Value' => 'Value',
|
||||||
'Verb' => 'Verb',
|
'Verb' => 'Verb',
|
||||||
'Version' => 'Version',
|
'Version' => 'Version',
|
||||||
'VeryFast' => 'Very Fast',
|
'VeryFast' => 'Very Fast',
|
||||||
'VeryHeavy' => 'Very Heavy',
|
'VeryHeavy' => 'Very Heavy',
|
||||||
'VeryLarge' => 'Very Large',
|
'VeryLarge' => 'Very Large',
|
||||||
'VeryLight' => 'Very Light',
|
'VeryLight' => 'Very Light',
|
||||||
'VeryLong' => 'Very Long',
|
'VeryLong' => 'Very Long',
|
||||||
'VeryShort' => 'Very Short',
|
'VeryShort' => 'Very Short',
|
||||||
'VerySlow' => 'Very Slow',
|
'VerySlow' => 'Very Slow',
|
||||||
'VerySmall' => 'Very Small',
|
'VerySmall' => 'Very Small',
|
||||||
'Volume' => 'Volume',
|
'Volume' => 'Volume',
|
||||||
'Warnings' => 'Warnings',
|
'Warnings' => 'Warnings',
|
||||||
'Website' => 'Website',
|
'Website' => 'Website',
|
||||||
'Weight' => 'Weight',
|
'Weight' => 'Weight',
|
||||||
'Zip' => 'Zip',
|
'Zip' => 'Zip',
|
||||||
'Trigger' => 'Trigger',
|
'Trigger' => 'Trigger',
|
||||||
'ServerStatus' => 'Server Status',
|
'ServerStatus' => 'Server Status',
|
||||||
'ServerMode-1' => 'Normal',
|
'ServerMode-1' => 'Normal',
|
||||||
'ServerMode-2' => 'Read Only',
|
'ServerMode-2' => 'Read Only',
|
||||||
'ServerMode-3' => 'Disabled',
|
'ServerMode-3' => 'Disabled',
|
||||||
'i:LoginRetries' => 'Amount of allowed retries (-1 = unlimited)',
|
'i:LoginRetries' => 'Amount of allowed retries (-1 = unlimited)',
|
||||||
'i:PasswordChangeInterval' => 'Interval in which passwards need to be changed (-1 = never)',
|
'i:PasswordChangeInterval' => 'Interval in which passwards need to be changed (-1 = never)',
|
||||||
'i:PasswordHistory' => 'New password has to be different from the last N passwords',
|
'i:PasswordHistory' => 'New password has to be different from the last N passwords',
|
||||||
'i:PasswordRegex' => 'Password requirement for users',
|
'i:PasswordRegex' => 'Password requirement for users',
|
||||||
'i:TimeoutPeriod' => 'Timeout period after too many logins',
|
'i:TimeoutPeriod' => 'Timeout period after too many logins',
|
||||||
'i:loc' => 'IP address or URL for remote access.',
|
'i:loc' => 'IP address or URL for remote access.',
|
||||||
'i:mail' => 'Email address.',
|
'i:mail' => 'Email address.',
|
||||||
'i:oname' => 'Organization name.',
|
'i:oname' => 'Organization name.',
|
||||||
'i:rc' => 'Forcing re-cache for every user.',
|
'i:rc' => 'Forcing re-cache for every user.',
|
||||||
'i:rem' => 'IP address or URL for remote access.',
|
'i:rem' => 'IP address or URL for remote access.',
|
||||||
'i:timef' => 'Time format.',
|
'i:timef' => 'Time format.',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -59,13 +59,13 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
||||||
protected string $appName = 'Api';
|
protected string $appName = 'Api';
|
||||||
};
|
};
|
||||||
|
|
||||||
$this->app->dbPool = $GLOBALS['dbpool'];
|
$this->app->dbPool = $GLOBALS['dbpool'];
|
||||||
$this->app->unitId = 1;
|
$this->app->unitId = 1;
|
||||||
$this->app->accountManager = new AccountManager($GLOBALS['session']);
|
$this->app->accountManager = new AccountManager($GLOBALS['session']);
|
||||||
$this->app->appSettings = new CoreSettings();
|
$this->app->appSettings = new CoreSettings();
|
||||||
$this->app->moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../../Modules/');
|
$this->app->moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../../Modules/');
|
||||||
$this->app->dispatcher = new Dispatcher($this->app);
|
$this->app->dispatcher = new Dispatcher($this->app);
|
||||||
$this->app->eventManager = new EventManager($this->app->dispatcher);
|
$this->app->eventManager = new EventManager($this->app->dispatcher);
|
||||||
$this->app->eventManager->importFromFile(__DIR__ . '/../../../../Web/Api/Hooks.php');
|
$this->app->eventManager->importFromFile(__DIR__ . '/../../../../Web/Api/Hooks.php');
|
||||||
$this->app->sessionManager = new HttpSession(36000);
|
$this->app->sessionManager = new HttpSession(36000);
|
||||||
$this->app->l11nManager = new L11nManager();
|
$this->app->l11nManager = new L11nManager();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user