diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2012-09-02 15:19:34 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2012-09-02 15:19:34 +0200 |
commit | 9498a3d2852ace0f4ee23598f542dbce3fd2ec28 (patch) | |
tree | 5aeced25a9fc09f93682788259f5c7d6d248634d /includes/Linker.php | |
parent | 588cc40aeec0165400421ef9612e81b6d2c7b936 (diff) |
Update to MediaWiki 1.19.2
Diffstat (limited to 'includes/Linker.php')
-rw-r--r-- | includes/Linker.php | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/includes/Linker.php b/includes/Linker.php index 3691d040..0b813ac0 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -768,31 +768,31 @@ class Linker { * Make a "broken" link to an image * * @param $title Title object - * @param $html String: link label in htmlescaped text form + * @param $label String: link label (plain text) * @param $query String: query string - * @param $trail String: link trail (HTML fragment) - * @param $prefix String: link prefix (HTML fragment) + * @param $unused1 Unused parameter kept for b/c + * @param $unused2 Unused parameter kept for b/c * @param $time Boolean: a file of a certain timestamp was requested * @return String */ - public static function makeBrokenImageLinkObj( $title, $html = '', $query = '', $trail = '', $prefix = '', $time = false ) { + public static function makeBrokenImageLinkObj( $title, $label = '', $query = '', $unused1 = '', $unused2 = '', $time = false ) { global $wgEnableUploads, $wgUploadMissingFileUrl, $wgUploadNavigationUrl; if ( ! $title instanceof Title ) { - return "<!-- ERROR -->{$prefix}{$html}{$trail}"; + return "<!-- ERROR -->" . htmlspecialchars( $label ); } wfProfileIn( __METHOD__ ); + if ( $label == '' ) { + $label = $title->getPrefixedText(); + } + $encLabel = htmlspecialchars( $label ); $currentExists = $time ? ( wfFindFile( $title ) != false ) : false; - list( $inside, $trail ) = self::splitTrail( $trail ); - if ( $html == '' ) - $html = htmlspecialchars( $title->getPrefixedText() ); - if ( ( $wgUploadMissingFileUrl || $wgUploadNavigationUrl || $wgEnableUploads ) && !$currentExists ) { $redir = RepoGroup::singleton()->getLocalRepo()->checkRedirect( $title ); if ( $redir ) { wfProfileOut( __METHOD__ ); - return self::linkKnown( $title, "$prefix$html$inside", array(), $query ) . $trail; + return self::linkKnown( $title, $encLabel, array(), wfCgiToArray( $query ) ); } $href = self::getUploadUrl( $title, $query ); @@ -800,10 +800,10 @@ class Linker { wfProfileOut( __METHOD__ ); return '<a href="' . htmlspecialchars( $href ) . '" class="new" title="' . htmlspecialchars( $title->getPrefixedText(), ENT_QUOTES ) . '">' . - "$prefix$html$inside</a>$trail"; + $encLabel . '</a>'; } else { wfProfileOut( __METHOD__ ); - return self::linkKnown( $title, "$prefix$html$inside", array(), $query ) . $trail; + return self::linkKnown( $title, $encLabel, array(), wfCgiToArray( $query ) ); } } |