Background
The CommunityRequests extension is currently designed to store votes as wikitext on a /Votes subpage of either a focus area, and later wishes. When a vote is saved, we need to update communityrequests_wishes.cr_vote_count (wishes) or communityrequests_focus_areas.crfa_vote_count (focus areas) accordingly.
Acceptance criteria
- Add a configuration variable to specify what the voting subpage is called. i.e. $wgCommunityRequestsVotingSubpage = '/Voting';
- Introduce a parser tag for votes. We don't store any voting data other than the tally count, so an empty parser function with no output is fine for now, i.e. <vote>. This will get embedded in the voting template, so don't worry about presentation.
- Keep a tally of each vote, storing the counter with ParserOutput::setExtensionData(), similar to what we're doing for the other parser tags
- Use the LinksUpdateComplete hook to get the final count (pulling the tally from the extension data)
- Before saving, ensure we're on a qualifying page
- Get the Wish or FocusArea object from the page title, and update the vote count field for the corresponding row in the wishes/focus_areas table