mirror of
https://github.com/Karaka-Management/oms-Auditor.git
synced 2026-02-17 14:08:41 +00:00
fix php version, lang files, basic tpl and sales impl.
This commit is contained in:
parent
031f32cce7
commit
632b719fa1
|
|
@ -1,13 +1,25 @@
|
||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
|
/**
|
||||||
|
* Orange Management
|
||||||
|
*
|
||||||
|
* PHP Version 8.0
|
||||||
|
*
|
||||||
|
* @package Modules\Auditor
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link https://orange-management.org
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'/POST:Module:.*?\-create/' => [
|
'/POST:Module:.*?\-create/' => [
|
||||||
'callback' => ['\Modules\Auditor\Controller\ApiController:apiLogCreate'],
|
'callback' => ['\Modules\Auditor\Controller\ApiController:eventLogCreate'],
|
||||||
],
|
],
|
||||||
'/POST:Module:.*?\-update/' => [
|
'/POST:Module:.*?\-update/' => [
|
||||||
'callback' => ['\Modules\Auditor\Controller\ApiController:apiLogUpdate'],
|
'callback' => ['\Modules\Auditor\Controller\ApiController:eventLogUpdate'],
|
||||||
],
|
],
|
||||||
'/POST:Module:.*?\-delete/' => [
|
'/POST:Module:.*?\-delete/' => [
|
||||||
'callback' => ['\Modules\Auditor\Controller\ApiController:apiLogDelete'],
|
'callback' => ['\Modules\Auditor\Controller\ApiController:eventLogDelete'],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ final class ApiController extends Controller
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function apiLogCreate(
|
public function eventLogCreate(
|
||||||
int $account,
|
int $account,
|
||||||
mixed $old,
|
mixed $old,
|
||||||
mixed $new,
|
mixed $new,
|
||||||
|
|
@ -85,7 +85,7 @@ final class ApiController extends Controller
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function apiLogUpdate(
|
public function eventLogUpdate(
|
||||||
int $account,
|
int $account,
|
||||||
mixed $old,
|
mixed $old,
|
||||||
mixed $new,
|
mixed $new,
|
||||||
|
|
@ -128,7 +128,7 @@ final class ApiController extends Controller
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function apiLogDelete(
|
public function eventLogDelete(
|
||||||
int $account,
|
int $account,
|
||||||
mixed $old,
|
mixed $old,
|
||||||
mixed $new,
|
mixed $new,
|
||||||
|
|
|
||||||
1
Theme/Backend/Lang/de.lang.php
Executable file → Normal file
1
Theme/Backend/Lang/de.lang.php
Executable file → Normal file
|
|
@ -4,6 +4,7 @@
|
||||||
*
|
*
|
||||||
* PHP Version 8.0
|
* PHP Version 8.0
|
||||||
*
|
*
|
||||||
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
|
|
|
||||||
13
Theme/Backend/Lang/en.lang.php
Executable file → Normal file
13
Theme/Backend/Lang/en.lang.php
Executable file → Normal file
|
|
@ -4,6 +4,7 @@
|
||||||
*
|
*
|
||||||
* PHP Version 8.0
|
* PHP Version 8.0
|
||||||
*
|
*
|
||||||
|
* @package Modules\Localization
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
|
|
@ -12,14 +13,14 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
return ['Auditor' => [
|
return ['Auditor' => [
|
||||||
'Action' => '',
|
'Action' => 'Action',
|
||||||
'Audit' => 'Audit',
|
'Audit' => 'Audit',
|
||||||
'Auditor' => 'Auditor',
|
'Auditor' => 'Auditor',
|
||||||
'Audits' => 'Audits',
|
'Audits' => 'Audits',
|
||||||
'By' => 'By',
|
'By' => 'By',
|
||||||
'CREATE' => '',
|
'CREATE' => 'Create',
|
||||||
'Content' => 'Content',
|
'Content' => 'Content',
|
||||||
'DELETE' => '',
|
'DELETE' => 'Delete',
|
||||||
'Date' => 'Date',
|
'Date' => 'Date',
|
||||||
'Email' => 'Email',
|
'Email' => 'Email',
|
||||||
'Module' => 'Module',
|
'Module' => 'Module',
|
||||||
|
|
@ -28,8 +29,8 @@ return ['Auditor' => [
|
||||||
'Old' => 'Old',
|
'Old' => 'Old',
|
||||||
'Ref' => 'Ref',
|
'Ref' => 'Ref',
|
||||||
'Subtype' => 'Subtype',
|
'Subtype' => 'Subtype',
|
||||||
'Trigger' => '',
|
'Trigger' => 'Trigger',
|
||||||
'Type' => 'Type',
|
'Type' => 'Type',
|
||||||
'UNKNOWN' => '',
|
'UNKNOWN' => 'Unknown',
|
||||||
'UPDATE' => '',
|
'UPDATE' => 'Update',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
||||||
*/
|
*/
|
||||||
public function testLogCreate() : void
|
public function testLogCreate() : void
|
||||||
{
|
{
|
||||||
$this->module->apiLogCreate(1, null, ['id' => 1, 'test' => true], 1, 'test-trigger', 'Auditor', 'abc', 'def');
|
$this->module->eventLogCreate(1, null, ['id' => 1, 'test' => true], 1, 'test-trigger', 'Auditor', 'abc', 'def');
|
||||||
$logs = AuditMapper::getAll();
|
$logs = AuditMapper::getAll();
|
||||||
|
|
||||||
foreach($logs as $log) {
|
foreach($logs as $log) {
|
||||||
|
|
@ -117,7 +117,7 @@ class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
||||||
*/
|
*/
|
||||||
public function testLogUpdate() : void
|
public function testLogUpdate() : void
|
||||||
{
|
{
|
||||||
$this->module->apiLogUpdate(1, ['id' => 2, 'test' => true], ['id' => 1, 'test' => true], 1, 'test-trigger', 'Auditor', 'abc', 'def');
|
$this->module->eventLogUpdate(1, ['id' => 2, 'test' => true], ['id' => 1, 'test' => true], 1, 'test-trigger', 'Auditor', 'abc', 'def');
|
||||||
$logs = AuditMapper::getAll();
|
$logs = AuditMapper::getAll();
|
||||||
|
|
||||||
$found = false;
|
$found = false;
|
||||||
|
|
@ -146,7 +146,7 @@ class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
||||||
public function testLogUpdateWithoutChange() : void
|
public function testLogUpdateWithoutChange() : void
|
||||||
{
|
{
|
||||||
$logs = AuditMapper::getAll();
|
$logs = AuditMapper::getAll();
|
||||||
$this->module->apiLogUpdate(1, ['id' => 2, 'test' => true], ['id' => 2, 'test' => true], 1, 'test-trigger', 'Auditor', 'abc', 'def');
|
$this->module->eventLogUpdate(1, ['id' => 2, 'test' => true], ['id' => 2, 'test' => true], 1, 'test-trigger', 'Auditor', 'abc', 'def');
|
||||||
$logs2 = AuditMapper::getAll();
|
$logs2 = AuditMapper::getAll();
|
||||||
|
|
||||||
self::assertGreaterThan(0, \count($logs));
|
self::assertGreaterThan(0, \count($logs));
|
||||||
|
|
@ -160,7 +160,7 @@ class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
||||||
*/
|
*/
|
||||||
public function testLogDelete() : void
|
public function testLogDelete() : void
|
||||||
{
|
{
|
||||||
$this->module->apiLogDelete(1, ['id' => 1, 'test' => true], null, 1, 'test-trigger', 'Auditor', 'abc', 'def');
|
$this->module->eventLogDelete(1, ['id' => 1, 'test' => true], null, 1, 'test-trigger', 'Auditor', 'abc', 'def');
|
||||||
$logs = AuditMapper::getAll();
|
$logs = AuditMapper::getAll();
|
||||||
|
|
||||||
foreach($logs as $log) {
|
foreach($logs as $log) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user