? 914834-media-adminmenu-suppress-D7.patch
Index: media.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/media/media.module,v
retrieving revision 1.50
diff -u -p -r1.50 media.module
--- media.module	16 Sep 2010 23:15:39 -0000	1.50
+++ media.module	17 Sep 2010 15:30:36 -0000
@@ -408,6 +408,8 @@ function media_page_alter(&$page) {
         unset($page[$key]);
       }
     }
+    // Suppress admin_menu on the popup page.
+    admin_menu_suppress();
   }
 }
 
@@ -464,7 +466,7 @@ function media_media_operations() {
       'redirect' => 'media/%fids/multiedit'
     ),
   );
-  
+
   if (!module_exists('multiform')) {
     // If the multiform module is not installed, do not show this option.
     unset($operations['edit']);
@@ -474,7 +476,7 @@ function media_media_operations() {
 
 /**
  * Implementation of hook_forms()
- */ 
+ */
 function media_forms($form_id, $args) {
   $forms = array();
   // To support the multiedit form, each form has to have a unique ID.
@@ -513,7 +515,7 @@ function media_load($fid) {
  *
  * @return array
  *  An array of corresponding media entities.
- */ 
+ */
 function media_multi_load($fids) {
   $fids = explode(" ", $fids);
   if ($files = media_load_multiple($fids)) {
@@ -1012,10 +1014,10 @@ function media_element_process(&$element
     'type' => 'setting',
     'data' => $setting,
   );
-  
+
   // hmm... Might need to think about this.
   // All settings would likely apply to all media in a multi-value, but what about passing the existing fid?
-  
+
   module_load_include('inc', 'media', 'media.browser');
   media_include_browser_js();
 
@@ -1128,7 +1130,6 @@ function media_file_validate_types(stdCl
   if (!in_array(media_get_type($file), $types)) {
     $errors[] = t('Only the following types of files are allowed to be uploaded: %types-allowed', array('%types-allowed' => implode(', ', $types)));
   }
-  
+
   return $errors;
 }
-
