if ( $file && !isset( $hp['width'] ) ) {
$hp['width'] = $file->getWidth( $page );
- if( isset( $fp['thumbnail'] ) || isset( $fp['framed'] ) || isset( $fp['frameless'] ) || !$hp['width'] ) {
+ if( isset( $fp['thumbnail'] ) || isset( $fp['framed'] ) || isset( $fp['frameless'] ) ) {
$wopt = $wgUser->getOption( 'thumbsize' );
if( !isset( $wgThumbLimits[$wopt] ) ) {
round( $wgThumbLimits[$wopt] * $fp['upright'], -1 ) :
$wgThumbLimits[$wopt];
if ( $hp['width'] <= 0 || $prefWidth < $hp['width'] ) {
- $hp['width'] = $prefWidth;
+ if( !isset( $hp['height'] ) ) {
+ $hp['width'] = $prefWidth;
+ }
}
}
}
$comment = Sanitizer::escapeHtmlAllowEntities( $comment );
# Render autocomments and make links:
- $comment = $this->formatAutoComments( $comment, $title, $local );
+ $comment = $this->formatAutocomments( $comment, $title, $local );
$comment = $this->formatLinksInComment( $comment, $title, $local );
wfProfileOut( __METHOD__ );
$title = $this->autocommentTitle;
$local = $this->autocommentLocal;
- $pre=$match[1];
- $auto=$match[2];
- $post=$match[3];
- $link='';
- if( $title ) {
+ $pre = $match[1];
+ $auto = $match[2];
+ $post = $match[3];
+ $link = '';
+ if ( $title ) {
$section = $auto;
# Generate a valid anchor name from the section title.
public function tooltipAndAccesskeyAttribs( $name ) {
global $wgEnableTooltipsAndAccesskeys;
if ( !$wgEnableTooltipsAndAccesskeys )
- return '';
+ return array();
# FIXME: If Sanitizer::expandAttributes() treated "false" as "output
# no attribute" instead of "output '' as value for attribute", this
# would be three lines.