Index: editors/tinymce.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/wysiwyg/editors/tinymce.inc,v
retrieving revision 1.31
diff -u -p -r1.31 tinymce.inc
--- editors/tinymce.inc	19 May 2009 15:29:11 -0000	1.31
+++ editors/tinymce.inc	5 Jun 2009 22:55:20 -0000
@@ -447,14 +447,6 @@ function wysiwyg_tinymce_plugins($editor
       'internal' => TRUE,
       'load' => TRUE,
     ),
-    'flash' => array(
-      'path' => $editor['library path'] .'/plugins/flash',
-      'buttons' => array('flash' => t('Flash')),
-      'extended_valid_elements' => array('img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|obj|param|embed]'),
-      'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/flash',
-      'internal' => TRUE,
-      'load' => TRUE,
-    ),
     'font' => array(
       'path' => $editor['library path'] .'/plugins/font',
       'buttons' => array('formatselect' => t('HTML block format'), 'fontselect' => t('Font'), 'fontsizeselect' => t('Font size'), 'styleselect' => t('Font style')),
@@ -540,6 +532,25 @@ function wysiwyg_tinymce_plugins($editor
       'load' => TRUE,
     ),
   );
+  if ($editor['installed version'] > '2.0.6') {
+    $plugins['media'] = array(
+      'path' => $editor['library path'] .'/plugins/media',
+      'buttons' => array('media' => t('Media')),
+      'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',
+      'internal' =>  TRUE,
+      'load' => TRUE,
+    );
+  }
+  if ($editor['installed version'] < 3) {
+    $plugins['flash'] = array(
+      'path' => $editor['library path'] .'/plugins/flash',
+      'buttons' => array('flash' => t('Flash')),
+      'extended_valid_elements' => array('img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|obj|param|embed]'),
+      'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/flash',
+      'internal' => TRUE,
+      'load' => TRUE,
+    );
+  }
   if ($editor['installed version'] > 3) {
     $plugins['xhtmlxtras'] = array(
       'path' => $editor['library path'] .'/plugins/xhtmlxtras',
