mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
cleanup expired history records in the history constructor
This commit is contained in:
parent
313c6b6db5
commit
704a534401
2 changed files with 13 additions and 2 deletions
|
|
@ -86,8 +86,7 @@
|
||||||
},
|
},
|
||||||
"database":
|
"database":
|
||||||
{
|
{
|
||||||
"enabled":true,
|
"enabled":true
|
||||||
"timeout":null
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"progressbar":
|
"progressbar":
|
||||||
|
|
@ -178,6 +177,10 @@
|
||||||
{
|
{
|
||||||
"enabled":true,
|
"enabled":true,
|
||||||
"label":"History",
|
"label":"History",
|
||||||
|
"clean":
|
||||||
|
{
|
||||||
|
"timeout":null
|
||||||
|
},
|
||||||
"time":
|
"time":
|
||||||
{
|
{
|
||||||
"format":"c"
|
"format":"c"
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,14 @@ class History
|
||||||
// Init config
|
// Init config
|
||||||
$this->config = \Yggverse\Yoda\Model\File::getConfig()->app->tab->history;
|
$this->config = \Yggverse\Yoda\Model\File::getConfig()->app->tab->history;
|
||||||
|
|
||||||
|
// Cleanup expired history
|
||||||
|
if ($this->config->clean->timeout)
|
||||||
|
{
|
||||||
|
$this->app->database->cleanHistory(
|
||||||
|
$this->config->clean->timeout
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Compose header
|
// Compose header
|
||||||
$this->header = new \GtkBox(
|
$this->header = new \GtkBox(
|
||||||
\GtkOrientation::HORIZONTAL
|
\GtkOrientation::HORIZONTAL
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue