* (bug 13353) Diff3 version checks were too strict, did not detect working diff3
* (bug 25843) Links to special pages using link= attribute on images are now
normalised like normal links to special pages
+* (bug 21364) External links using link= attribute on images now respect
+ $wgExternalLinkTarget
=== API changes in 1.17 ===
* (bug 22738) Allow filtering by action type on query=logevent.
* caption HTML for image caption.
* link-url URL to link to
* link-title Title object to link to
+ * link-target Value for the target attribue, only with link-url
* no-link Boolean, suppress description link
*
* @param $handlerParams Array: associative array of media handler parameters, to be passed
$mtoParams = array();
if ( isset( $frameParams['link-url'] ) && $frameParams['link-url'] !== '' ) {
$mtoParams['custom-url-link'] = $frameParams['link-url'];
+ if ( isset( $frameParams['link-target'] ) ) {
+ $mtoParams['custom-target-link'] = $frameParams['link-target'];
+ }
} elseif ( isset( $frameParams['link-title'] ) && $frameParams['link-title'] !== '' ) {
$mtoParams['custom-title-link'] = $this->normaliseSpecialPage( $frameParams['link-title'] );
} elseif ( !empty( $frameParams['no-link'] ) ) {
* desc-query String, description link query params
* custom-url-link Custom URL to link to
* custom-title-link Custom Title object to link to
+ * custom target-link Value of the target attribute, for custom-target-link
*
* For images, desc-link and file-link are implemented as a click-through. For
* sounds and videos, they may be displayed in other ways.
if ( !empty( $options['title'] ) ) {
$linkAttribs['title'] = $options['title'];
}
+ if ( !empty( $options['custom-target-link'] ) ) {
+ $linkAttribs['target'] = $options['custom-target-link'];
+ }
} elseif ( !empty( $options['custom-title-link'] ) ) {
$title = $options['custom-title-link'];
$linkAttribs = array(
if ( preg_match( "/^($prots)$chars+$/", $value, $m ) ) {
$paramName = 'link-url';
$this->mOutput->addExternalLink( $value );
+ if ( $this->mOptions->getExternalLinkTarget() ) {
+ $params[$type]['link-target'] = $this->mOptions->getExternalLinkTarget();
+ }
$validated = true;
}
} else {