diff options
author | Lauris BH <lauris@nix.lv> | 2017-11-27 02:58:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-27 02:58:54 +0200 |
commit | 0d4c63fd70d0b255a9a17352cc47ec2b6ca13440 (patch) | |
tree | 1128c5e474474bf7b2967dee8b9528dc207c6aa7 /routers/repo/commit.go | |
parent | fb5c6b644460f94acb8976ad35165230b9d47fb2 (diff) | |
download | gitea-0d4c63fd70d0b255a9a17352cc47ec2b6ca13440.tar.gz gitea-0d4c63fd70d0b255a9a17352cc47ec2b6ca13440.zip |
Fix go-get, src and raw urls to new scheme (#2978)
Diffstat (limited to 'routers/repo/commit.go')
-rw-r--r-- | routers/repo/commit.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/routers/repo/commit.go b/routers/repo/commit.go index 758771e657..2fcb65557d 100644 --- a/routers/repo/commit.go +++ b/routers/repo/commit.go @@ -237,11 +237,11 @@ func Diff(ctx *context.Context) { ctx.Data["Diff"] = diff ctx.Data["Parents"] = parents ctx.Data["DiffNotAvailable"] = diff.NumFiles() == 0 - ctx.Data["SourcePath"] = setting.AppSubURL + "/" + path.Join(userName, repoName, "src", commitID) + ctx.Data["SourcePath"] = setting.AppSubURL + "/" + path.Join(userName, repoName, "src", "commit", commitID) if commit.ParentCount() > 0 { - ctx.Data["BeforeSourcePath"] = setting.AppSubURL + "/" + path.Join(userName, repoName, "src", parents[0]) + ctx.Data["BeforeSourcePath"] = setting.AppSubURL + "/" + path.Join(userName, repoName, "src", "commit", parents[0]) } - ctx.Data["RawPath"] = setting.AppSubURL + "/" + path.Join(userName, repoName, "raw", commitID) + ctx.Data["RawPath"] = setting.AppSubURL + "/" + path.Join(userName, repoName, "raw", "commit", commitID) ctx.HTML(200, tplDiff) } @@ -302,9 +302,9 @@ func CompareDiff(ctx *context.Context) { ctx.Data["Commit"] = commit ctx.Data["Diff"] = diff ctx.Data["DiffNotAvailable"] = diff.NumFiles() == 0 - ctx.Data["SourcePath"] = setting.AppSubURL + "/" + path.Join(userName, repoName, "src", afterCommitID) - ctx.Data["BeforeSourcePath"] = setting.AppSubURL + "/" + path.Join(userName, repoName, "src", beforeCommitID) - ctx.Data["RawPath"] = setting.AppSubURL + "/" + path.Join(userName, repoName, "raw", afterCommitID) + ctx.Data["SourcePath"] = setting.AppSubURL + "/" + path.Join(userName, repoName, "src", "commit", afterCommitID) + ctx.Data["BeforeSourcePath"] = setting.AppSubURL + "/" + path.Join(userName, repoName, "src", "commit", beforeCommitID) + ctx.Data["RawPath"] = setting.AppSubURL + "/" + path.Join(userName, repoName, "raw", "commit", afterCommitID) ctx.Data["RequireHighlightJS"] = true ctx.HTML(200, tplDiff) } |