|
|
@@ -211,6 +211,18 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) { |
|
|
|
// as an error on the UI for this action |
|
|
|
ctx.Data["Err_RepoName"] = nil |
|
|
|
|
|
|
|
if form.EnableDataset && !models.UnitTypeDatasets.UnitGlobalDisabled() { |
|
|
|
units = append(units, models.RepoUnit{ |
|
|
|
RepoID: repo.ID, |
|
|
|
Type: models.UnitTypeDatasets, |
|
|
|
Config: &models.DatasetConfig{ |
|
|
|
EnableDataset: form.EnableDataset, |
|
|
|
}, |
|
|
|
}) |
|
|
|
} else if !models.UnitTypeDatasets.UnitGlobalDisabled() { |
|
|
|
deleteUnitTypes = append(deleteUnitTypes, models.UnitTypeDatasets) |
|
|
|
} |
|
|
|
|
|
|
|
if form.EnableWiki && form.EnableExternalWiki && !models.UnitTypeExternalWiki.UnitGlobalDisabled() { |
|
|
|
if !validation.IsValidExternalURL(form.ExternalWikiURL) { |
|
|
|
ctx.Flash.Error(ctx.Tr("repo.settings.external_wiki_url_error")) |
|
|
|