1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-04 08:17:24 -05:00

Update xorm version (#26128)

Test new xorm version compatible with Gitea

---------

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
This commit is contained in:
Lunny Xiao 2023-07-26 04:27:44 +08:00 committed by GitHub
parent 5a56f9699c
commit c7f6e9fc2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 69 additions and 345 deletions

4
go.mod
View File

@ -119,8 +119,8 @@ require (
gopkg.in/yaml.v3 v3.0.1 gopkg.in/yaml.v3 v3.0.1
mvdan.cc/xurls/v2 v2.5.0 mvdan.cc/xurls/v2 v2.5.0
strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251 strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251
xorm.io/builder v0.3.12 xorm.io/builder v0.3.13
xorm.io/xorm v1.3.3-0.20230623150031-18f8e7a86c75 xorm.io/xorm v1.3.3-0.20230725140238-59b727260d35
) )
require ( require (

405
go.sum

File diff suppressed because it is too large Load Diff

View File

@ -241,7 +241,10 @@ func GetSearchOrderByBySortType(sortType string) db.SearchOrderBy {
// FindProjects returns a list of all projects that have been created in the repository // FindProjects returns a list of all projects that have been created in the repository
func FindProjects(ctx context.Context, opts SearchOptions) ([]*Project, int64, error) { func FindProjects(ctx context.Context, opts SearchOptions) ([]*Project, int64, error) {
e := db.GetEngine(ctx).Where(opts.toConds()).OrderBy(opts.OrderBy.String()) e := db.GetEngine(ctx).Where(opts.toConds())
if opts.OrderBy.String() != "" {
e = e.OrderBy(opts.OrderBy.String())
}
projects := make([]*Project, 0, setting.UI.IssuePagingNum) projects := make([]*Project, 0, setting.UI.IssuePagingNum)
if opts.Page > 0 { if opts.Page > 0 {