1
0
Fork 0
forked from forgejo/forgejo

Update xorm version (#26128) (#26150)

backport #26128 to fix some serious bug.

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
(cherry picked from commit bc73e6a85c)
This commit is contained in:
Lunny Xiao 2023-07-26 15:40:23 +08:00 committed by Earl Warren
parent f20cfc291c
commit 7099ef15b6
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
3 changed files with 66 additions and 307 deletions

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 {