Topic on Extension talk:HTMLets

Broken in 1.27 with the depreciation of wfMsgForContent

2
108.11.216.62 (talkcontribs)

Change lines 93-100 from

if ( !preg_match('!^\w+://!', $dir ) && !file_exists( $f ) ) {

$output = Html::rawElement( 'div', array( 'class' => 'error' ), wfMsgForContent( 'htmlets-filenotfound', htmlspecialchars( $name ) ) );

} else {

$output = file_get_contents( $f );

if ( $output === false ) {

$output = Html::rawElement( 'div', array( 'class' => 'error' ), wfMsgForContent( 'htmlets-loadfailed', htmlspecialchars( $name ) ) );

}

}

TO

if ( !preg_match('!^\w+://!', $dir ) && !file_exists( $f ) ) {

$output = Html::rawElement( 'div', array( 'class' => 'error' ), wfMessage( 'htmlets-filenotfound', htmlspecialchars( $name ) )->inContentLanguage()->text() );

} else {

$output = file_get_contents( $f );

if ( $output === false ) {

$output = Html::rawElement( 'div', array( 'class' => 'error' ), wfMessage( 'htmlets-loadfailed', htmlspecialchars( $name ) )->inContentLanguage()->text() );

}

}

Kghbln (talkcontribs)
Reply to "Broken in 1.27 with the depreciation of wfMsgForContent"