Update xorm version (#26128) (#26150)

backport #26128 to fix some serious bug.

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
This commit is contained in:
2023-07-26 15:40:23 +08:00
committed by GitHub
parent a8445e9320
commit bc73e6a85c
3 changed files with 66 additions and 307 deletions

4
go.mod
View File

@ -121,8 +121,8 @@ require (
gopkg.in/yaml.v3 v3.0.1 gopkg.in/yaml.v3 v3.0.1
mvdan.cc/xurls/v2 v2.4.0 mvdan.cc/xurls/v2 v2.4.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 (

364
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 {