Move AjaxExportList to callback

Change-Id: I7f44b3ea0d5460cecfa358fe0a7f437f5d800b8b
This commit is contained in:
Paladox 2018-05-10 17:45:48 +00:00
parent eba1049be2
commit 19b11b54d5
2 changed files with 7 additions and 5 deletions

View file

@ -9,6 +9,7 @@
"url": "https://www.mediawiki.org/wiki/Extension:AJAX_Poll", "url": "https://www.mediawiki.org/wiki/Extension:AJAX_Poll",
"descriptionmsg": "ajaxpoll-desc", "descriptionmsg": "ajaxpoll-desc",
"type": "parserhook", "type": "parserhook",
"callback": "AJAXPoll::onRegistration",
"GroupPermissions": { "GroupPermissions": {
"*": { "*": {
"ajaxpoll-vote": false, "ajaxpoll-vote": false,
@ -63,10 +64,6 @@
"TrackingCategories": [ "TrackingCategories": [
"ajaxpoll-tracking-category" "ajaxpoll-tracking-category"
], ],
"config": { "config": {},
"AjaxExportList": [
"AJAXPoll::submitVote"
]
},
"manifest_version": 1 "manifest_version": 1
} }

View file

@ -15,6 +15,11 @@
*/ */
class AJAXPoll { class AJAXPoll {
public static function onRegistration() {
global $wgAjaxExportList;
$wgAjaxExportList[] = 'AJAXPoll::submitVote';
}
/** /**
* Register <poll> tag with the parser * Register <poll> tag with the parser
* *