* Skin::doEditSectionLink requires type Language for the parameter $lang.
The parameters $tooltip and $lang are mandatory. Omitting the parameters is
deprecated since 1.32.
+* Language::truncate(), deprecated in 1.31, has been removed.
* …
=== Deprecations in 1.33 ===
to be removed in a future release.
* The configuration option $wgSquidPurgeUseHostHeader has been deprecated,
and is expected to be removed in a future release.
+* The configuration options $wgFixArabicUnicode and $wgFixMalayalamUnicode,
+ introduced in MW 1.17, have been deprecated. These fixes will always be
+ applied for Arabic and Malayalam in the future. Please enable these on
+ your local wiki (if you have them explicitly set to false) and run
+ maintenance/cleanupTitles.php to fix any existing page titles.
* …
=== Other changes in 1.33 ===
* @since 1.29
*/
$wgExtraLanguageCodes = [
+ // Language codes of macro languages, which get mapped to the main language
'bh' => 'bho', // Bihari language family
'no' => 'nb', // Norwegian language family
+
+ // Language variants which get mapped to the main language
'simple' => 'en', // Simple English
];
*
* Note that pages with titles containing presentation forms will become
* inaccessible, run maintenance/cleanupTitles.php to fix this.
+ *
+ * @deprecated since 1.33: in the future will always be true.
*/
$wgFixArabicUnicode = true;
*
* If you enable this on an existing wiki, run maintenance/cleanupTitles.php to
* fix any ZWJ sequences in existing page titles.
+ *
+ * @deprecated since 1.33: in the future will always be true.
*/
$wgFixMalayalamUnicode = true;
$wgCanonicalNamespaceNames = $wgCanonicalNamespaceNames + $wgExtraNamespaces;
}
+// Hard-deprecate setting $wgDummyLanguageCodes in LocalSettings.php
+if ( count( $wgDummyLanguageCodes ) !== 0 ) {
+ wfDeprecated( '$wgDummyLanguageCodes', '1.29' );
+}
// Merge in the legacy language codes, incorporating overrides from the config
$wgDummyLanguageCodes += [
+ // Internal language codes of the private-use area which get mapped to
+ // themselves.
'qqq' => 'qqq', // Used for message documentation
'qqx' => 'qqx', // Used for viewing message keys
] + $wgExtraLanguageCodes + LanguageCode::getDeprecatedCodeMapping();
+// Merge in (inverted) BCP 47 mappings
+foreach ( LanguageCode::getNonstandardLanguageCodeMapping() as $code => $bcp47 ) {
+ $bcp47 = strtolower( $bcp47 ); // force case-insensitivity
+ if ( !isset( $wgDummyLanguageCodes[$bcp47] ) ) {
+ $wgDummyLanguageCodes[$bcp47] = $wgDummyLanguageCodes[$code] ?? $code;
+ }
+}
// These are now the same, always
// To determine the user language, use $wgLang->getCode()
[ 'image_comment_temp' => [ 'LEFT JOIN', [ 'imgcomment_name = img_name' ] ] ]
);
foreach ( $res as $row ) {
- $commentStore->insert( $dbw, 'img_description', $row->img_description );
+ $imgFields = $commentStore->insert( $dbw, 'img_description', $row->img_description );
+ $dbw->update(
+ 'image',
+ $imgFields,
+ [ 'img_name' => $row->img_name ],
+ __METHOD__
+ );
}
}
[ 'image_comment_temp' => [ 'LEFT JOIN', [ 'imgcomment_name = img_name' ] ] ]
);
foreach ( $res as $row ) {
- $commentStore->insert( $dbw, 'img_description', $row->img_description );
+ $imgFields = $commentStore->insert( $dbw, 'img_description', $row->img_description );
+ $dbw->update(
+ 'image',
+ $imgFields,
+ [ 'img_name' => $row->img_name ],
+ __METHOD__
+ );
}
}
public function execute() {
$text = $this->getFileContents();
$text = InstallDocFormatter::format( $text );
- $this->parent->output->addWikiTextInterface( $text );
+ $this->parent->output->addWikiTextAsInterface( $text );
$this->startForm();
$this->endForm( false );
}
/**
* @param string $text
- * @deprecated since 1.32; use addWikiTextInterface instead
+ * @deprecated since 1.32; use addWikiTextAsInterface instead
*/
public function addWikiText( $text ) {
wfDeprecated( __METHOD__, '1.32' );
- $this->addWikiTextInterface( $text );
+ $this->addWikiTextAsInterface( $text );
}
/**
* @param string $text
+ * @since 1.32
*/
- public function addWikiTextInterface( $text ) {
+ public function addWikiTextAsInterface( $text ) {
$this->addHTML( $this->parent->parse( $text ) );
}
return 'continue';
}
}
- $this->parent->output->addWikiTextInterface( wfMessage( 'config-welcome' )->plain() );
+ $this->parent->output->addWikiTextAsInterface( wfMessage( 'config-welcome' )->plain() );
$status = $this->parent->doEnvironmentChecks();
if ( $status->isGood() ) {
$this->parent->output->addHTML( '<span class="success-message">' .
wfMessage( 'config-env-good' )->escaped() . '</span>' );
- $this->parent->output->addWikiTextInterface( wfMessage( 'config-copyright',
+ $this->parent->output->addWikiTextAsInterface( wfMessage( 'config-copyright',
SpecialVersion::getCopyrightAndAuthorList() )->plain() );
$this->startForm();
$this->endForm();
$pOutput = ( $outputDone instanceof ParserOutput )
// phpcs:ignore MediaWiki.Usage.NestedInlineTernary.UnparenthesizedTernary -- FIXME T203805
? $outputDone // object fetched by hook
- : $this->mParserOutput ?: null; // ParserOutput or null, avoid false
+ : ( $this->mParserOutput ?: null ); // ParserOutput or null, avoid false
# Adjust title for main page & pages with displaytitle
if ( $pOutput ) {
);
}
- /**
- * This method is deprecated since 1.31 and kept as alias for truncateForDatabase, which
- * has replaced it. This method provides truncation suitable for DB.
- *
- * The database offers limited byte lengths for some columns in the database;
- * multi-byte character sets mean we need to ensure that only whole characters
- * are included, otherwise broken characters can be passed to the user.
- *
- * @deprecated since 1.31, use truncateForDatabase or truncateForVisual as appropriate.
- *
- * @param string $string String to truncate
- * @param int $length Maximum length (including ellipsis)
- * @param string $ellipsis String to append to the truncated text
- * @param bool $adjustLength Subtract length of ellipsis from $length.
- * $adjustLength was introduced in 1.18, before that behaved as if false.
- * @return string
- */
- function truncate( $string, $length, $ellipsis = '...', $adjustLength = true ) {
- wfDeprecated( __METHOD__, '1.31' );
- return $this->truncateForDatabase( $string, $length, $ellipsis, $adjustLength );
- }
-
/**
* Truncate a string to a specified length in bytes, appending an optional
* string (e.g. for ellipsis)
* Mapping of deprecated language codes that were used in previous
* versions of MediaWiki to up-to-date, current language codes.
* These may or may not be valid BCP 47 codes; they are included here
- * because MediaWiki remapped these particular codes at some point.
+ * because MediaWiki renamed these particular codes at some point.
*
- * @var array Mapping from language code to language code
+ * @var array Mapping from deprecated MediaWiki-internal language code
+ * to replacement MediaWiki-internal language code.
*
* @since 1.30
* @see https://meta.wikimedia.org/wiki/Special_language_codes
* `kk-Cyrl` is a valid code, although some validators may emit
* a warning note.
*
- * @var array Mapping from nonstandard codes to BCP 47 codes
+ * @var array Mapping from nonstandard MediaWiki-internal codes to
+ * BCP 47 codes
*
* @since 1.32
* @see https://meta.wikimedia.org/wiki/Special_language_codes
$s = parent::normalize( $s );
if ( $wgFixArabicUnicode ) {
$s = $this->transformUsingPairFile( 'normalize-ar.php', $s );
+ } else {
+ wfDeprecated( '$wgFixArabicUnicode = false', '1.33' );
}
return $s;
}
$s = parent::normalize( $s );
if ( $wgFixMalayalamUnicode ) {
$s = $this->transformUsingPairFile( 'normalize-ml.php', $s );
+ } else {
+ wfDeprecated( '$wgFixMalayalamUnicode = false', '1.33' );
}
return $s;
}
$this->assertSame( $expected, $this->getLang()->normalize( $input ), 'ar-normalised form' );
$this->setMwGlobals( 'wgFixArabicUnicode', false );
+ $this->hideDeprecated( '$wgFixArabicUnicode = false' );
$this->assertSame( $input, $this->getLang()->normalize( $input ), 'regular normalised form' );
}
$this->assertSame( $expected, $this->getLang()->normalize( $input ), 'ml-normalised form' );
$this->setMwGlobals( 'wgFixMalayalamUnicode', false );
+ $this->hideDeprecated( '$wgFixMalayalamUnicode = false' );
$this->assertSame( $input, $this->getLang()->normalize( $input ), 'regular normalised form' );
}