Add apprtype and apprlevel to AllPagesGenerator#105
Add apprtype and apprlevel to AllPagesGenerator#105ashotjanibekyan wants to merge 1 commit intoCXuesong:masterfrom
Conversation
| Upload | ||
| } | ||
|
|
||
| public enum ProtectionLevel |
There was a problem hiding this comment.
Some wikis may have more level. I used the English Wikipedia as a reference, the enum can be extended later.
There was a problem hiding this comment.
I've checked DB table and pr_level is a column of free text. Then probably you can use string as protection level, and use a another static class like ProtectionLevels to define common protection levels, like what I've been doing in LogActions class.
In the future we might consider introducing some utility structures like HttpMethod class for better strong-typing support.
| {"apfilterlanglinks", LanguageLinkFilter.ToString("withlanglinks", "withoutlanglinks")}, | ||
| {"apminsize", MinPageContentLength}, | ||
| {"apmaxsize", MaxPageContentLength}, | ||
| {"apprtype", ProtectionType != null && ProtectionType.Count != 0 ? string.Join('|', ProtectionType.Select(x => x.ToString().ToLower())) : null}, |
There was a problem hiding this comment.
Please use MediaWikiHelper.JoinValues instead of string.Join('|', ...).
| Upload | ||
| } | ||
|
|
||
| public enum ProtectionLevel |
There was a problem hiding this comment.
I've checked DB table and pr_level is a column of free text. Then probably you can use string as protection level, and use a another static class like ProtectionLevels to define common protection levels, like what I've been doing in LogActions class.
In the future we might consider introducing some utility structures like HttpMethod class for better strong-typing support.
| WithoutProperty, | ||
| } | ||
|
|
||
| public enum ProtectionType |
No description provided.