Changeset 2981
- Timestamp:
- 04/19/2016 08:05:57 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-status-transitions.php
r2930 r2981 3 3 use WordPressdotorg\Plugin_Directory\Tools; 4 4 use WordPressdotorg\Plugin_Directory\Tools\SVN; 5 use WordPressdotorg\Plugin_Directory\Tools\Filesystem; 5 6 6 7 /** … … 50 51 51 52 // Read zip and add/commit files to svn. 52 $attachments 53 $attachment _id = $attachments[0]->ID;54 SVN::add( Filesystem::unzip( get_attached_file( $attachment _id) ) );53 $attachments = get_attached_media( 'application/zip', $post_id ); 54 $attachment = current( $attachments ); 55 SVN::add( Filesystem::unzip( get_attached_file( $attachment->ID ) ) ); 55 56 56 57 // Delete zip. 57 wp_delete_attachment( $attachment _id, true );58 wp_delete_attachment( $attachment->ID, true ); 58 59 59 60 // Grant commit access.
Note: See TracChangeset
for help on using the changeset viewer.