build: Load ConfirmEdit as phan dependency

Bug: T296287
Depends-On: I549a97923fe994820358c65ee1cd725f6d9bba1a
Change-Id: If45b296a24e86d7ef6c581b3d822eb0adfa1f245
This commit is contained in:
Umherirrender 2021-11-23 19:30:25 +01:00
parent 538e543a32
commit c062d047ce
2 changed files with 2 additions and 1 deletions

View file

@ -7,6 +7,7 @@ $cfg['directory_list'] = array_merge(
[ [
'../../extensions/EventLogging', '../../extensions/EventLogging',
'../../extensions/WikimediaEvents', '../../extensions/WikimediaEvents',
'../../extensions/ConfirmEdit',
] ]
); );
@ -15,6 +16,7 @@ $cfg['exclude_analysis_directory_list'] = array_merge(
[ [
'../../extensions/EventLogging', '../../extensions/EventLogging',
'../../extensions/WikimediaEvents', '../../extensions/WikimediaEvents',
'../../extensions/ConfirmEdit',
] ]
); );

View file

@ -423,7 +423,6 @@ class Hooks implements EditPageGetPreviewContentHook {
if ( ExtensionRegistry::getInstance()->isLoaded( 'ConfirmEdit' ) ) { if ( ExtensionRegistry::getInstance()->isLoaded( 'ConfirmEdit' ) ) {
$key = CacheKeyHelper::getKeyForPage( $wikiPage ); $key = CacheKeyHelper::getKeyForPage( $wikiPage );
/** @var SimpleCaptcha $captcha */ /** @var SimpleCaptcha $captcha */
// @phan-suppress-next-line PhanUndeclaredClassMethod
$captcha = \ConfirmEditHooks::getInstance(); $captcha = \ConfirmEditHooks::getInstance();
$activatedCaptchas = $captcha->getActivatedCaptchas(); $activatedCaptchas = $captcha->getActivatedCaptchas();
if ( isset( $activatedCaptchas[$key] ) ) { if ( isset( $activatedCaptchas[$key] ) ) {