ApiDisabled: Correctly fall back to api-help-no-extended-description
ApiBase falls back to this message when the module itself doesn't define an extended-description message. ApiDisabled and ApiQueryDisabled should do so as well. Bug: T242534 Change-Id: I8f3ed17559363d9c66c5baf0ef7b0675714dc877
This commit is contained in:
parent
155a87a305
commit
edc3272816
3 changed files with 13 additions and 2 deletions
|
|
@ -45,6 +45,9 @@ class ApiDisabled extends ApiBase {
|
|||
}
|
||||
|
||||
protected function getExtendedDescription() {
|
||||
return 'apihelp-disabled-extended-description';
|
||||
return [ [
|
||||
'apihelp-disabled-extended-description',
|
||||
'api-help-no-extended-description',
|
||||
] ];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,6 +45,9 @@ class ApiQueryDisabled extends ApiQueryBase {
|
|||
}
|
||||
|
||||
public function getExtendedDescription() {
|
||||
return 'apihelp-query+disabled-extended-description';
|
||||
return [ [
|
||||
'apihelp-query+disabled-extended-description',
|
||||
'api-help-no-extended-description',
|
||||
] ];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,6 +114,11 @@ class ApiStructureTest extends MediaWikiTestCase {
|
|||
self::$main->getContext()->setTitle(
|
||||
Title::makeTitle( NS_SPECIAL, 'Badtitle/dummy title for ApiStructureTest' )
|
||||
);
|
||||
|
||||
// Inject ApiDisabled and ApiQueryDisabled so they can be tested too
|
||||
self::$main->getModuleManager()->addModule( 'disabled', 'action', ApiDisabled::class );
|
||||
self::$main->getModuleFromPath( 'query' )
|
||||
->getModuleManager()->addModule( 'query-disabled', 'meta', ApiQueryDisabled::class );
|
||||
}
|
||||
return self::$main;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue