More rel_type elimination. see #4189
git-svn-id: http://svn.automattic.com/wordpress/trunk@5532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
563c0ab7a2
commit
1b783b9b9a
|
@ -645,11 +645,6 @@ function checked( $checked, $current) {
|
||||||
echo ' checked="checked"';
|
echo ' checked="checked"';
|
||||||
}
|
}
|
||||||
|
|
||||||
function return_categories_list( $parent = 0 ) {
|
|
||||||
global $wpdb;
|
|
||||||
return $wpdb->get_col( "SELECT cat_ID FROM $wpdb->categories WHERE category_parent = $parent AND ( type & " . TAXONOMY_CATEGORY . " != 0 ) AND ( link_count = 0 OR category_count != 0 ) ORDER BY category_count DESC" );
|
|
||||||
}
|
|
||||||
|
|
||||||
function sort_cats( $cat1, $cat2 ) {
|
function sort_cats( $cat1, $cat2 ) {
|
||||||
if ( $cat1['checked'] || $cat2['checked'] )
|
if ( $cat1['checked'] || $cat2['checked'] )
|
||||||
return ( $cat1['checked'] && !$cat2['checked'] ) ? -1 : 1;
|
return ( $cat1['checked'] && !$cat2['checked'] ) ? -1 : 1;
|
||||||
|
|
|
@ -650,7 +650,8 @@ function clean_page_cache($id) {
|
||||||
|
|
||||||
function update_post_category_cache($post_ids) {
|
function update_post_category_cache($post_ids) {
|
||||||
global $wpdb, $category_cache, $tag_cache, $blog_id;
|
global $wpdb, $category_cache, $tag_cache, $blog_id;
|
||||||
|
// TODO
|
||||||
|
return;
|
||||||
if ( empty($post_ids) )
|
if ( empty($post_ids) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -1560,10 +1560,10 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
$categories_struct = array();
|
$categories_struct = array();
|
||||||
|
|
||||||
// FIXME: can we avoid using direct SQL there?
|
// FIXME: can we avoid using direct SQL there?
|
||||||
if ($cats = $wpdb->get_results("SELECT cat_ID, cat_name FROM $wpdb->categories WHERE (type & " . TAXONOMY_CATEGORY . " != 0)", ARRAY_A)) {
|
if ( $cats = get_categories('hide_empty=0&hierarchical=0') ) {
|
||||||
foreach ($cats as $cat) {
|
foreach ($cats as $cat) {
|
||||||
$struct['categoryId'] = $cat['cat_ID'];
|
$struct['categoryId'] = $cat->term_id;
|
||||||
$struct['categoryName'] = $cat['cat_name'];
|
$struct['categoryName'] = $cat->name;
|
||||||
|
|
||||||
$categories_struct[] = $struct;
|
$categories_struct[] = $struct;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue