tweaked spacing.
* (bug 18656) Use proper directory separators in wfMkdirParents()
* (bug 18549) Make Special:Blockip respect $wgEnableUserEmail and $wgSysopEmailBans
+* (bug 16912) Tooltips on images with link= disappear
== API changes in 1.16 ==
$alt = empty( $options['alt'] ) ? '' : $options['alt'];
# Note: if title is empty and alt is not, make the title empty, don't
# use alt; only use alt if title is not set
- $title = !isset( $options['title'] ) ? $alt : $options['title'];
+ $title = !isset( $options['title'] ) ? $alt : $options['title'];
$query = empty($options['desc-query']) ? '' : $options['desc-query'];
if ( !empty( $options['custom-url-link'] ) ) {
$linkAttribs = array( 'href' => $options['custom-url-link'] );
+ if ( $alt ) {
+ $linkAttribs['title'] = $alt;
+ }
} elseif ( !empty( $options['custom-title-link'] ) ) {
$title = $options['custom-title-link'];
- $linkAttribs = array( 'href' => $title->getLinkUrl(), 'title' => $title->getFullText() );
+ $linkAttribs = array( 'href' => $title->getLinkUrl(),
+ 'title' => empty( $options['alt'] ) ? $title->getFullText() : $alt );
} elseif ( !empty( $options['desc-link'] ) ) {
$linkAttribs = $this->getDescLinkAttribs( $title, $query );
} elseif ( !empty( $options['file-link'] ) ) {
</p>
!! end
+!! test
+Image with link parameter (wiki target) and unnamed parameter
+!! input
+[[Image:foobar.jpg|link=Target page|Title]]
+!! result
+<p><a href="/wiki/Target_page" title="Title"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! end
+
+!! test
+Image with link parameter (URL target) and unnamed parameter
+!! input
+[[Image:foobar.jpg|link=http://example.com/|Title]]
+!! result
+<p><a href="http://example.com/" title="Title"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! end
+
!! test