You are here

public function FrxBlockEditor::update in Forena Reports 7.4

Update the block data.

Parameters

unknown $block:

Return value

FrxBlockEditor

2 calls to FrxBlockEditor::update()
FrxBlockEditor::load in ./FrxBlockEditor.inc
Block loader method.
FrxBlockEditor::rename in ./FrxBlockEditor.inc
Rename the exisiting block.

File

./FrxBlockEditor.inc, line 61

Class

FrxBlockEditor

Code

public function update($block = array()) {
  if ($block) {

    // Make sure we don't put any invalid values
    $block = array_intersect_key($block, $this->block);
    $block = array_merge($this->block, $block);
    $same = $block['file'] == $this->block['file'] && @$block['access'] == @$this->block['access'];

    // UPdate the block;
    if (!$same) {
      $this->block = $block;
      $_SESSION['forena_query_editor'][$this->block_name] = $this->block;
      $this->modified = TRUE;
    }
  }
  return $this;
}