Changeset 704
- Timestamp:
- Apr 20, 2011, 6:09:12 PM (14 years ago)
- Location:
- trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/class-xpress-upgrader.php
r701 r704 5 5 6 6 function upgrade_strings() { 7 $this->strings['up_to_date'] = __('XPressME Integration Kit is at the latest version.' );8 $this->strings['no_package'] = __('Upgrade package not available.' );9 $this->strings['downloading_package'] = __('Downloading update from <span class="code">%s</span>…' );10 $this->strings['unpack_package'] = __('Unpacking the update…' );11 $this->strings['copy_failed'] = __('Could not copy files.' );12 $this->strings['make_config'] = __('Delete source wp-config.php.' );13 $this->strings['delete_failed'] = __('Could not delete files.' );7 $this->strings['up_to_date'] = __('XPressME Integration Kit is at the latest version.', 'xpressme'); 8 $this->strings['no_package'] = __('Upgrade package not available.', 'xpressme'); 9 $this->strings['downloading_package'] = __('Downloading update from <span class="code">%s</span>…', 'xpressme'); 10 $this->strings['unpack_package'] = __('Unpacking the update…', 'xpressme'); 11 $this->strings['copy_failed'] = __('Could not copy files.', 'xpressme'); 12 $this->strings['make_config'] = __('Delete source wp-config.php.', 'xpressme'); 13 $this->strings['delete_failed'] = __('Could not delete files.', 'xpressme'); 14 14 } 15 15 -
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/update_xpress.php
r698 r704 30 30 function update_xpress($from, $to) { 31 31 global $wp_filesystem, $_old_xpress_files, $wpdb; 32 show_message( __('Disable overwrite of wp-config.php...' ) );32 show_message( __('Disable overwrite of wp-config.php...', 'xpressme') ); 33 33 // remove wp-config.php from the new version into place. 34 34 $wp_config = $from . 'wp-config.php'; … … 38 38 39 39 // Copy new versions of XPressME Integration Kit files into place. 40 show_message( __('Copy new versions of XPressME Integration Kit files into place...' ) );40 show_message( __('Copy new versions of XPressME Integration Kit files into place...', 'xpressme') ); 41 41 $result = copy_dir($from . $distro, $to); 42 42 if ( is_wp_error($result) ) { … … 47 47 48 48 // Remove old files 49 show_message( __('Remove an unnecessary, old file...' ) );49 show_message( __('Remove an unnecessary, old file...', 'xpressme') ); 50 50 foreach ( $_old_xpress_files as $old_file ) { 51 51 $old_file = $to . $old_file; … … 54 54 $wp_filesystem->delete($old_file, true); 55 55 } 56 show_message( __('Set templates directory chmod 777' ) );56 show_message( __('Set templates directory chmod 777', 'xpressme') ); 57 57 $wp_filesystem->chmod($to . 'templates/', 0777); 58 58 59 59 // Remove working directory 60 60 $working_dir = dirname(dirname($from)); 61 show_message( sprintf(__('Remove working directory(%s)...' ),$working_dir) );61 show_message( sprintf(__('Remove working directory(%s)...', 'xpressme'),$working_dir) ); 62 62 $wp_filesystem->delete($working_dir, true); 63 63 -
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_upgrade.php
r702 r704 32 32 } else if (version_compare($xpress_version, $latest_version, '<')) { 33 33 echo '<h3 class="response">'; 34 _e( 'An updated version of XPressME Integration Kit is available.' );34 _e( 'An updated version of XPressME Integration Kit is available.', 'xpressme' ); 35 35 echo '</h3>'; 36 36 … … 40 40 $download_diff .='</a>'; 41 41 } 42 $message = sprintf(__('You can update to XPressME Integration Kit Ver %s</a> automatically or download the package and install it manually:' ), $latest_version);43 $submit = __('Update Automatically' );42 $message = sprintf(__('You can update to XPressME Integration Kit Ver %s</a> automatically or download the package and install it manually:', 'xpressme'), $latest_version); 43 $submit = __('Update Automatically', 'xpressme'); 44 44 $form_action = 'admin.php?page=upgrade_page&action=do-xpress-upgrade'; 45 45 $download = sprintf(__('Download %s', 'xpressme') , $latest_version); … … 48 48 } else { 49 49 echo '<h3>'; 50 printf(__('You have the latest version of XPressME Integration Kit Ver.%s.' ),$xpress_version);50 printf(__('You have the latest version of XPressME Integration Kit Ver.%s.', 'xpressme'),$xpress_version); 51 51 echo '</h3>'; 52 52 53 53 $message = __('You have the latest version of XPressME Integration Kit. You do not need to upgrade', 'xpressme'); 54 $submit = __('Re-install Automatically' );54 $submit = __('Re-install Automatically', 'xpressme'); 55 55 $form_action = 'update-core.php?action=do-core-reinstall'; 56 56 … … 70 70 $develop_show = true; 71 71 $develop_package=$latest['develop_package']; 72 $develop_submit = __('Update Automatically' );72 $develop_submit = __('Update Automatically', 'xpressme'); 73 73 $develop_download = sprintf(__('Download %s', 'xpressme') , $develop_latest_version); 74 74 $develop_download_diff = ''; … … 127 127 128 128 function do_xpress_upgrade( $develop = false,$reinstall = false ) { 129 global $wp_filesystem ;129 global $wp_filesystem,$xoops_config; 130 130 131 131 if ( $reinstall ) 132 $url = 'update-xpress.php?action=do-xpress-reinstall'; 133 else 134 $url = 'update-xpress.php?action=do-xpress-upgrade'; 135 $url = wp_nonce_url($url, 'upgrade-xpress'); 132 $url = 'admin.php?page=upgrade_page&action=do-xpress-reinstall'; 133 else { 134 if(!$develop) 135 $url = 'admin.php?page=upgrade_page&action=do-xpress-upgrade'; 136 else 137 $url = 'admin.php?page=upgrade_page&action=do-xpress-develop_upgrade'; 138 $url = wp_nonce_url($url, 'upgrade-xpress'); 139 } 136 140 if ( false === ($credentials = request_filesystem_credentials($url, '', false, ABSPATH)) ) 137 141 return; … … 153 157 <div class="wrap"> 154 158 <?php screen_icon(); ?> 155 <h2><?php _e('Update XPressME Integration Kit' ); ?></h2>159 <h2><?php _e('Update XPressME Integration Kit', 'xpressme'); ?></h2> 156 160 <?php 157 161 if ( $wp_filesystem->errors->get_error_code() ) { … … 170 174 show_message($result); 171 175 if ('up_to_date' != $result->get_error_code() ) 172 show_message( __('Installation Failed' ) );176 show_message( __('Installation Failed', 'xpressme') ); 173 177 } else { 174 show_message( __('XPressME Integration Kit updated successfully') ); 175 $update_url = 'http://localhost/cube/modules/xp_test/admin/update.php'; 178 show_message( __('XPressME Integration Kit files updated successfully', 'xpressme') ); 179 show_message( __('Please update the module. ', 'xpressme') ); 180 181 $update_url = $xoops_config->->module_url .'/admin/update.php'; 176 182 show_message( '<strong>' . __('Actions:') . '</strong> <a href="' . esc_url( $update_url ) . '">' . __('Go to Module Update') . '</a>' ); 177 183 } … … 185 191 { 186 192 if ( ! current_user_can('update_plugins') ) 187 wp_die(__('You do not have sufficient permissions to update XPressME Integration Kit for this site.' ));193 wp_die(__('You do not have sufficient permissions to update XPressME Integration Kit for this site.', 'xpressme')); 188 194 $action = isset($_GET['action']) ? $_GET['action'] : 'upgrade-xpress'; 189 195 $upgrade_error = false;
Note: See TracChangeset
for help on using the changeset viewer.