mirror of
https://github.com/Karaka-Management/oms-Auditor.git
synced 2026-02-08 02: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 [
|
||||
'/POST:Module:.*?\-create/' => [
|
||||
'callback' => ['\Modules\Auditor\Controller\ApiController:apiLogCreate'],
|
||||
'callback' => ['\Modules\Auditor\Controller\ApiController:eventLogCreate'],
|
||||
],
|
||||
'/POST:Module:.*?\-update/' => [
|
||||
'callback' => ['\Modules\Auditor\Controller\ApiController:apiLogUpdate'],
|
||||
'callback' => ['\Modules\Auditor\Controller\ApiController:eventLogUpdate'],
|
||||
],
|
||||
'/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
|
||||
*/
|
||||
public function apiLogCreate(
|
||||
public function eventLogCreate(
|
||||
int $account,
|
||||
mixed $old,
|
||||
mixed $new,
|
||||
|
|
@ -85,7 +85,7 @@ final class ApiController extends Controller
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function apiLogUpdate(
|
||||
public function eventLogUpdate(
|
||||
int $account,
|
||||
mixed $old,
|
||||
mixed $new,
|
||||
|
|
@ -128,7 +128,7 @@ final class ApiController extends Controller
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function apiLogDelete(
|
||||
public function eventLogDelete(
|
||||
int $account,
|
||||
mixed $old,
|
||||
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
|
||||
*
|
||||
* @package Modules\Localization
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 1.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
|
||||
*
|
||||
* @package Modules\Localization
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
|
|
@ -12,14 +13,14 @@
|
|||
declare(strict_types=1);
|
||||
|
||||
return ['Auditor' => [
|
||||
'Action' => '',
|
||||
'Action' => 'Action',
|
||||
'Audit' => 'Audit',
|
||||
'Auditor' => 'Auditor',
|
||||
'Audits' => 'Audits',
|
||||
'By' => 'By',
|
||||
'CREATE' => '',
|
||||
'CREATE' => 'Create',
|
||||
'Content' => 'Content',
|
||||
'DELETE' => '',
|
||||
'DELETE' => 'Delete',
|
||||
'Date' => 'Date',
|
||||
'Email' => 'Email',
|
||||
'Module' => 'Module',
|
||||
|
|
@ -28,8 +29,8 @@ return ['Auditor' => [
|
|||
'Old' => 'Old',
|
||||
'Ref' => 'Ref',
|
||||
'Subtype' => 'Subtype',
|
||||
'Trigger' => '',
|
||||
'Trigger' => 'Trigger',
|
||||
'Type' => 'Type',
|
||||
'UNKNOWN' => '',
|
||||
'UPDATE' => '',
|
||||
'UNKNOWN' => 'Unknown',
|
||||
'UPDATE' => 'Update',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
|||
*/
|
||||
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();
|
||||
|
||||
foreach($logs as $log) {
|
||||
|
|
@ -117,7 +117,7 @@ class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
|||
*/
|
||||
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();
|
||||
|
||||
$found = false;
|
||||
|
|
@ -146,7 +146,7 @@ class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
|||
public function testLogUpdateWithoutChange() : void
|
||||
{
|
||||
$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();
|
||||
|
||||
self::assertGreaterThan(0, \count($logs));
|
||||
|
|
@ -160,7 +160,7 @@ class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
|||
*/
|
||||
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();
|
||||
|
||||
foreach($logs as $log) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user