From 36cbdd1bd8ceb3f97017c994e7b362423346f418 Mon Sep 17 00:00:00 2001 From: aszlig Date: Wed, 22 Jul 2015 11:51:49 +0200 Subject: [PATCH] common.tt: Properly generate URL for /api/scmdiff. If Hydra isn't hosted on https://example.com/ but something like https://example.com/hydra/, the URL for /api/scmdiff would have ended up on /api/scmdiff rather than /hydra/api/scmdiff. This is because we didn't use the URI resolver from the controller, hence we're using it now to build up the whole URL including the query string. Signed-off-by: aszlig --- src/root/common.tt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/root/common.tt b/src/root/common.tt index 75a66b63..44902431 100644 --- a/src/root/common.tt +++ b/src/root/common.tt @@ -271,7 +271,13 @@ BLOCK renderDiffUri; url = res.0; branch = res.1; IF bi1.type == "hg" || bi1.type == "git" %] - [% contents %] + [% contents %] [% ELSE; contents; END;