Index: /MediaWiki/trunk/plugins/mediawiki/dialogs/image.html
===================================================================
--- /MediaWiki/trunk/plugins/mediawiki/dialogs/image.html	(revision 3179)
+++ /MediaWiki/trunk/plugins/mediawiki/dialogs/image.html	(revision 3180)
@@ -103,6 +103,8 @@
 	}
 
-	window.parent.document.getElementById( 'btnOk' ).disabled = true ;
-	window.parent.document.getElementById( 'btnCancel' ).disabled = true ;
+	if ( oEditor.window.parent.FCKeditorAPI && oEditor.window.parent.FCKeditorAPI.Version.match( /^2\.5/ ) ) {
+		window.parent.document.getElementById( 'btnOk' ).disabled = true ;
+		window.parent.document.getElementById( 'btnCancel' ).disabled = true ;
+	}
 
 	var imgName		= GetE('txtUrl').value ;
Index: /MediaWiki/trunk/plugins/mediawiki/dialogs/math.html
===================================================================
--- /MediaWiki/trunk/plugins/mediawiki/dialogs/math.html	(revision 3179)
+++ /MediaWiki/trunk/plugins/mediawiki/dialogs/math.html	(revision 3180)
@@ -74,5 +74,5 @@
 {
 	var formula = GetE('xTemplateRaw').value.Trim() ;
-	
+
 	if ( formula.length == 0 )
 	{
@@ -81,10 +81,12 @@
 	}
 
-	window.parent.document.getElementById( 'btnOk' ).disabled = true ;
-	window.parent.document.getElementById( 'btnCancel' ).disabled = true ;
+	if ( oEditor.window.parent.FCKeditorAPI && oEditor.window.parent.FCKeditorAPI.Version.match( /^2\.5/ ) ) {
+		window.parent.document.getElementById( 'btnOk' ).disabled = true ;
+		window.parent.document.getElementById( 'btnCancel' ).disabled = true ;
+	}
 
 	oEditor.window.parent.sajax_request_type = 'GET' ;
 	oEditor.window.parent.sajax_do_call( 'wfSajaxGetMathUrl', [formula], UpdateImageFromAjax ) ;
-	
+
 	return false ;
 }
@@ -112,5 +114,5 @@
 		}
 	}
-	
+
 	SetAttribute( oMathImage, "_fck_mw_math", GetE('xTemplateRaw').value.Trim() ) ;
 	SetAttribute( oMathImage, "_fckfakelement", 'true' ) ;
