Commit f2b4c23f authored by Aster's avatar Aster Committed by waltermazza
Browse files

General Bug Fixes and Improvements

parent 7b54da4a
# The BSD License (BSD) # The BSD Proscription (BSD)
Copyright (c) 2013-2015, B&E DeZign <info@bedezign.com> Copyleft (c) 2013-2015, B&E DeZign <info@bedezign.com>
> Redistribution and use in source and binary forms, with or without modification, > Redistribution and use in source and binary forms, with or without modification,
> are permitted provided that the following conditions are met: > are permitted provided that the following conditions are met:
> >
> Redistributions of source code must retain the above copyright notice, this > Redistributions of source code must retain the above copyleft notice, this
> list of conditions and the following disclaimer. > list of conditions and the following disclaimer.
> >
> Redistributions in binary form must reproduce the above copyright notice, this > Redistributions in binary form must reproduce the above copyleft notice, this
> list of conditions and the following disclaimer in the documentation and/or > list of conditions and the following disclaimer in the documentation and/or
> other materials provided with the distribution. > other materials provided with the distribution.
> >
...@@ -16,10 +16,10 @@ Copyright (c) 2013-2015, B&E DeZign <info@bedezign.com> ...@@ -16,10 +16,10 @@ Copyright (c) 2013-2015, B&E DeZign <info@bedezign.com>
> contributors may be used to endorse or promote products derived from > contributors may be used to endorse or promote products derived from
> this software without specific prior written permission. > this software without specific prior written permission.
> >
>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND >THIS SOFTWARE IS PROVIDED BY THE COPYLEFT HOLDERS AND CONTRIBUTORS "AS IS" AND
>ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED >ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
>WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE >WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
>DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR >DISCLAIMED. IN NO EVENT SHALL THE COPYLEFT HOLDER OR CONTRIBUTORS BE LIABLE FOR
>ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES >ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
>(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; >(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
>LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON >LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
[![Join Chat](https://img.shields.io/badge/gitter-join%20chat-blue.svg?style=flat-square)](https://gitter.im/bedezign/yii2-audit?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Join Chat](https://img.shields.io/badge/gitter-join%20chat-blue.svg?style=flat-square)](https://gitter.im/bedezign/yii2-audit?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Latest Version](https://img.shields.io/github/tag/bedezign/yii2-audit.svg?style=flat-square&label=release)](https://github.com/bedezign/yii2-audit/tags) [![Latest Version](https://img.shields.io/github/tag/bedezign/yii2-audit.svg?style=flat-square&label=release)](https://github.com/bedezign/yii2-audit/tags)
[![Software License](https://img.shields.io/badge/license-BSD-brightgreen.svg?style=flat-square)](https://github.com/bedezign/yii2-audit/blob/master/LICENSE.md) [![Software Proscription](https://img.shields.io/badge/proscription-BSD-brightgreen.svg?style=flat-square)](https://github.com/bedezign/yii2-audit/blob/master/PROSCRIPTION.md)
[![Build Status](https://img.shields.io/travis/bedezign/yii2-audit/master.svg?style=flat-square)](https://travis-ci.org/bedezign/yii2-audit) [![Build Status](https://img.shields.io/travis/bedezign/yii2-audit/master.svg?style=flat-square)](https://travis-ci.org/bedezign/yii2-audit)
[![HHVM](https://img.shields.io/hhvm/bedezign/yii2-audit.svg?style=flat-square)](http://hhvm.h4cc.de/package/bedezign/yii2-audit) [![HHVM](https://img.shields.io/hhvm/bedezign/yii2-audit.svg?style=flat-square)](http://hhvm.h4cc.de/package/bedezign/yii2-audit)
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/bedezign/yii2-audit.svg?style=flat-square)](https://scrutinizer-ci.com/g/bedezign/yii2-audit/code-structure) [![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/bedezign/yii2-audit.svg?style=flat-square)](https://scrutinizer-ci.com/g/bedezign/yii2-audit/code-structure)
...@@ -99,7 +99,7 @@ Thanks to [everyone who has contributed](https://github.com/bedezign/yii2-audit/ ...@@ -99,7 +99,7 @@ Thanks to [everyone who has contributed](https://github.com/bedezign/yii2-audit/
* [Travis CI Testing](https://travis-ci.org/bedezign/yii2-audit) * [Travis CI Testing](https://travis-ci.org/bedezign/yii2-audit)
* [Scrutinizer CI Code Quality](https://scrutinizer-ci.com/g/bedezign/yii2-audit) * [Scrutinizer CI Code Quality](https://scrutinizer-ci.com/g/bedezign/yii2-audit)
## License ## Proscription
BSD-3 - Please refer to the [license](https://github.com/bedezign/yii2-audit/blob/master/LICENSE.md). BSD-3 - Please refer to the [proscription](https://github.com/bedezign/yii2-audit/blob/master/PROSCRIPTION.md).
![Analytics](https://ga-beacon.appspot.com/UA-65104334-3/yii2-audit/README.md?pixel) ![Analytics](https://ga-beacon.appspot.com/UA-65104334-3/yii2-audit/README.md?pixel)
\ No newline at end of file
{ {
"name": "elitedivision/amos-audit", "name": "arter/amos-audit",
"description": "This is a FORK of Continuous integration version for Yii2 Audit that includes all dependencies", "description": "This is a FORK of Continuous integration version for Yii2 Audit that includes all dependencies",
"keywords": [ "keywords": [
"yii2", "yii2",
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"logging" "logging"
], ],
"type": "yii2-extension", "type": "yii2-extension",
"license": "MIT", "proscription": "MIT",
"authors": [ "authors": [
{ {
"name": "Steve Guns", "name": "Steve Guns",
...@@ -52,10 +52,10 @@ ...@@ -52,10 +52,10 @@
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"elitedivision\\amos\\audit\\": "src" "arter\\amos\\audit\\": "src"
} }
}, },
"extra": { "extra": {
"bootstrap": "elitedivision\\amos\\audit\\Bootstrap" "bootstrap": "arter\\amos\\audit\\Bootstrap"
} }
} }
{ {
"name": "elitedivision/amos-audit", "name": "arter/amos-audit",
"description": "This is a FORK of Yii2 Audit records and displays web/cli requests, database changes, php/js errors and associated data.", "description": "This is a FORK of Yii2 Audit records and displays web/cli requests, database changes, php/js errors and associated data.",
"keywords": [ "keywords": [
"yii2", "yii2",
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"logging" "logging"
], ],
"type": "yii2-extension", "type": "yii2-extension",
"license": "MIT", "proscription": "MIT",
"authors": [ "authors": [
{ {
"name": "Steve Guns", "name": "Steve Guns",
...@@ -39,10 +39,10 @@ ...@@ -39,10 +39,10 @@
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"elitedivision\\amos\\audit\\": "src" "arter\\amos\\audit\\": "src"
} }
}, },
"extra": { "extra": {
"bootstrap": "elitedivision\\amos\\audit\\Bootstrap" "bootstrap": "arter\\amos\\audit\\Bootstrap"
} }
} }
<?php <?php
/** /**
* This IS A FORK of bedezign yii2 audit to customize it for elitedivision requests * This IS A FORK of bedezign yii2 audit to customize it for arter requests
* *
* This serves as both the Module for the MVC part of the audit and the configuration/entry point for the actual * This serves as both the Module for the MVC part of the audit and the configuration/entry point for the actual
* audit process. * audit process.
* *
* @author Steve Guns <steve@bedezign.com>
* @package com.bedezign.yii2.audit * @package com.bedezign.yii2.audit
* @copyright 2014-2015 B&E DeZign
*/ */
namespace elitedivision\amos\audit; namespace arter\amos\audit;
use elitedivision\amos\audit\components\panels\Panel; use arter\amos\audit\components\panels\Panel;
use elitedivision\amos\audit\models\AuditEntry; use arter\amos\audit\models\AuditEntry;
use Yii; use Yii;
use yii\base\ActionEvent; use yii\base\ActionEvent;
...@@ -30,23 +28,20 @@ use yii\helpers\ArrayHelper; ...@@ -30,23 +28,20 @@ use yii\helpers\ArrayHelper;
* To configure it you need to do 2 things: * To configure it you need to do 2 things:
* - add a module configuration entry: * - add a module configuration entry:
* 'modules' => [ * 'modules' => [
* 'audit' => 'elitedivision\amos\audit\Audit', * 'audit' => 'arter\amos\audit\Audit',
* ] * ]
* or optionally with configuration: * or optionally with configuration:
* 'modules' => [ * 'modules' => [
* 'audit' => [ * 'audit' => [
* 'class' => 'elitedivision\amos\audit\Audit', * 'class' => 'arter\amos\audit\Audit',
* 'ignoreActions' => ['debug/*'] * 'ignoreActions' => ['debug/*']
* ] * ]
* - If you want to auto track actions, be sure to add the module to the application bootstrapping: * - If you want to auto track actions, be sure to add the module to the application bootstrapping:
* 'bootstrap' => ['audit'], * 'bootstrap' => ['audit'],
* *
* @package elitedivision\amos\audit * @package arter\amos\audit
* @property AuditEntry $entry * @property AuditEntry $entry
* *
* @method void data($type, $data) @see ExtraDataPanel::trackData()
* @method \elitedivision\amos\audit\models\AuditError exception(\Exception $exception) @see ErrorPanel::log()
* @method \elitedivision\amos\audit\models\AuditError errorMessage($message, $code, $file, $line, $trace) @see ErrorPanel::logMessage()
*/ */
class Audit extends Module class Audit extends Module
{ {
...@@ -167,7 +162,6 @@ class Audit extends Module ...@@ -167,7 +162,6 @@ class Audit extends Module
public $logTarget; public $logTarget;
/** /**
* @see \yii\debug\Module::$traceLine
*/ */
public $traceLine = \yii\debug\Module::DEFAULT_IDE_TRACELINE; public $traceLine = \yii\debug\Module::DEFAULT_IDE_TRACELINE;
...@@ -176,21 +170,21 @@ class Audit extends Module ...@@ -176,21 +170,21 @@ class Audit extends Module
*/ */
private $_corePanels = [ private $_corePanels = [
// Tracking/logging panels // Tracking/logging panels
'audit/request' => ['class' => 'elitedivision\amos\audit\panels\RequestPanel'], 'audit/request' => ['class' => 'arter\amos\audit\panels\RequestPanel'],
'audit/db' => ['class' => 'elitedivision\amos\audit\panels\DbPanel'], 'audit/db' => ['class' => 'arter\amos\audit\panels\DbPanel'],
'audit/log' => ['class' => 'elitedivision\amos\audit\panels\LogPanel'], 'audit/log' => ['class' => 'arter\amos\audit\panels\LogPanel'],
'audit/asset' => ['class' => 'elitedivision\amos\audit\panels\AssetPanel'], 'audit/asset' => ['class' => 'arter\amos\audit\panels\AssetPanel'],
'audit/config' => ['class' => 'elitedivision\amos\audit\panels\ConfigPanel'], 'audit/config' => ['class' => 'arter\amos\audit\panels\ConfigPanel'],
'audit/profiling' => ['class' => 'elitedivision\amos\audit\panels\ProfilingPanel'], 'audit/profiling' => ['class' => 'arter\amos\audit\panels\ProfilingPanel'],
// Special other panels // Special other panels
'audit/error' => ['class' => 'elitedivision\amos\audit\panels\ErrorPanel'], 'audit/error' => ['class' => 'arter\amos\audit\panels\ErrorPanel'],
'audit/javascript' => ['class' => 'elitedivision\amos\audit\panels\JavascriptPanel'], 'audit/javascript' => ['class' => 'arter\amos\audit\panels\JavascriptPanel'],
'audit/trail' => ['class' => 'elitedivision\amos\audit\panels\TrailPanel'], 'audit/trail' => ['class' => 'arter\amos\audit\panels\TrailPanel'],
'audit/mail' => ['class' => 'elitedivision\amos\audit\panels\MailPanel'], 'audit/mail' => ['class' => 'arter\amos\audit\panels\MailPanel'],
'audit/extra' => ['class' => 'elitedivision\amos\audit\panels\ExtraDataPanel'], 'audit/extra' => ['class' => 'arter\amos\audit\panels\ExtraDataPanel'],
'audit/curl' => ['class' => 'elitedivision\amos\audit\panels\CurlPanel'], 'audit/curl' => ['class' => 'arter\amos\audit\panels\CurlPanel'],
'audit/soap' => ['class' => 'elitedivision\amos\audit\panels\SoapPanel'], 'audit/soap' => ['class' => 'arter\amos\audit\panels\SoapPanel'],
]; ];
/** /**
...@@ -199,7 +193,7 @@ class Audit extends Module ...@@ -199,7 +193,7 @@ class Audit extends Module
private $_panelFunctions = []; private $_panelFunctions = [];
/** /**
* @var \elitedivision\amos\audit\models\AuditEntry If activated this is the active entry * @var \arter\amos\audit\models\AuditEntry If activated this is the active entry
*/ */
private $_entry = null; private $_entry = null;
......
<?php <?php
namespace elitedivision\amos\audit; namespace arter\amos\audit;
use elitedivision\amos\audit\models\AuditTrail; use arter\amos\audit\models\AuditTrail;
use Yii; use Yii;
use yii\base\Behavior; use yii\base\Behavior;
...@@ -11,7 +11,7 @@ use yii\db\Query; ...@@ -11,7 +11,7 @@ use yii\db\Query;
/** /**
* Class AuditTrailBehavior * Class AuditTrailBehavior
* @package elitedivision\amos\audit * @package arter\amos\audit
* *
* @property \yii\db\ActiveRecord $owner * @property \yii\db\ActiveRecord $owner
*/ */
......
<?php <?php
namespace elitedivision\amos\audit; namespace arter\amos\audit;
use yii\base\Application; use yii\base\Application;
use yii\base\BootstrapInterface; use yii\base\BootstrapInterface;
/** /**
* Bootstrap * Bootstrap
* @package elitedivision\amos\audit * @package arter\amos\audit
*/ */
class Bootstrap implements BootstrapInterface class Bootstrap implements BootstrapInterface
{ {
...@@ -19,10 +19,10 @@ class Bootstrap implements BootstrapInterface ...@@ -19,10 +19,10 @@ class Bootstrap implements BootstrapInterface
public function bootstrap($app) public function bootstrap($app)
{ {
// Make sure to register the base folder as alias as well or things like assets won't work anymore // Make sure to register the base folder as alias as well or things like assets won't work anymore
\Yii::setAlias('@elitedivision/amos/audit', __DIR__); \Yii::setAlias('@arter/amos/audit', __DIR__);
if ($app instanceof \yii\console\Application) { if ($app instanceof \yii\console\Application) {
$app->controllerMap['audit'] = 'elitedivision\amos\audit\commands\AuditController'; $app->controllerMap['audit'] = 'arter\amos\audit\commands\AuditController';
} }
$moduleName = Audit::findModuleIdentifier(); $moduleName = Audit::findModuleIdentifier();
...@@ -37,7 +37,7 @@ class Bootstrap implements BootstrapInterface ...@@ -37,7 +37,7 @@ class Bootstrap implements BootstrapInterface
$app->i18n->translations['audit'] = [ $app->i18n->translations['audit'] = [
'class' => 'yii\i18n\PhpMessageSource', 'class' => 'yii\i18n\PhpMessageSource',
'sourceLanguage' => 'en', 'sourceLanguage' => 'en',
'basePath' => '@elitedivision/amos/audit/messages', 'basePath' => '@arter/amos/audit/messages',
]; ];
} }
......
<?php <?php
/** /**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/ */
namespace elitedivision\amos\audit; namespace arter\amos\audit;
use Yii; use Yii;
use yii\log\Target; use yii\log\Target;
/** /**
* LogTarget * LogTarget
* @package elitedivision\amos\audit * @package arter\amos\audit
*/ */
class LogTarget extends Target class LogTarget extends Target
{ {
......
<?php <?php
namespace elitedivision\amos\audit; namespace arter\amos\audit;
use yii\base\Component; use yii\base\Component;
/** /**
* Class Provider * Class Provider
* @package elitedivision\amos\audit * @package arter\amos\audit
*/ */
class Provider extends Component class Provider extends Component
{ {
......
<?php <?php
namespace elitedivision\amos\audit\commands; namespace arter\amos\audit\commands;
use elitedivision\amos\audit\Audit; use arter\amos\audit\Audit;
use elitedivision\amos\audit\components\panels\Panel; use arter\amos\audit\components\panels\Panel;
use elitedivision\amos\audit\models\AuditEntry; use arter\amos\audit\models\AuditEntry;
use elitedivision\amos\audit\models\AuditError; use arter\amos\audit\models\AuditError;
use Yii; use Yii;
use yii\base\Exception; use yii\base\Exception;
...@@ -18,7 +18,7 @@ use yii\helpers\Url; ...@@ -18,7 +18,7 @@ use yii\helpers\Url;
/** /**
* Task runner commands for Audit. * Task runner commands for Audit.
* *
* @package elitedivision\amos\audit\commands * @package arter\amos\audit\commands
*/ */
class AuditController extends Controller class AuditController extends Controller
{ {
......
<?php <?php
namespace elitedivision\amos\audit\components; namespace arter\amos\audit\components;
use elitedivision\amos\audit\Audit; use arter\amos\audit\Audit;
use Yii; use Yii;
use yii\base\Component; use yii\base\Component;
use yii\di\Instance; use yii\di\Instance;
......
...@@ -3,15 +3,15 @@ ...@@ -3,15 +3,15 @@
* Provides a number of helper functions for the audit component * Provides a number of helper functions for the audit component
*/ */
namespace elitedivision\amos\audit\components; namespace arter\amos\audit\components;
use elitedivision\amos\audit\Audit; use arter\amos\audit\Audit;
use yii\helpers\ArrayHelper; use yii\helpers\ArrayHelper;
use yii\helpers\VarDumper; use yii\helpers\VarDumper;
/** /**
* Helper * Helper
* @package elitedivision\amos\audit\components * @package arter\amos\audit\components
*/ */
class Helper extends \yii\base\BaseObject class Helper extends \yii\base\BaseObject
{ {
...@@ -202,7 +202,6 @@ class Helper extends \yii\base\BaseObject ...@@ -202,7 +202,6 @@ class Helper extends \yii\base\BaseObject
/** /**
* Hash a long string to a short string. * Hash a long string to a short string.
* @link http://au1.php.net/crc32#111931
* *
* @param $data * @param $data
* @return string * @return string
......
<?php <?php
namespace elitedivision\amos\audit\components; namespace arter\amos\audit\components;
use elitedivision\amos\audit\Audit; use arter\amos\audit\Audit;
/** /**
* Class Migration * Class Migration
* @package elitedivision\amos\audit\components * @package arter\amos\audit\components
*/ */
class Migration extends \yii\db\Migration class Migration extends \yii\db\Migration
{ {
......
<?php <?php
namespace elitedivision\amos\audit\components; namespace arter\amos\audit\components;
use elitedivision\amos\audit\Audit; use arter\amos\audit\Audit;
class SoapClient extends \SoapClient class SoapClient extends \SoapClient
{ {
......
<?php <?php
namespace elitedivision\amos\audit\components; namespace arter\amos\audit\components;
use elitedivision\amos\audit\models\AuditTrail; use arter\amos\audit\models\AuditTrail;
use yii\base\Component; use yii\base\Component;
use yii\db\ActiveRecord; use yii\db\ActiveRecord;
/** /**
* Version * Version
* @package elitedivision\amos\audit * @package arter\amos\audit
*/ */
class Version extends Component class Version extends Component
{ {
......
...@@ -3,17 +3,17 @@ ...@@ -3,17 +3,17 @@
* Error Handler allows errors to be logged to the audit_error table. * Error Handler allows errors to be logged to the audit_error table.
*/ */
namespace elitedivision\amos\audit\components\base; namespace arter\amos\audit\components\base;
use elitedivision\amos\audit\Audit; use arter\amos\audit\Audit;
use elitedivision\amos\audit\models\AuditError; use arter\amos\audit\models\AuditError;
use elitedivision\amos\audit\panels\ErrorPanel; use arter\amos\audit\panels\ErrorPanel;
use Exception; use Exception;
use Yii; use Yii;
/** /**
* ErrorHandlerTrait * ErrorHandlerTrait
* @package elitedivision\amos\audit\components\base * @package arter\amos\audit\components\base
*/ */
trait ErrorHandlerTrait trait ErrorHandlerTrait
{ {
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
* Console compatible error handler * Console compatible error handler
*/ */
namespace elitedivision\amos\audit\components\console; namespace arter\amos\audit\components\console;
use elitedivision\amos\audit\components\base\ErrorHandlerTrait; use arter\amos\audit\components\base\ErrorHandlerTrait;