mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	move templateFuncs to one file, add middleware context.
This commit is contained in:
		@@ -4,17 +4,9 @@
 | 
			
		||||
 | 
			
		||||
package base
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"github.com/codegangsta/martini"
 | 
			
		||||
)
 | 
			
		||||
import ()
 | 
			
		||||
 | 
			
		||||
type (
 | 
			
		||||
	// Type TmplData represents data in the templates.
 | 
			
		||||
	TmplData map[string]interface{}
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func InitContext() martini.Handler {
 | 
			
		||||
	return func(context martini.Context) {
 | 
			
		||||
		context.Map(TmplData{})
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user