Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F2952
Linker.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 9:17 PM
2014-11-21 21:17:50 (UTC+0)
Size
980 B
Referenced Files
None
Subscribers
None
Linker.patch
View Options
--- 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
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2522
Default Alt Text
Linker.patch (980 B)
Attached To
Mode
T8743: Make image links to image page, not to upload on upload disabled [Patch]
Attached
Detach File
Event Timeline
Log In to Comment