aboutsummaryrefslogtreecommitdiffstats
path: root/includes/Linker.php
diff options
context:
space:
mode:
authornobody <nobody@localhost>2006-01-05 23:36:45 +0000
committernobody <nobody@localhost>2006-01-05 23:36:45 +0000
commit4ce70280face928c604c4300fd2ba6fdc78243da (patch)
tree3b2f616b592484fcd8bf9b70ea4a062cd5ac64fc /includes/Linker.php
parent9018faf3a776fffd61bbb9a7516da6ae8bf55f55 (diff)
parentb2a8013a4893454f32dc13bd253e141d7fef2f35 (diff)
downloadmediawikicore-4ce70280face928c604c4300fd2ba6fdc78243da.tar.gz
mediawikicore-4ce70280face928c604c4300fd2ba6fdc78243da.zip
This commit was manufactured by cvs2svn to create tag 'REL1_5_5'.1.5.5
Diffstat (limited to 'includes/Linker.php')
-rw-r--r--includes/Linker.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/includes/Linker.php b/includes/Linker.php
index 81e31e56ce0c..d37e8148e7b4 100644
--- a/includes/Linker.php
+++ b/includes/Linker.php
@@ -373,6 +373,10 @@ class Linker {
global $wgContLang, $wgUser, $wgThumbLimits;
$img = new Image( $nt );
+ if ( !$img->allowInlineDisplay() ) {
+ return $this->makeKnownLinkObj( $nt );
+ }
+
$url = $img->getViewURL();
$prefix = $postfix = '';
@@ -406,7 +410,7 @@ class Linker {
$wopt = User::getDefaultOption( 'thumbsize' );
}
- $width = $wgThumbLimits[$wopt];
+ $width = min( $img->getWidth(), $wgThumbLimits[$wopt] );
}
return $prefix.$this->makeThumbLinkObj( $img, $label, $alt, $align, $width, $height, $framed, $manual_thumb ).$postfix;
@@ -591,7 +595,7 @@ class Linker {
* @access public
* @todo Handle invalid or missing images better.
*/
- function makeMediaLinkObj( $title, $text = '', $nourl=false ) {
+ function makeMediaLinkObj( $title, $text = '' ) {
if( is_null( $title ) ) {
### HOTFIX. Instead of breaking, return empty string.
return $text;
@@ -600,9 +604,6 @@ class Linker {
$img = new Image( $title );
if( $img->exists() ) {
$url = $img->getURL();
- if( $nourl ) {
- $url = str_replace( "http://", "http-noparse://", $url );
- }
$class = 'internal';
} else {
$upload = Title::makeTitle( NS_SPECIAL, 'Upload' );