From c2ddd3dba58b3b6143a1e3ff6ba2c02a8ef29dcb Mon Sep 17 00:00:00 2001 From: yggverse Date: Wed, 17 Apr 2024 10:43:16 +0300 Subject: [PATCH] delegate history action to the history class --- src/Entity/Tab/Page.php | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/src/Entity/Tab/Page.php b/src/Entity/Tab/Page.php index 0ff64d97..73732775 100644 --- a/src/Entity/Tab/Page.php +++ b/src/Entity/Tab/Page.php @@ -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 + ); } }