function forena_get_report_editor in Forena Reports 7.3
Same name and namespace in other branches
- 6.2 forena.admin.inc \forena_get_report_editor()
- 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()
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 132
Code
function forena_get_report_editor($report_name) {
require_once 'FrxEditor.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 FrxEditor($r_text);
return $r;
}
else {
return new FrxEditor();
}
}