protected override void ProcessArticleFinish()
{
Living living = Living.Unknown;
StubClass();
foreach (ListViewItem lvi in _ourSettingsControl.ListView1.Items)
{
if (lvi.Checked)
{
TemplateParameters tp = (TemplateParameters) lvi.Tag;
if (tp.Group == WorkgroupsGroups)
{
string param = tp.ParamName.ToLower().Replace(" ", "-");
AddAndLogNewParamWithAYesValue(param + "-work-group");
// Probably needs some reformatting
AddEmptyParam(param + "-priority");
}
else
{
switch (tp.ParamName)
{
case "Not Living":
living = Living.Dead;
break;
case "Living":
living = Living.Living;
break;
default:
AddAndLogNewParamWithAYesValue(tp.ParamName.ToLower().Replace(" ", "-"));
break;
}
}
}
}
switch (living)
{
case Living.Living:
if (!Template.HasYesParamLowerOrTitleCase(true, "living"))
{
AddAndLogNewParamWithAYesValue("living");
}
break;
case Living.Dead:
if (!Template.HasYesParamLowerOrTitleCase(false, "living"))
{
Template.NewOrReplaceTemplateParm("living", "no", TheArticle, true, false, false, "", true);
}
break;
case Living.Unknown:
Template.NewOrReplaceTemplateParm("living", "", TheArticle, false, false, true, "", true);
break;
}
if (TheArticle.Namespace == Namespace.Talk && TheArticle.ProcessIt && !PluginManager.BotMode)
{
// Since we're dealing with talk pages, we want a listas= even if it's the same as the
// article title without namespace (otherwise it sorts to namespace)
Template.NewOrReplaceTemplateParm("listas", Tools.MakeHumanCatKey(TheArticle.FullArticleTitle, TheArticle.AlteredArticleText), TheArticle, true, false, true, "");
}
}