=== modified file 'includes/bootstrap.inc'
--- includes/bootstrap.inc	2010-03-28 03:08:37 +0000
+++ includes/bootstrap.inc	2010-03-29 17:47:59 +0000
@@ -1467,7 +1467,7 @@ function check_plain($text) {
   // drupal_validate_utf8() here. This avoids the overhead of an additional
   // function call, since check_plain() may be called hundreds of times during
   // a request. For PHP 5.2.5+, this check for valid UTF-8 should be handled
-  // internally by PHP in htmlspecialchars(). 
+  // internally by PHP in htmlspecialchars().
   // See http://www.php.net/releases/5_2_5.php.
   // @todo remove this when support for either IE6 or PHP < 5.2.5 is dropped.
 
@@ -2679,7 +2679,7 @@ function &drupal_register_shutdown_funct
     $args = func_get_args();
     array_shift($args);
     // Save callback and arguments
-    $callbacks[] = array('callback' => $callback, 'arguments' => $args);
+    $callbacks[] = array('callback' => $callback, 'arguments' => $args, 'cwd' => getcwd());
   }
   return $callbacks;
 }
@@ -2692,6 +2692,7 @@ function _drupal_shutdown_function() {
 
   try {
     while (list($key, $callback) = each($callbacks)) {
+      chdir($callback['cwd']);
       call_user_func_array($callback['callback'], $callback['arguments']);
     }
   }

=== modified file 'sites/all/modules/contrib/mongodb/mongodb_watchdog/mongodb_watchdog.admin.inc'
--- sites/all/modules/contrib/mongodb/mongodb_watchdog/mongodb_watchdog.admin.inc	2010-03-24 01:09:45 +0000
+++ sites/all/modules/contrib/mongodb/mongodb_watchdog/mongodb_watchdog.admin.inc	2010-03-29 18:29:43 +0000
@@ -57,12 +57,16 @@ function mongodb_watchdog_overview() {
 
   $rows = array();
   foreach ($cursor as $id => $value) {
+    $account = (object) $value['user'];
+    if (!isset($account->pass) && ($loaded = user_load($account->uid))) {
+      $account = $loaded;
+    }
     $rows[$id] = array(
       $icons[$value['severity']],
       t($value['type']),
       format_date($value['timestamp'], 'short'),
       truncate_utf8(_mongodb_watchdog_format_message((object) $value), 56, TRUE, TRUE),
-      theme('username', array('account' => (object) $value['user'])),
+      theme('username', array('account' => $account)),
       $value['link'],
     );
   }

=== modified file 'sites/all/modules/contrib/mongodb/mongodb_watchdog/mongodb_watchdog.module'
--- sites/all/modules/contrib/mongodb/mongodb_watchdog/mongodb_watchdog.module	2010-03-26 21:06:45 +0000
+++ sites/all/modules/contrib/mongodb/mongodb_watchdog/mongodb_watchdog.module	2010-03-29 18:28:59 +0000
@@ -56,6 +56,9 @@ function mongodb_watchdog_form_system_lo
  * Implement hook_watchdog().
  */
 function mongodb_watchdog_watchdog(array $log_entry) {
+  // Save space by only saving the user-id.
+  $log_entry['user'] = array('uid' => $log_entry['user']->uid, 'name' => $log_entry['user']->name);
+  // Write entry to Mongo.
   $collection = mongodb_collection(variable_get('mongodb_collectionname', 'watchdog'));
   $collection->save((array) $log_entry);
 }

=== added file 'sites/all/patches/756498-shutdown_cwd.patch'
--- sites/all/patches/756498-shutdown_cwd.patch	1970-01-01 00:00:00 +0000
+++ sites/all/patches/756498-shutdown_cwd.patch	2010-03-29 18:23:28 +0000
@@ -0,0 +1,21 @@
+=== modified file 'includes/bootstrap.inc'
+--- includes/bootstrap.inc	2010-03-28 03:08:37 +0000
++++ includes/bootstrap.inc	2010-03-29 17:47:59 +0000
+@@ -2679,7 +2679,7 @@ function &drupal_register_shutdown_funct
+     $args = func_get_args();
+     array_shift($args);
+     // Save callback and arguments
+-    $callbacks[] = array('callback' => $callback, 'arguments' => $args);
++    $callbacks[] = array('callback' => $callback, 'arguments' => $args, 'cwd' => getcwd());
+   }
+   return $callbacks;
+ }
+@@ -2692,6 +2692,7 @@ function _drupal_shutdown_function() {
+
+   try {
+     while (list($key, $callback) = each($callbacks)) {
++      chdir($callback['cwd']);
+       call_user_func_array($callback['callback'], $callback['arguments']);
+     }
+   }
+

