Index: install.php
===================================================================
RCS file: /cvs/drupal/drupal/install.php,v
retrieving revision 1.149
diff -u -p -r1.149 install.php
--- install.php	19 Jan 2009 10:46:50 -0000	1.149
+++ install.php	19 Jan 2009 18:06:18 -0000
@@ -554,9 +554,11 @@ function install_select_locale($profilen
       }
     }
 
-    foreach ($locales as $locale) {
-      if ($_POST['locale'] == $locale->name) {
-        return $locale->name;
+    if (!empty($_POST['locale'])) {
+      foreach ($locales as $locale) {
+        if ($_POST['locale'] == $locale->name) {
+          return $locale->name;
+        }
       }
     }
 
Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.265
diff -u -p -r1.265 bootstrap.inc
--- includes/bootstrap.inc	19 Jan 2009 10:46:50 -0000	1.265
+++ includes/bootstrap.inc	19 Jan 2009 18:06:56 -0000
@@ -194,6 +194,16 @@ define('LANGUAGE_NEGOTIATION_PATH', 2);
 define('LANGUAGE_NEGOTIATION_DOMAIN', 3);
 
 /**
+ * Language written left to right. Possible value of $language->direction.
+ */
+define('LANGUAGE_LTR', 0);
+
+/**
+ * Language written right to left. Possible value of $language->direction.
+ */
+define('LANGUAGE_RTL', 1);
+
+/**
  * For convenience, define a short form of the request time global.
  */
 define('REQUEST_TIME', $_SERVER['REQUEST_TIME']);
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.849
diff -u -p -r1.849 common.inc
--- includes/common.inc	19 Jan 2009 10:46:50 -0000	1.849
+++ includes/common.inc	19 Jan 2009 18:07:27 -0000
@@ -2056,7 +2056,7 @@ function drupal_add_css($path = NULL, $o
     $css[$media][$type][$path] = $options['preprocess'];
 
     // If the current language is RTL, add the CSS file with RTL overrides.
-    if (defined('LANGUAGE_RTL') && $language->direction == LANGUAGE_RTL) {
+    if ($language->direction == LANGUAGE_RTL) {
       $rtl_path = str_replace('.css', '-rtl.css', $path);
       if (file_exists($rtl_path)) {
         $css[$media][$type][$rtl_path] = $options['preprocess'];
Index: modules/book/book.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book.module,v
retrieving revision 1.483
diff -u -p -r1.483 book.module
--- modules/book/book.module	29 Dec 2008 16:03:56 -0000	1.483
+++ modules/book/book.module	19 Jan 2009 18:08:37 -0000
@@ -998,7 +998,7 @@ function template_preprocess_book_export
   $variables['title'] = check_plain($variables['title']);
   $variables['base_url'] = $base_url;
   $variables['language'] = $language;
-  $variables['language_rtl'] = defined('LANGUAGE_RTL') && $language->direction == LANGUAGE_RTL;
+  $variables['language_rtl'] = ($language->direction == LANGUAGE_RTL);
   $variables['head'] = drupal_get_html_head();
 }
 
Index: modules/color/color.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/color/color.module,v
retrieving revision 1.51
diff -u -p -r1.51 color.module
--- modules/color/color.module	30 Dec 2008 16:43:16 -0000	1.51
+++ modules/color/color.module	19 Jan 2009 18:08:56 -0000
@@ -94,7 +94,7 @@ function _color_page_alter(&$vars) {
 
           // If the current language is RTL and the CSS file had an RTL variant,
           // pull out the non-colored and add rewritten RTL stylesheet.
-          if (defined('LANGUAGE_RTL') && $language->direction == LANGUAGE_RTL) {
+          if ($language->direction == LANGUAGE_RTL) {
             $rtl_old_path = str_replace('.css', '-rtl.css', $old_path);
             $rtl_color_path = str_replace('.css', '-rtl.css', $color_path);
             if (file_exists($rtl_color_path)) {
Index: modules/locale/locale.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.module,v
retrieving revision 1.234
diff -u -p -r1.234 locale.module
--- modules/locale/locale.module	16 Dec 2008 23:57:32 -0000	1.234
+++ modules/locale/locale.module	19 Jan 2009 18:09:09 -0000
@@ -12,17 +12,6 @@
  *   Gettext portable object files are supported.
  */
 
-/**
- * Language written left to right. Possible value of $language->direction.
- */
-define('LANGUAGE_LTR', 0);
-
-/**
- * Language written right to left. Possible value of $language->direction.
- */
-define('LANGUAGE_RTL', 1);
-
-
 // ---------------------------------------------------------------------------------
 // Hook implementations
 
Index: themes/garland/template.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/garland/template.php,v
retrieving revision 1.19
diff -u -p -r1.19 template.php
--- themes/garland/template.php	25 Jun 2008 09:12:25 -0000	1.19
+++ themes/garland/template.php	19 Jan 2009 18:09:44 -0000
@@ -92,7 +92,7 @@ function garland_get_ie_styles() {
   global $language;
 
   $ie_styles = '<link type="text/css" rel="stylesheet" media="all" href="' . base_path() . path_to_theme() . '/fix-ie.css" />'. "\n";
-  if (defined('LANGUAGE_RTL') && $language->direction == LANGUAGE_RTL) {
+  if ($language->direction == LANGUAGE_RTL) {
     $ie_styles .= '      <style type="text/css" media="all">@import "' . base_path() . path_to_theme() . '/fix-ie-rtl.css";</style>'. "\n";
   }
 
