[wp-trac] [WordPress Trac] #15655: Media Upload form does not pass tab name

WordPress Trac wp-trac at lists.automattic.com
Fri Dec 3 00:00:02 UTC 2010


#15655: Media Upload form does not pass tab name
--------------------------+-------------------------------------------------
 Reporter:  jackcrosby    |       Owner:                           
     Type:  defect (bug)  |      Status:  new                      
 Priority:  normal        |   Milestone:  Awaiting Review          
Component:  Upload        |     Version:  3.0.2                    
 Severity:  normal        |    Keywords:  upload, media, tab, admin
--------------------------+-------------------------------------------------
 The Media Upload form has an error (wp-admin/includes/media.php line
 #1538). It is not passing the tab name, which hinders adding actions based
 on which Upload tab is selected.

 Error:
 Get param 'tab' is being set to 'type' which is incorrect.
 {{{
 $form_action_url = admin_url("media-
 upload.php?type=$type&tab=type&post_id=$post_id");
 }}}


 Fix:
 To top of function add:
 {{{
 global $tab;
 }}}

 Change the form action URL (line #1538) to:
 {{{
 $form_action_url = admin_url("media-
 upload.php?type=$type&tab=$tab&post_id=$post_id");
 }}}

 This change also impacts function media_upload_type_url_form (line #1591).
 Same fix applies.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15655>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list