$this->writeEventLog();
}
- function writeEventLog()
+ function writeEventLog($extra_data = '')
{
$ff = HTML_FlexyFramework::get();
if (empty($ff->Pman['event_log_dir'])) {
print_r("failed to copy {$f['tmp_name']}...\n");
}
}
-
- file_put_contents($file, json_encode(array(
+ $out = array(
'REQUEST_URI' => empty($_SERVER['REQUEST_URI']) ? 'cli' : $_SERVER['REQUEST_URI'],
'HTTP_USER_AGENT' => empty($_SERVER['HTTP_USER_AGENT']) ? '' : $_SERVER['HTTP_USER_AGENT'],
'GET' => empty($_GET) ? array() : $_GET,
'POST' =>$p,
'FILES' => $files,
- )));
+ );
+ if (!empty($extra_data)) {
+ $out['EXTRA'] = $extra_data;
+ }
+
+ file_put_contents($file, json_encode($out));
}
$file = $this->retrieveEventLog();
if(!$file){
- return 'No record?!';
+ return "No records?!";
}
$source = json_decode(file_get_contents($file));
- return 'No record?!';
+ return $source;
}
function retrieveEventLog()