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/wp-install-helper.php

    r280 r294  
    11<?php
    22require_once('../wp-config.php');
     3$debug = 0;
    34
    45/**
     
    3334 */
    3435function maybe_add_column($table_name, $column_name, $create_ddl) {
    35     global $wpdb;
     36    global $wpdb, $debug;
    3637    foreach ($wpdb->get_col("DESC $table_name",0) as $column ) {
     38        if ($debug) echo("checking $column == $column_name<br />");
    3739        if ($column == $column_name) {
    3840            return true;
     
    9193 */
    9294function check_column($table_name, $col_name, $col_type, $is_null = null, $key = null, $default = null, $extra = null) {
    93     global $wpdb;
     95    global $wpdb, $debug;
    9496    $diffs = 0;
    9597    $results = $wpdb->get_results("DESC $table_name");
    9698   
    9799    foreach ($results as $row ) {
    98         //print_r($row);
     100        if ($debug > 1) print_r($row);
    99101        if ($row->Field == $col_name) {
    100102            // got our column, check the params
    101             //echo ("checking $row->Type against $col_type\n");
     103            if ($debug) echo ("checking $row->Type against $col_type\n");
    102104            if (($col_type != null) && ($row->Type != $col_type)) {
    103105                ++$diffs;
     
    116118            }
    117119            if ($diffs > 0) {
    118                 //echo ("diffs = $diffs returning false\n");
     120                if ($debug) echo ("diffs = $diffs returning false\n");
    119121                return false;
    120122            }
Note: See TracChangeset for help on using the changeset viewer.