@@ -27,7 +27,6 @@ import (
27
27
"code.gitea.io/gitea/modules/git"
28
28
"code.gitea.io/gitea/modules/log"
29
29
"code.gitea.io/gitea/modules/references"
30
- "code.gitea.io/gitea/modules/setting"
31
30
api "code.gitea.io/gitea/modules/structs"
32
31
"code.gitea.io/gitea/modules/timeutil"
33
32
"code.gitea.io/gitea/modules/util"
@@ -1903,23 +1902,17 @@ func GetRepoIssueStats(repoID, uid int64, filterMode int, isPull bool) (numOpen,
1903
1902
func SearchIssueIDsByKeyword (ctx context.Context , kw string , repoIDs []int64 , limit , start int ) (int64 , []int64 , error ) {
1904
1903
repoCond := builder .In ("repo_id" , repoIDs )
1905
1904
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
- }
1912
1905
cond := builder .And (
1913
1906
repoCond ,
1914
1907
builder .Or (
1915
- builder. Like { "UPPER( name) " , kw } ,
1916
- builder. Like { "UPPER( content) " , kw } ,
1908
+ db . BuildCaseInsensitiveLike ( " name" , kw ) ,
1909
+ db . BuildCaseInsensitiveLike ( " content" , kw ) ,
1917
1910
builder .In ("id" , builder .Select ("issue_id" ).
1918
1911
From ("comment" ).
1919
1912
Where (builder .And (
1920
1913
builder.Eq {"type" : CommentTypeComment },
1921
1914
builder .In ("issue_id" , subQuery ),
1922
- builder. Like { "UPPER( content) " , kw } ,
1915
+ db . BuildCaseInsensitiveLike ( " content" , kw ) ,
1923
1916
)),
1924
1917
),
1925
1918
),
0 commit comments