Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

fixed padding and filtered missing hashes

Cette révision appartient à :
ayame-git 2017-05-05 10:18:24 +03:00
Parent 6adce8eda9
révision d053dab402
2 fichiers modifiés avec 7 ajouts et 6 suppressions

Voir le fichier

@ -21,7 +21,7 @@ nav#mainmenu a {
color: white;
}
div#container {
padding-top: 7rem;
padding-top: 10rem;
}
body {

Voir le fichier

@ -131,13 +131,14 @@ func getTorrentsOrderBy(parameters *WhereParams, orderBy string, limit int, offs
var torrents []Torrents
var dbQuery *gorm.DB
var count int
conditions := "torrent_hash is not null" //filter out broken entries
var params []interface{}
if parameters != nil { // if there is where parameters
db.Model(&torrents).Where(parameters.conditions, parameters.params...).Count(&count)
dbQuery = db.Model(&torrents).Where(parameters.conditions, parameters.params...)
} else {
db.Model(&torrents).Count(&count)
dbQuery = db.Model(&torrents)
conditions += " AND " + parameters.conditions
params = parameters.params
}
db.Model(&torrents).Where(conditions, params...).Count(&count)
dbQuery = db.Model(&torrents).Where(conditions, params...)
if orderBy == "" {
orderBy = "torrent_id DESC"