$this->mWatch = !empty( $options['watch'] );
$this->mForReUpload = !empty( $options['forreupload'] );
- $this->mSessionKey = isset( $options['sessionkey'] ) ? $options['sessionkey'] : '';
+ $this->mSessionKey = $options['sessionkey'] ?? '';
$this->mHideIgnoreWarning = !empty( $options['hideignorewarning'] );
$this->mDestWarningAck = !empty( $options['destwarningack'] );
- $this->mDestFile = isset( $options['destfile'] ) ? $options['destfile'] : '';
+ $this->mDestFile = $options['destfile'] ?? '';
- $this->mComment = isset( $options['description'] ) ?
- $options['description'] : '';
+ $this->mComment = $options['description'] ?? '';
- $this->mTextTop = isset( $options['texttop'] )
- ? $options['texttop'] : '';
+ $this->mTextTop = $options['texttop'] ?? '';
- $this->mTextAfterSummary = isset( $options['textaftersummary'] )
- ? $options['textaftersummary'] : '';
+ $this->mTextAfterSummary = $options['textaftersummary'] ?? '';
$sourceDescriptor = $this->getSourceSection();
$descriptor = $sourceDescriptor
$file = null;
}
if ( $file ) {
- global $wgContLang;
-
$mto = $file->transform( [ 'width' => 120 ] );
if ( $mto ) {
$this->addHeaderText(
- '<div class="thumb t' . $wgContLang->alignEnd() . '">' .
+ '<div class="thumb t' .
+ MediaWikiServices::getInstance()->getContentLanguage()->alignEnd() . '">' .
Html::element( 'img', [
'src' => $mto->getUrl(),
'class' => 'thumbimage',