mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-12-04 20:48:31 +00:00
2de530d092
The old method is returning null, results in error that makes user stuck on the save your chagnes dialog in VE. Bug: T311449 Change-Id: I124093fff4f7e69f7ec76cc6b9994d7939bc80f1
27 lines
592 B
PHP
27 lines
592 B
PHP
<?php
|
|
|
|
declare( strict_types=1 );
|
|
|
|
namespace MediaWiki\Extension\ConfirmEdit\hCaptcha\Hooks;
|
|
|
|
use Config;
|
|
use MediaWiki\ResourceLoader as RL;
|
|
|
|
class ResourceLoaderHooks {
|
|
/**
|
|
* Passes config variables to ext.confirmEdit.hCaptcha.visualEditor ResourceLoader module.
|
|
* @param RL\Context $context
|
|
* @param Config $config
|
|
* @return array
|
|
*/
|
|
public static function getHCaptchaResourceLoaderConfig(
|
|
RL\Context $context,
|
|
Config $config
|
|
) {
|
|
return [
|
|
'hCaptchaSiteKey' => $config->get( 'HCaptchaSiteKey' ),
|
|
'hCaptchaScriptURL' => 'https://js.hcaptcha.com/1/api.js',
|
|
];
|
|
}
|
|
}
|