}
$out->setPageTitle( $this->msg( 'version-credits-title', $extName ) );
- $out->addWikiText( $wikiText );
+ $out->addWikiTextAsInterface( $wikiText );
break;
case 'license':
}
$out->setPageTitle( $this->msg( 'version-license-title', $extName ) );
- $out->addWikiText( $wikiText );
+ $out->addWikiTextAsInterface( $wikiText );
break;
default:
$out->addModuleStyles( 'mediawiki.special.version' );
- $out->addWikiText(
+ $out->addWikiTextAsInterface(
$this->getMediaWikiCredits() .
$this->softwareInformation() .
$this->getEntryPointInfo()
$this->getParserTags() .
$this->getParserFunctionHooks()
);
- $out->addWikiText( $this->getWgHooks() );
+ $out->addWikiTextAsInterface( $this->getWgHooks() );
$out->addHTML( $this->IPInfo() );
break;
}
$software[$dbr->getSoftwareLink()] = $dbr->getServerInfo();
- $software['[http://site.icu-project.org/ ICU]'] = INTL_ICU_VERSION;
+ if ( defined( 'INTL_ICU_VERSION' ) ) {
+ $software['[http://site.icu-project.org/ ICU]'] = INTL_ICU_VERSION;
+ }
// Allow a hook to add/remove items.
Hooks::run( 'SoftwareInfo', [ &$software ] );
public static function getExtensionTypeName( $type ) {
$types = self::getExtensionTypes();
- return isset( $types[$type] ) ? $types[$type] : $types['other'];
+ return $types[$type] ?? $types['other'];
}
/**
* @return int
*/
public function compare( $a, $b ) {
- if ( $a['name'] === $b['name'] ) {
- return 0;
- } else {
- return $this->getLanguage()->lc( $a['name'] ) > $this->getLanguage()->lc( $b['name'] )
- ? 1
- : -1;
- }
+ return $this->getLanguage()->lc( $a['name'] ) <=> $this->getLanguage()->lc( $b['name'] );
}
/**
$description = $out->parseInline( $description );
// ... now get the authors for this extension
- $authors = isset( $extension['author'] ) ? $extension['author'] : [];
+ $authors = $extension['author'] ?? [];
$authors = $this->listAuthors( $authors, $extension['name'], $extensionPath );
// Finally! Create the table
*/
public function getEntryPointInfo() {
global $wgArticlePath, $wgScriptPath;
- $scriptPath = $wgScriptPath ? $wgScriptPath : "/";
+ $scriptPath = $wgScriptPath ?: "/";
$entryPoints = [
'version-entrypoints-articlepath' => $wgArticlePath,
'version-entrypoints-scriptpath' => $scriptPath,