mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
ignore history record on same URL given
This commit is contained in:
parent
b092e6d9f1
commit
b5fec535fb
2 changed files with 13 additions and 0 deletions
|
|
@ -322,6 +322,12 @@ class Page
|
||||||
$url
|
$url
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Ignore history record on same URL given
|
||||||
|
if ($url == $this->history->getCurrent())
|
||||||
|
{
|
||||||
|
$history = false;
|
||||||
|
}
|
||||||
|
|
||||||
// Update address field by requested
|
// Update address field by requested
|
||||||
$this->address->set_text(
|
$this->address->set_text(
|
||||||
$url
|
$url
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,13 @@ class History
|
||||||
return isset($this->_record[$position]) ? $this->_record[$position] : null;
|
return isset($this->_record[$position]) ? $this->_record[$position] : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getCurrent(): ?string
|
||||||
|
{
|
||||||
|
return $this->get(
|
||||||
|
$this->_position
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public function getBack(): ?string
|
public function getBack(): ?string
|
||||||
{
|
{
|
||||||
return $this->get(
|
return $this->get(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue