aboutsummaryrefslogtreecommitdiffstats
path: root/models/org.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2016-11-10 17:12:14 +0800
committerGitHub <noreply@github.com>2016-11-10 17:12:14 +0800
commitc6c840faf7ade5007f1fb3453d12c14486e7c1fb (patch)
treedf105154af4e3a470c1195c5f1e4a1dda7dd46cc /models/org.go
parentb5bfab98552a1f9fb03f4f4246ce4772cbc343eb (diff)
parent7dcc3bc3d7469770fa020c1728b43522afca42d5 (diff)
downloadgitea-c6c840faf7ade5007f1fb3453d12c14486e7c1fb.tar.gz
gitea-c6c840faf7ade5007f1fb3453d12c14486e7c1fb.zip
Merge pull request #129 from lunny/lunny/SQL_instead_Sql
use x.SQL instead of x.Sql
Diffstat (limited to 'models/org.go')
-rw-r--r--models/org.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/org.go b/models/org.go
index 621e48de2f..bf4d619999 100644
--- a/models/org.go
+++ b/models/org.go
@@ -507,7 +507,7 @@ func (org *User) GetUserRepositories(userID int64, page, pageSize int) ([]*Repos
}
repos := make([]*Repository, 0, pageSize)
// 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
ON team_repo.repo_id = repository.id
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)
- if err = x.Sql(fmt.Sprintf(`SELECT repository.* FROM repository
+ if err = x.SQL(fmt.Sprintf(`SELECT repository.* FROM repository
INNER JOIN team_repo
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)