Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.1187
diff -u -p -r1.1187 common.inc
--- includes/common.inc	28 Jun 2010 19:57:34 -0000	1.1187
+++ includes/common.inc	29 Jun 2010 22:16:48 -0000
@@ -1510,8 +1510,8 @@ function filter_xss_bad_protocol($string
  * Arbitrary elements may be added using the $args associative array.
  */
 function format_rss_channel($title, $link, $description, $items, $langcode = NULL, $args = array()) {
-  global $language;
-  $langcode = $langcode ? $langcode : $language->language;
+  global $language_content;
+  $langcode = $langcode ? $langcode : $language_content->language;
 
   $output = "<channel>\n";
   $output .= ' <title>' . check_plain($title) . "</title>\n";
@@ -1956,8 +1956,8 @@ function format_username($account) {
  *   - 'external': Whether the given path is an external URL.
  *   - 'language': An optional language object. If the path being linked to is
  *     internal to the site, $options['language'] is used to look up the alias
- *     for the URL. If $options['language'] is omitted, the global $language
- *     will be used.
+ *     for the URL. If $options['language'] is omitted, the global
+ *     $language_content will be used.
  *   - 'https': Whether this URL should point to a secure location. If not
  *     defined, the current scheme is used, so the user stays on http or https
  *     respectively. TRUE enforces HTTPS and FALSE enforces HTTP, but HTTPS can
@@ -5321,9 +5321,12 @@ function drupal_render_cid_parts($granul
   global $theme, $base_root, $user;
 
   $cid_parts[] = $theme;
-  if (module_exists('locale')) {
-    global $language;
-    $cid_parts[] = $language->language;
+  // If Locale is enabled but we have only one language we do not need it as cid
+  // part.
+  if (drupal_multilingual()) {
+    foreach (language_types_configurable() as $language_type) {
+      $cid_parts[] = $GLOBALS[$language_type]->language;
+    }
   }
 
   if (!empty($granularity)) {
Index: modules/color/color.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/color/color.module,v
retrieving revision 1.86
diff -u -p -r1.86 color.module
--- modules/color/color.module	1 May 2010 08:12:23 -0000	1.86
+++ modules/color/color.module	29 Jun 2010 21:52:34 -0000
@@ -73,7 +73,7 @@ function _color_theme_select_form_alter(
  * Callback for the theme to alter the resources used.
  */
 function _color_html_alter(&$vars) {
-  global $language, $theme_key;
+  global $theme_key;
   $themes = list_themes();
 
   // Override stylesheets.
@@ -102,7 +102,7 @@ function _color_html_alter(&$vars) {
  * Callback for the theme to alter the resources used.
  */
 function _color_page_alter(&$vars) {
-  global $language, $theme_key;
+  global $theme_key;
 
   // Override logo.
   $logo = variable_get('color_' . $theme_key . '_logo');
Index: modules/locale/locale.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.api.php,v
retrieving revision 1.11
diff -u -p -r1.11 locale.api.php
--- modules/locale/locale.api.php	12 May 2010 08:26:14 -0000	1.11
+++ modules/locale/locale.api.php	29 Jun 2010 21:51:01 -0000
@@ -68,8 +68,8 @@ function hook_language_init() {
 function hook_language_switch_links_alter(array &$links, $type, $path) {
   global $language;
 
-  if ($type == LANGUAGE_TYPE_CONTENT && isset($links[$language])) {
-    foreach ($links[$language] as $link) {
+  if ($type == LANGUAGE_TYPE_CONTENT && isset($links[$language->language])) {
+    foreach ($links[$language->language] as $link) {
       $link['attributes']['class'][] = 'active-language';
     }
   }
Index: modules/locale/locale.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.module,v
retrieving revision 1.293
diff -u -p -r1.293 locale.module
--- modules/locale/locale.module	12 May 2010 08:26:14 -0000	1.293
+++ modules/locale/locale.module	29 Jun 2010 21:53:46 -0000
@@ -1000,7 +1000,7 @@ function locale_form_comment_form_alter(
   // If a content type has multilingual support we set the content language as
   // comment language.
   if (empty($form['language']['#value']) && locale_multilingual_node_type($form['#node']->type)) {
-    global $language;
-    $form['language']['#value'] = $language->language;
+    global $language_content;
+    $form['language']['#value'] = $language_content->language;
   }
 }
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.1279
diff -u -p -r1.1279 node.module
--- modules/node/node.module	25 Jun 2010 19:33:47 -0000	1.1279
+++ modules/node/node.module	29 Jun 2010 22:18:18 -0000
@@ -2354,7 +2354,7 @@ function node_block_list_alter(&$blocks)
  *   The link should be an absolute URL.
  */
 function node_feed($nids = FALSE, $channel = array()) {
-  global $base_url, $language;
+  global $base_url, $language_content;
 
   if ($nids === FALSE) {
     $nids = db_select('node', 'n')
@@ -2409,7 +2409,7 @@ function node_feed($nids = FALSE, $chann
     'title'       => variable_get('site_name', 'Drupal'),
     'link'        => $base_url,
     'description' => variable_get('feed_description', ''),
-    'language'    => $language->language
+    'language'    => $language_content->language
   );
   $channel_extras = array_diff_key($channel, $channel_defaults);
   $channel = array_merge($channel_defaults, $channel);
