Changeset 2346
- Timestamp:
- 02/15/2005 03:32:43 AM (20 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-functions.php
r2328 r2346 905 905 if ( isset($wp_file_descriptions[basename($file)] ) ) { 906 906 return $wp_file_descriptions[basename($file)]; 907 } else {907 } elseif ( file_exists( ABSPATH . $file ) ) { 908 908 $template_data = implode('', file(ABSPATH . $file)); 909 909 if ( preg_match("|Template Name:(.*)|i", $template_data, $name) ) -
trunk/wp-admin/upgrade-functions.php
r2332 r2346 544 544 $oldpath = ABSPATH; 545 545 546 if ($oldfile == 'index.php') { // Check to make sure it's not a new index 547 $index = implode('', file("$oldpath/$oldfile")); 548 if ( strstr( $index, 'WP_USE_THEMES' ) ) { 549 if (! @copy(ABSPATH . 'wp-content/themes/default/index.php', "$site_dir/$newfile")) 550 return false; 551 continue; // Don't copy anything 552 } 553 } 554 546 555 if (! @copy("$oldpath/$oldfile", "$site_dir/$newfile")) 547 556 return false; … … 571 580 572 581 // Add a theme header. 573 $header = "/*\nTheme Name: $theme_name\nTheme URI: " . get_option('siteurl') . "\nDescription: Your theme.\nVersion: 1\nAuthor: You\n*/\n";582 $header = "/*\nTheme Name: $theme_name\nTheme URI: " . get_option('siteurl') . "\nDescription: A theme automatically created by the upgrade.\nVersion: 1.0\nAuthor: Moi\n*/\n"; 574 583 575 584 $stylelines = file_get_contents("$site_dir/style.css");
Note: See TracChangeset
for help on using the changeset viewer.