Page MenuHomePhabricator

api help for query=filerepoinfo are missing messages for optional filerepo properties
Open, Needs TriagePublic

Description

Running phpunit tests while having setup in $wgForeignFileRepos[] for ForeignDBRepo gives failures:

1) ApiStructureTest::testDocumentationExists with data set "Module query+filerepoinfo with MiserMode=false" ('query+filerepoinfo', array(false))
Parameter prop value descBaseUrl message apihelp-query+filerepoinfo-paramvalue-prop-descBaseUrl exists
Failed asserting that false is true.

2) ApiStructureTest::testDocumentationExists with data set "Module query+filerepoinfo with MiserMode=true" ('query+filerepoinfo', array(true))
Parameter prop value descBaseUrl message apihelp-query+filerepoinfo-paramvalue-prop-descBaseUrl exists
Failed asserting that false is true.

Looking at the api help there are also shown "(no description)" for the properties.

This has happen, because FileRepo defines some optional settings which have no apihelp messages, except scriptDirUrl

		$optionalSettings = [
			'descBaseUrl', 'scriptDirUrl', 'articleUrl', 'fetchDescription',
			'thumbScriptUrl', 'pathDisclosureProtection', 'descriptionCacheExpiry',
			'favicon', 'thumbProxyUrl', 'thumbProxySecret',
		];

Please add messages for the other optional settings to api/i18n/en.json | qqq.json

Needs some idea how to test that new optional settings gets messages in api help, this may delayed and moved to a new task