mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Add system setting table with cache and also add cache supports for user setting (#18058)
This commit is contained in:
		@@ -8,7 +8,7 @@ import (
 | 
			
		||||
	"fmt"
 | 
			
		||||
	"strings"
 | 
			
		||||
 | 
			
		||||
	admin_model "code.gitea.io/gitea/models/admin"
 | 
			
		||||
	system_model "code.gitea.io/gitea/models/system"
 | 
			
		||||
	"code.gitea.io/gitea/modules/git"
 | 
			
		||||
	"code.gitea.io/gitea/modules/log"
 | 
			
		||||
	base "code.gitea.io/gitea/modules/migration"
 | 
			
		||||
@@ -17,7 +17,7 @@ import (
 | 
			
		||||
// WarnAndNotice will log the provided message and send a repository notice
 | 
			
		||||
func WarnAndNotice(fmtStr string, args ...interface{}) {
 | 
			
		||||
	log.Warn(fmtStr, args...)
 | 
			
		||||
	if err := admin_model.CreateRepositoryNotice(fmt.Sprintf(fmtStr, args...)); err != nil {
 | 
			
		||||
	if err := system_model.CreateRepositoryNotice(fmt.Sprintf(fmtStr, args...)); err != nil {
 | 
			
		||||
		log.Error("create repository notice failed: ", err)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user