Browse Source

delegate history action to the history class

PHP-GTK3
yggverse 8 months ago
parent
commit
c2ddd3dba5
  1. 23
      src/Entity/Tab/Page.php

23
src/Entity/Tab/Page.php

@ -708,24 +708,11 @@ class Page @@ -708,24 +708,11 @@ class Page
// Update history database
if ($history && $this->config->history->database->enabled)
{
// Ignore history record on same URL stored
if ($result = $this->app->database->getHistory('', 0, 1))
{
if ($url == reset($result)->url)
{
$history = false;
}
}
if ($history)
{
$this->app->database->addHistory(
$url,
$title
);
$this->app->history->refresh();
}
$this->app->history->add(
$url,
$title,
$this->config->history->database->renew
);
}
}

Loading…
Cancel
Save