Page MenuHomePhabricator

Linker.patch

Authored By
bzimport
Nov 21 2014, 9:17 PM
Size
980 B
Referenced Files
None
Subscribers
None

Linker.patch

--- Linker.r15726.php 2006-07-15 19:17:46.000000000 +0200
+++ Linker.php 2006-07-19 16:32:12.000000000 +0200
@@ -665,12 +665,17 @@
$fname = 'Linker::makeBrokenImageLinkObj';
wfProfileIn( $fname );
- $q = 'wpDestFile=' . urlencode( $nt->getDBkey() );
- if ( '' != $query ) {
- $q .= "&$query";
- }
- $uploadTitle = Title::makeTitle( NS_SPECIAL, 'Upload' );
- $url = $uploadTitle->escapeLocalURL( $q );
+
+ global $wgEnableUploads;
+ if ($wgEnableUploads) { #If uploads are enabled, make the link to the upload page
+ $q = 'wpDestFile=' . urlencode( $nt->getDBkey() );
+ if ( '' != $query ) {
+ $q .= "&$query";
+ }
+ $uploadTitle = Title::makeTitle( NS_SPECIAL, 'Upload' );
+ $url = $uploadTitle->escapeLocalURL( $q );
+ } else #If uploads are disabled, make the link to the image page (which will be blank)
+ $url = $nt->escapeLocalURL();
if ( '' == $text ) {
$text = htmlspecialchars( $nt->getPrefixedText() );

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2522
Default Alt Text
Linker.patch (980 B)

Event Timeline