Two small tweaks before release

git-svn-id: http://svn.automattic.com/wordpress/trunk@2346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2005-02-15 03:32:43 +00:00
parent 86f0f9fa5c
commit d720a8ef0a
2 changed files with 11 additions and 2 deletions

View File

@ -904,7 +904,7 @@ function get_file_description($file) {
if ( isset($wp_file_descriptions[basename($file)] ) ) {
return $wp_file_descriptions[basename($file)];
} else {
} elseif ( file_exists( ABSPATH . $file ) ) {
$template_data = implode('', file(ABSPATH . $file));
if ( preg_match("|Template Name:(.*)|i", $template_data, $name) )
return $name[1];

View File

@ -543,6 +543,15 @@ function make_site_theme_from_oldschool($theme_name, $template) {
else
$oldpath = ABSPATH;
if ($oldfile == 'index.php') { // Check to make sure it's not a new index
$index = implode('', file("$oldpath/$oldfile"));
if ( strstr( $index, 'WP_USE_THEMES' ) ) {
if (! @copy(ABSPATH . 'wp-content/themes/default/index.php', "$site_dir/$newfile"))
return false;
continue; // Don't copy anything
}
}
if (! @copy("$oldpath/$oldfile", "$site_dir/$newfile"))
return false;
@ -570,7 +579,7 @@ function make_site_theme_from_oldschool($theme_name, $template) {
}
// Add a theme header.
$header = "/*\nTheme Name: $theme_name\nTheme URI: " . get_option('siteurl') . "\nDescription: Your theme.\nVersion: 1\nAuthor: You\n*/\n";
$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";
$stylelines = file_get_contents("$site_dir/style.css");
if ($stylelines) {