XPressME Integration Kit

Trac


Ignore:
Timestamp:
Apr 20, 2011, 3:41:10 PM (14 years ago)
Author:
toemon
Message:

開発版の自動更新対応 bump Ver2.4.0 alpha3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/class-xpress-upgrader.php

    r698 r701  
    11<?php 
    22include_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 
    124class Xpress_Upgrader extends WP_Upgrader { 
    135 
     
    5749                // Copy update-core.php from the new version into place. 
    5850                $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                } 
    6355                $wp_filesystem->chmod($wp_dir . $update_xpress_file, FS_CHMOD_FILE); 
    6456 
    6557                require(ABSPATH . $update_xpress_file); 
    66  
    6758                return update_xpress($kit_dir, $wp_dir); 
    68                  
    69         // Remove working directory 
    70                 $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); 
    7659        } 
    7760} 
Note: See TracChangeset for help on using the changeset viewer.