mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-18 15:18:25 +00:00
fix
This commit is contained in:
parent
349c594489
commit
2e141d820a
@ -856,10 +856,13 @@ func updateRepoUnits(ctx *context.APIContext, opts api.EditRepoOption) error {
|
|||||||
Config: config,
|
Config: config,
|
||||||
})
|
})
|
||||||
deleteUnitTypes = append(deleteUnitTypes, unit_model.TypeExternalWiki)
|
deleteUnitTypes = append(deleteUnitTypes, unit_model.TypeExternalWiki)
|
||||||
} else if !*opts.HasWiki && !unit_model.TypeExternalWiki.UnitGlobalDisabled() {
|
} else if !*opts.HasWiki {
|
||||||
deleteUnitTypes = append(deleteUnitTypes, unit_model.TypeExternalWiki)
|
if !unit_model.TypeExternalWiki.UnitGlobalDisabled() {
|
||||||
} else if !*opts.HasWiki && !unit_model.TypeWiki.UnitGlobalDisabled() {
|
deleteUnitTypes = append(deleteUnitTypes, unit_model.TypeExternalWiki)
|
||||||
deleteUnitTypes = append(deleteUnitTypes, unit_model.TypeWiki)
|
}
|
||||||
|
if !unit_model.TypeWiki.UnitGlobalDisabled() {
|
||||||
|
deleteUnitTypes = append(deleteUnitTypes, unit_model.TypeWiki)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,9 +53,8 @@ func getRepoEditOptionFromRepo(repo *repo_model.Repository) *api.EditRepoOption
|
|||||||
hasWiki = true
|
hasWiki = true
|
||||||
} else if unit, err := repo.GetUnit(db.DefaultContext, unit_model.TypeExternalWiki); err == nil {
|
} else if unit, err := repo.GetUnit(db.DefaultContext, unit_model.TypeExternalWiki); err == nil {
|
||||||
hasWiki = true
|
hasWiki = true
|
||||||
config := unit.ExternalWikiConfig()
|
|
||||||
externalWiki = &api.ExternalWiki{
|
externalWiki = &api.ExternalWiki{
|
||||||
ExternalWikiURL: config.ExternalWikiURL,
|
ExternalWikiURL: unit.ExternalWikiConfig().ExternalWikiURL,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
defaultBranch := repo.DefaultBranch
|
defaultBranch := repo.DefaultBranch
|
||||||
|
Loading…
Reference in New Issue
Block a user