Changeset 8600 for trunk/wp-admin/includes/update.php
- Timestamp:
- 08/09/2008 05:36:14 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/update.php
r8597 r8600 75 75 else 76 76 printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%1$s">View version %3$s Details</a> or <a href="%4$s">upgrade automatically</a>.'), $plugin_data['Name'], $details_url, $r->new_version, wp_nonce_url('update.php?action=upgrade-plugin&plugin=' . $file, 'upgrade-plugin_' . $file) ); 77 77 78 78 echo '</td></tr>'; 79 79 } … … 110 110 if( empty($content_dir) ) 111 111 return new WP_Error('fs_no_content_dir', __('Unable to locate WordPress Content directory (wp-content).')); 112 112 113 113 $plugins_dir = trailingslashit( $plugins_dir ); 114 114 $content_dir = trailingslashit( $content_dir ); … … 137 137 // Unzip package to working directory 138 138 $result = unzip_file($download_file, $working_dir); 139 139 140 140 // Once extracted, delete the package 141 141 unlink($download_file); 142 142 143 143 if ( is_wp_error($result) ) { 144 144 $wp_filesystem->delete($working_dir, true); … … 155 155 apply_filters('update_feedback', __('Removing the old version of the plugin')); 156 156 $this_plugin_dir = trailingslashit( dirname($plugins_dir . $plugin) ); 157 157 158 158 // If plugin is in its own directory, recursively delete the directory. 159 159 if ( strpos($plugin, '/') && $this_plugin_dir != $plugins_dir ) //base check on if plugin includes directory seperator AND that its not the root plugin folder … … 183 183 // Force refresh of plugin update information 184 184 delete_option('update_plugins'); 185 185 186 186 if( empty($filelist) ) 187 187 return false; //We couldnt find any files in the working dir, therefor no plugin installed? Failsafe backup. 188 188 189 189 $folder = $filelist[0]; 190 190 $plugin = get_plugins('/' . $folder); //Ensure to pass with leading slash … … 224 224 if( empty($content_dir) ) 225 225 return new WP_Error('fs_no_content_dir', __('Unable to locate WordPress Content directory (wp-content).')); 226 226 227 227 $wp_dir = trailingslashit( $wp_dir ); 228 228 $content_dir = trailingslashit( $content_dir );
Note: See TracChangeset
for help on using the changeset viewer.