Page MenuHomePhabricator

imagelink.patch

Authored By
bzimport
Nov 21 2014, 10:47 PM
Size
663 B
Referenced Files
None
Subscribers
None

imagelink.patch

This document is not UTF8. It was detected as Shift JIS and converted to UTF8 for display.
Index: MediaTransformOutput.php
===================================================================
--- MediaTransformOutput.php (r騅ision 63210)
+++ MediaTransformOutput.php (copie de travail)
@@ -155,6 +155,13 @@
if ( !empty( $options['custom-url-link'] ) ) {
$linkAttribs = array( 'href' => $options['custom-url-link'] );
+ global $wgExternalLinkTarget,$wgNoFollowLinks;
+ if ( isset( $wgExternalLinkTarget ) ) {
+ $linkAttribs['target'] = $wgExternalLinkTarget;
+ }
+ if ( $wgNoFollowLinks ) {
+ $linkAttribs['rel'] = 'nofollow';
+ }
if ( !empty( $options['title'] ) ) {
$linkAttribs['title'] = $options['title'];
}

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5494
Default Alt Text
imagelink.patch (663 B)

Event Timeline