From: Jens Frank Date: Thu, 29 Jan 2004 23:15:30 +0000 (+0000) Subject: Break backwards compatibility: Make image links parse for extended syntax even if... X-Git-Tag: 1.3.0beta1~1072 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=a8d1b7e7887dcec03ac6b66d5faf3e418130fc6b;p=lhc%2Fweb%2Fwiklou.git Break backwards compatibility: Make image links parse for extended syntax even if only the alt attribute is set (upon ErikMoellers request) --- diff --git a/includes/Skin.php b/includes/Skin.php index f3c5ef449f..c90923b5ec 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -1447,32 +1447,30 @@ class Skin { $part = explode( "|", $alt); - if ( count($part) > 1 ) { - $mwThumb =& MagicWord::get( MAG_IMG_THUMBNAIL ); - $mwLeft =& MagicWord::get( MAG_IMG_LEFT ); - $mwRight =& MagicWord::get( MAG_IMG_RIGHT ); - $mwNone =& MagicWord::get( MAG_IMG_NONE ); - $mwWidth =& MagicWord::get( MAG_IMG_WIDTH ); - $alt = $part[count($part)-1]; - - $thumb=false; - - foreach( $part as $key => $val ) { - if ( ! is_null( $mwThumb->matchVariableStartToEnd($val) ) ) { - $thumb=true; - } elseif ( ! is_null( $mwRight->matchVariableStartToEnd($val) ) ) { - # remember to set an alignment, don't render immediately - $align = "right"; - } elseif ( ! is_null( $mwLeft->matchVariableStartToEnd($val) ) ) { - # remember to set an alignment, don't render immediately - $align = "left"; - } elseif ( ! is_null( $mwNone->matchVariableStartToEnd($val) ) ) { - # remember to set an alignment, don't render immediately - $align = "none"; - } elseif ( ! is_null( $match = $mwWidth->matchVariableStartToEnd($val) ) ) { - # $match is the image width in pixels - $width = intval($match); - } + $mwThumb =& MagicWord::get( MAG_IMG_THUMBNAIL ); + $mwLeft =& MagicWord::get( MAG_IMG_LEFT ); + $mwRight =& MagicWord::get( MAG_IMG_RIGHT ); + $mwNone =& MagicWord::get( MAG_IMG_NONE ); + $mwWidth =& MagicWord::get( MAG_IMG_WIDTH ); + $alt = $part[count($part)-1]; + + $thumb=false; + + foreach( $part as $key => $val ) { + if ( ! is_null( $mwThumb->matchVariableStartToEnd($val) ) ) { + $thumb=true; + } elseif ( ! is_null( $mwRight->matchVariableStartToEnd($val) ) ) { + # remember to set an alignment, don't render immediately + $align = "right"; + } elseif ( ! is_null( $mwLeft->matchVariableStartToEnd($val) ) ) { + # remember to set an alignment, don't render immediately + $align = "left"; + } elseif ( ! is_null( $mwNone->matchVariableStartToEnd($val) ) ) { + # remember to set an alignment, don't render immediately + $align = "none"; + } elseif ( ! is_null( $match = $mwWidth->matchVariableStartToEnd($val) ) ) { + # $match is the image width in pixels + $width = intval($match); } }