summaryrefslogtreecommitdiffstats
path: root/wp-includes
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-04-08 15:59:15 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-04-08 15:59:15 +0000
commit6fa96b69841ed7d437dbcc178b53e695f29ec007 (patch)
treece7fe0ec505b808409c5ec2d909ee51ffa912b49 /wp-includes
parentc4f5e9ba65a9d9b5b9fa23ab0fc48211b53036c6 (diff)
downloadwordpress-mu-6fa96b69841ed7d437dbcc178b53e695f29ec007.tar.gz
wordpress-mu-6fa96b69841ed7d437dbcc178b53e695f29ec007.tar.xz
wordpress-mu-6fa96b69841ed7d437dbcc178b53e695f29ec007.zip
Update the default category ID when it's changed, fixes #580, props MrBrian
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1221 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes')
-rw-r--r--wp-includes/wpmu-functions.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/wp-includes/wpmu-functions.php b/wp-includes/wpmu-functions.php
index 55bc7e0..9043bad 100644
--- a/wp-includes/wpmu-functions.php
+++ b/wp-includes/wpmu-functions.php
@@ -1759,6 +1759,8 @@ function global_terms( $term_id, $tt_id ) {
if ( $global_id == $term_id )
return $global_id;
+ if( get_option( 'default_category' ) == $term_id )
+ update_option( 'default_category', $global_id );
$wpdb->query( "UPDATE $wpdb->terms SET term_id = '$global_id' WHERE term_id = '$term_id'" );
$wpdb->query( "UPDATE $wpdb->term_taxonomy SET term_id = '$global_id' WHERE term_id = '$term_id'" );
$wpdb->query( "UPDATE $wpdb->term_taxonomy SET parent = '$global_id' WHERE parent = '$term_id'" );