mirror of
https://github.com/go-gitea/gitea
synced 2024-11-21 23:03:39 +01:00
fix some typos (#1082)
This commit is contained in:
parent
4b286f282a
commit
c2eef171ff
4 changed files with 6 additions and 6 deletions
|
@ -715,7 +715,7 @@ func GetActiveOAuth2LoginSourceByName(name string) (*LoginSource, error) {
|
||||||
// key is used as technical name (like in the callbackURL)
|
// key is used as technical name (like in the callbackURL)
|
||||||
// values to display
|
// values to display
|
||||||
func GetActiveOAuth2Providers() (map[string]OAuth2Provider, error) {
|
func GetActiveOAuth2Providers() (map[string]OAuth2Provider, error) {
|
||||||
// Maybe also seperate used and unused providers so we can force the registration of only 1 active provider for each type
|
// Maybe also separate used and unused providers so we can force the registration of only 1 active provider for each type
|
||||||
|
|
||||||
loginSources, err := GetActiveOAuth2ProviderLoginSources()
|
loginSources, err := GetActiveOAuth2ProviderLoginSources()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -244,7 +244,7 @@ func GetReleasesByRepoID(repoID int64, page, pageSize int) (rels []*Release, err
|
||||||
return rels, err
|
return rels, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetReleasesByRepoIDAndNames returns a list of releases of repository accroding repoID and tagNames.
|
// GetReleasesByRepoIDAndNames returns a list of releases of repository according repoID and tagNames.
|
||||||
func GetReleasesByRepoIDAndNames(repoID int64, tagNames []string) (rels []*Release, err error) {
|
func GetReleasesByRepoIDAndNames(repoID int64, tagNames []string) (rels []*Release, err error) {
|
||||||
err = x.
|
err = x.
|
||||||
Desc("created_unix").
|
Desc("created_unix").
|
||||||
|
|
|
@ -529,17 +529,17 @@ func IsTextFile(data []byte) bool {
|
||||||
return strings.Index(http.DetectContentType(data), "text/") != -1
|
return strings.Index(http.DetectContentType(data), "text/") != -1
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsImageFile detectes if data is an image format
|
// IsImageFile detects if data is an image format
|
||||||
func IsImageFile(data []byte) bool {
|
func IsImageFile(data []byte) bool {
|
||||||
return strings.Index(http.DetectContentType(data), "image/") != -1
|
return strings.Index(http.DetectContentType(data), "image/") != -1
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsPDFFile detectes if data is a pdf format
|
// IsPDFFile detects if data is a pdf format
|
||||||
func IsPDFFile(data []byte) bool {
|
func IsPDFFile(data []byte) bool {
|
||||||
return strings.Index(http.DetectContentType(data), "application/pdf") != -1
|
return strings.Index(http.DetectContentType(data), "application/pdf") != -1
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsVideoFile detectes if data is an video format
|
// IsVideoFile detects if data is an video format
|
||||||
func IsVideoFile(data []byte) bool {
|
func IsVideoFile(data []byte) bool {
|
||||||
return strings.Index(http.DetectContentType(data), "video/") != -1
|
return strings.Index(http.DetectContentType(data), "video/") != -1
|
||||||
}
|
}
|
||||||
|
|
|
@ -296,7 +296,7 @@ func Home(ctx *context.Context) {
|
||||||
ctx.HTML(200, tplRepoHome)
|
ctx.HTML(200, tplRepoHome)
|
||||||
}
|
}
|
||||||
|
|
||||||
// RenderUserCards render a page show users accroding the input templaet
|
// RenderUserCards render a page show users according the input templaet
|
||||||
func RenderUserCards(ctx *context.Context, total int, getter func(page int) ([]*models.User, error), tpl base.TplName) {
|
func RenderUserCards(ctx *context.Context, total int, getter func(page int) ([]*models.User, error), tpl base.TplName) {
|
||||||
page := ctx.QueryInt("page")
|
page := ctx.QueryInt("page")
|
||||||
if page <= 0 {
|
if page <= 0 {
|
||||||
|
|
Loading…
Reference in a new issue