aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-02-14 20:07:42 -0500
committerUnknwon <u@gogs.io>2016-02-14 20:07:42 -0500
commita1d97e8f5c13d4380abe761ed64d0ab59b779167 (patch)
treea3f542336e3856df14e4036efec69215e9300825
parentdaa43cfb6e6ed4118676e55d47d8816bab2379e5 (diff)
Minor fix for #2567
-rw-r--r--.bra.toml3
-rw-r--r--Makefile4
-rw-r--r--README.md2
-rw-r--r--gogs.go2
-rw-r--r--models/action.go14
-rw-r--r--routers/user/home.go2
-rw-r--r--routers/user/profile.go2
-rw-r--r--templates/.VERSION2
8 files changed, 17 insertions, 14 deletions
diff --git a/.bra.toml b/.bra.toml
index dd6a1e1c..0a461cc5 100644
--- a/.bra.toml
+++ b/.bra.toml
@@ -13,7 +13,6 @@ watch_dirs = [
watch_exts = [".go"]
build_delay = 1500
cmds = [
- ["go", "install", "-v", "-race"], # sqlite cert pam tidb
- ["go", "build", "-race"],
+ ["make", "build-dev"], # sqlite cert pam tidb
["./gogs", "web"]
] \ No newline at end of file
diff --git a/Makefile b/Makefile
index 768ec0b3..4137d89d 100644
--- a/Makefile
+++ b/Makefile
@@ -19,6 +19,10 @@ build: $(GENERATED)
go install -v -ldflags '$(LDFLAGS)' -tags '$(TAGS)'
cp '$(GOPATH)/bin/gogs' .
+build-dev: $(GENERATED)
+ go install -v -race -tags '$(TAGS)'
+ cp '$(GOPATH)/bin/gogs' .
+
govet:
go tool vet -composites=false -methods=false -structtags=false .
diff --git a/README.md b/README.md
index 876f380e..ada97c1a 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra
![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true)
-##### Current version: 0.8.34
+##### Current version: 0.8.35
| Web | UI | Preview |
|:-------------:|:-------:|:-------:|
diff --git a/gogs.go b/gogs.go
index d2e4c3e7..111d5fdb 100644
--- a/gogs.go
+++ b/gogs.go
@@ -17,7 +17,7 @@ import (
"github.com/gogits/gogs/modules/setting"
)
-const APP_VER = "0.8.34.0214"
+const APP_VER = "0.8.35.0214"
func init() {
runtime.GOMAXPROCS(runtime.NumCPU())
diff --git a/models/action.go b/models/action.go
index 5a38da87..8d7dd6fa 100644
--- a/models/action.go
+++ b/models/action.go
@@ -593,21 +593,21 @@ func MergePullRequestAction(actUser *User, repo *Repository, pull *Issue) error
}
// GetFeeds returns action list of given user in given context.
-// ctxUserID is the user who's requesting, userID is the user/org that is requested.
-// ctxUserID can be -1, if isProfile is true or in order to skip the permission check.
+// userID is the user who's requesting, ctxUserID is the user/org that is requested.
+// userID can be -1, if isProfile is true or in order to skip the permission check.
func GetFeeds(ctxUserID, userID, offset int64, isProfile bool) ([]*Action, error) {
actions := make([]*Action, 0, 20)
- sess := x.Limit(20, int(offset)).Desc("id").Where("user_id=?", userID)
+ sess := x.Limit(20, int(offset)).Desc("id").Where("user_id=?", ctxUserID)
if isProfile {
- sess.And("is_private=?", false).And("act_user_id=?", userID)
+ sess.And("is_private=?", false).And("act_user_id=?", ctxUserID)
} else if ctxUserID != -1 {
- ctxUser := &User{Id: userID}
- if err := ctxUser.GetUserRepositories(ctxUserID); err != nil {
+ ctxUser := &User{Id: ctxUserID}
+ if err := ctxUser.GetUserRepositories(userID); err != nil {
return nil, err
}
var repoIDs []int64
- for _, repo := range ctxUser.Repos {
+ for _, repo := range ctxUser.Repos {
repoIDs = append(repoIDs, repo.ID)
}
diff --git a/routers/user/home.go b/routers/user/home.go
index d48f2831..fa8c1364 100644
--- a/routers/user/home.go
+++ b/routers/user/home.go
@@ -140,7 +140,7 @@ func Dashboard(ctx *middleware.Context) {
ctx.Data["MirrorCount"] = len(mirrors)
ctx.Data["Mirrors"] = mirrors
- retrieveFeeds(ctx, ctx.User.Id, ctxUser.Id, 0, false)
+ retrieveFeeds(ctx, ctxUser.Id, ctx.User.Id, 0, false)
if ctx.Written() {
return
}
diff --git a/routers/user/profile.go b/routers/user/profile.go
index c1ebc3bf..c1f68c03 100644
--- a/routers/user/profile.go
+++ b/routers/user/profile.go
@@ -86,7 +86,7 @@ func Profile(ctx *middleware.Context) {
ctx.Data["TabName"] = tab
switch tab {
case "activity":
- retrieveFeeds(ctx, -1, u.Id, 0, true)
+ retrieveFeeds(ctx, u.Id, -1, 0, true)
if ctx.Written() {
return
}
diff --git a/templates/.VERSION b/templates/.VERSION
index f2e90b7a..f6fb13cf 100644
--- a/templates/.VERSION
+++ b/templates/.VERSION
@@ -1 +1 @@
-0.8.34.0214 \ No newline at end of file
+0.8.35.0214 \ No newline at end of file