[wp-trac] [WordPress Trac] #22840: Uploading an existing plugin saves the zip in media library

WordPress Trac noreply at wordpress.org
Sun Sep 29 04:45:41 UTC 2013


#22840: Uploading an existing plugin saves the zip in media library
-----------------------------+-----------------------------
 Reporter:  Ipstenu          |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Future Release
Component:  Upgrade/Install  |     Version:  3.4.2
 Severity:  normal           |  Resolution:
 Keywords:                   |
-----------------------------+-----------------------------

Comment (by nacin):

 I'm moving this back to 3.7. At worst, we should do what we do with
 imports (which makes sense anyway since a critical failure *could* occur,
 leaving the file there either way).

 Really simple:
 {{{
 wp_schedule_single_event( time() + DAY_IN_SECONDS,
     'upgrader_upload_scheduled_cleanup', array( $this->id ) );
 add_action( 'upgrader_upload_scheduled_cleanup', 'wp_delete_attachment' );
 }}}

 But, it seems like we might not always have an ID, based on the `elseif`
 in the current cleanup() method?

--
Ticket URL: <http://core.trac.wordpress.org/ticket/22840#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list