Commit d13a3949 authored by metzlerd's avatar metzlerd
Browse files

Fixed parameters

Fixed block editing with parameters. 
parent 3a2e692c
......@@ -118,13 +118,10 @@ class FrxBlockEditor {
* @return Ambigous <unknown, string, NULL>
*/
public function data($parms = array()) {
if ($parms) {
// Merge in current_context
$parms = array_merge(Frx::Data()->currentContextArray(), $parms);
$id = str_replace('/', '-', $this->block_name) . '-parm';
Frx::Data()->push($parms, $id);
}
// Merge in current_context
$parms = array_merge(Frx::Data()->currentContextArray(), $parms);
$id = str_replace('/', '-', $this->block_name) . '-parm';
Frx::Data()->push($parms, $id);
if ($this->edit) {
$xml = Frx::RepoMan()->sqlData($this->provider, $this->block['file'], $parms);
}
......
......@@ -836,7 +836,6 @@ class FrxEditor {
public function preview($parms = array()) {
$r = $this->frxReport;
if(strpos($this->report_name, '__') !== 0) $r->preview_mode = TRUE;
return $this->report($parms, TRUE, TRUE);
......@@ -921,7 +920,6 @@ class FrxEditor {
unset($parms['q']);
$links = $this->l_icon("reports/$r_link/edit/select-data/add-data", 'doc-option-add.png', 'Add Data', $parms);
}
Frx::Data()->pop();
$content = array(
'#has_data' => $r->blocks_loaded,
'parameter_form' => $r->parameters_form,
......@@ -942,6 +940,7 @@ class FrxEditor {
}
}
Frx::Data()->pop();
}
public function fieldLink($id, $value) {
......
......@@ -1576,5 +1576,3 @@ function forena_requirements($phase) {
}
return $requirements;
}
......@@ -1161,11 +1161,11 @@ function forena_report_parameter_config_form_submit($formid, &$form_state) {
$r = Frx::Editor($form_state['values']['report_name']);
$parameters = $r->frxReport->parametersArray();
$id = $form_state['values']['parm']['id'];
$paramaters[$id] = array_merge($parameters[$id], $form_state['values']['parm']);
$r->setParameters($paramaters);
$parameters[$id] = array_merge($parameters[$id], $form_state['values']['parm']);
$r->setParameters($parameters);
$r->update();
$r_link = $r->report_link;
$form_state['redirect'] = array("$r_link/edit", array('query' => Frx::parms()));
$form_state['redirect'] = array("$r_link/edit/parameters", array('query' => Frx::parms()));
}
......
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