Make WordPress Core

Changeset 762


Ignore:
Timestamp:
01/12/2004 12:12:45 PM (22 years ago)
Author:
saxmatt
Message:

Upgrade and import fixes.

Location:
trunk/wp-admin
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/import-blogger.php

    r628 r762  
    1616    }
    1717}
    18 
     18    require_once('../wp-config.php');
     19    require('upgrade_functions.php');
    1920switch ($action) {
    2021
    2122case "step1":
    22 
    23     require_once('../wp-config.php');
    24     require_once(ABSPATH.WPINC.'/template-functions.php');
    25     require_once(ABSPATH.WPINC.'/functions.php');
    26     require_once(ABSPATH.WPINC.'/vars.php');
    27 
    2823?>
    2924<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    159154    $result = $wpdb->query("DELETE FROM $tableposts WHERE post_date=\"0000-00-00 00:00:00\"");
    160155
    161 
     156    upgrade_all();
    162157    ?>
    163158</ul>
  • trunk/wp-admin/import-greymatter.php

    r661 r762  
    77require_once('../wp-config.php');
    88require_once(ABSPATH.WPINC.'/functions.php');
     9require('upgrade-functions.php');
    910
    1011$wpvarstoreset = array('action', 'gmpath', 'archivespath');
     
    253254            echo "... <b>Done</b></li>";
    254255        }
    255     } ?>
     256    }
     257    upgrade_all();
     258    ?>
    256259</ul><b>Done</b></li></ul>
    257260<p>&nbsp;</p>
  • trunk/wp-admin/import-textpattern.php

    r601 r762  
    33// For security reasons, fill in the connection details to your Textpattern database below:
    44
    5 $tp_database_name = 'wordpres_test';
    6 $tp_database_username = 'wordpres_test';
    7 $tp_database_password = 'test';
     5$tp_database_name = 'textpattern';
     6$tp_database_username = 'username';
     7$tp_database_password = 'password';
    88$tp_database_host = 'localhost';
    99
    1010if (!file_exists('../wp-config.php')) die("There doesn't seem to be a wp-config.php file. Double check that you updated wp-config.sample.php with the proper database connection information and renamed it to wp-config.php.");
    1111require('../wp-config.php');
    12 require('install-helper.php');
     12require('upgrade-functions.php');
    1313
    1414$step = $HTTP_GET_VARS['step'];
     
    3030        background-image: url(http://wordpress.org/images/wordpress.gif);
    3131        background-repeat: no-repeat;
    32         height: 72px;
     32        height: 60px;
    3333        border-bottom: 4px solid #333;
    3434    }
     
    3737        text-decoration: none;
    3838        text-indent: -100em;
    39         height: 72px;
     39        height: 60px;
    4040    }
    4141    p {
     
    6161} else {
    6262?>
    63 <p><em>It doesn't look like your database information is correct. Please re-edit this file and double-check all the settings.</em></p>
     63<p><em>It doesn't look like your database information is incorrect. Please re-edit this file and double-check all the settings.</em></p>
    6464<?php
    6565}
     
    103103
    104104    $wpdb->query("INSERT INTO $tableposts
    105         (post_author, post_date, post_content, post_title, post_category, post_name)
     105        (post_author, post_date, post_content, post_title, post_category, post_name, post_status)
    106106        VALUES
    107         ('$author', '$posted', '$content', '$title', '$category', '$post_name')");
     107        ('$author', '$posted', '$content', '$title', '$category', '$post_name', 'publish')");
    108108
    109109    // Get wordpress post id
     
    126126}
    127127
    128 ?>
    129 <p><strong>Done.</strong></p>
    130 <p>Now let's populate the new field.</p>
    131 <p>Working
    132  
    133   <strong>Done.</strong></p>
    134   <p>Now on to <a href="upgrade-072-to-073.php?step=2">step 2</a>.</p>
     128upgrade_all();
     129?>
     130<p><strong>All done.</strong> Wasn&#8217;t that fun? <a href="../">Have fun</a>.</p>
    135131<?php
    136     break;
    137     case 2:
    138 ?>
    139     <h1>Step 2</h1>
    140     <p>Now we need to adjust some option data (don't worry this won't change any of your settings.) </p>
    141     <p>Working
    142 <?php
    143         // fix timezone diff range
    144         $wpdb->query("UPDATE $tableoptionvalues SET optionvalue_max = 23 , optionvalue_min = -23 WHERE option_id = 51");
    145         echo ' .';
    146         flush();
    147         // fix upload users description
    148         $wpdb->query("UPDATE $tableoptions SET option_description = '...or you may authorize only some users. enter their logins here, separated by spaces. if you leave this variable blank, all users who have the minimum level are authorized to upload. example: \'barbara anne george\'' WHERE option_id = 37");
    149         echo ' .';
    150         flush();
    151         // and file types
    152         $wpdb->query("UPDATE $tableoptions SET option_description = 'accepted file types, separated by spaces. example: \'jpg gif png\'' WHERE option_id = 34");
    153         echo ' .';
    154         flush();
    155         // add link to date format help page
    156         $wpdb->query("UPDATE $tableoptions SET option_description = 'see <a href=\"help/en/dateformats.help.html\">help</a> for format characters' WHERE option_id = 52");
    157         $wpdb->query("UPDATE $tableoptions SET option_description = 'see <a href=\"help/en/dateformats.help.html\">help</a> for format characters' WHERE option_id = 53");
    158         echo ' .';
    159         flush();
    160 ?>
    161     <strong>Done.</strong></p>
    162 <p>See, that didn&#8217;t hurt a bit. All done!</p>
    163 <?php
    164     break;
     132break;
    165133}
    166134?>
     135
    167136</body>
    168137</html>
  • trunk/wp-admin/upgrade-functions.php

    r759 r762  
    11<?php
    22// Functions to be called in install and upgrade scripts
     3
     4function upgrade_all() {
     5    upgrade_071();
     6    upgrade_072();
     7    upgrade_100();
     8    upgrade_101();
     9}
    310
    411// General
  • trunk/wp-admin/upgrade.php

    r711 r762  
    4949   
    5050    case 1:
    51     upgrade_071();
    52     upgrade_072();
    53     upgrade_100();
    54     upgrade_101();
     51    upgrade_all();
    5552?>
    5653<h2>Step 1</h2>
Note: See TracChangeset for help on using the changeset viewer.