Browse Source

Update xorm version (#26128)

Test new xorm version compatible with Gitea

---------

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
tags/v1.21.0-rc0
Lunny Xiao 10 months ago
parent
commit
c7f6e9fc2f
No account linked to committer's email address
3 changed files with 69 additions and 345 deletions
  1. 2
    2
      go.mod
  2. 63
    342
      go.sum
  3. 4
    1
      models/project/project.go

+ 2
- 2
go.mod View File

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

require (

+ 63
- 342
go.sum
File diff suppressed because it is too large
View File


+ 4
- 1
models/project/project.go 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
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)

if opts.Page > 0 {

Loading…
Cancel
Save