|
|
@ -507,7 +507,7 @@ func (org *User) GetUserRepositories(userID int64, page, pageSize int) ([]*Repos |
|
|
|
} |
|
|
|
} |
|
|
|
repos := make([]*Repository, 0, pageSize) |
|
|
|
repos := make([]*Repository, 0, pageSize) |
|
|
|
// FIXME: use XORM chain operations instead of raw SQL.
|
|
|
|
// FIXME: use XORM chain operations instead of raw SQL.
|
|
|
|
if err = x.Sql(fmt.Sprintf(`SELECT repository.* FROM repository |
|
|
|
if err = x.SQL(fmt.Sprintf(`SELECT repository.* FROM repository |
|
|
|
INNER JOIN team_repo |
|
|
|
INNER JOIN team_repo |
|
|
|
ON team_repo.repo_id = repository.id |
|
|
|
ON team_repo.repo_id = repository.id |
|
|
|
WHERE (repository.owner_id = ? AND repository.is_private = ?) OR team_repo.team_id IN (%s) |
|
|
|
WHERE (repository.owner_id = ? AND repository.is_private = ?) OR team_repo.team_id IN (%s) |
|
|
@ -546,7 +546,7 @@ func (org *User) GetUserMirrorRepositories(userID int64) ([]*Repository, error) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
repos := make([]*Repository, 0, 10) |
|
|
|
repos := make([]*Repository, 0, 10) |
|
|
|
if err = x.Sql(fmt.Sprintf(`SELECT repository.* FROM repository |
|
|
|
if err = x.SQL(fmt.Sprintf(`SELECT repository.* FROM repository |
|
|
|
INNER JOIN team_repo |
|
|
|
INNER JOIN team_repo |
|
|
|
ON team_repo.repo_id = repository.id AND repository.is_mirror = ? |
|
|
|
ON team_repo.repo_id = repository.id AND repository.is_mirror = ? |
|
|
|
WHERE (repository.owner_id = ? AND repository.is_private = ?) OR team_repo.team_id IN (%s) |
|
|
|
WHERE (repository.owner_id = ? AND repository.is_private = ?) OR team_repo.team_id IN (%s) |
|
|
|