Переделка для composer autoload
This commit is contained in:
parent
ad69746347
commit
b5641db607
100 changed files with 14 additions and 325 deletions
26
src/filter/actionlogger.php
Normal file
26
src/filter/actionlogger.php
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
require_once 'core/path.php';
|
||||
|
||||
class ActionLogger
|
||||
{
|
||||
public $before = array ();
|
||||
public $file;
|
||||
public $action;
|
||||
public $processor;
|
||||
|
||||
function __construct($processor)
|
||||
{
|
||||
$this->processor = $processor;
|
||||
$this->file = fopen(Shortcut::getUrl('access.log'), "a");
|
||||
}
|
||||
|
||||
function execute(HTTPRequest $request)
|
||||
{
|
||||
$action = $request->getAction();
|
||||
if(in_array($action, $this->before)) {
|
||||
fwrite($this->file, "time: " . date("r", time()) . " query: ". json::encode(array_merge($_POST, $_GET)) . " by: " . UserAccess::$name . "\n");
|
||||
}
|
||||
return $this->processor->execute($request);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue