mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 02:38:35 +00:00
Update xorm to latest version and fix correct user
table referencing in sql (#4473)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user