Changeset 17578
- Timestamp:
- 04/01/2011 09:13:50 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/update-core.php
r17577 r17578 369 369 // Copy Languages 370 370 if ( !is_wp_error($result) && $wp_filesystem->is_dir($from . $distro . 'wp-content/languages') ) { 371 if ( !@is_dir(WP_LANG_DIR) && 0 === strpos(WP_LANG_DIR, ABSPATH) ) { // Check the language directory exists first 372 $wp_filesystem->mkdir($to . str_replace(WP_LANG_DIR, ABSPATH, ''), FS_CHMOD_DIR); // If it's within the ABSPATH we can handle it here, otherwise they're out of luck. 371 if ( WP_LANG_DIR != ABSPATH . WPINC . '/languages' || @is_dir(WP_LANG_DIR) ) 372 $lang_dir = WP_LANG_DIR; 373 else 374 $lang_dir = WP_CONTENT_DIR . '/languages'; 375 376 if ( !@is_dir($lang_dir) && 0 === strpos($lang_dir, ABSPATH) ) { // Check the language directory exists first 377 $wp_filesystem->mkdir($to . str_replace($lang_dir, ABSPATH, ''), FS_CHMOD_DIR); // If it's within the ABSPATH we can handle it here, otherwise they're out of luck. 373 378 clearstatcache(); // for FTP, Need to clear the stat cache 374 379 } 375 380 376 if ( @is_dir(WP_LANG_DIR) ) { 377 $wp_lang_dir = $wp_filesystem->wp_lang_dir(); 378 $result = copy_dir($from . $distro . 'wp-content/languages/', $wp_lang_dir); 381 if ( @is_dir($lang_dir) ) { 382 $wp_lang_dir = $wp_filesystem->find_folder($lang_dir); 383 if ( $wp_lang_dir ) 384 $result = copy_dir($from . $distro . 'wp-content/languages/', $wp_lang_dir); 379 385 } 380 386 }
Note: See TracChangeset
for help on using the changeset viewer.