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/optionhandler.php

    r700 r1355  
    1010function get_option_widget($option_result, $editable, $between)
    1111{
    12     global $wpdb, $tableoptionvalues;
     12    global $wpdb;
    1313    $disabled = $editable ? '' : 'disabled';
    1414
     
    4848
    4949            $select = $wpdb->get_results("SELECT optionvalue, optionvalue_desc "
    50                                          ."FROM $tableoptionvalues "
     50                                         ."FROM $wpdb->optionvalues "
    5151                                         ."WHERE option_id = $option_result->option_id "
    5252                                         ."ORDER BY optionvalue_seq");
     
    6767        case 7: // SQL select
    6868            // first get the sql to run
    69             $sql = $wpdb->get_var("SELECT optionvalue FROM $tableoptionvalues WHERE option_id = $option_result->option_id");
     69            $sql = $wpdb->get_var("SELECT optionvalue FROM $wpdb->optionvalues WHERE option_id = $option_result->option_id");
    7070            if (!$sql) {
    7171                return $option_result->option_name . $editable;
     
    101101
    102102function validate_option($option, $name, $val) {
    103     global $wpdb, $tableoptionvalues;
     103    global $wpdb;
    104104    $msg = '';
    105105    switch ($option->option_type) {
    106106        case 6: // range
    107107            // get range
    108             $range = $wpdb->get_row("SELECT optionvalue_max, optionvalue_min FROM $tableoptionvalues WHERE option_id = $option->option_id");
     108            $range = $wpdb->get_row("SELECT optionvalue_max, optionvalue_min FROM $wpdb->optionvalues WHERE option_id = $option->option_id");
    109109            if ($range) {
    110110                if (($val < $range->optionvalue_min) || ($val > $range->optionvalue_max)) {
Note: See TracChangeset for help on using the changeset viewer.