mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-20 16:37:18 -04:00
Update xorm to latest version and fix correct user
table referencing in sql (#4473)
This commit is contained in:
parent
1e2da5d396
commit
0c59edaafa
49 changed files with 1718 additions and 1102 deletions
|
@ -374,9 +374,9 @@ func (u *User) GetFollowers(page int) ([]*User, error) {
|
|||
Limit(ItemsPerPage, (page-1)*ItemsPerPage).
|
||||
Where("follow.follow_id=?", u.ID)
|
||||
if setting.UsePostgreSQL {
|
||||
sess = sess.Join("LEFT", "follow", `"user".id=follow.user_id`)
|
||||
sess = sess.Join("LEFT", "follow", "`user`.id=follow.user_id")
|
||||
} else {
|
||||
sess = sess.Join("LEFT", "follow", "user.id=follow.user_id")
|
||||
sess = sess.Join("LEFT", "follow", "`user`.id=follow.user_id")
|
||||
}
|
||||
return users, sess.Find(&users)
|
||||
}
|
||||
|
@ -393,9 +393,9 @@ func (u *User) GetFollowing(page int) ([]*User, error) {
|
|||
Limit(ItemsPerPage, (page-1)*ItemsPerPage).
|
||||
Where("follow.user_id=?", u.ID)
|
||||
if setting.UsePostgreSQL {
|
||||
sess = sess.Join("LEFT", "follow", `"user".id=follow.follow_id`)
|
||||
sess = sess.Join("LEFT", "follow", "`user`.id=follow.follow_id")
|
||||
} else {
|
||||
sess = sess.Join("LEFT", "follow", "user.id=follow.follow_id")
|
||||
sess = sess.Join("LEFT", "follow", "`user`.id=follow.follow_id")
|
||||
}
|
||||
return users, sess.Find(&users)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue