Index: wp-includes/ms-default-filters.php
===================================================================
--- wp-includes/ms-default-filters.php	(revision 21841)
+++ wp-includes/ms-default-filters.php	(working copy)
@@ -33,7 +33,6 @@
 add_filter( 'allowed_redirect_hosts', 'redirect_this_site' );
 
 // Administration
-add_filter( 'term_id_filter', 'global_terms', 10, 2 );
 add_action( 'publish_post', 'update_posts_count' );
 add_action( 'delete_post', '_update_blog_date_on_post_delete' );
 add_action( 'transition_post_status', '_update_blog_date_on_post_publish', 10, 3 );
Index: wp-includes/functions.php
===================================================================
--- wp-includes/functions.php	(revision 21841)
+++ wp-includes/functions.php	(working copy)
@@ -3072,30 +3072,6 @@
 }
 
 /**
- * Whether global terms are enabled.
- *
- *
- * @since 3.0.0
- * @package WordPress
- *
- * @return bool True if multisite and global terms enabled
- */
-function global_terms_enabled() {
-	if ( ! is_multisite() )
-		return false;
-
-	static $global_terms = null;
-	if ( is_null( $global_terms ) ) {
-		$filter = apply_filters( 'global_terms_enabled', null );
-		if ( ! is_null( $filter ) )
-			$global_terms = (bool) $filter;
-		else
-			$global_terms = (bool) get_site_option( 'global_terms_enabled', false );
-	}
-	return $global_terms;
-}
-
-/**
  * gmt_offset modification for smart timezone handling.
  *
  * Overrides the gmt_offset option if we have a timezone_string available.
Index: wp-includes/option.php
===================================================================
--- wp-includes/option.php	(revision 21841)
+++ wp-includes/option.php	(working copy)
@@ -174,7 +174,7 @@
 	if ( empty($site_id) )
 		$site_id = $wpdb->siteid;
 
-	$core_options = array('site_name', 'siteurl', 'active_sitewide_plugins', '_site_transient_timeout_theme_roots', '_site_transient_theme_roots', 'site_admins', 'can_compress_scripts', 'global_terms_enabled', 'ms_files_rewriting' );
+	$core_options = array('site_name', 'siteurl', 'active_sitewide_plugins', '_site_transient_timeout_theme_roots', '_site_transient_theme_roots', 'site_admins', 'can_compress_scripts', 'ms_files_rewriting' );
 
 	$core_options_in = "'" . implode("', '", $core_options) . "'";
 	$options = $wpdb->get_results( $wpdb->prepare("SELECT meta_key, meta_value FROM $wpdb->sitemeta WHERE meta_key IN ($core_options_in) AND site_id = %d", $site_id) );
Index: wp-includes/wp-db.php
===================================================================
--- wp-includes/wp-db.php	(revision 21841)
+++ wp-includes/wp-db.php	(working copy)
@@ -239,7 +239,7 @@
 	 * @var array
 	 */
 	var $ms_global_tables = array( 'blogs', 'signups', 'site', 'sitemeta',
-		'sitecategories', 'registration_log', 'blog_versions' );
+		'registration_log', 'blog_versions' );
 
 	/**
 	 * WordPress Comments table
@@ -390,15 +390,6 @@
 	var $site;
 
 	/**
-	 * Multisite Sitewide Terms table
-	 *
-	 * @since 3.0.0
-	 * @access public
-	 * @var string
-	 */
-	var $sitecategories;
-
-	/**
 	 * Multisite Site Metadata table
 	 *
 	 * @since 3.0.0
Index: wp-includes/ms-load.php
===================================================================
--- wp-includes/ms-load.php	(revision 21841)
+++ wp-includes/ms-load.php	(working copy)
@@ -246,8 +246,6 @@
 	$msg .= __( 'Read the <a target="_blank" href="http://codex.wordpress.org/Debugging_a_WordPress_Network">bug report</a> page. Some of the guidelines there may help you figure out what went wrong.' );
 	$msg .= ' ' . __( 'If you&#8217;re still stuck with this message, then check that your database contains the following tables:' ) . '</p><ul>';
 	foreach ( $wpdb->tables('global') as $t => $table ) {
-		if ( 'sitecategories' == $t )
-			continue;
 		$msg .= '<li>' . $table . '</li>';
 	}
 	$msg .= '</ul>';
Index: wp-includes/ms-functions.php
===================================================================
--- wp-includes/ms-functions.php	(revision 21841)
+++ wp-includes/ms-functions.php	(working copy)
@@ -314,7 +314,7 @@
  */
 function get_blog_permalink( $blog_id, $post_id ) {
 	switch_to_blog( $blog_id );
-	$link = get_permalink( $post_id );
+	$link = set_url_scheme( get_permalink( $post_id ) , 'http' );
 	restore_current_blog();
 
 	return $link;
@@ -1502,74 +1502,6 @@
 }
 
 /**
- * Maintains a canonical list of terms by syncing terms created for each blog with the global terms table.
- *
- * @since 3.0.0
- *
- * @see term_id_filter
- *
- * @param int $term_id An ID for a term on the current blog.
- * @return int An ID from the global terms table mapped from $term_id.
- */
-function global_terms( $term_id, $deprecated = '' ) {
-	global $wpdb;
-	static $global_terms_recurse = null;
-
-	if ( !global_terms_enabled() )
-		return $term_id;
-
-	// prevent a race condition
-	$recurse_start = false;
-	if ( $global_terms_recurse === null ) {
-		$recurse_start = true;
-		$global_terms_recurse = 1;
-	} elseif ( 10 < $global_terms_recurse++ ) {
-		return $term_id;
-	}
-
-	$term_id = intval( $term_id );
-	$c = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->terms WHERE term_id = %d", $term_id ) );
-
-	$global_id = $wpdb->get_var( $wpdb->prepare( "SELECT cat_ID FROM $wpdb->sitecategories WHERE category_nicename = %s", $c->slug ) );
-	if ( $global_id == null ) {
-		$used_global_id = $wpdb->get_var( $wpdb->prepare( "SELECT cat_ID FROM $wpdb->sitecategories WHERE cat_ID = %d", $c->term_id ) );
-		if ( null == $used_global_id ) {
-			$wpdb->insert( $wpdb->sitecategories, array( 'cat_ID' => $term_id, 'cat_name' => $c->name, 'category_nicename' => $c->slug ) );
-			$global_id = $wpdb->insert_id;
-			if ( empty( $global_id ) )
-				return $term_id;
-		} else {
-			$max_global_id = $wpdb->get_var( "SELECT MAX(cat_ID) FROM $wpdb->sitecategories" );
-			$max_local_id = $wpdb->get_var( "SELECT MAX(term_id) FROM $wpdb->terms" );
-			$new_global_id = max( $max_global_id, $max_local_id ) + mt_rand( 100, 400 );
-			$wpdb->insert( $wpdb->sitecategories, array( 'cat_ID' => $new_global_id, 'cat_name' => $c->name, 'category_nicename' => $c->slug ) );
-			$global_id = $wpdb->insert_id;
-		}
-	} elseif ( $global_id != $term_id ) {
-		$local_id = $wpdb->get_row( $wpdb->prepare( "SELECT term_id FROM $wpdb->terms WHERE term_id = %d", $global_id ) );
-		if ( null != $local_id )
-			$local_id = global_terms( $local_id );
-			if ( 10 < $global_terms_recurse )
-				$global_id = $term_id;
-	}
-
-	if ( $global_id != $term_id ) {
-		if ( get_option( 'default_category' ) == $term_id )
-			update_option( 'default_category', $global_id );
-
-		$wpdb->update( $wpdb->terms, array('term_id' => $global_id), array('term_id' => $term_id) );
-		$wpdb->update( $wpdb->term_taxonomy, array('term_id' => $global_id), array('term_id' => $term_id) );
-		$wpdb->update( $wpdb->term_taxonomy, array('parent' => $global_id), array('parent' => $term_id) );
-
-		clean_term_cache($term_id);
-	}
-	if( $recurse_start )
-		$global_terms_recurse = null;
-
-	return $global_id;
-}
-
-/**
  * Ensure that the current site's domain is listed in the allowed redirect host list.
  *
  * @see wp_validate_redirect()
Index: wp-admin/includes/class-wp-terms-list-table.php
===================================================================
--- wp-admin/includes/class-wp-terms-list-table.php	(revision 21841)
+++ wp-admin/includes/class-wp-terms-list-table.php	(working copy)
@@ -341,12 +341,10 @@
 					<span class="title"><?php _ex( 'Name', 'term name' ); ?></span>
 					<span class="input-text-wrap"><input type="text" name="name" class="ptitle" value="" /></span>
 				</label>
-	<?php if ( !global_terms_enabled() ) { ?>
 				<label>
 					<span class="title"><?php _e( 'Slug' ); ?></span>
 					<span class="input-text-wrap"><input type="text" name="slug" class="ptitle" value="" /></span>
 				</label>
-	<?php } ?>
 			</div></fieldset>
 	<?php
 
Index: wp-admin/includes/upgrade.php
===================================================================
--- wp-admin/includes/upgrade.php	(revision 21841)
+++ wp-admin/includes/upgrade.php	(working copy)
@@ -108,16 +108,7 @@
 	/* translators: Default category slug */
 	$cat_slug = sanitize_title(_x('Uncategorized', 'Default category slug'));
 
-	if ( global_terms_enabled() ) {
-		$cat_id = $wpdb->get_var( $wpdb->prepare( "SELECT cat_ID FROM {$wpdb->sitecategories} WHERE category_nicename = %s", $cat_slug ) );
-		if ( $cat_id == null ) {
-			$wpdb->insert( $wpdb->sitecategories, array('cat_ID' => 0, 'cat_name' => $cat_name, 'category_nicename' => $cat_slug, 'last_updated' => current_time('mysql', true)) );
-			$cat_id = $wpdb->insert_id;
-		}
-		update_option('default_category', $cat_id);
-	} else {
-		$cat_id = 1;
-	}
+	$cat_id = 1;
 
 	$wpdb->insert( $wpdb->terms, array('term_id' => $cat_id, 'name' => $cat_name, 'slug' => $cat_slug, 'term_group' => 0) );
 	$wpdb->insert( $wpdb->term_taxonomy, array('term_id' => $cat_id, 'taxonomy' => 'category', 'description' => '', 'parent' => 0, 'count' => 1));
@@ -1242,10 +1233,6 @@
 		}
 	}
 
-	// 3.0
-	if ( $wp_current_db_version < 13576 )
-		update_site_option( 'global_terms_enabled', '1' );
-
 	// 3.3
 	if ( $wp_current_db_version < 19390 )
 		update_site_option( 'initial_db_version', $wp_current_db_version );
@@ -1936,6 +1923,11 @@
 			break;
 		}
 	}
+
+	// 3.5
+	if ( $wp_current_db_version < 20149 && get_site_option( 'global_terms_enabled' ) ) {
+		// TODO: install plugin
+	}
 }
 
 /**
@@ -1972,27 +1964,3 @@
 
 }
 
-/**
- * Install global terms.
- *
- * @since 3.0.0
- *
- */
-if ( !function_exists( 'install_global_terms' ) ) :
-function install_global_terms() {
-	global $wpdb, $charset_collate;
-	$ms_queries = "
-CREATE TABLE $wpdb->sitecategories (
-  cat_ID bigint(20) NOT NULL auto_increment,
-  cat_name varchar(55) NOT NULL default '',
-  category_nicename varchar(200) NOT NULL default '',
-  last_updated timestamp NOT NULL,
-  PRIMARY KEY  (cat_ID),
-  KEY category_nicename (category_nicename),
-  KEY last_updated (last_updated)
-) $charset_collate;
-";
-// now create tables
-	dbDelta( $ms_queries );
-}
-endif;
Index: wp-admin/includes/schema.php
===================================================================
--- wp-admin/includes/schema.php	(revision 21841)
+++ wp-admin/includes/schema.php	(working copy)
@@ -911,7 +911,6 @@
 		'add_new_users' => '0',
 		'upload_space_check_disabled' => is_multisite() ? get_site_option( 'upload_space_check_disabled' ) : '1',
 		'subdomain_install' => intval( $subdomain_install ),
-		'global_terms_enabled' => global_terms_enabled() ? '1' : '0',
 		'ms_files_rewriting' => is_multisite() ? get_site_option( 'ms_files_rewriting' ) : '0',
 		'initial_db_version' => get_option( 'initial_db_version' ),
 		'active_sitewide_plugins' => array(),
Index: wp-admin/includes/ms.php
===================================================================
--- wp-admin/includes/ms.php	(revision 21841)
+++ wp-admin/includes/ms.php	(working copy)
@@ -497,18 +497,6 @@
 	return strtr( $code, $lang_codes );
 }
 
