Changeset 33024 for category-admin/trunk

Show
Ignore:
Timestamp:
02/25/08 17:49:27 (5 months ago)
Author:
alexkingorg
Message:

may work with WP 2.3

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • category-admin/trunk/category-overload.php

    r7752 r33024  
    55Plugin URI: http://alexking.org/projects/wordpress 
    66Description: This plugin will allow you to better manage a very large category list. 
    7 Version: 1.0 
     7Version: 1.1b1 
    88Author: Alex King 
    99Author URI: http://alexking.org 
     
    5656      global $wpdb, $class; 
    5757 
    58       $categories = $wpdb->get_results("SELECT SQL_CALC_FOUND_ROWS * FROM $wpdb->categories WHERE category_parent = '$parent' ORDER BY cat_name LIMIT $offset, 50"); 
     58      $categories = $wpdb->get_results(" 
     59            SELECT SQL_CALC_FOUND_ROWS  
     60            t.term_id AS cat_ID, tt.count AS category_count, 
     61            tt.description AS category_description, t.name AS cat_name, 
     62            t.slug AS category_nicename, tt.parent AS category_parent 
     63            FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id 
     64            WHERE tt.taxonomy = 'category' AND tt.parent = '$parent' 
     65            ORDER BY t.name LIMIT $offset, 50 
     66      "); 
    5967      $cat_count = intval($wpdb->get_var('SELECT FOUND_ROWS()')); 
    6068       
     
    133141      global $wpdb, $class; 
    134142 
    135       $categories = $wpdb->get_results("SELECT SQL_CALC_FOUND_ROWS * FROM $wpdb->categories WHERE category_parent = '$parent' ORDER BY cat_name LIMIT $offset, 50"); 
     143      $categories = $wpdb->get_results(" 
     144            SELECT SQL_CALC_FOUND_ROWS  
     145            t.term_id AS cat_ID, tt.count AS category_count, 
     146            tt.description AS category_description, t.name AS cat_name, 
     147            t.slug AS category_nicename, tt.parent AS category_parent 
     148            FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id 
     149            WHERE tt.taxonomy = 'category' AND tt.parent = '$parent' 
     150            ORDER BY t.name LIMIT $offset, 50 
     151      "); 
    136152      $cat_count = $wpdb->get_var('SELECT FOUND_ROWS()'); 
    137153