Commit 2726fc37 authored by David Metzler's avatar David Metzler
Browse files

Added path and report data contexts.

parent e3d925a2
...@@ -946,6 +946,9 @@ function forena_report($name_in, $parms = NULL, $print = TRUE, $filename='') { ...@@ -946,6 +946,9 @@ function forena_report($name_in, $parms = NULL, $print = TRUE, $filename='') {
$time = @new DateTime($value); $time = @new DateTime($value);
$desc['time'] = date_format($time, 'Y-m-d H:i:s'); $desc['time'] = date_format($time, 'Y-m-d H:i:s');
$desc['basepath'] = base_path(); $desc['basepath'] = base_path();
$desc['path'] = $desc['basepath'] . Frx::File()->path($desc['filename'], TRUE);
$desc['theme'] = $desc['basepath'] . drupal_get_path('theme',$GLOBALS['theme']);
$desc['q'] = $_GET['q'];
if (!$desc['exists']) { if (!$desc['exists']) {
watchdog('error', 'Report %s not found', array('%s' => $name_in), WATCHDOG_ERROR); watchdog('error', 'Report %s not found', array('%s' => $name_in), WATCHDOG_ERROR);
if($print) { if($print) {
...@@ -954,7 +957,6 @@ function forena_report($name_in, $parms = NULL, $print = TRUE, $filename='') { ...@@ -954,7 +957,6 @@ function forena_report($name_in, $parms = NULL, $print = TRUE, $filename='') {
} }
return ''; return '';
} }
FrxData::instance()->setContext('cookie', $_COOKIE); FrxData::instance()->setContext('cookie', $_COOKIE);
FrxData::instance()->setContext('report', $desc); FrxData::instance()->setContext('report', $desc);
$report_name = $desc['name']; $report_name = $desc['name'];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment