aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/avatar/avatar.go4
-rw-r--r--modules/middleware/context.go2
2 files changed, 4 insertions, 2 deletions
diff --git a/modules/avatar/avatar.go b/modules/avatar/avatar.go
index e037703b..60f7e2ec 100644
--- a/modules/avatar/avatar.go
+++ b/modules/avatar/avatar.go
@@ -39,6 +39,8 @@ import (
"github.com/gogits/gogs/modules/setting"
)
+//FIXME: remove cache module
+
var gravatarSource string
func UpdateGravatarSource() {
@@ -153,7 +155,7 @@ func (this *Avatar) Encode(wr io.Writer, size int) (err error) {
if img, err = decodeImageFile(imgPath); err != nil {
return
}
- m := resize.Resize(uint(size), 0, img, resize.NearestNeighbor)
+ m := resize.Resize(uint(size), 0, img, resize.Lanczos3)
return jpeg.Encode(wr, m, nil)
}
diff --git a/modules/middleware/context.go b/modules/middleware/context.go
index dffebe6f..3910a205 100644
--- a/modules/middleware/context.go
+++ b/modules/middleware/context.go
@@ -205,7 +205,7 @@ func Contexter() macaron.Handler {
Session: sess,
}
// Compute current URL for real-time change language.
- ctx.Data["Link"] = setting.AppSubUrl + ctx.Req.URL.Path
+ ctx.Data["Link"] = setting.AppSubUrl + strings.TrimSuffix(ctx.Req.URL.Path, "/")
ctx.Data["PageStartTime"] = time.Now()