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/link-categories.php

    r1175 r1355  
    7272          $list_limit = -1;
    7373
    74       $wpdb->query("INSERT INTO $tablelinkcategories (cat_id, cat_name, auto_toggle, show_images, show_description, \n" .
     74      $wpdb->query("INSERT INTO $wpdb->linkcategories (cat_id, cat_name, auto_toggle, show_images, show_description, \n" .
    7575             " show_rating, show_updated, sort_order, sort_desc, text_before_link, text_after_link, text_after_all, list_limit) \n" .
    7676             " VALUES ('0', '$cat_name', '$auto_toggle', '$show_images', '$show_description', \n" .
     
    9696      die (__("Cheatin' uh ?"));
    9797
    98     $wpdb->query("DELETE FROM $tablelinkcategories WHERE cat_id='$cat_id'");
    99     $wpdb->query("UPDATE $tablelinks SET link_category=1 WHERE link_category='$cat_id'");
     98    $wpdb->query("DELETE FROM $wpdb->linkcategories WHERE cat_id='$cat_id'");
     99    $wpdb->query("UPDATE $wpdb->links SET link_category=1 WHERE link_category='$cat_id'");
    100100
    101101    header('Location: link-categories.php');
     
    108108    $row = $wpdb->get_row("SELECT cat_id, cat_name, auto_toggle, show_images, show_description, "
    109109         . " show_rating, show_updated, sort_order, sort_desc, text_before_link, text_after_link, "
    110          . " text_after_all, list_limit FROM $tablelinkcategories WHERE cat_id=$cat_id");
     110         . " text_after_all, list_limit FROM $wpdb->linkcategories WHERE cat_id=$cat_id");
    111111    if ($row) {
    112112        if ($row->list_limit == -1) {
     
    264264        $list_limit = -1;
    265265
    266     $wpdb->query("UPDATE $tablelinkcategories set
     266    $wpdb->query("UPDATE $wpdb->linkcategories set
    267267            cat_name='$cat_name',
    268268            auto_toggle='$auto_toggle',
     
    325325$results = $wpdb->get_results("SELECT cat_id, cat_name, auto_toggle, show_images, show_description, "
    326326         . " show_rating, show_updated, sort_order, sort_desc, text_before_link, text_after_link, "
    327          . " text_after_all, list_limit FROM $tablelinkcategories ORDER BY cat_id");
     327         . " text_after_all, list_limit FROM $wpdb->linkcategories ORDER BY cat_id");
    328328$i = 1;
    329329foreach ($results as $row) {
Note: See TracChangeset for help on using the changeset viewer.