Make WordPress Core


Ignore:
Timestamp:
08/05/2003 10:44:38 PM (23 years ago)
Author:
mikelittle
Message:

Changes for new geourl functionality.
Example added to index.php.
Install and update done.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/upgrade-071-to-072.php

    r290 r294  
    4444
    4545        case 0:
     46    {
    4647?>
    4748<p>Welcome to WordPress. You're already part of the family so this should be familiar
    … …  
    7071  you&#8217;re all ready, <a href="<?php echo $thisfile;?>?step=1">let's go</a>! </p>
    7172<?php
    72         break;
     73        break;
     74    }
    7375
    7476    case 1:
     77    {
    7578?>
    7679<h1>Step 1</h1>
    … …  
    202205<?php
    203206}
    204     break;
    205         case 2:
     207        break;
     208    } // end case 1
     209
     210    case 2:
     211    {
    206212?>
    207213<h1>Step 2</h1>
     214<p>There are some changes we need to make to the post table, we'll do those next.</p>
     215<?php
     216$error_count = 0;
     217$tablename = $tableposts;
     218
     219$ddl = "ALTER TABLE $tableposts ADD COLUMN post_lon float ";
     220maybe_add_column($tablename, 'post_lon', $ddl);
     221if (check_column($tablename, 'post_lon', 'float')) {
     222    $res .= $tablename . ' - ok <br />'."\n";
     223} else {
     224    $res .= 'There was a problem with ' . $tablename . '<br />'."\n";
     225    ++$error_count;
     226}
     227
     228$ddl = "ALTER TABLE $tableposts ADD COLUMN post_lat float ";
     229maybe_add_column($tablename, 'post_lat', $ddl);
     230if (check_column($tablename, 'post_lat', 'float')) {
     231    $res .= $tablename . ' - ok <br />'."\n";
     232} else {
     233    $res .= 'There was a problem with ' . $tablename . '<br />'."\n";
     234    ++$error_count;
     235}
     236
     237
     238if ($error_count > 0) {
     239    echo("<p>$res</p>");
     240?>
     241<p>Hmmm... there was some kind of error. If you cannot figure out
     242   see from the output above how to correct the problems please
     243   visit our <a href="http://wordpress.org/support/">support
     244   forums</a> and report your problem.</p>
     245<?php
     246} else {
     247?>
     248<p>OK, another step completed. Let's move on to <a href="<?php echo $thisfile;?>?step=3">step 3</a>.</p>
     249<?php
     250}
     251        break;
     252    } // end case 2
     253   
     254        case 3:
     255    {
     256?>
     257<h1>Step 3</h1>
    208258<p>There are a few new database tables with this version, so lets get those out of
    209259  the way.</p>
    … …  
    524574
    525575?>
     576<?php
     577$geo_option_data = array(
     578// data for geo settings
     579"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(84,'use_geo_positions', 2, '1', 'Turns on the geo url features of WordPress', 8, 20)",
     580"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(85,'use_default_geourl', 2, '1','enables placement of default GeoURL ICBM location even when no other specified', 8, 20)",
     581"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(86,'default_geourl_lat ', 8, 0.0, 'The default Latitude ICBM value - <a href=\"http://www.geourl.org/resources.html\" target=\"_blank\">see here</a>', 8, 20)",
     582"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(87,'default_geourl_lon', 8, 0.0, 'The default Longitude ICBM value', 8, 20)",
     583
     584"INSERT INTO $tableoptiongroups (group_id, group_name, group_desc) VALUES(9,'Geo Options', 'Settings which control the posting and display of Geo Options')",
     585
     586"INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(9,84,1)",
     587"INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(9,85,1)",
     588"INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(9,86,1)",
     589"INSERT INTO $tableoptiongroup_options (group_id, option_id, seq) VALUES(9,87,1)",
     590);
     591
     592foreach ($geo_option_data as $query) {
     593    $q = $wpdb->query($query);
     594}
     595?>
     596
     597<p>Geo option data inserted okay.</p>
     598
    526599
    527600<p>Good, the option data was inserted okay.</p>
    … …  
    742815<?php
    743816    } // end else no b2config
    744         break;
     817        break;
     818    } // end case 3
    745819}
    746820?>
Note: See TracChangeset for help on using the changeset viewer.