@@ -27,7 +27,6 @@ import (
2727 "code.gitea.io/gitea/modules/git"
2828 "code.gitea.io/gitea/modules/log"
2929 "code.gitea.io/gitea/modules/references"
30- "code.gitea.io/gitea/modules/setting"
3130 api "code.gitea.io/gitea/modules/structs"
3231 "code.gitea.io/gitea/modules/timeutil"
3332 "code.gitea.io/gitea/modules/util"
@@ -1903,23 +1902,17 @@ func GetRepoIssueStats(repoID, uid int64, filterMode int, isPull bool) (numOpen,
19031902func SearchIssueIDsByKeyword (ctx context.Context , kw string , repoIDs []int64 , limit , start int ) (int64 , []int64 , error ) {
19041903 repoCond := builder .In ("repo_id" , repoIDs )
19051904 subQuery := builder .Select ("id" ).From ("issue" ).Where (repoCond )
1906- // SQLite's UPPER function only transforms ASCII letters.
1907- if setting .Database .UseSQLite3 {
1908- kw = util .ToUpperASCII (kw )
1909- } else {
1910- kw = strings .ToUpper (kw )
1911- }
19121905 cond := builder .And (
19131906 repoCond ,
19141907 builder .Or (
1915- builder. Like { "UPPER( name) " , kw } ,
1916- builder. Like { "UPPER( content) " , kw } ,
1908+ db . BuildCaseInsensitiveLike ( " name" , kw ) ,
1909+ db . BuildCaseInsensitiveLike ( " content" , kw ) ,
19171910 builder .In ("id" , builder .Select ("issue_id" ).
19181911 From ("comment" ).
19191912 Where (builder .And (
19201913 builder.Eq {"type" : CommentTypeComment },
19211914 builder .In ("issue_id" , subQuery ),
1922- builder. Like { "UPPER( content) " , kw } ,
1915+ db . BuildCaseInsensitiveLike ( " content" , kw ) ,
19231916 )),
19241917 ),
19251918 ),
0 commit comments