Break backwards compatibility: Make image links parse for extended syntax even if...
authorJens Frank <jeluf@users.mediawiki.org>
Thu, 29 Jan 2004 23:15:30 +0000 (23:15 +0000)
committerJens Frank <jeluf@users.mediawiki.org>
Thu, 29 Jan 2004 23:15:30 +0000 (23:15 +0000)
includes/Skin.php

index f3c5ef4..c90923b 100644 (file)
@@ -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);
                                }
                        }