People: Improve search for names in photos #22
This commit is contained in:
parent
8577202b0a
commit
94b8a6ad65
1 changed files with 1 additions and 1 deletions
|
@ -237,7 +237,7 @@ func Photos(f form.PhotoSearch) (results PhotoResults, count int, err error) {
|
|||
entity.Marker{}.TableName()), strings.Split(subj, txt.Or))
|
||||
}
|
||||
} else if f.Subjects != "" {
|
||||
for _, where := range LikeAnyWord("s.subj_name", f.Subjects) {
|
||||
for _, where := range LikeAllNames(Cols{"subj_name", "subj_alias"}, f.Subjects) {
|
||||
s = s.Where(fmt.Sprintf("photos.id IN (SELECT photo_id FROM files f JOIN %s m ON f.file_uid = m.file_uid AND m.marker_invalid = 0 JOIN %s s ON s.subj_uid = m.subj_uid WHERE (?))",
|
||||
entity.Marker{}.TableName(), entity.Subject{}.TableName()), gorm.Expr(where))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue