From: Jens Frank Date: Mon, 11 Oct 2004 19:02:56 +0000 (+0000) Subject: Fix bounding box feature of thumbnails (e.g. |200x200px|) X-Git-Tag: 1.5.0alpha1~1585 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=87bae60403b9deba664a0c948208c8310bb509e4;p=lhc%2Fweb%2Fwiklou.git Fix bounding box feature of thumbnails (e.g. |200x200px|) --- diff --git a/includes/MagicWord.php b/includes/MagicWord.php index 4651ba8212..a8fd0eb472 100644 --- a/includes/MagicWord.php +++ b/includes/MagicWord.php @@ -193,10 +193,10 @@ class MagicWord { $matchcount = preg_match( $this->getVariableStartToEndRegex(), $text, $matches ); if ( $matchcount == 0 ) { return NULL; - } elseif ( count($matches) == 1 ) { + } elseif ( count($matches) == 2 ) { return $matches[0]; } else { - return $matches[1]; + return $matches[2]; } } diff --git a/includes/Skin.php b/includes/Skin.php index 6e4f4476d0..c3cae13e0f 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -1767,8 +1767,6 @@ class Skin { if ( ( ! $height === false ) && ( $img->getHeight() * $width / $img->getWidth() > $height ) ) { - print "height=$height
\nimg->getHeight() = ".$img->getHeight()."
\n"; - print 'rescaling by factor '. $height / $img->getHeight() . "
\n"; $width = $img->getWidth() * $height / $img->getHeight(); } if ( '' == $manual_thumb ) $url = $img->createThumb( $width );