Fix DB abstraction layer bug
This commit is contained in:
parent
8ab0bb2c42
commit
68693fa368
|
@ -123,7 +123,7 @@ sub get_expired {
|
|||
my $time = shift;
|
||||
|
||||
## Select only files expired since two days, to be sure that nobody is still downloading it
|
||||
my @files = LufiDB::Files->select('WHERE deleted = 0 AND ((delete_at_day + 2) * 86400) < (? - created_at) AND delete_at_day != 0', $time);
|
||||
my @files = Lufi::DB::SQLite::Files->select('WHERE deleted = 0 AND ((delete_at_day + 2) * 86400) < (? - created_at) AND delete_at_day != 0', $time);
|
||||
|
||||
return c(map { Lufi::DB::File->new(app => $c->app, record => $_) } @files);
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ sub get_no_longer_viewed {
|
|||
my $c = shift;
|
||||
my $time = shift;
|
||||
|
||||
my @files = LufiDB::Files->select('WHERE deleted = 0 AND last_access_at < ?', $time);
|
||||
my @files = Lufi::DB::SQLite::Files->select('WHERE deleted = 0 AND last_access_at < ?', $time);
|
||||
|
||||
return c(map { Lufi::DB::File->new(app => $c->app, record => $_) } @files);
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ sub startup {
|
|||
default => {
|
||||
prefix => '/',
|
||||
theme => 'default',
|
||||
dbtype => 'sqlite',
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue