Make WordPress Core


Ignore:
Timestamp:
05/24/2004 08:22:18 AM (21 years ago)
Author:
saxmatt
Message:

Giant commit, sorry mailing list people. Move all table names to new $wpdb versions. Works but the whole app needs thorough testing now.

File:
1 edited

Legend:

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

    r1273 r1355  
    6464    }
    6565
    66     $options = $wpdb->get_results("SELECT $tableoptions.option_id, option_name, option_type, option_value, option_admin_level FROM $tableoptions WHERE option_name IN ($option_names)");
     66    $options = $wpdb->get_results("SELECT $wpdb->options.option_id, option_name, option_type, option_value, option_admin_level FROM $wpdb->options WHERE option_name IN ($option_names)");
    6767//  die(var_dump($options));
    6868
     
    8484                if( in_array($option->option_name, $nonbools) && $new_val == 0 ) $new_value = 'closed';
    8585                if ($new_val !== $old_val) {
    86                     $query = "UPDATE $tableoptions SET option_value = '$new_val' WHERE option_name = '$option->option_name'";
     86                    $query = "UPDATE $wpdb->options SET option_value = '$new_val' WHERE option_name = '$option->option_name'";
    8787                    $result = $wpdb->query($query);
    8888                    //if( in_array($option->option_name, $nonbools)) die('boo'.$query);
     
    131131<?php
    132132    //iterate through the available option groups. output them as a definition list.
    133     $option_groups = $wpdb->get_results("SELECT group_id, group_name, group_desc, group_longdesc FROM $tableoptiongroups ORDER BY group_id");
     133    $option_groups = $wpdb->get_results("SELECT group_id, group_name, group_desc, group_longdesc FROM $wpdb->optiongroups ORDER BY group_id");
    134134    foreach ($option_groups as $option_group) {
    135135        echo("  <dt><a href=\"$this_file?option_group_id={$option_group->group_id}\" title=\"{$option_group->group_desc}\">{$option_group->group_name}</a></dt>\n");
     
    160160//Now display all the options for the selected group.
    161161if ('all' == $_GET['option_group_id']) :
    162 $options = $wpdb->get_results("SELECT * FROM $tableoptions LEFT JOIN $tableoptiongroup_options ON $tableoptions.option_id = $tableoptiongroup_options.option_id ORDER BY option_name");
     162$options = $wpdb->get_results("SELECT * FROM $wpdb->options LEFT JOIN $wpdb->optiongroup_options ON $wpdb->options.option_id = $wpdb->optiongroup_options.option_id ORDER BY option_name");
    163163else :
    164164$options = $wpdb->get_results("
    165165SELECT
    166 $tableoptions.option_id, option_name, option_type, option_value, option_width, option_height, option_description, option_admin_level
    167 FROM $tableoptions  LEFT JOIN $tableoptiongroup_options ON $tableoptions.option_id = $tableoptiongroup_options.option_id
     166$wpdb->options.option_id, option_name, option_type, option_value, option_width, option_height, option_description, option_admin_level
     167FROM $wpdb->options  LEFT JOIN $wpdb->optiongroup_options ON $wpdb->options.option_id = $wpdb->optiongroup_options.option_id
    168168WHERE group_id = $option_group_id
    169169ORDER BY seq
Note: See TracChangeset for help on using the changeset viewer.