Changeset 811

Show
Ignore:
Timestamp:
11/27/06 11:19:48 (2 years ago)
Author:
donncha
Message:

WP Merge to rev 4534

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/admin-db.php

    r810 r811  
    140140 
    141141        wp_cache_delete($cat_ID, 'category'); 
     142        wp_cache_delete('get_categories', 'category'); 
    142143 
    143144        if ($update) { 
     
    221222        wp_cache_delete($cat_ID, 'category'); 
    222223        wp_cache_delete('all_category_ids', 'category'); 
     224        wp_cache_delete('get_categories', 'category'); 
    223225 
    224226        do_action('delete_category', $cat_ID); 
     
    414416                        $wpdb->query("UPDATE $wpdb->categories SET link_count = link_count - 1 WHERE cat_ID = '$category'"); 
    415417                        wp_cache_delete($category, 'category'); 
     418                        do_action('edit_category', $cat_id); 
    416419                } 
    417420        } 
  • trunk/wp-includes/bookmark.php

    r810 r811  
    2020// Deprecate 
    2121function get_link($bookmark_id, $output = OBJECT) { 
    22         return get_bookmark($bookmark_id, $output);     
     22        return get_bookmark($bookmark_id, $output); 
    2323} 
    2424 
     
    5656                } 
    5757        } 
    58         if (!empty($inclusions))  
     58        if (!empty($inclusions)) 
    5959                $inclusions .= ')'; 
    6060 
     
    7171                } 
    7272        } 
    73         if (!empty($exclusions))  
     73        if (!empty($exclusions)) 
    7474                $exclusions .= ')'; 
    7575                 
     
    9393        } 
    9494        if (!empty($category_query)) { 
    95                 $category_query .= ')';         
     95                $category_query .= ')'; 
    9696                $join = " LEFT JOIN $wpdb->link2cat ON ($wpdb->links.link_id = $wpdb->link2cat.link_id) "; 
    9797        } 
  • trunk/wp-includes/category.php

    r810 r811  
    226226} 
    227227 
     228function cat_is_ancestor_of($cat1, $cat2) {  
     229        if ( is_int($cat1) )  
     230                $cat1 = & get_category($cat1);  
     231        if ( is_int($cat2) )  
     232                $cat2 = & get_category($cat2);  
     233 
     234        if ( !$cat1->cat_ID || !$cat2->category_parent )  
     235                return false;  
     236 
     237        if ( $cat2->category_parent == $cat1->cat_ID )  
     238                return true;  
     239 
     240        return cat_is_ancestor_of($cat1, get_category($cat2->parent_category));  
     241}  
     242 
    228243// 
    229244// Private 
  • trunk/wp-includes/kses.php

    r765 r811  
    823823        // Post filtering 
    824824        add_filter('content_save_pre', 'wp_filter_post_kses'); 
     825        add_filter('content_filtered_save_pre', 'wp_filter_post_kses'); 
    825826        add_filter('pre_comment_author', 'wp_filter_kses'); 
    826827        add_action('admin_notices', 'wp_kses_show_message'); 
     
    834835        // Post filtering 
    835836        remove_filter('content_save_pre', 'wp_filter_post_kses'); 
     837        remove_filter('content_filtered_save_pre', 'wp_filter_post_kses'); 
    836838} 
    837839 
  • trunk/wp-includes/post.php

    r810 r811  
    403403                                $wpdb->query("UPDATE $wpdb->categories SET category_count = category_count - 1 WHERE cat_ID = '$cat_id'"); 
    404404                                wp_cache_delete($cat_id, 'category'); 
     405                                do_action('edit_category', $cat_id); 
    405406                        } 
    406407                } 
     
    418419        $wpdb->query("DELETE FROM $wpdb->postmeta WHERE post_id = $postid"); 
    419420 
    420         if ( 'page' == $post->type ) { 
    421                 wp_cache_delete('all_page_ids', 'pages'); 
     421        if ( 'page' == $post->post_type ) { 
     422                wp_cache_delete( 'all_page_ids', 'pages' ); 
     423                wp_cache_delete( 'get_pages', 'page' ); 
    422424                $wp_rewrite->flush_rules(); 
    423425        } 
     
    496498        if ( empty($no_filter) ) { 
    497499                $post_content    = apply_filters('content_save_pre',   $post_content); 
     500                $post_content_filtered = apply_filters('content_filtered_save_pre',   $post_content_filtered); 
    498501                $post_excerpt    = apply_filters('excerpt_save_pre',   $post_excerpt); 
    499502                $post_title      = apply_filters('title_save_pre',     $post_title); 
     
    680683                } 
    681684        } else if ($post_type == 'page') { 
    682                 wp_cache_delete('all_page_ids', 'pages'); 
     685                wp_cache_delete( 'all_page_ids', 'pages' ); 
     686                wp_cache_delete( 'get_pages', 'page' ); 
    683687                $wp_rewrite->flush_rules(); 
    684688 
     
    809813                do_action('edit_category', $cat_id); 
    810814        } 
     815 
     816        wp_cache_delete('get_categories', 'category'); 
    811817 
    812818        do_action('edit_post', $post_ID); 
     
    10601066        if ( !empty($include) ) { 
    10611067                $child_of = 0; //ignore child_of, exclude, meta_key, and meta_value params if using include  
    1062                 $exclude = '';   
     1068                $exclude = ''; 
    10631069                $meta_key = ''; 
    10641070                $meta_value = ''; 
     
    10731079                } 
    10741080        } 
    1075         if (!empty($inclusions))  
    1076                 $inclusions .= ')';     
     1081        if (!empty($inclusions)) 
     1082                $inclusions .= ')'; 
    10771083 
    10781084        $exclusions = ''; 
     
    12101216        // Get the basics. 
    12111217        $post_content    = apply_filters('content_save_pre',   $post_content); 
     1218        $post_content_filtered = apply_filters('content_filtered_save_pre',   $post_content_filtered); 
    12121219        $post_excerpt    = apply_filters('excerpt_save_pre',   $post_excerpt); 
    12131220        $post_title      = apply_filters('title_save_pre',     $post_title); 
  • trunk/wp-includes/wpmu-functions.php

    r810 r811  
    13881388} 
    13891389 
    1390 function cat_is_ancestor_of($cat1, $cat2) {  
    1391         if ( is_int($cat1) )  
    1392         $cat1 = & get_category($cat1);  
    1393         if ( is_int($cat2) )  
    1394         $cat2 = & get_category($cat2);  
    1395  
    1396         if ( !$cat1->cat_ID || !$cat2->category_parent )  
    1397         return false;  
    1398  
    1399         if ( $cat2->category_parent == $cat1->cat_ID )  
    1400         return true;  
    1401  
    1402         return cat_is_ancestor_of($cat1, get_category($cat2->parent_category));  
    1403 }  
    1404  
    14051390?> 
  • trunk/xmlrpc.php

    r810 r811  
    12201220                $comment_post_ID = (int) $post_ID; 
    12211221                $comment_author = $title; 
    1222                 $wpdb->escape($comment_author); 
     1222                $this->escape($comment_author); 
    12231223                $comment_author_url = $pagelinkedfrom; 
    12241224                $comment_content = $context; 
    1225                 $wpdb->escape($comment_content); 
     1225                $this->escape($comment_content); 
    12261226                $comment_type = 'pingback'; 
    12271227