Page MenuHomePhabricator

cirrussearch-ignored-headings is used in WikiTextStructure
Closed, ResolvedPublic

Description

WikiTextStructure uses the cirrussearch-ignored-headings i18n message from CirrusSearch, which won't exist if the extension isn't installed

	/**
	 * Gets a list of heading to ignore.
	 * @return string[]
	 */
	private function getIgnoredHeadings() {
		static $ignoredHeadings = null;
		if ( $ignoredHeadings === null ) {
			$ignoredHeadings = [];
			$source = wfMessage( 'search-ignored-headings' )->inContentLanguage();
			if ( $source->isBlank() ) {
				// Try the old version too, just in case
				$source = wfMessage( 'cirrussearch-ignored-headings' )->inContentLanguage();
			}
			if ( !$source->isDisabled() ) {
				$lines = self::parseSettingsInMessage( $source->plain() );
				// Now we just have headings!
				$ignoredHeadings = $lines;
			}
		}
		return $ignoredHeadings;
	}

I suspect we can just remove that "fallback...

Event Timeline

Reedy updated the task description. (Show Details)

Change 951900 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/core@master] WikiTextStructure: Drop message fallback to old cirrussearch message

https://gerrit.wikimedia.org/r/951900

Change #1057978 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/CirrusSearch@master] i18n: Drop 'cirrussearch-ignored-headings', now unused

https://gerrit.wikimedia.org/r/1057978

Change #951900 merged by jenkins-bot:

[mediawiki/core@master] WikiTextStructure: Drop message fallback to old cirrussearch message

https://gerrit.wikimedia.org/r/951900

Change #1057978 merged by jenkins-bot:

[mediawiki/extensions/CirrusSearch@master] i18n: Drop 'cirrussearch-ignored-headings', now unused

https://gerrit.wikimedia.org/r/1057978

TheDJ assigned this task to Reedy.

Considering this fixed