Thiemo Mättig (WMDE) has uploaded a new change for review.
https://gerrit.wikimedia.org/r/233957
Change subject: Fix non-callable type in wgAPIModules registration
......................................................................
Fix non-callable type in wgAPIModules registration
I can not tell why this started to fail on my local mashine, because
the relevant is_callable check is there since 2014. However, I think
this is a reasonable change that should be done no matter what. A
string is usually not callable, you know?
Change-Id: I0d36f955f0c8b9407c585be17377b2b85640c68f
---
M WikibaseQuality.php
1 file changed, 9 insertions(+), 3 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseQuality
refs/changes/57/233957/1
diff --git a/WikibaseQuality.php b/WikibaseQuality.php
index 286ceee..ef9de2b 100644
--- a/WikibaseQuality.php
+++ b/WikibaseQuality.php
@@ -60,15 +60,21 @@
// Define API modules
$GLOBALS['wgAPIModules']['wbqgetviolationmessages'] = array(
'class' => 'WikibaseQuality\Api\GetViolationMessages',
- 'factory' =>
'WikibaseQuality\Api\GetViolationMessages::newFromGlobalState'
+ 'factory' => function( ApiMain $main, $action ) {
+ return
\WikibaseQuality\Api\GetViolationMessages::newFromGlobalState( $main, $action );
+ }
);
$GLOBALS['wgAPIModules']['wbqmodifyviolation'] = array(
'class' => 'WikibaseQuality\Api\ModifyViolation',
- 'factory' =>
'WikibaseQuality\Api\ModifyViolation::newFromGlobalState'
+ 'factory' => function( ApiMain $main, $action ) {
+ return
\WikibaseQuality\Api\ModifyViolation::newFromGlobalState( $main, $action );
+ }
);
$GLOBALS['wgAPIModules']['wbqgetviolationtypes'] = array(
'class' => 'WikibaseQuality\Api\GetViolationTypes',
- 'factory' =>
'WikibaseQuality\Api\GetViolationTypes::newFromGlobalState'
+ 'factory' => function( ApiMain $main, $action ) {
+ return
\WikibaseQuality\Api\GetViolationTypes::newFromGlobalState( $main, $action );
+ }
);
// Define user right
--
To view, visit https://gerrit.wikimedia.org/r/233957
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0d36f955f0c8b9407c585be17377b2b85640c68f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQuality
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits