$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];
}
}
if ( ( ! $height === false )
&& ( $img->getHeight() * $width / $img->getWidth() > $height ) ) {
- print "height=$height<br>\nimg->getHeight() = ".$img->getHeight()."<br>\n";
- print 'rescaling by factor '. $height / $img->getHeight() . "<br>\n";
$width = $img->getWidth() * $height / $img->getHeight();
}
if ( '' == $manual_thumb ) $url = $img->createThumb( $width );