function forena_get_report_editor in Forena Reports 6.2
Same name and namespace in other branches
- 6 forena.admin.inc \forena_get_report_editor()
- 7 forena.admin.inc \forena_get_report_editor()
- 7.2 forena.admin.inc \forena_get_report_editor()
- 7.3 forena.admin.inc \forena_get_report_editor()
Accepts the name of a file
Returns an editor object of the file.
19 calls to forena_get_report_editor()
File
- ./
forena.admin.inc, line 340
Code
function forena_get_report_editor($report_name) {
require_once 'FrxReportEditor.inc';
if ($report_name) {
$r_text = '';
$report_path = forena_report_path();
$filename = $report_path . '/' . $report_name . '.frx';
if (file_exists($filename)) {
$r_text = file_get_contents($filename);
}
$r = new FrxReportEditor($r_text);
return $r;
}
else {
return new FrxReportEditor();
}
}