diff options
author | Unknwon <joe2010xtmf@163.com> | 2014-10-12 02:06:46 -0400 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2014-10-12 02:06:46 -0400 |
commit | 0d7b9065c60604a1ac37af595878d86b0c0679ad (patch) | |
tree | 3c3390b8dcbb2b267ef828099f468af6c8b4850f | |
parent | 452ccff81ca736a07bec44a059a0562a08656bf4 (diff) | |
download | gitea-0d7b9065c60604a1ac37af595878d86b0c0679ad.tar.gz gitea-0d7b9065c60604a1ac37af595878d86b0c0679ad.zip |
Fix #540
-rw-r--r-- | models/org.go | 19 | ||||
-rw-r--r-- | public/ng/js/gogs.js | 2 |
2 files changed, 3 insertions, 18 deletions
diff --git a/models/org.go b/models/org.go index 1297cb6d81..08d276bf86 100644 --- a/models/org.go +++ b/models/org.go @@ -845,23 +845,8 @@ func IsTeamMember(orgId, teamId, uid int64) bool { // GetTeamMembers returns all members in given team of organization. func GetTeamMembers(orgId, teamId int64) ([]*User, error) { - /*tus := make([]*TeamUser, 0, 10) - - err := x.Where("org_id=?", orgId).And("team_id=?", teamId).Find(&tus) - if err != nil { - return nil, err - } - - us := make([]*User, len(tus)) - for i, tu := range tus { - us[i], err = GetUserById(tu.Uid) - if err != nil { - return nil, err - } - }*/ - - us := make([]*User, 0) - err := x.Sql("select * from user join team_user on team_user.team_id = ? and team_user.uid = user.id", teamId).Find(&us) + us := make([]*User, 0, 10) + err := x.Sql("SELECT * FROM user JOIN team_user ON team_user.team_id = ? AND team_user.uid = user.id", teamId).Find(&us) return us, err } diff --git a/public/ng/js/gogs.js b/public/ng/js/gogs.js index 538e6c679a..eba1744b93 100644 --- a/public/ng/js/gogs.js +++ b/public/ng/js/gogs.js @@ -718,7 +718,7 @@ function initDiff() { $('.diff-detail-box>a').click(function () { $($(this).data('target')).slideToggle(100); }) - + var $counter = $('.diff-counter'); if ($counter.length < 1) { return; |