Changeset 701 for trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/class-xpress-upgrader.php
- Timestamp:
- Apr 20, 2011, 3:41:10 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/class-xpress-upgrader.php
r698 r701 1 1 <?php 2 2 include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; 3 /** 4 * Core Upgrader class for WordPress. It allows for WordPress to upgrade itself in combiantion with the wp-admin/includes/update-core.php file 5 * 6 * @TODO More Detailed docs, for methods as well. 7 * 8 * @package WordPress 9 * @subpackage Upgrader 10 * @since 2.8.0 11 */ 3 12 4 class Xpress_Upgrader extends WP_Upgrader { 13 5 … … 57 49 // Copy update-core.php from the new version into place. 58 50 $update_xpress_file = 'wp-content/plugins/xpressme/include/update_xpress.php'; 59 //if ( !$wp_filesystem->copy($kit_dir . $update_xpress_file, $wp_dir . $update_xpress_file, true) ) {60 //$wp_filesystem->delete($working_dir, true);61 //return new WP_Error('copy_failed', $this->strings['copy_failed']);62 //}51 if ( !$wp_filesystem->copy($kit_dir . $update_xpress_file, $wp_dir . $update_xpress_file, true) ) { 52 $wp_filesystem->delete($working_dir, true); 53 return new WP_Error('copy_failed', $this->strings['copy_failed']); 54 } 63 55 $wp_filesystem->chmod($wp_dir . $update_xpress_file, FS_CHMOD_FILE); 64 56 65 57 require(ABSPATH . $update_xpress_file); 66 67 58 return update_xpress($kit_dir, $wp_dir); 68 69 // Remove working directory70 $wp_filesystem->delete($working_dir, true);71 if ( !$wp_filesystem->delete($working_dir, true)){72 return new WP_Error('delete_failed', $this->strings['delete_failed']);73 }74 show_message( __('Delete Working directory') );75 $wp_filesystem->chmod($wp_dir . 'templates/', 0777);76 59 } 77 60 }
Note: See TracChangeset
for help on using the changeset viewer.