-function sync_category_tag_slugs( $term, $taxonomy ) {
-	if ( global_terms_enabled() && ( $taxonomy == 'category' || $taxonomy == 'post_tag' ) ) {
-		if ( is_object( $term ) ) {
-			$term->slug = sanitize_title( $term->name );
-		} else {
-			$term['slug'] = sanitize_title( $term['name'] );
-		}
-	}
-	return $term;
-}
-add_filter( 'get_term', 'sync_category_tag_slugs', 10, 2 );
-
 function _access_denied_splash() {
 	if ( ! is_user_logged_in() || is_network_admin() )
 		return;
Index: wp-admin/edit-tags.php
===================================================================
--- wp-admin/edit-tags.php	(revision 21841)
+++ wp-admin/edit-tags.php	(working copy)
@@ -214,8 +214,7 @@
 		$help .= '<ul>' .
 		'<li>' . __( '<strong>Name</strong> - The name is how it appears on your site.' ) . '</li>';
 
-		if ( ! global_terms_enabled() )
-			$help .= '<li>' . __( '<strong>Slug</strong> - The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.' ) . '</li>';
+		$help .= '<li>' . __( '<strong>Slug</strong> - The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.' ) . '</li>';
 
 		if ( 'category' == $taxonomy )
 			$help .= '<li>' . __( '<strong>Parent</strong> - Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional. To create a subcategory, just choose another category from the Parent dropdown.' ) . '</li>';
@@ -361,13 +360,11 @@
 	<input name="tag-name" id="tag-name" type="text" value="" size="40" aria-required="true" />
 	<p><?php _e('The name is how it appears on your site.'); ?></p>
 </div>
-<?php if ( ! global_terms_enabled() ) : ?>
 <div class="form-field">
 	<label for="tag-slug"><?php _ex('Slug', 'Taxonomy Slug'); ?></label>
 	<input name="slug" id="tag-slug" type="text" value="" size="40" />
 	<p><?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p>
 </div>
-<?php endif; // global_terms_enabled() ?>
 <?php if ( is_taxonomy_hierarchical($taxonomy) ) : ?>
 <div class="form-field">
 	<label for="parent"><?php _ex('Parent', 'Taxonomy Parent'); ?></label>
Index: wp-admin/edit-tag-form.php
===================================================================
--- wp-admin/edit-tag-form.php	(revision 21841)
+++ wp-admin/edit-tag-form.php	(working copy)
@@ -41,13 +41,11 @@
 			<td><input name="name" id="name" type="text" value="<?php if ( isset( $tag->name ) ) echo esc_attr($tag->name); ?>" size="40" aria-required="true" />
 			<p class="description"><?php _e('The name is how it appears on your site.'); ?></p></td>
 		</tr>
-<?php if ( !global_terms_enabled() ) { ?>
 		<tr class="form-field">
 			<th scope="row" valign="top"><label for="slug"><?php _ex('Slug', 'Taxonomy Slug'); ?></label></th>
 			<td><input name="slug" id="slug" type="text" value="<?php if ( isset( $tag->slug ) ) echo esc_attr(apply_filters('editable_slug', $tag->slug)); ?>" size="40" />
 			<p class="description"><?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p></td>
 		</tr>
-<?php } ?>
 <?php if ( is_taxonomy_hierarchical($taxonomy) ) : ?>
 		<tr class="form-field">
 			<th scope="row" valign="top"><label for="parent"><?php _ex('Parent', 'Taxonomy Parent'); ?></label></th>
Index: wp-admin/network/settings.php
===================================================================
--- wp-admin/network/settings.php	(revision 21841)
+++ wp-admin/network/settings.php	(working copy)
@@ -85,7 +85,7 @@
 		update_site_option( 'banned_email_domains', '' );
 	}
 
-	$options = array( 'registrationnotification', 'registration', 'add_new_users', 'menu_items', 'upload_space_check_disabled', 'blog_upload_space', 'upload_filetypes', 'site_name', 'first_post', 'first_page', 'first_comment', 'first_comment_url', 'first_comment_author', 'welcome_email', 'welcome_user_email', 'fileupload_maxk', 'global_terms_enabled' );
+	$options = array( 'registrationnotification', 'registration', 'add_new_users', 'menu_items', 'upload_space_check_disabled', 'blog_upload_space', 'upload_filetypes', 'site_name', 'first_post', 'first_page', 'first_comment', 'first_comment_url', 'first_comment_author', 'welcome_email', 'welcome_user_email', 'fileupload_maxk' );
 	$checked_options = array( 'menu_items' => array(), 'registrationnotification' => 'no', 'upload_space_check_disabled' => 1, 'add_new_users' => 0 );
 	foreach ( $checked_options as $option_name => $option_unchecked_value ) {
 		if ( ! isset( $_POST[$option_name] ) )
Index: wp-admin/maint/repair.php
===================================================================
--- wp-admin/maint/repair.php	(revision 21841)
+++ wp-admin/maint/repair.php	(working copy)
@@ -32,10 +32,6 @@
 
 	$tables = $wpdb->tables();
 
-	// Sitecategories may not exist if global terms are disabled.
-	if ( is_multisite() && ! $wpdb->get_var( "SHOW TABLES LIKE '$wpdb->sitecategories'" ) )
-		unset( $tables['sitecategories'] );
-
 	$tables = array_merge( $tables, (array) apply_filters( 'tables_to_repair', array() ) ); // Return tables with table prefixes.
 
 	// Loop over the tables, checking and repairing as needed.
