Fix that the timeline does not regenerate the logarithmical base
refs #4190
This commit is contained in:
parent
2049e42988
commit
19b2a94777
|
@ -269,20 +269,22 @@ class TimeLine implements IteratorAggregate
|
|||
public function getCalculationBase($create)
|
||||
{
|
||||
if ($this->calculationBase === null) {
|
||||
if ($this->session !== null) {
|
||||
$this->calculationBase = $this->session->get('calculationBase');
|
||||
}
|
||||
$calculationBase = $this->session !== null ? $this->session->get('calculationBase') : null;
|
||||
|
||||
if ($create) {
|
||||
$new = $this->generateCalculationBase();
|
||||
if ($new > $this->calculationBase) {
|
||||
if ($new > $calculationBase) {
|
||||
$this->calculationBase = $new;
|
||||
|
||||
if ($this->session !== null) {
|
||||
$this->session->calculationBase = $new;
|
||||
Session::getSession()->write(); // TODO: Should it be possible to call write() on the namespace?
|
||||
}
|
||||
} else {
|
||||
$this->calculationBase = $calculationBase;
|
||||
}
|
||||
} else {
|
||||
return $calculationBase;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue