mirror of
https://github.com/fumiama/paper-manager.git
synced 2026-07-01 08:10:27 +08:00
finish chkdup
This commit is contained in:
@@ -83,13 +83,13 @@ func (f *FileDatabase) SaveFileToTemp(uploader int, file io.Reader, name string)
|
||||
}
|
||||
|
||||
// ListUploadedFile will select all file that HasntAnalyzed && IsTemp or !HasntAnalyzed && !IsTemp
|
||||
func (f *FileDatabase) ListUploadedFile(istemp *bool) (lst []*List, err error) {
|
||||
func (f *FileDatabase) ListUploadedFile(istemp *bool, uid int) (lst []*List, err error) {
|
||||
q := ""
|
||||
switch {
|
||||
case istemp == nil:
|
||||
q = "ORDER BY UpTime DESC"
|
||||
q = "WHERE (NOT IsTemp) OR (Uploader=" + strconv.Itoa(uid) + ") ORDER BY UpTime DESC"
|
||||
case *istemp:
|
||||
q = "WHERE IsTemp ORDER BY UpTime DESC"
|
||||
q = "WHERE IsTemp AND Uploader=" + strconv.Itoa(uid) + " ORDER BY UpTime DESC"
|
||||
default:
|
||||
q = "WHERE (HasntAnalyzed AND IsTemp) OR (NOT HasntAnalyzed AND NOT IsTemp) ORDER BY UpTime DESC"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user