Index: /MediaWiki/trunk/extensions/FCKeditor/FCKeditorSkin.body.php
===================================================================
--- /MediaWiki/trunk/extensions/FCKeditor/FCKeditorSkin.body.php	(revision 947)
+++ /MediaWiki/trunk/extensions/FCKeditor/FCKeditorSkin.body.php	(revision 948)
@@ -6,16 +6,16 @@
 
     /**
-     * Enter description here...
+     * Create image link in MediaWiki 1.10
      *
-     * @param Title $nt
-     * @param unknown_type $label
-     * @param unknown_type $alt
-     * @param unknown_type $align
-     * @param unknown_type $params
-     * @param unknown_type $framed
-     * @param unknown_type $thumb
-     * @param unknown_type $manual_thumb
-     * @param unknown_type $valign
-     * @return unknown
+	 * @param Title $nt
+	 * @param string $label label text
+	 * @param string $alt alt text
+	 * @param string $align horizontal alignment: none, left, center, right)
+	 * @param array $params Parameters to be passed to the media handler
+	 * @param boolean $framed shows image in original size in a frame
+	 * @param boolean $thumb shows image as thumbnail in a frame
+	 * @param string $manual_thumb image name for the manual thumbnail
+	 * @param string $valign vertical alignment: baseline, sub, super, top, text-top, middle, bottom, text-bottom
+	 * @return string     * 
      */
     function makeImageLinkObj( $nt, $label, $alt, $align = '', $params = array(), $framed = false,
@@ -40,5 +40,5 @@
         }
         else {
-			$ret .= "_fck_mw_valid=\"false"."\" ";
+            $ret .= "_fck_mw_valid=\"false"."\" ";
         }
         $ret .= "_fck_mw_filename=\"{$orginal}\" ";
@@ -56,5 +56,5 @@
         }
         $class = "";
-        if ($thumb) {            
+        if ($thumb) {
             $ret .= "_fck_mw_type=\"thumb"."\" ";
             $class .= "fck_mw_frame";
@@ -64,8 +64,8 @@
             $class .= "fck_mw_frame";
         }
-        
+
         if ($align == "right") {
             $class .= ($class?" ":"") . "fck_mw_right";
-        } 
+        }
         else if($align == "center") {
             $class .= ($class?" ":"") . "fck_mw_center";
@@ -77,8 +77,8 @@
             $class .= ($class?" ":"") . "fck_mw_right";
         }
-		
-		if (!$found) {
-			$class .= ($class?" ":"") . "fck_mw_notfound";
-		}
+
+        if (!$found) {
+            $class .= ($class?" ":"") . "fck_mw_notfound";
+        }
 
         if (!is_null($alt) && !empty($alt) && false !== strpos(FCKeditorParser::$fkc_mw_makeImage_options, $alt) && $alt != "Image:" . $orginal) {
@@ -92,5 +92,118 @@
             $ret .= "class=\"$class\" ";
         }
-        
+
+        $ret .= "/>";
+
+        return $ret;
+    }
+
+    /**
+	 * Make an image link in Mediawiki 1.11
+	 * @param Title $title Title object
+	 * @param File $file File object, or false if it doesn't exist
+	 *
+     * @param array $frameParams Associative array of parameters external to the media handler.
+     *     Boolean parameters are indicated by presence or absence, the value is arbitrary and 
+     *     will often be false.
+     *          thumbnail       If present, downscale and frame
+     *          manualthumb     Image name to use as a thumbnail, instead of automatic scaling
+     *          framed          Shows image in original size in a frame
+     *          frameless       Downscale but don't frame
+     *          upright         If present, tweak default sizes for portrait orientation
+     *          upright_factor  Fudge factor for "upright" tweak (default 0.75)
+     *          border          If present, show a border around the image
+     *          align           Horizontal alignment (left, right, center, none)
+     *          valign          Vertical alignment (baseline, sub, super, top, text-top, middle, 
+     *                          bottom, text-bottom)
+     *          alt             Alternate text for image (i.e. alt attribute). Plain text.
+     *          caption         HTML for image caption.
+	 *
+     * @param array $handlerParams Associative array of media handler parameters, to be passed 
+     *       to transform(). Typical keys are "width" and "page". 
+	 */
+    function makeImageLink2( Title $nt, $file, $frameParams = array(), $handlerParams = array() ) {
+        $orginal = $nt->getText();
+        $img   = new Image( $nt );
+        $imgName = $img->getName();
+        $found = $img->getURL();
+
+        if ($found) {
+            $originalLink = Linker::makeImageLink2( $nt, $file, $frameParams, $handlerParams);
+
+            if (false !== strpos($originalLink, "src=\"")) {
+                $srcPart = substr($originalLink, strpos($originalLink, "src=")+ 5);
+                $url = strtok($srcPart, '"');
+            }
+            $srcPart = substr($originalLink, strpos($originalLink, "src=")+ 5);
+            $url = strtok($srcPart, '"');
+        }
+
+        // Shortcuts
+        $fp =& $frameParams;
+        $hp =& $handlerParams;
+
+        if (!isset($fp['align'])) {
+            $fp['align'] = '';
+        }
+
+        $ret = "<img ";
+
+        if ($found) {
+            $ret .= "src=\"{$url}\" ";
+        }
+        else {
+            $ret .= "_fck_mw_valid=\"false"."\" ";
+        }
+        $ret .= "_fck_mw_filename=\"{$orginal}\" ";
+
+        if ($fp['align']) {
+            $ret .= "_fck_mw_location=\"".strtolower($fp['align'])."\" ";
+        }
+        if (!empty($hp)) {
+            if (isset($hp['width'])) {
+                $ret .= "_fck_mw_width=\"".$hp['width']."\" ";
+            }
+            if (isset($hp['height'])) {
+                $ret .= "_fck_mw_height=\"".$hp['height']."\" ";
+            }
+        }
+        $class = "";
+        if (isset($fp['thumbnail'])) {
+            $ret .= "_fck_mw_type=\"thumb"."\" ";
+            $class .= "fck_mw_frame";
+        }
+        else if (isset($fp['framed'])) {
+            $ret .= "_fck_mw_type=\"frame"."\" ";
+            $class .= "fck_mw_frame";
+        }
+
+        if ($fp['align'] == "right") {
+            $class .= ($class?" ":"") . "fck_mw_right";
+        }
+        else if($fp['align'] == "center") {
+            $class .= ($class?" ":"") . "fck_mw_center";
+        }
+        else if($fp['align'] == "left") {
+            $class .= ($class?" ":"") . "fck_mw_left";
+        }
+        else if(isset($fp['framed']) || isset($fp['thumbnail'])) {
+            $class .= ($class?" ":"") . "fck_mw_right";
+        }
+
+        if (!$found) {
+            $class .= ($class?" ":"") . "fck_mw_notfound";
+        }
+
+        if (isset($fp['alt']) && !empty($fp['alt']) && false !== strpos(FCKeditorParser::$fkc_mw_makeImage_options, $fp['alt']) && $fp['alt'] != "Image:" . $orginal) {
+            $ret .= "alt=\"".htmlspecialchars($fp['alt'])."\" ";
+        }
+        else {
+            $ret .= "alt=\"\" ";
+        }
+
+        if ($class) {
+            $ret .= "class=\"$class\" ";
+        }
+
         $ret .= "/>";
 
@@ -123,5 +236,5 @@
             $text = htmlspecialchars( $nt->getPrefixedText() );
         }
-        
+
         if ($nt->getNamespace() == NS_CATEGORY) {
             $u = ':' . $u;
