summaryrefslogtreecommitdiffstats
path: root/models/repo.go
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2015-02-10 23:44:16 -0500
committerUnknwon <joe2010xtmf@163.com>2015-02-10 23:44:16 -0500
commit485ea6f14f38cfa5da4fa27865f62fcc7691ffb4 (patch)
tree77be68e9bb6a05fc2e66f6792ed143a2bff8f107 /models/repo.go
parent28580aee63997e04c9b8136a7a189966b8f6b666 (diff)
downloadgitea-485ea6f14f38cfa5da4fa27865f62fcc7691ffb4.tar.gz
gitea-485ea6f14f38cfa5da4fa27865f62fcc7691ffb4.zip
models: make code change for session issue with SQLite3 #739
Diffstat (limited to 'models/repo.go')
-rw-r--r--models/repo.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/models/repo.go b/models/repo.go
index 15aadbba66..cdb838a1fb 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -1296,7 +1296,7 @@ func IsWatching(uid, repoId int64) bool {
return has
}
-func watchRepoWithEngine(e Engine, uid, repoId int64, watch bool) (err error) {
+func watchRepo(e Engine, uid, repoId int64, watch bool) (err error) {
if watch {
if IsWatching(uid, repoId) {
return nil
@@ -1319,7 +1319,7 @@ func watchRepoWithEngine(e Engine, uid, repoId int64, watch bool) (err error) {
// Watch or unwatch repository.
func WatchRepo(uid, repoId int64, watch bool) (err error) {
- return watchRepoWithEngine(x, uid, repoId, watch)
+ return watchRepo(x, uid, repoId, watch)
}
// GetWatchers returns all watchers of given repository.
@@ -1507,14 +1507,14 @@ func ForkRepository(u *User, oldRepo *Repository, name, desc string) (*Repositor
log.Error(4, "GetMembers: %v", err)
} else {
for _, u := range t.Members {
- if err = watchRepoWithEngine(sess, u.Id, repo.Id, true); err != nil {
+ if err = watchRepo(sess, u.Id, repo.Id, true); err != nil {
log.Error(4, "WatchRepo2: %v", err)
}
}
}
}
} else {
- if err = watchRepoWithEngine(sess, u.Id, repo.Id, true); err != nil {
+ if err = watchRepo(sess, u.Id, repo.Id, true); err != nil {
log.Error(4, "WatchRepo3: %v", err)
}
}