forked from Gitlink/gitea-1120-rc1
fix:
This commit is contained in:
parent
5decf76ec3
commit
b228c9f602
|
@ -302,7 +302,7 @@ func EditWikiPost(ctx *context.APIContext, form api.WikiOption) {
|
|||
oldWikiName := wiki_service.NormalizeWikiName(ctx.Params(":page"))
|
||||
newWikiName := wiki_service.NormalizeWikiName(form.Name)
|
||||
|
||||
newWikiName, _= url.QueryUnescape(newWikiName)
|
||||
//newWikiName, _= url.QueryUnescape(newWikiName)
|
||||
|
||||
if len(form.CommitMessage) == 0 {
|
||||
form.CommitMessage = ctx.Tr("repo.editor.update", form.Name)
|
||||
|
@ -315,6 +315,3 @@ func EditWikiPost(ctx *context.APIContext, form api.WikiOption) {
|
|||
}
|
||||
|
||||
|
||||
func CheckHasWiki(ctx *context.APIContext){
|
||||
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@ import (
|
|||
api "code.gitea.io/gitea/modules/structs"
|
||||
"code.gitea.io/gitea/modules/wikies"
|
||||
wiki_service "code.gitea.io/gitea/services/wiki"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"sort"
|
||||
)
|
||||
|
@ -34,22 +33,14 @@ func WikiList(ctx *context.APIContext) {
|
|||
// "200":
|
||||
// "$ref": "#/responses/WikiList"
|
||||
|
||||
|
||||
if !ctx.Repo.Repository.HasWiki() {
|
||||
ctx.CheckHasWiki()
|
||||
return
|
||||
}
|
||||
|
||||
repository := ctx.Repo.Repository
|
||||
wikiCloneLink := repository.CloneWikiLink()
|
||||
wikiRepo, commit, err := wikies.FindWikiRepoCommit(ctx)
|
||||
|
||||
|
||||
|
||||
fmt.Println("wikiRepo================================\n",wikiRepo)
|
||||
|
||||
fmt.Println("repository===================\n", repository)
|
||||
|
||||
if err != nil {
|
||||
if wikiRepo != nil {
|
||||
wikiRepo.Close()
|
||||
|
@ -63,15 +54,6 @@ func WikiList(ctx *context.APIContext) {
|
|||
}
|
||||
return
|
||||
}
|
||||
|
||||
for _, entry := range entries {
|
||||
|
||||
fmt.Println("entry",entry)
|
||||
fmt.Println("entry name",entry.Name())
|
||||
fmt.Println()
|
||||
|
||||
}
|
||||
|
||||
wikiesList := make([]api.WikiesResponse, 0, len(entries))
|
||||
for _, entry := range entries {
|
||||
if !entry.IsRegular() {
|
||||
|
|
Loading…
Reference in New Issue