WordPress.org

Make WordPress Core

Changeset 18615


Ignore:
Timestamp:
08/28/11 03:54:34 (3 years ago)
Author:
dd32
Message:

Clean up Plugin/Theme uploads after successfully installing them. Restores pre-3.2 behaviour. See #18182 for 3.2.x

Location:
branches/3.2/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/wp-admin/includes/class-wp-upgrader.php

    r18227 r18615  
    14551455        } 
    14561456    } 
     1457 
     1458    function cleanup() { 
     1459        if ( file_exists($this->package) ) 
     1460            return @unlink($this->package); 
     1461        return true; 
     1462    } 
    14571463} 
  • branches/3.2/wp-admin/update.php

    r17632 r18615  
    141141        $upgrader->install( $file_upload->package ); 
    142142 
     143        $file_upload->cleanup(); 
     144 
    143145        include(ABSPATH . 'wp-admin/admin-footer.php'); 
    144146 
     
    243245        $upgrader->install( $file_upload->package ); 
    244246 
     247        $file_upload->cleanup(); 
     248 
    245249        include(ABSPATH . 'wp-admin/admin-footer.php'); 
    246250 
Note: See TracChangeset for help on using the changeset viewer.