#988: GetRepoLink already contains AppSubUrl

This commit is contained in:
Unknwon 2015-03-12 16:01:23 -04:00
parent 6b70a0c0d9
commit 0720d3988f
12 changed files with 128 additions and 94 deletions

View file

@ -97,8 +97,15 @@ func (a Action) GetRepoName() string {
return a.RepoName
}
func (a Action) GetRepoPath() string {
return path.Join(a.RepoUserName, a.RepoName)
}
func (a Action) GetRepoLink() string {
return path.Join(setting.AppSubUrl, a.RepoUserName, a.RepoName)
if len(setting.AppSubUrl) > 0 {
return path.Join(setting.AppSubUrl, a.GetRepoPath())
}
return "/" + a.GetRepoPath()
}
func (a Action) GetBranch() string {