mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15:28 +00:00
delegate history action to the history class
This commit is contained in:
parent
704a534401
commit
c2ddd3dba5
1 changed files with 5 additions and 18 deletions
|
|
@ -708,24 +708,11 @@ class Page
|
||||||
// Update history database
|
// Update history database
|
||||||
if ($history && $this->config->history->database->enabled)
|
if ($history && $this->config->history->database->enabled)
|
||||||
{
|
{
|
||||||
// Ignore history record on same URL stored
|
$this->app->history->add(
|
||||||
if ($result = $this->app->database->getHistory('', 0, 1))
|
$url,
|
||||||
{
|
$title,
|
||||||
if ($url == reset($result)->url)
|
$this->config->history->database->renew
|
||||||
{
|
);
|
||||||
$history = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($history)
|
|
||||||
{
|
|
||||||
$this->app->database->addHistory(
|
|
||||||
$url,
|
|
||||||
$title
|
|
||||||
);
|
|
||||||
|
|
||||||
$this->app->history->refresh();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue