diff -urp drupal-7.x-head/includes/common.inc drupal-7.x-dev/includes/common.inc
--- drupal-7.x-head/includes/common.inc	2010-08-22 14:46:21.000000000 +0200
+++ drupal-7.x-dev/includes/common.inc	2010-08-23 18:20:02.000000000 +0200
@@ -4605,7 +4605,7 @@ function _drupal_bootstrap_full() {
     //   ahead of when rendering starts.
     menu_set_custom_theme();
     drupal_theme_initialize();
-    module_invoke_all('init');
+    drupal_add_styles_scripts();
   }
 }
 
diff -urp drupal-7.x-head/includes/module.inc drupal-7.x-dev/includes/module.inc
--- drupal-7.x-head/includes/module.inc	2010-07-28 03:46:59.000000000 +0200
+++ drupal-7.x-dev/includes/module.inc	2010-08-23 18:26:29.000000000 +0200
@@ -766,6 +766,36 @@ function module_invoke_all() {
  */
 
 /**
+ * Include stylesheets and scripts as defined in enabled modules .info files.
+ */
+function drupal_add_styles_scripts() {
+  $module_list = module_list();
+  $module_data = system_get_info('module');
+
+  foreach ($module_list as $module) {
+    
+    // Add styleshets added by modules.
+    if (!empty($module_data[$module]['stylesheets'])) {
+      foreach ($module_data[$module]['stylesheets'] as $media=>$stylesheets) {
+        foreach ($stylesheets as $stylesheet) {
+          drupal_add_css($stylesheet, array('media' => $media, 'preprocess' => TRUE));
+        }
+      }
+    }
+    
+    // Add scripts added by modules.
+    if (!empty($module_data[$module]['scripts'])) {
+      foreach ($module_data[$module]['scripts'] as $name => $script) {
+        drupal_add_js($script, array('weight' => JS_DEFAULT, 'preprocess' => TRUE));
+      }
+    }
+  }  
+  
+  module_invoke_all('init');
+}
+
+
+/**
  * Array of modules required by core.
  */
 function drupal_required_modules() {

diff -urp drupal-7.x-head/modules/aggregator/aggregator.info drupal-7.x-dev/modules/aggregator/aggregator.info
--- drupal-7.x-head/modules/aggregator/aggregator.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/aggregator/aggregator.info	2009-11-17 22:24:18.000000000 +0100
@@ -13,10 +13,3 @@ files[] = aggregator.processor.inc
 files[] = aggregator.install
 files[] = aggregator.test
 configure = admin/config/services/aggregator/settings
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/aggregator/tests/aggregator_test.info drupal-7.x-dev/modules/aggregator/tests/aggregator_test.info
--- drupal-7.x-head/modules/aggregator/tests/aggregator_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/aggregator/tests/aggregator_test.info	2009-04-02 22:50:37.000000000 +0200
@@ -6,10 +6,3 @@ version = VERSION
 core = 7.x
 files[] = aggregator_test.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-

diff -urp drupal-7.x-head/modules/block/block.info drupal-7.x-dev/modules/block/block.info
--- drupal-7.x-head/modules/block/block.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/block/block.info	2009-11-17 22:24:18.000000000 +0100
@@ -9,10 +9,3 @@ files[] = block.admin.inc
 files[] = block.install
 files[] = block.test
 configure = admin/structure/block
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/block/tests/block_test.info drupal-7.x-dev/modules/block/tests/block_test.info
--- drupal-7.x-head/modules/block/tests/block_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/block/tests/block_test.info	2010-02-28 18:28:38.000000000 +0100
@@ -6,10 +6,3 @@ version = VERSION
 core = 7.x
 files[] = block_test.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/blog/blog.info drupal-7.x-dev/modules/blog/blog.info
--- drupal-7.x-head/modules/blog/blog.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/blog/blog.info	2009-06-08 11:23:51.000000000 +0200
@@ -8,10 +8,3 @@ core = 7.x
 files[] = blog.module
 files[] = blog.pages.inc
 files[] = blog.test
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/book/book.info drupal-7.x-dev/modules/book/book.info
--- drupal-7.x-head/modules/book/book.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/book/book.info	2009-11-17 22:24:18.000000000 +0100
@@ -10,10 +10,3 @@ files[] = book.pages.inc
 files[] = book.install
 files[] = book.test
 configure = admin/content/book/settings
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/color/color.info drupal-7.x-dev/modules/color/color.info
--- drupal-7.x-head/modules/color/color.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/color/color.info	2009-09-01 22:39:55.000000000 +0200
@@ -8,10 +8,3 @@ core = 7.x
 files[] = color.module
 files[] = color.install
 files[] = color.test
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/comment/comment.info drupal-7.x-dev/modules/comment/comment.info
--- drupal-7.x-head/modules/comment/comment.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/comment/comment.info	2010-08-16 22:57:22.000000000 +0200
@@ -12,10 +12,3 @@ files[] = comment.install
 files[] = comment.test
 files[] = comment.tokens.inc
 configure = admin/content/comment
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/comment/comment.module drupal-7.x-dev/modules/comment/comment.module
--- drupal-7.x-head/modules/comment/comment.module	2010-08-22 12:01:06.000000000 +0200
+++ drupal-7.x-dev/modules/comment/comment.module	2010-08-23 16:53:50.000000000 +0200
@@ -1,5 +1,5 @@
 <?php
-// $Id: comment.module,v 1.891 2010/08/22 10:01:06 webchick Exp $
+// $Id: comment.module,v 1.892 2010/08/23 14:53:50 webchick Exp $
 
 /**
  * @file
@@ -2615,3 +2615,12 @@ function comment_rdf_mapping() {
     ),
   );
 }
+
+/**
+ * Implements hook_file_download_access().
+ */
+function comment_file_download_access($field, $entity_type, $entity) {
+  if ($entity_type == 'comment') {
+    return user_access('access comments') && $entity->status == COMMENT_PUBLISHED || user_access('administer comments');
+  }
+}
diff -urp drupal-7.x-head/modules/contact/contact.info drupal-7.x-dev/modules/contact/contact.info
--- drupal-7.x-head/modules/contact/contact.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/contact/contact.info	2009-11-17 22:24:18.000000000 +0100
@@ -10,10 +10,3 @@ files[] = contact.pages.inc
 files[] = contact.install
 files[] = contact.test
 configure = admin/structure/contact
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/contextual/contextual.info drupal-7.x-dev/modules/contextual/contextual.info
--- drupal-7.x-head/modules/contextual/contextual.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/contextual/contextual.info	2009-12-06 02:00:27.000000000 +0100
@@ -5,10 +5,3 @@ package = Core
 version = VERSION
 core = 7.x
 files[] = contextual.module
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/dashboard/dashboard.info drupal-7.x-dev/modules/dashboard/dashboard.info
--- drupal-7.x-head/modules/dashboard/dashboard.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/dashboard/dashboard.info	2010-06-05 01:04:32.000000000 +0200
@@ -8,10 +8,3 @@ files[] = dashboard.module
 files[] = dashboard.test
 dependencies[] = block
 configure = admin/dashboard/customize
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/dblog/dblog.info drupal-7.x-dev/modules/dblog/dblog.info
--- drupal-7.x-head/modules/dblog/dblog.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/dblog/dblog.info	2009-06-08 11:23:51.000000000 +0200
@@ -8,10 +8,3 @@ files[] = dblog.module
 files[] = dblog.admin.inc
 files[] = dblog.install
 files[] = dblog.test
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-

diff -urp drupal-7.x-head/modules/field/field.info drupal-7.x-dev/modules/field/field.info
--- drupal-7.x-head/modules/field/field.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/field/field.info	2010-06-21 04:27:47.000000000 +0200
@@ -15,10 +15,3 @@ files[] = field.form.inc
 files[] = tests/field.test
 dependencies[] = field_sql_storage
 required = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/field/modules/field_sql_storage/field_sql_storage.info drupal-7.x-dev/modules/field/modules/field_sql_storage/field_sql_storage.info
--- drupal-7.x-head/modules/field/modules/field_sql_storage/field_sql_storage.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/field/modules/field_sql_storage/field_sql_storage.info	2010-08-16 22:57:22.000000000 +0200
@@ -9,10 +9,3 @@ files[] = field_sql_storage.module
 files[] = field_sql_storage.install
 files[] = field_sql_storage.test
 required = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/field/modules/list/list.info drupal-7.x-dev/modules/field/modules/list/list.info
--- drupal-7.x-head/modules/field/modules/list/list.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/field/modules/list/list.info	2010-08-16 22:57:22.000000000 +0200
@@ -8,10 +8,3 @@ dependencies[] = field
 files[] = list.module
 files[] = tests/list.test
 required = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/field/modules/list/tests/list_test.info drupal-7.x-dev/modules/field/modules/list/tests/list_test.info
--- drupal-7.x-head/modules/field/modules/list/tests/list_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/field/modules/list/tests/list_test.info	2009-12-14 21:18:55.000000000 +0100
@@ -6,10 +6,3 @@ package = Testing
 files[] = list_test.module
 version = VERSION
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/field/modules/number/number.info drupal-7.x-dev/modules/field/modules/number/number.info
--- drupal-7.x-head/modules/field/modules/number/number.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/field/modules/number/number.info	2010-08-16 22:57:22.000000000 +0200
@@ -7,10 +7,3 @@ core = 7.x
 dependencies[] = field
 files[] = number.module
 required = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/field/modules/options/options.info drupal-7.x-dev/modules/field/modules/options/options.info
--- drupal-7.x-head/modules/field/modules/options/options.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/field/modules/options/options.info	2010-08-16 22:57:22.000000000 +0200
@@ -8,10 +8,3 @@ dependencies[] = field
 files[] = options.module
 files[] = options.test
 required = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/field/modules/text/text.info drupal-7.x-dev/modules/field/modules/text/text.info
--- drupal-7.x-head/modules/field/modules/text/text.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/field/modules/text/text.info	2010-08-16 22:57:22.000000000 +0200
@@ -8,10 +8,3 @@ dependencies[] = field
 files[] = text.module
 files[] = text.test
 required = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/field/tests/field_test.info drupal-7.x-dev/modules/field/tests/field_test.info
--- drupal-7.x-head/modules/field/tests/field_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/field/tests/field_test.info	2009-11-21 00:29:28.000000000 +0100
@@ -10,10 +10,3 @@ files[] = field_test.storage.inc
 files[] = field_test.install
 version = VERSION
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-

diff -urp drupal-7.x-head/modules/field_ui/field_ui.info drupal-7.x-dev/modules/field_ui/field_ui.info
--- drupal-7.x-head/modules/field_ui/field_ui.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/field_ui/field_ui.info	2010-08-16 22:57:23.000000000 +0200
@@ -8,10 +8,3 @@ dependencies[] = field
 files[] = field_ui.module
 files[] = field_ui.admin.inc
 files[] = field_ui.test
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-

diff -urp drupal-7.x-head/modules/file/file.info drupal-7.x-dev/modules/file/file.info
--- drupal-7.x-head/modules/file/file.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/file/file.info	2010-08-16 22:57:23.000000000 +0200
@@ -9,10 +9,3 @@ files[] = file.module
 files[] = file.field.inc
 files[] = file.install
 files[] = tests/file.test
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/file/file.module drupal-7.x-dev/modules/file/file.module
--- drupal-7.x-head/modules/file/file.module	2010-08-22 15:52:58.000000000 +0200
+++ drupal-7.x-dev/modules/file/file.module	2010-08-23 16:53:50.000000000 +0200
@@ -1,5 +1,5 @@
 <?php
-// $Id: file.module,v 1.35 2010/08/22 13:52:58 dries Exp $
+// $Id: file.module,v 1.36 2010/08/23 14:53:50 webchick Exp $
 
 /**
  * @file
@@ -141,46 +141,69 @@ function file_file_download($uri, $field
   // Find out which (if any) file fields contain this file.
   $references = file_get_file_references($file, NULL, FIELD_LOAD_REVISION, $field_type);
 
-  // TODO: Check field-level access if available here.
-
-  $denied = $file->status ? NULL : FALSE;
-  // Check access to content containing the file fields. If access is allowed
-  // to any of this content, allow the download.
+  // Default to allow access.
+  $denied = FALSE;
+  // Loop through all references of this file. If a reference explicitly allows
+  // access to the field to which this file belongs, no further checks are done
+  // and download access is granted. If a reference denies access, eventually
+  // existing additional references are checked. If all references were checked
+  // and no reference denied access, access is granted as well. If at least one
+  // reference denied access, access is denied.
   foreach ($references as $field_name => $field_references) {
     foreach ($field_references as $entity_type => $type_references) {
-      foreach ($type_references as $reference) {
-        // If access is allowed to any object, immediately stop and grant
-        // access. If access is denied, continue through in case another object
-        // grants access.
-        // TODO: Switch this to a universal access check mechanism if available.
-        if ($entity_type == 'node' && ($node = node_load($reference->nid))) {
-          if (node_access('view', $node)) {
-            $denied = FALSE;
-            break 3;
-          }
-          else {
-            $denied = TRUE;
+      foreach ($type_references as $id => $reference) {
+        // Try to load $entity and $field.
+        $entity = reset(entity_load($entity_type, array($id)));
+        $field = NULL;
+        if ($entity) {
+          // Load all fields for that entity.
+          $field_items = field_get_items($entity_type, $entity, $field_name);
+
+          // Find the field item with the matching URI.
+          foreach ($field_items as $field_item) {
+            if ($field_item['uri'] == $uri) {
+              $field = $field_item;
+              break;
+            }
           }
         }
-        if ($entity_type == 'user') {
-          if (user_access('access user profiles') || $user->uid == $reference->uid) {
-            $denied = FALSE;
-            break 3;
-          }
-          else {
-            $denied = TRUE;
-          }
+
+        // Check that $entity and $field were loaded successfully and check if
+        // access to that field is not disallowed. If any of these checks fail,
+        // stop checking access for this reference.
+        if (empty($entity) || empty($field) || !field_access('view', $field, $entity_type, $entity)) {
+          $denied = TRUE;
+          break;
+        }
+
+        // Invoke hook and collect grants/denies for download access.
+        // Default to FALSE and let entities overrule this ruling.
+        $grants = array('system' => FALSE);
+        foreach (module_implements('file_download_access') as $module) {
+          $grants = array_merge($grants, array($module => module_invoke($module, 'file_download_access', $field, $entity_type, $entity)));
+        }
+        // Allow other modules to alter the returned grants/denies.
+        drupal_alter('file_download_access', $grants, $field, $entity_type, $entity);
+
+        if (in_array(TRUE, $grants)) {
+          // If TRUE is returned, access is granted and no further checks are
+          // necessary.
+          $denied = FALSE;
+          break 3;
+        }
+
+        if (in_array(FALSE, $grants)) {
+          // If an implementation returns FALSE, access to this entity is denied
+          // but the file could belong to another entity to which the user might
+          // have access. Continue with these.
+          $denied = TRUE;
         }
       }
     }
   }
 
-  // No access was denied or granted.
-  if (!isset($denied)) {
-    return;
-  }
-  // Access specifically denied and not granted elsewhere.
-  elseif ($denied == TRUE) {
+  // Access specifically denied.
+  if ($denied) {
     return -1;
   }
 
diff -urp drupal-7.x-head/modules/file/tests/file.test drupal-7.x-dev/modules/file/tests/file.test
--- drupal-7.x-head/modules/file/tests/file.test	2010-08-22 15:52:58.000000000 +0200
+++ drupal-7.x-dev/modules/file/tests/file.test	2010-08-23 16:53:50.000000000 +0200
@@ -1,5 +1,5 @@
 <?php
-// $Id: file.test,v 1.22 2010/08/22 13:52:58 dries Exp $
+// $Id: file.test,v 1.23 2010/08/23 14:53:50 webchick Exp $
 
 /**
  * @file
@@ -14,7 +14,7 @@ class FileFieldTestCase extends DrupalWe
 
   function setUp() {
     parent::setUp('file');
-    $this->admin_user = $this->drupalCreateUser(array('access content', 'access administration pages', 'administer site configuration', 'administer users', 'administer content types', 'administer nodes', 'bypass node access'));
+    $this->admin_user = $this->drupalCreateUser(array('access content', 'access administration pages', 'administer site configuration', 'administer users', 'administer permissions', 'administer content types', 'administer nodes', 'bypass node access'));
     $this->drupalLogin($this->admin_user);
   }
 
@@ -301,6 +301,68 @@ class FileFieldWidgetTestCase extends Fi
     $this->drupalGet("admin/structure/types/manage/$type_name/fields/$field_name");
     $this->assertFieldByXpath('//input[@id="edit-field-settings-uri-scheme-public" and not(@disabled)]', 'public', t('Upload destination setting enabled.'));
   }
+
+  /**
+   * Tests that download restrictions on private files work on comments.
+   */
+  function testPrivateFileComment() {
+    $user = $this->drupalCreateUser(array('access comments'));
+
+    // Remove access comments permission from anon user.
+    $edit = array(
+      '1[access comments]' => FALSE,
+    );
+    $this->drupalPost('admin/people/permissions', $edit, t('Save permissions'));
+
+    // Create a new field.
+    $edit = array(
+      '_add_new_field[label]' => $label = $this->randomName(),
+      '_add_new_field[field_name]' => $name = strtolower($this->randomName()),
+      '_add_new_field[type]' => 'file',
+      '_add_new_field[widget_type]' => 'file_generic',
+    );
+    $this->drupalPost('admin/structure/types/manage/article/comment/fields', $edit, t('Save'));
+    $edit = array('field[settings][uri_scheme]' => 'private');
+    $this->drupalPost(NULL, $edit, t('Save field settings'));
+    $this->drupalPost(NULL, array(), t('Save settings'));
+
+    // Create node.
+    $text_file = $this->getTestFile('text');
+    $edit = array(
+      'title' => $this->randomName(),
+    );
+    $this->drupalPost('node/add/article', $edit, t('Save'));
+
+    // Add a comment with a file.
+    $text_file = $this->getTestFile('text');
+    $edit = array(
+      'files[field_' . $name . '_' . LANGUAGE_NONE . '_' . 0 . ']' => realpath($text_file->uri),
+      'comment_body[' . LANGUAGE_NONE . '][0][value]' => $comment_body = $this->randomName(),
+    );
+    $this->drupalPost(NULL, $edit, t('Save'));
+
+    // Get the comment ID.
+    preg_match('/comment-([0-9]+)/', $this->getUrl(), $matches);
+    $cid = $matches[1];
+
+    // Log in as normal user.
+    $this->drupalLogin($user);
+   
+    $comment = comment_load($cid);
+    $comment_file = (object) $comment->{'field_' . $name}[LANGUAGE_NONE][0];
+    $this->assertFileExists($comment_file, t('New file saved to disk on node creation.'));
+    // Test authenticated file download.
+    $url = file_create_url($comment_file->uri);
+    $this->assertNotEqual($url, NULL, t('Confirmed that the URL is valid'));
+    $this->drupalGet(file_create_url($comment_file->uri));
+    $this->assertResponse(200, t('Confirmed that the generated URL is correct by downloading the shipped file.'));
+ 
+    // Test anonymous file download.
+    $this->drupalLogout();
+    $this->drupalGet(file_create_url($comment_file->uri));
+    $this->assertResponse(403, t('Confirmed that access is denied for the file without the needed permission.'));
+  }
+
 }
 
 /**
diff -urp drupal-7.x-head/modules/file/tests/file_module_test.info drupal-7.x-dev/modules/file/tests/file_module_test.info
--- drupal-7.x-head/modules/file/tests/file_module_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/file/tests/file_module_test.info	2009-08-29 14:52:32.000000000 +0200
@@ -6,10 +6,3 @@ version = VERSION
 core = 7.x
 files[] = file_module_test.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/filter/filter.info drupal-7.x-dev/modules/filter/filter.info
--- drupal-7.x-head/modules/filter/filter.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/filter/filter.info	2009-11-17 22:24:18.000000000 +0100
@@ -11,10 +11,3 @@ files[] = filter.install
 files[] = filter.test
 required = TRUE
 configure = admin/config/content/formats
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/forum/forum.info drupal-7.x-dev/modules/forum/forum.info
--- drupal-7.x-head/modules/forum/forum.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/forum/forum.info	2009-11-17 22:24:18.000000000 +0100
@@ -12,10 +12,3 @@ files[] = forum.pages.inc
 files[] = forum.install
 files[] = forum.test
 configure = admin/structure/forum
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/help/help.info drupal-7.x-dev/modules/help/help.info
--- drupal-7.x-head/modules/help/help.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/help/help.info	2009-06-08 11:23:52.000000000 +0200
@@ -7,10 +7,3 @@ core = 7.x
 files[] = help.module
 files[] = help.admin.inc
 files[] = help.test
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/image/image.info drupal-7.x-dev/modules/image/image.info
--- drupal-7.x-head/modules/image/image.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/image/image.info	2009-11-17 22:24:18.000000000 +0100
@@ -12,10 +12,3 @@ files[] = image.field.inc
 files[] = image.install
 files[] = image.test
 configure = admin/config/media/image-styles
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-

diff -urp drupal-7.x-head/modules/locale/locale.info drupal-7.x-dev/modules/locale/locale.info
--- drupal-7.x-head/modules/locale/locale.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/locale/locale.info	2010-03-25 12:46:21.000000000 +0100
@@ -9,10 +9,3 @@ files[] = locale.install
 files[] = locale.admin.inc
 files[] = locale.test
 configure = admin/config/regional/language
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/locale/tests/locale_test.info drupal-7.x-dev/modules/locale/tests/locale_test.info
--- drupal-7.x-head/modules/locale/tests/locale_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/locale/tests/locale_test.info	2009-04-26 17:14:55.000000000 +0200
@@ -6,10 +6,3 @@ package = Testing
 files[] = locale_test.module
 version = VERSION
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/menu/menu.info drupal-7.x-dev/modules/menu/menu.info
--- drupal-7.x-head/modules/menu/menu.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/menu/menu.info	2009-11-17 22:24:18.000000000 +0100
@@ -9,10 +9,3 @@ files[] = menu.admin.inc
 files[] = menu.install
 files[] = menu.test
 configure = admin/structure/menu
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/node/node.info drupal-7.x-dev/modules/node/node.info
--- drupal-7.x-head/modules/node/node.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/node/node.info	2009-11-17 22:24:18.000000000 +0100
@@ -13,10 +13,3 @@ files[] = node.test
 files[] = node.tokens.inc
 required = TRUE
 configure = admin/structure/types
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/node/node.module drupal-7.x-dev/modules/node/node.module
--- drupal-7.x-head/modules/node/node.module	2010-08-22 18:11:12.000000000 +0200
+++ drupal-7.x-dev/modules/node/node.module	2010-08-23 16:53:50.000000000 +0200
@@ -1,5 +1,5 @@
 <?php
-// $Id: node.module,v 1.1291 2010/08/22 16:11:12 dries Exp $
+// $Id: node.module,v 1.1292 2010/08/23 14:53:50 webchick Exp $
 
 /**
  * @file
@@ -3763,3 +3763,12 @@ class NodeController extends DrupalDefau
     return $query;
   }
 }
+
+/**
+ * Implements hook_file_download_access().
+ */
+function node_file_download_access($field, $entity_type, $entity) {
+  if ($entity_type == 'node') {
+    return node_access('view', $entity);
+  }
+}
diff -urp drupal-7.x-head/modules/node/tests/node_access_test.info drupal-7.x-dev/modules/node/tests/node_access_test.info
--- drupal-7.x-head/modules/node/tests/node_access_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/node/tests/node_access_test.info	2010-02-15 20:00:30.000000000 +0100
@@ -6,10 +6,3 @@ version = VERSION
 core = 7.x
 files[] = node_access_test.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/node/tests/node_presave_test.info drupal-7.x-dev/modules/node/tests/node_presave_test.info
--- drupal-7.x-head/modules/node/tests/node_presave_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/node/tests/node_presave_test.info	2010-04-20 11:17:20.000000000 +0200
@@ -6,10 +6,3 @@ version = VERSION
 core = 7.x
 files[] = node_presave_test.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/node/tests/node_test.info drupal-7.x-dev/modules/node/tests/node_test.info
--- drupal-7.x-head/modules/node/tests/node_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/node/tests/node_test.info	2009-04-02 22:47:54.000000000 +0200
@@ -6,10 +6,3 @@ version = VERSION
 core = 7.x
 files[] = node_test.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/node/tests/node_test_exception.info drupal-7.x-dev/modules/node/tests/node_test_exception.info
--- drupal-7.x-head/modules/node/tests/node_test_exception.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/node/tests/node_test_exception.info	2009-11-19 05:00:47.000000000 +0100
@@ -6,10 +6,3 @@ version = VERSION
 core = 7.x
 files[] = node_test_exception.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/openid/openid.info drupal-7.x-dev/modules/openid/openid.info
--- drupal-7.x-head/modules/openid/openid.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/openid/openid.info	2010-05-26 10:39:54.000000000 +0200
@@ -9,10 +9,3 @@ files[] = openid.inc
 files[] = openid.pages.inc
 files[] = openid.install
 files[] = openid.test
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/openid/tests/openid_test.info drupal-7.x-dev/modules/openid/tests/openid_test.info
--- drupal-7.x-head/modules/openid/tests/openid_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/openid/tests/openid_test.info	2009-05-08 23:44:48.000000000 +0200
@@ -8,10 +8,3 @@ files[] = openid_test.install
 files[] = openid_test.module
 dependencies[] = openid
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-

diff -urp drupal-7.x-head/modules/overlay/overlay.info drupal-7.x-dev/modules/overlay/overlay.info
--- drupal-7.x-head/modules/overlay/overlay.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/overlay/overlay.info	2009-12-02 08:28:22.000000000 +0100
@@ -6,10 +6,3 @@ version = VERSION
 core = 7.x
 files[] = overlay.module
 files[] = overlay.install
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-

diff -urp drupal-7.x-head/modules/path/path.info drupal-7.x-dev/modules/path/path.info
--- drupal-7.x-head/modules/path/path.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/path/path.info	2009-11-17 22:24:18.000000000 +0100
@@ -8,10 +8,3 @@ files[] = path.module
 files[] = path.admin.inc
 files[] = path.test
 configure = admin/config/search/path
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/php/php.info drupal-7.x-dev/modules/php/php.info
--- drupal-7.x-head/modules/php/php.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/php/php.info	2009-06-08 11:23:53.000000000 +0200
@@ -7,10 +7,3 @@ core = 7.x
 files[] = php.module
 files[] = php.install
 files[] = php.test
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-

diff -urp drupal-7.x-head/modules/poll/poll.info drupal-7.x-dev/modules/poll/poll.info
--- drupal-7.x-head/modules/poll/poll.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/poll/poll.info	2009-08-19 22:19:36.000000000 +0200
@@ -9,10 +9,3 @@ files[] = poll.pages.inc
 files[] = poll.install
 files[] = poll.test
 files[] = poll.tokens.inc
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/profile/profile.info drupal-7.x-dev/modules/profile/profile.info
--- drupal-7.x-head/modules/profile/profile.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/profile/profile.info	2009-11-17 22:24:18.000000000 +0100
@@ -10,10 +10,3 @@ files[] = profile.pages.inc
 files[] = profile.install
 files[] = profile.test
 configure = admin/config/people/profile
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/rdf/rdf.info drupal-7.x-dev/modules/rdf/rdf.info
--- drupal-7.x-head/modules/rdf/rdf.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/rdf/rdf.info	2009-11-18 05:44:19.000000000 +0100
@@ -7,10 +7,3 @@ core = 7.x
 files[] = rdf.install
 files[] = rdf.module
 files[] = rdf.test
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/rdf/tests/rdf_test.info drupal-7.x-dev/modules/rdf/tests/rdf_test.info
--- drupal-7.x-head/modules/rdf/tests/rdf_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/rdf/tests/rdf_test.info	2009-10-19 20:28:15.000000000 +0200
@@ -7,10 +7,3 @@ core = 7.x
 files[] = rdf_test.install
 files[] = rdf_test.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/search/search.info drupal-7.x-dev/modules/search/search.info
--- drupal-7.x-head/modules/search/search.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/search/search.info	2009-11-17 22:24:18.000000000 +0100
@@ -11,10 +11,3 @@ files[] = search.install
 files[] = search.test
 files[] = search.extender.inc
 configure = admin/config/search/settings
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/search/tests/search_embedded_form.info drupal-7.x-dev/modules/search/tests/search_embedded_form.info
--- drupal-7.x-head/modules/search/tests/search_embedded_form.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/search/tests/search_embedded_form.info	2010-08-11 16:21:39.000000000 +0200
@@ -6,10 +6,3 @@ version = VERSION
 core = 7.x
 files[] = search_embedded_form.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/search/tests/search_extra_type.info drupal-7.x-dev/modules/search/tests/search_extra_type.info
--- drupal-7.x-head/modules/search/tests/search_extra_type.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/search/tests/search_extra_type.info	2010-08-05 09:11:15.000000000 +0200
@@ -6,10 +6,3 @@ version = VERSION
 core = 7.x
 files[] = search_extra_type.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/shortcut/shortcut.info drupal-7.x-dev/modules/shortcut/shortcut.info
--- drupal-7.x-head/modules/shortcut/shortcut.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/shortcut/shortcut.info	2010-03-06 07:33:14.000000000 +0100
@@ -9,10 +9,3 @@ files[] = shortcut.admin.inc
 files[] = shortcut.install
 files[] = shortcut.test
 configure = admin/config/user-interface/shortcut
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/simpletest.info drupal-7.x-dev/modules/simpletest/simpletest.info
--- drupal-7.x-head/modules/simpletest/simpletest.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/simpletest.info	2010-07-30 03:28:00.000000000 +0200
@@ -40,10 +40,3 @@ files[] = tests/update.test
 files[] = tests/xmlrpc.test
 files[] = tests/upgrade/upgrade.test
 files[] = tests/upgrade/upgrade.poll.test
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/tests/actions_loop_test.info drupal-7.x-dev/modules/simpletest/tests/actions_loop_test.info
--- drupal-7.x-head/modules/simpletest/tests/actions_loop_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/tests/actions_loop_test.info	2009-08-22 18:16:19.000000000 +0200
@@ -6,10 +6,3 @@ version = VERSION
 core = 7.x
 files[] = actions_loop_test.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/tests/ajax_forms_test.info drupal-7.x-dev/modules/simpletest/tests/ajax_forms_test.info
--- drupal-7.x-head/modules/simpletest/tests/ajax_forms_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/tests/ajax_forms_test.info	2009-11-18 05:56:18.000000000 +0100
@@ -6,10 +6,3 @@ package = Testing
 files[] = ajax_forms_test.module
 version = VERSION
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/tests/ajax_test.info drupal-7.x-dev/modules/simpletest/tests/ajax_test.info
--- drupal-7.x-head/modules/simpletest/tests/ajax_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/tests/ajax_test.info	2009-10-18 07:14:39.000000000 +0200
@@ -6,10 +6,3 @@ version = VERSION
 core = 7.x
 files[] = ajax_test.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/tests/batch_test.info drupal-7.x-dev/modules/simpletest/tests/batch_test.info
--- drupal-7.x-head/modules/simpletest/tests/batch_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/tests/batch_test.info	2010-01-08 07:36:34.000000000 +0100
@@ -7,10 +7,3 @@ core = 7.x
 files[] = batch_test.module
 files[] = batch_test.callbacks.inc
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/tests/common_test.info drupal-7.x-dev/modules/simpletest/tests/common_test.info
--- drupal-7.x-head/modules/simpletest/tests/common_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/tests/common_test.info	2009-07-02 06:27:23.000000000 +0200
@@ -6,10 +6,3 @@ version = VERSION
 core = 7.x
 files[] = common_test.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/tests/database_test.info drupal-7.x-dev/modules/simpletest/tests/database_test.info
--- drupal-7.x-head/modules/simpletest/tests/database_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/tests/database_test.info	2008-10-10 00:51:40.000000000 +0200
@@ -7,10 +7,3 @@ files[] = database_test.module
 files[] = database_test.install
 version = VERSION
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/tests/entity_cache_test.info drupal-7.x-dev/modules/simpletest/tests/entity_cache_test.info
--- drupal-7.x-head/modules/simpletest/tests/entity_cache_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/tests/entity_cache_test.info	2010-04-18 17:01:56.000000000 +0200
@@ -7,10 +7,3 @@ core = 7.x
 files[] = entity_cache_test.module
 dependencies[] = entity_cache_test_dependency
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/tests/entity_cache_test_dependency.info drupal-7.x-dev/modules/simpletest/tests/entity_cache_test_dependency.info
--- drupal-7.x-head/modules/simpletest/tests/entity_cache_test_dependency.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/tests/entity_cache_test_dependency.info	2010-04-18 17:01:56.000000000 +0200
@@ -6,10 +6,3 @@ version = VERSION
 core = 7.x
 files[] = entity_cache_test_dependency.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/tests/error_test.info drupal-7.x-dev/modules/simpletest/tests/error_test.info
--- drupal-7.x-head/modules/simpletest/tests/error_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/tests/error_test.info	2009-05-22 17:03:46.000000000 +0200
@@ -6,10 +6,3 @@ version = VERSION
 core = 7.x
 files[] = error_test.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/tests/file_test.info drupal-7.x-dev/modules/simpletest/tests/file_test.info
--- drupal-7.x-head/modules/simpletest/tests/file_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/tests/file_test.info	2008-09-20 09:35:53.000000000 +0200
@@ -6,10 +6,3 @@ version = VERSION
 core = 7.x
 files[] = file_test.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/tests/filter_test.info drupal-7.x-dev/modules/simpletest/tests/filter_test.info
--- drupal-7.x-head/modules/simpletest/tests/filter_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/tests/filter_test.info	2009-08-26 12:29:26.000000000 +0200
@@ -6,10 +6,3 @@ version = VERSION
 core = 7.x
 files[] = filter_test.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/tests/form_test.info drupal-7.x-dev/modules/simpletest/tests/form_test.info
--- drupal-7.x-head/modules/simpletest/tests/form_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/tests/form_test.info	2010-07-17 20:52:39.000000000 +0200
@@ -7,10 +7,3 @@ core = 7.x
 files[] = form_test.module
 files[] = form_test.file.inc
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/tests/image_test.info drupal-7.x-dev/modules/simpletest/tests/image_test.info
--- drupal-7.x-head/modules/simpletest/tests/image_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/tests/image_test.info	2009-03-09 12:44:54.000000000 +0100
@@ -6,10 +6,3 @@ version = VERSION
 core = 7.x
 files[] = image_test.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/tests/menu_test.info drupal-7.x-dev/modules/simpletest/tests/menu_test.info
--- drupal-7.x-head/modules/simpletest/tests/menu_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/tests/menu_test.info	2008-12-28 19:27:14.000000000 +0100
@@ -6,10 +6,3 @@ version = VERSION
 core = 7.x
 files[] = menu_test.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/tests/module_test.info drupal-7.x-dev/modules/simpletest/tests/module_test.info
--- drupal-7.x-head/modules/simpletest/tests/module_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/tests/module_test.info	2010-04-22 20:56:31.000000000 +0200
@@ -7,10 +7,3 @@ core = 7.x
 files[] = module_test.module
 files[] = module_test.file.inc
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/tests/requirements1_test.info drupal-7.x-dev/modules/simpletest/tests/requirements1_test.info
--- drupal-7.x-head/modules/simpletest/tests/requirements1_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/tests/requirements1_test.info	2010-05-26 09:31:46.000000000 +0200
@@ -7,10 +7,3 @@ core = 7.x
 files[] = requirements1_test.install
 files[] = requirements1_test.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/tests/requirements2_test.info drupal-7.x-dev/modules/simpletest/tests/requirements2_test.info
--- drupal-7.x-head/modules/simpletest/tests/requirements2_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/tests/requirements2_test.info	2010-05-26 09:31:46.000000000 +0200
@@ -8,10 +8,3 @@ version = VERSION
 core = 7.x
 files[] = requirements2_test.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/tests/session_test.info drupal-7.x-dev/modules/simpletest/tests/session_test.info
--- drupal-7.x-head/modules/simpletest/tests/session_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/tests/session_test.info	2008-08-16 23:11:02.000000000 +0200
@@ -6,10 +6,3 @@ version = VERSION
 core = 7.x
 files[] = session_test.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/tests/system_dependencies_test.info drupal-7.x-dev/modules/simpletest/tests/system_dependencies_test.info
--- drupal-7.x-head/modules/simpletest/tests/system_dependencies_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/tests/system_dependencies_test.info	2009-12-08 07:39:34.000000000 +0100
@@ -7,10 +7,3 @@ core = 7.x
 files[] = system_dependencies_test.module
 hidden = TRUE
 dependencies[] = _missing_dependency
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/tests/system_test.info drupal-7.x-dev/modules/simpletest/tests/system_test.info
--- drupal-7.x-head/modules/simpletest/tests/system_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/tests/system_test.info	2008-10-25 01:32:44.000000000 +0200
@@ -6,10 +6,3 @@ version = VERSION
 core = 7.x
 files[] = system_test.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/tests/taxonomy_test.info drupal-7.x-dev/modules/simpletest/tests/taxonomy_test.info
--- drupal-7.x-head/modules/simpletest/tests/taxonomy_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/tests/taxonomy_test.info	2009-04-05 14:21:12.000000000 +0200
@@ -7,10 +7,3 @@ core = 7.x
 files[] = taxonomy_test.module
 hidden = TRUE
 dependencies[] = taxonomy
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/tests/theme_test.info drupal-7.x-dev/modules/simpletest/tests/theme_test.info
--- drupal-7.x-head/modules/simpletest/tests/theme_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/tests/theme_test.info	2010-03-21 05:05:24.000000000 +0100
@@ -6,10 +6,3 @@ version = VERSION
 core = 7.x
 files[] = theme_test.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/tests/update_test_1.info drupal-7.x-dev/modules/simpletest/tests/update_test_1.info
--- drupal-7.x-head/modules/simpletest/tests/update_test_1.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/tests/update_test_1.info	2010-02-03 19:16:23.000000000 +0100
@@ -7,10 +7,3 @@ core = 7.x
 files[] = update_test_1.module
 files[] = update_test_1.install
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/tests/update_test_2.info drupal-7.x-dev/modules/simpletest/tests/update_test_2.info
--- drupal-7.x-head/modules/simpletest/tests/update_test_2.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/tests/update_test_2.info	2010-02-03 19:16:23.000000000 +0100
@@ -7,10 +7,3 @@ core = 7.x
 files[] = update_test_2.module
 files[] = update_test_2.install
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/tests/update_test_3.info drupal-7.x-dev/modules/simpletest/tests/update_test_3.info
--- drupal-7.x-head/modules/simpletest/tests/update_test_3.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/tests/update_test_3.info	2010-02-03 19:16:23.000000000 +0100
@@ -7,10 +7,3 @@ core = 7.x
 files[] = update_test_3.module
 files[] = update_test_3.install
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/tests/url_alter_test.info drupal-7.x-dev/modules/simpletest/tests/url_alter_test.info
--- drupal-7.x-head/modules/simpletest/tests/url_alter_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/tests/url_alter_test.info	2009-10-24 07:13:44.000000000 +0200
@@ -7,10 +7,3 @@ version = VERSION
 files[] = url_alter_test.module
 files[] = url_alter_test.install
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/simpletest/tests/xmlrpc_test.info drupal-7.x-dev/modules/simpletest/tests/xmlrpc_test.info
--- drupal-7.x-head/modules/simpletest/tests/xmlrpc_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/simpletest/tests/xmlrpc_test.info	2008-08-09 14:41:22.000000000 +0200
@@ -6,10 +6,3 @@ version = VERSION
 core = 7.x
 files[] = xmlrpc_test.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/statistics/statistics.info drupal-7.x-dev/modules/statistics/statistics.info
--- drupal-7.x-head/modules/statistics/statistics.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/statistics/statistics.info	2009-11-17 22:24:18.000000000 +0100
@@ -11,10 +11,3 @@ files[] = statistics.install
 files[] = statistics.test
 files[] = statistics.tokens.inc
 configure = admin/config/system/statistics
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-

diff -urp drupal-7.x-head/modules/syslog/syslog.info drupal-7.x-dev/modules/syslog/syslog.info
--- drupal-7.x-head/modules/syslog/syslog.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/syslog/syslog.info	2009-06-08 11:23:54.000000000 +0200
@@ -6,10 +6,3 @@ version = VERSION
 core = 7.x
 files[] = syslog.module
 files[] = syslog.test
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/system/region.tpl.php drupal-7.x-dev/modules/system/region.tpl.php
--- drupal-7.x-head/modules/system/region.tpl.php	2009-10-05 04:43:01.000000000 +0200
+++ drupal-7.x-dev/modules/system/region.tpl.php	2010-08-23 11:09:23.000000000 +0200
@@ -1,5 +1,5 @@
 <?php
-// $Id: region.tpl.php,v 1.1 2009/10/05 02:43:01 webchick Exp $
+// $Id: region.tpl.php,v 1.2 2010/08/23 09:09:23 dries Exp $
 
 /**
  * @file
@@ -27,6 +27,8 @@
  * @see template_process()
  */
 ?>
-<div class="<?php print $classes; ?>">
-  <?php print $content; ?>
-</div>
+<?php if($content): ?>
+  <div class="<?php print $classes; ?>">
+    <?php print $content; ?>
+  </div>
+<?php endif; ?>
diff -urp drupal-7.x-head/modules/system/system.info drupal-7.x-dev/modules/system/system.info
--- drupal-7.x-head/modules/system/system.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/system/system.info	2009-12-15 09:37:18.000000000 +0100
@@ -17,10 +17,3 @@ files[] = system.updater.inc
 files[] = system.mail.inc
 required = TRUE
 configure = admin/config/system
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/system/system.install drupal-7.x-dev/modules/system/system.install
--- drupal-7.x-head/modules/system/system.install	2010-08-22 16:55:29.000000000 +0200
+++ drupal-7.x-dev/modules/system/system.install	2010-08-23 16:56:37.000000000 +0200
@@ -1,5 +1,5 @@
 <?php
-// $Id: system.install,v 1.498 2010/08/22 14:55:29 dries Exp $
+// $Id: system.install,v 1.499 2010/08/23 14:56:37 webchick Exp $
 
 /**
  * @file
@@ -2043,12 +2043,12 @@ function system_update_7016() {
           $datatype = 'bigint';
           break;
       }
-      db_query('ALTER TABLE ' . $row->table . ' ALTER COLUMN ' . $row->field . ' TYPE ' . $datatype);
-      db_query('ALTER TABLE ' . $row->table . ' ADD CHECK (' . $row->field . ' >= 0)');
+      db_query('ALTER TABLE ' . $row->table . ' ALTER COLUMN "' . $row->field . '" TYPE ' . $datatype);
+      db_query('ALTER TABLE ' . $row->table . ' ADD CHECK ("' . $row->field . '" >= 0)');
     }
-    db_query('DROP DOMAIN smallint_unsigned');
-    db_query('DROP DOMAIN int_unsigned');
-    db_query('DROP DOMAIN bigint_unsigned');
+    db_query('DROP DOMAIN IF EXISTS smallint_unsigned');
+    db_query('DROP DOMAIN IF EXISTS int_unsigned');
+    db_query('DROP DOMAIN IF EXISTS bigint_unsigned');
   }
 }
 
diff -urp drupal-7.x-head/modules/system/system.module drupal-7.x-dev/modules/system/system.module
--- drupal-7.x-head/modules/system/system.module	2010-08-22 15:52:58.000000000 +0200
+++ drupal-7.x-dev/modules/system/system.module	2010-08-23 18:20:05.000000000 +0200
@@ -2289,6 +2289,10 @@ function _system_rebuild_module_data() {
 
     // Merge in defaults and save.
     $modules[$key]->info = $module->info + $defaults;
+    
+    // Set the stylesheets & scripts variables with the correct paths.
+    $modules[$key]->info['stylesheets'] = _system_rebuild_info_stylesheets($modules[$key]->info, $modules[$key]->uri);
+    $modules[$key]->info['scripts'] = _system_rebuild_info_scripts($modules[$key]->info, $modules[$key]->uri);
 
     // Install profiles are hidden by default, unless explicitly specified
     // otherwise in the .info file.
@@ -2414,24 +2418,12 @@ function _system_rebuild_theme_data() {
     }
 
     // Give the stylesheets proper path information.
-    $pathed_stylesheets = array();
-    if (isset($themes[$key]->info['stylesheets'])) {
-      foreach ($themes[$key]->info['stylesheets'] as $media => $stylesheets) {
-        foreach ($stylesheets as $stylesheet) {
-          $pathed_stylesheets[$media][$stylesheet] = dirname($themes[$key]->uri) . '/' . $stylesheet;
-        }
-      }
-    }
-    $themes[$key]->info['stylesheets'] = $pathed_stylesheets;
+    // Set the stylesheets & scripts variables with the correct paths.
+    $themes[$key]->info['stylesheets'] = _system_rebuild_info_stylesheets($themes[$key]->info, $themes[$key]->uri);
+    $themes[$key]->info['scripts'] = _system_rebuild_info_scripts($themes[$key]->info, $themes[$key]->uri);
+   
 
-    // Give the scripts proper path information.
-    $scripts = array();
-    if (isset($themes[$key]->info['scripts'])) {
-      foreach ($themes[$key]->info['scripts'] as $script) {
-        $scripts[$script] = dirname($themes[$key]->uri) . '/' . $script;
-      }
-    }
-    $themes[$key]->info['scripts'] = $scripts;
+    
     // Give the screenshot proper path information.
     if (!empty($themes[$key]->info['screenshot'])) {
       $themes[$key]->info['screenshot'] = dirname($themes[$key]->uri) . '/' . $themes[$key]->info['screenshot'];
@@ -2482,6 +2474,44 @@ function system_rebuild_theme_data() {
 }
 
 /**
+ * Helper function to give the stylesheets listed in the .info file the proper
+ * path information.
+ *
+ * @return
+ *   An associative array of stylesheet paths.
+ */
+function _system_rebuild_info_stylesheets($info, $uri) {
+  $pathed_stylesheets = array();
+  if (isset($info['stylesheets'])) {
+    foreach ($info['stylesheets'] as $media => $stylesheets) {
+      foreach ($stylesheets as $stylesheet) {
+        $pathed_stylesheets[$media][$stylesheet] = dirname($uri) . '/' . $stylesheet;
+      }
+    }
+  }
+  return $pathed_stylesheets;
+}
+
+/**
+ * Helper function to give the stylesheets listed in the .info file the proper
+ * path information.
+ *
+ * @return
+ *   An associative array of stylesheet paths.
+ */
+function _system_rebuild_info_scripts($info, $uri) {
+  $scripts = array();
+  if (isset($info['scripts'])) {
+    foreach ($info['scripts'] as $script) {
+      $scripts[$script] = dirname($uri) . '/' . $script;
+    }
+  }
+  return $scripts;
+}
+
+
+
+/**
  * Returns an array of default theme features.
  */
 function _system_default_theme_features() {
diff -urp drupal-7.x-head/modules/taxonomy/taxonomy.info drupal-7.x-dev/modules/taxonomy/taxonomy.info
--- drupal-7.x-head/modules/taxonomy/taxonomy.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/taxonomy/taxonomy.info	2009-11-17 22:24:18.000000000 +0100
@@ -11,10 +11,3 @@ files[] = taxonomy.install
 files[] = taxonomy.test
 files[] = taxonomy.tokens.inc
 configure = admin/structure/taxonomy
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-

diff -urp drupal-7.x-head/modules/toolbar/toolbar.info drupal-7.x-dev/modules/toolbar/toolbar.info
--- drupal-7.x-head/modules/toolbar/toolbar.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/toolbar/toolbar.info	2009-12-04 17:02:42.000000000 +0100
@@ -5,10 +5,3 @@ core = 7.x
 package = Core
 version = VERSION
 files[] = toolbar.module
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/tracker/tracker.info drupal-7.x-dev/modules/tracker/tracker.info
--- drupal-7.x-head/modules/tracker/tracker.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/tracker/tracker.info	2009-11-23 03:45:42.000000000 +0100
@@ -8,10 +8,3 @@ core = 7.x
 files[] = tracker.module
 files[] = tracker.pages.inc
 files[] = tracker.test
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/translation/translation.info drupal-7.x-dev/modules/translation/translation.info
--- drupal-7.x-head/modules/translation/translation.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/translation/translation.info	2009-06-08 11:23:54.000000000 +0200
@@ -8,10 +8,3 @@ core = 7.x
 files[] = translation.module
 files[] = translation.pages.inc
 files[] = translation.test
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/trigger/tests/trigger_test.info drupal-7.x-dev/modules/trigger/tests/trigger_test.info
--- drupal-7.x-head/modules/trigger/tests/trigger_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/trigger/tests/trigger_test.info	2009-05-27 18:29:05.000000000 +0200
@@ -5,10 +5,3 @@ package = Testing
 core = 7.x
 files[] = trigger_test.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/trigger/trigger.info drupal-7.x-dev/modules/trigger/trigger.info
--- drupal-7.x-head/modules/trigger/trigger.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/trigger/trigger.info	2009-11-17 22:24:18.000000000 +0100
@@ -9,10 +9,3 @@ files[] = trigger.admin.inc
 files[] = trigger.install
 files[] = trigger.test
 configure = admin/structure/trigger
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/update/tests/aaa_update_test.info drupal-7.x-dev/modules/update/tests/aaa_update_test.info
--- drupal-7.x-head/modules/update/tests/aaa_update_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/update/tests/aaa_update_test.info	2009-10-01 21:23:21.000000000 +0200
@@ -5,10 +5,3 @@ package = Testing
 core = 7.x
 files[] = aaa_update_test.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/update/tests/bbb_update_test.info drupal-7.x-dev/modules/update/tests/bbb_update_test.info
--- drupal-7.x-head/modules/update/tests/bbb_update_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/update/tests/bbb_update_test.info	2009-10-01 21:23:21.000000000 +0200
@@ -5,10 +5,3 @@ package = Testing
 core = 7.x
 files[] = bbb_update_test.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/update/tests/ccc_update_test.info drupal-7.x-dev/modules/update/tests/ccc_update_test.info
--- drupal-7.x-head/modules/update/tests/ccc_update_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/update/tests/ccc_update_test.info	2009-10-01 21:23:21.000000000 +0200
@@ -5,10 +5,3 @@ package = Testing
 core = 7.x
 files[] = ccc_update_test.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/update/tests/update_test.info drupal-7.x-dev/modules/update/tests/update_test.info
--- drupal-7.x-head/modules/update/tests/update_test.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/update/tests/update_test.info	2009-09-26 19:03:13.000000000 +0200
@@ -6,10 +6,3 @@ version = VERSION
 core = 7.x
 files[] = update_test.module
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/update/update.info drupal-7.x-dev/modules/update/update.info
--- drupal-7.x-head/modules/update/update.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/update/update.info	2009-11-17 22:24:18.000000000 +0100
@@ -14,10 +14,3 @@ files[] = update.report.inc
 files[] = update.settings.inc
 files[] = update.test
 configure = admin/reports/updates/settings
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-

diff -urp drupal-7.x-head/modules/user/user.info drupal-7.x-dev/modules/user/user.info
--- drupal-7.x-head/modules/user/user.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/modules/user/user.info	2009-11-17 22:24:19.000000000 +0100
@@ -12,10 +12,3 @@ files[] = user.test
 files[] = user.tokens.inc
 required = TRUE
 configure = admin/config/people
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/modules/user/user.install drupal-7.x-dev/modules/user/user.install
--- drupal-7.x-head/modules/user/user.install	2010-08-22 15:55:53.000000000 +0200
+++ drupal-7.x-dev/modules/user/user.install	2010-08-23 16:56:37.000000000 +0200
@@ -1,5 +1,5 @@
 <?php
-// $Id: user.install,v 1.58 2010/08/22 13:55:53 dries Exp $
+// $Id: user.install,v 1.59 2010/08/23 14:56:37 webchick Exp $
 
 /**
  * @file
@@ -690,7 +690,7 @@ function user_update_7012(&$sandbox) {
     // Initialize batch update information.
     $sandbox['progress'] = 0;
     $sandbox['last_user_processed'] = -1;
-    $sandbox['max'] = db_query("SELECT COUNT(*) FROM {users} WHERE picture <> 0")->fetchField();
+    $sandbox['max'] = db_query("SELECT COUNT(*) FROM {users} WHERE picture <> ''")->fetchField();
   }
 
   // As a batch operation move the photos into the {file_managed} table and
diff -urp drupal-7.x-head/modules/user/user.module drupal-7.x-dev/modules/user/user.module
--- drupal-7.x-head/modules/user/user.module	2010-08-22 15:52:59.000000000 +0200
+++ drupal-7.x-dev/modules/user/user.module	2010-08-23 16:53:50.000000000 +0200
@@ -1,5 +1,5 @@
 <?php
-// $Id: user.module,v 1.1194 2010/08/22 13:52:59 dries Exp $
+// $Id: user.module,v 1.1195 2010/08/23 14:53:50 webchick Exp $
 
 /**
  * @file
@@ -3684,3 +3684,12 @@ function user_rdf_mapping() {
     ),
   );
 }
+
+/**
+ * Implements hook_file_download_access().
+ */
+function user_file_download_access($field, $entity_type, $entity) {
+  if ($entity_type == 'user') {
+    return user_view_access($entity);
+  }
+}

diff -urp drupal-7.x-head/profiles/minimal/minimal.info drupal-7.x-dev/profiles/minimal/minimal.info
--- drupal-7.x-head/profiles/minimal/minimal.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/profiles/minimal/minimal.info	2010-01-05 00:08:34.000000000 +0100
@@ -6,10 +6,3 @@ core = 7.x
 dependencies[] = block
 dependencies[] = dblog
 files[] = minimal.profile
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/profiles/standard/standard.info drupal-7.x-dev/profiles/standard/standard.info
--- drupal-7.x-head/profiles/standard/standard.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/profiles/standard/standard.info	2010-01-05 00:08:34.000000000 +0100
@@ -22,10 +22,3 @@ dependencies[] = field_ui
 dependencies[] = file
 dependencies[] = rdf
 files[] = standard.profile
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/profiles/testing/testing.info drupal-7.x-dev/profiles/testing/testing.info
--- drupal-7.x-head/profiles/testing/testing.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/profiles/testing/testing.info	2010-08-22 17:31:18.000000000 +0200
@@ -4,10 +4,3 @@ description = Totally stripped back test
 version = VERSION
 core = 7.x
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/themes/bartik/bartik.info drupal-7.x-dev/themes/bartik/bartik.info
--- drupal-7.x-head/themes/bartik/bartik.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/themes/bartik/bartik.info	2010-07-28 03:40:39.000000000 +0200
@@ -37,10 +37,3 @@ regions[footer] = Footer
 
 settings[shortcut_module_link] = 0
 
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-

diff -urp drupal-7.x-head/themes/garland/garland.info drupal-7.x-dev/themes/garland/garland.info
--- drupal-7.x-head/themes/garland/garland.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/themes/garland/garland.info	2009-12-01 16:57:40.000000000 +0100
@@ -8,10 +8,3 @@ engine = phptemplate
 stylesheets[all][] = style.css
 stylesheets[print][] = print.css
 settings[garland_width] = fluid
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-

diff -urp drupal-7.x-head/themes/seven/seven.info drupal-7.x-dev/themes/seven/seven.info
--- drupal-7.x-head/themes/seven/seven.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/themes/seven/seven.info	2010-01-14 07:47:54.000000000 +0100
@@ -14,10 +14,3 @@ regions[page_top] = Page top
 regions[page_bottom] = Page bottom
 regions[sidebar_first] = First sidebar
 regions_hidden[] = sidebar_first
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-

diff -urp drupal-7.x-head/themes/stark/stark.info drupal-7.x-dev/themes/stark/stark.info
--- drupal-7.x-head/themes/stark/stark.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/themes/stark/stark.info	2009-12-20 20:43:10.000000000 +0100
@@ -6,10 +6,3 @@ version = VERSION
 core = 7.x
 engine = phptemplate
 stylesheets[all][] = layout.css
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/themes/tests/test_theme/test_theme.info drupal-7.x-dev/themes/tests/test_theme/test_theme.info
--- drupal-7.x-head/themes/tests/test_theme/test_theme.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/themes/tests/test_theme/test_theme.info	2010-03-21 05:05:24.000000000 +0100
@@ -3,10 +3,4 @@ name = Test theme
 description = Theme for testing the theme system
 core = 7.x
 engine = phptemplate
-hidden = TRUE
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
+hidden = TRUE
\ No newline at end of file
diff -urp drupal-7.x-head/themes/tests/update_test_basetheme/update_test_basetheme.info drupal-7.x-dev/themes/tests/update_test_basetheme/update_test_basetheme.info
--- drupal-7.x-head/themes/tests/update_test_basetheme/update_test_basetheme.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/themes/tests/update_test_basetheme/update_test_basetheme.info	2009-10-08 17:40:34.000000000 +0200
@@ -4,10 +4,3 @@ description = Test theme which acts as a
 core = 7.x
 engine = phptemplate
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
diff -urp drupal-7.x-head/themes/tests/update_test_subtheme/update_test_subtheme.info drupal-7.x-dev/themes/tests/update_test_subtheme/update_test_subtheme.info
--- drupal-7.x-head/themes/tests/update_test_subtheme/update_test_subtheme.info	2010-08-23 02:07:30.000000000 +0200
+++ drupal-7.x-dev/themes/tests/update_test_subtheme/update_test_subtheme.info	2009-10-08 17:40:34.000000000 +0200
@@ -5,10 +5,3 @@ core = 7.x
 engine = phptemplate
 base theme = update_test_basetheme
 hidden = TRUE
-
-; Information added by drupal.org packaging script on 2010-08-23
-version = "7.x-dev"
-core = "7.x"
-project = "drupal"
-datestamp = "1282522050"
-
