Make WordPress Core

Changeset 2346


Ignore:
Timestamp:
02/15/2005 03:32:43 AM (19 years ago)
Author:
saxmatt
Message:

Two small tweaks before release

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-functions.php

    r2328 r2346  
    905905    if ( isset($wp_file_descriptions[basename($file)] ) ) {
    906906        return $wp_file_descriptions[basename($file)];
    907     } else {
     907    } elseif ( file_exists( ABSPATH . $file ) ) {
    908908        $template_data = implode('', file(ABSPATH . $file));
    909909        if ( preg_match("|Template Name:(.*)|i", $template_data, $name) )
  • trunk/wp-admin/upgrade-functions.php

    r2332 r2346  
    544544            $oldpath = ABSPATH;
    545545
     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
    546555        if (! @copy("$oldpath/$oldfile", "$site_dir/$newfile"))
    547556            return false;
     
    571580
    572581    // 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";
    574583
    575584    $stylelines = file_get_contents("$site_dir/style.css");
Note: See TracChangeset for help on using the changeset viewer.