[Pkg-drupal-commits] r2238 - in /branches/upstream/current-7: ./ includes/ includes/database/ includes/database/mysql/ includes/database/sqlite/ misc/ modules/aggregator/ modules/aggregator/tests/ modules/block/ modules/block/tests/ modules/blog/ modules/book/ modules/color/ modules/comment/ modules/contact/ modules/contextual/ modules/dashboard/ modules/dblog/ modules/field/ modules/field/modules/field_sql_storage/ modules/field/modules/list/ modules/field/modules/list/tests/ modules/field/modules/number/ modules/field/modules/options/ modules/field/modules/text/ modules/field/tests/ modules/field/theme/ modules/field_ui/ modules/file/ modules/file/tests/ modules/filter/ modules/forum/ modules/help/ modules/image/ modules/image/tests/ modules/locale/ modules/locale/tests/ modules/menu/ modules/node/ modules/node/tests/ modules/openid/ modules/openid/tests/ modules/overlay/ modules/path/ modules/php/ modules/poll/ modules/profile/ modules/rdf/ modules/rdf/tests/ modules/search/ modules/search/tests/ modules/shortcut/ modules/simpletest/ modules/simpletest/files/css_test_files/ modules/simpletest/tests/ modules/simpletest/tests/drupal_system_listing_compatible_test/ modules/simpletest/tests/drupal_system_listing_incompatible_test/ modules/simpletest/tests/upgrade/ modules/statistics/ modules/syslog/ modules/system/ modules/taxonomy/ modules/toolbar/ modules/tracker/ modules/translation/ modules/translation/tests/ modules/trigger/ modules/trigger/tests/ modules/update/ modules/update/tests/ modules/user/ modules/user/tests/ profiles/minimal/ profiles/standard/ profiles/testing/ profiles/testing/modules/drupal_system_listing_compatible_test/ profiles/testing/modules/drupal_system_listing_incompatible_test/ scripts/ sites/default/ themes/bartik/ themes/garland/ themes/seven/ themes/stark/ themes/tests/test_theme/ themes/tests/update_test_basetheme/ themes/tests/update_test_subtheme/

luigi at users.alioth.debian.org luigi at users.alioth.debian.org
Wed Nov 2 17:45:30 UTC 2011


Author: luigi
Date: Wed Nov  2 17:45:27 2011
New Revision: 2238

URL: http://svn.debian.org/wsvn/pkg-drupal/?sc=1&rev=2238
Log:
[svn-upgrade] new version drupal7 (7.9)

Added:
    branches/upstream/current-7/modules/locale/tests/locale_test.js
Removed:
    branches/upstream/current-7/modules/node/node-rtl.css
Modified:
    branches/upstream/current-7/.htaccess
    branches/upstream/current-7/CHANGELOG.txt
    branches/upstream/current-7/LICENSE.txt
    branches/upstream/current-7/MAINTAINERS.txt
    branches/upstream/current-7/UPGRADE.txt
    branches/upstream/current-7/authorize.php
    branches/upstream/current-7/includes/actions.inc
    branches/upstream/current-7/includes/bootstrap.inc
    branches/upstream/current-7/includes/common.inc
    branches/upstream/current-7/includes/database/database.inc
    branches/upstream/current-7/includes/database/mysql/database.inc
    branches/upstream/current-7/includes/database/prefetch.inc
    branches/upstream/current-7/includes/database/query.inc
    branches/upstream/current-7/includes/database/sqlite/database.inc
    branches/upstream/current-7/includes/database/sqlite/schema.inc
    branches/upstream/current-7/includes/entity.inc
    branches/upstream/current-7/includes/errors.inc
    branches/upstream/current-7/includes/file.inc
    branches/upstream/current-7/includes/file.mimetypes.inc
    branches/upstream/current-7/includes/form.inc
    branches/upstream/current-7/includes/image.inc
    branches/upstream/current-7/includes/install.inc
    branches/upstream/current-7/includes/locale.inc
    branches/upstream/current-7/includes/menu.inc
    branches/upstream/current-7/includes/module.inc
    branches/upstream/current-7/includes/pager.inc
    branches/upstream/current-7/includes/session.inc
    branches/upstream/current-7/includes/stream_wrappers.inc
    branches/upstream/current-7/includes/theme.inc
    branches/upstream/current-7/includes/update.inc
    branches/upstream/current-7/includes/utility.inc
    branches/upstream/current-7/misc/drupal.js
    branches/upstream/current-7/misc/favicon.ico
    branches/upstream/current-7/misc/states.js
    branches/upstream/current-7/misc/tableselect.js
    branches/upstream/current-7/modules/aggregator/aggregator-item.tpl.php
    branches/upstream/current-7/modules/aggregator/aggregator-summary-item.tpl.php
    branches/upstream/current-7/modules/aggregator/aggregator.info
    branches/upstream/current-7/modules/aggregator/aggregator.pages.inc
    branches/upstream/current-7/modules/aggregator/aggregator.parser.inc
    branches/upstream/current-7/modules/aggregator/aggregator.processor.inc
    branches/upstream/current-7/modules/aggregator/aggregator.test
    branches/upstream/current-7/modules/aggregator/tests/aggregator_test.info
    branches/upstream/current-7/modules/aggregator/tests/aggregator_test_rss091.xml
    branches/upstream/current-7/modules/block/block.admin.inc
    branches/upstream/current-7/modules/block/block.info
    branches/upstream/current-7/modules/block/block.module
    branches/upstream/current-7/modules/block/block.test
    branches/upstream/current-7/modules/block/tests/block_test.info
    branches/upstream/current-7/modules/blog/blog.info
    branches/upstream/current-7/modules/book/book-all-books-block.tpl.php
    branches/upstream/current-7/modules/book/book-export-html.tpl.php
    branches/upstream/current-7/modules/book/book-navigation.tpl.php
    branches/upstream/current-7/modules/book/book.info
    branches/upstream/current-7/modules/book/book.module
    branches/upstream/current-7/modules/book/book.test
    branches/upstream/current-7/modules/color/color.info
    branches/upstream/current-7/modules/comment/comment.info
    branches/upstream/current-7/modules/comment/comment.install
    branches/upstream/current-7/modules/comment/comment.module
    branches/upstream/current-7/modules/comment/comment.test
    branches/upstream/current-7/modules/comment/comment.tokens.inc
    branches/upstream/current-7/modules/contact/contact.info
    branches/upstream/current-7/modules/contact/contact.test
    branches/upstream/current-7/modules/contextual/contextual.css
    branches/upstream/current-7/modules/contextual/contextual.info
    branches/upstream/current-7/modules/dashboard/dashboard.info
    branches/upstream/current-7/modules/dblog/dblog.css
    branches/upstream/current-7/modules/dblog/dblog.info
    branches/upstream/current-7/modules/field/field.api.php
    branches/upstream/current-7/modules/field/field.crud.inc
    branches/upstream/current-7/modules/field/field.form.inc
    branches/upstream/current-7/modules/field/field.info
    branches/upstream/current-7/modules/field/field.module
    branches/upstream/current-7/modules/field/modules/field_sql_storage/field_sql_storage.info
    branches/upstream/current-7/modules/field/modules/field_sql_storage/field_sql_storage.module
    branches/upstream/current-7/modules/field/modules/field_sql_storage/field_sql_storage.test
    branches/upstream/current-7/modules/field/modules/list/list.info
    branches/upstream/current-7/modules/field/modules/list/list.module
    branches/upstream/current-7/modules/field/modules/list/tests/list.test
    branches/upstream/current-7/modules/field/modules/list/tests/list_test.info
    branches/upstream/current-7/modules/field/modules/number/number.info
    branches/upstream/current-7/modules/field/modules/number/number.module
    branches/upstream/current-7/modules/field/modules/number/number.test
    branches/upstream/current-7/modules/field/modules/options/options.api.php
    branches/upstream/current-7/modules/field/modules/options/options.info
    branches/upstream/current-7/modules/field/modules/options/options.module
    branches/upstream/current-7/modules/field/modules/text/text.info
    branches/upstream/current-7/modules/field/tests/field_test.info
    branches/upstream/current-7/modules/field/tests/field_test.storage.inc
    branches/upstream/current-7/modules/field/theme/field.tpl.php
    branches/upstream/current-7/modules/field_ui/field_ui.admin.inc
    branches/upstream/current-7/modules/field_ui/field_ui.api.php
    branches/upstream/current-7/modules/field_ui/field_ui.info
    branches/upstream/current-7/modules/field_ui/field_ui.module
    branches/upstream/current-7/modules/field_ui/field_ui.test
    branches/upstream/current-7/modules/file/file.field.inc
    branches/upstream/current-7/modules/file/file.info
    branches/upstream/current-7/modules/file/file.module
    branches/upstream/current-7/modules/file/tests/file.test
    branches/upstream/current-7/modules/file/tests/file_module_test.info
    branches/upstream/current-7/modules/filter/filter.info
    branches/upstream/current-7/modules/filter/filter.module
    branches/upstream/current-7/modules/forum/forum.admin.inc
    branches/upstream/current-7/modules/forum/forum.info
    branches/upstream/current-7/modules/forum/forum.install
    branches/upstream/current-7/modules/forum/forum.module
    branches/upstream/current-7/modules/help/help.info
    branches/upstream/current-7/modules/image/image.api.php
    branches/upstream/current-7/modules/image/image.effects.inc
    branches/upstream/current-7/modules/image/image.field.inc
    branches/upstream/current-7/modules/image/image.info
    branches/upstream/current-7/modules/image/image.install
    branches/upstream/current-7/modules/image/image.module
    branches/upstream/current-7/modules/image/image.test
    branches/upstream/current-7/modules/image/tests/image_module_test.info
    branches/upstream/current-7/modules/image/tests/image_module_test.module
    branches/upstream/current-7/modules/locale/locale.admin.inc
    branches/upstream/current-7/modules/locale/locale.info
    branches/upstream/current-7/modules/locale/locale.test
    branches/upstream/current-7/modules/locale/tests/locale_test.info
    branches/upstream/current-7/modules/menu/menu.admin.inc
    branches/upstream/current-7/modules/menu/menu.info
    branches/upstream/current-7/modules/menu/menu.install
    branches/upstream/current-7/modules/menu/menu.module
    branches/upstream/current-7/modules/menu/menu.test
    branches/upstream/current-7/modules/node/node.admin.inc
    branches/upstream/current-7/modules/node/node.api.php
    branches/upstream/current-7/modules/node/node.info
    branches/upstream/current-7/modules/node/node.module
    branches/upstream/current-7/modules/node/node.test
    branches/upstream/current-7/modules/node/node.tokens.inc
    branches/upstream/current-7/modules/node/tests/node_access_test.info
    branches/upstream/current-7/modules/node/tests/node_test.info
    branches/upstream/current-7/modules/node/tests/node_test_exception.info
    branches/upstream/current-7/modules/openid/openid.api.php
    branches/upstream/current-7/modules/openid/openid.inc
    branches/upstream/current-7/modules/openid/openid.info
    branches/upstream/current-7/modules/openid/openid.js
    branches/upstream/current-7/modules/openid/openid.module
    branches/upstream/current-7/modules/openid/openid.test
    branches/upstream/current-7/modules/openid/tests/openid_test.info
    branches/upstream/current-7/modules/openid/tests/openid_test.module
    branches/upstream/current-7/modules/overlay/overlay-child.css
    branches/upstream/current-7/modules/overlay/overlay.api.php
    branches/upstream/current-7/modules/overlay/overlay.info
    branches/upstream/current-7/modules/path/path.info
    branches/upstream/current-7/modules/php/php.info
    branches/upstream/current-7/modules/poll/poll.info
    branches/upstream/current-7/modules/poll/poll.module
    branches/upstream/current-7/modules/profile/profile-block.tpl.php
    branches/upstream/current-7/modules/profile/profile-listing.tpl.php
    branches/upstream/current-7/modules/profile/profile.info
    branches/upstream/current-7/modules/profile/profile.test
    branches/upstream/current-7/modules/rdf/rdf.info
    branches/upstream/current-7/modules/rdf/tests/rdf_test.info
    branches/upstream/current-7/modules/search/search-block-form.tpl.php
    branches/upstream/current-7/modules/search/search-result.tpl.php
    branches/upstream/current-7/modules/search/search-results.tpl.php
    branches/upstream/current-7/modules/search/search.admin.inc
    branches/upstream/current-7/modules/search/search.api.php
    branches/upstream/current-7/modules/search/search.info
    branches/upstream/current-7/modules/search/search.test
    branches/upstream/current-7/modules/search/tests/search_embedded_form.info
    branches/upstream/current-7/modules/search/tests/search_extra_type.info
    branches/upstream/current-7/modules/shortcut/shortcut.admin.inc
    branches/upstream/current-7/modules/shortcut/shortcut.info
    branches/upstream/current-7/modules/shortcut/shortcut.module
    branches/upstream/current-7/modules/shortcut/shortcut.test
    branches/upstream/current-7/modules/simpletest/drupal_web_test_case.php
    branches/upstream/current-7/modules/simpletest/files/css_test_files/comment_hacks.css.unoptimized.css
    branches/upstream/current-7/modules/simpletest/simpletest.info
    branches/upstream/current-7/modules/simpletest/simpletest.module
    branches/upstream/current-7/modules/simpletest/simpletest.pages.inc
    branches/upstream/current-7/modules/simpletest/tests/actions_loop_test.info
    branches/upstream/current-7/modules/simpletest/tests/ajax_forms_test.info
    branches/upstream/current-7/modules/simpletest/tests/ajax_test.info
    branches/upstream/current-7/modules/simpletest/tests/batch_test.info
    branches/upstream/current-7/modules/simpletest/tests/bootstrap.test
    branches/upstream/current-7/modules/simpletest/tests/cache.test
    branches/upstream/current-7/modules/simpletest/tests/common.test
    branches/upstream/current-7/modules/simpletest/tests/common_test.info
    branches/upstream/current-7/modules/simpletest/tests/common_test_cron_helper.info
    branches/upstream/current-7/modules/simpletest/tests/database_test.info
    branches/upstream/current-7/modules/simpletest/tests/database_test.test
    branches/upstream/current-7/modules/simpletest/tests/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info
    branches/upstream/current-7/modules/simpletest/tests/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info
    branches/upstream/current-7/modules/simpletest/tests/entity_cache_test.info
    branches/upstream/current-7/modules/simpletest/tests/entity_cache_test_dependency.info
    branches/upstream/current-7/modules/simpletest/tests/entity_crud_hook_test.info
    branches/upstream/current-7/modules/simpletest/tests/entity_query.test
    branches/upstream/current-7/modules/simpletest/tests/error_test.info
    branches/upstream/current-7/modules/simpletest/tests/file.test
    branches/upstream/current-7/modules/simpletest/tests/file_test.info
    branches/upstream/current-7/modules/simpletest/tests/filter_test.info
    branches/upstream/current-7/modules/simpletest/tests/form.test
    branches/upstream/current-7/modules/simpletest/tests/form_test.info
    branches/upstream/current-7/modules/simpletest/tests/form_test.module
    branches/upstream/current-7/modules/simpletest/tests/image_test.info
    branches/upstream/current-7/modules/simpletest/tests/menu.test
    branches/upstream/current-7/modules/simpletest/tests/menu_test.info
    branches/upstream/current-7/modules/simpletest/tests/menu_test.module
    branches/upstream/current-7/modules/simpletest/tests/module_test.info
    branches/upstream/current-7/modules/simpletest/tests/path.test
    branches/upstream/current-7/modules/simpletest/tests/requirements1_test.info
    branches/upstream/current-7/modules/simpletest/tests/requirements2_test.info
    branches/upstream/current-7/modules/simpletest/tests/session_test.info
    branches/upstream/current-7/modules/simpletest/tests/system_dependencies_test.info
    branches/upstream/current-7/modules/simpletest/tests/system_test.info
    branches/upstream/current-7/modules/simpletest/tests/taxonomy_test.info
    branches/upstream/current-7/modules/simpletest/tests/theme.test
    branches/upstream/current-7/modules/simpletest/tests/theme_test.info
    branches/upstream/current-7/modules/simpletest/tests/update_test_1.info
    branches/upstream/current-7/modules/simpletest/tests/update_test_2.info
    branches/upstream/current-7/modules/simpletest/tests/update_test_3.info
    branches/upstream/current-7/modules/simpletest/tests/upgrade/drupal-6.user-password-token.database.php
    branches/upstream/current-7/modules/simpletest/tests/upgrade/upgrade.test
    branches/upstream/current-7/modules/simpletest/tests/upgrade/upgrade.user.test
    branches/upstream/current-7/modules/simpletest/tests/url_alter_test.info
    branches/upstream/current-7/modules/simpletest/tests/xmlrpc_test.info
    branches/upstream/current-7/modules/statistics/statistics.info
    branches/upstream/current-7/modules/syslog/syslog.info
    branches/upstream/current-7/modules/system/system.admin.inc
    branches/upstream/current-7/modules/system/system.api.php
    branches/upstream/current-7/modules/system/system.info
    branches/upstream/current-7/modules/system/system.install
    branches/upstream/current-7/modules/system/system.module
    branches/upstream/current-7/modules/system/system.tar.inc
    branches/upstream/current-7/modules/system/system.test
    branches/upstream/current-7/modules/taxonomy/taxonomy.info
    branches/upstream/current-7/modules/taxonomy/taxonomy.module
    branches/upstream/current-7/modules/taxonomy/taxonomy.pages.inc
    branches/upstream/current-7/modules/toolbar/toolbar.info
    branches/upstream/current-7/modules/tracker/tracker.info
    branches/upstream/current-7/modules/translation/tests/translation_test.info
    branches/upstream/current-7/modules/translation/translation.info
    branches/upstream/current-7/modules/trigger/tests/trigger_test.info
    branches/upstream/current-7/modules/trigger/trigger.info
    branches/upstream/current-7/modules/update/tests/aaa_update_test.info
    branches/upstream/current-7/modules/update/tests/bbb_update_test.info
    branches/upstream/current-7/modules/update/tests/ccc_update_test.info
    branches/upstream/current-7/modules/update/tests/update_test.info
    branches/upstream/current-7/modules/update/tests/update_test.module
    branches/upstream/current-7/modules/update/update.fetch.inc
    branches/upstream/current-7/modules/update/update.info
    branches/upstream/current-7/modules/update/update.manager.inc
    branches/upstream/current-7/modules/update/update.test
    branches/upstream/current-7/modules/user/tests/user_form_test.info
    branches/upstream/current-7/modules/user/user-profile-category.tpl.php
    branches/upstream/current-7/modules/user/user-profile.tpl.php
    branches/upstream/current-7/modules/user/user.info
    branches/upstream/current-7/modules/user/user.install
    branches/upstream/current-7/modules/user/user.module
    branches/upstream/current-7/modules/user/user.pages.inc
    branches/upstream/current-7/profiles/minimal/minimal.info
    branches/upstream/current-7/profiles/standard/standard.info
    branches/upstream/current-7/profiles/testing/modules/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info
    branches/upstream/current-7/profiles/testing/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info
    branches/upstream/current-7/profiles/testing/testing.info
    branches/upstream/current-7/scripts/generate-d6-content.sh
    branches/upstream/current-7/scripts/run-tests.sh
    branches/upstream/current-7/sites/default/default.settings.php
    branches/upstream/current-7/themes/bartik/bartik.info
    branches/upstream/current-7/themes/garland/comment.tpl.php
    branches/upstream/current-7/themes/garland/garland.info
    branches/upstream/current-7/themes/seven/reset.css
    branches/upstream/current-7/themes/seven/seven.info
    branches/upstream/current-7/themes/seven/style-rtl.css
    branches/upstream/current-7/themes/seven/style.css
    branches/upstream/current-7/themes/stark/stark.info
    branches/upstream/current-7/themes/tests/test_theme/test_theme.info
    branches/upstream/current-7/themes/tests/update_test_basetheme/update_test_basetheme.info
    branches/upstream/current-7/themes/tests/update_test_subtheme/update_test_subtheme.info
    branches/upstream/current-7/update.php

Modified: branches/upstream/current-7/.htaccess
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/.htaccess?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/.htaccess (original)
+++ branches/upstream/current-7/.htaccess Wed Nov  2 17:45:27 2011
@@ -15,12 +15,6 @@
 
 # Make Drupal handle any 404 errors.
 ErrorDocument 404 /index.php
-
-# Force simple error message for requests for non-existent favicon.ico.
-<Files favicon.ico>
-  # There is no end quote below, for compatibility with Apache 1.3.
-  ErrorDocument 404 "The requested file favicon.ico was not found.
-</Files>
 
 # Set the default handler.
 DirectoryIndex index.php index.html index.htm
@@ -129,7 +123,7 @@
 
     <FilesMatch "(\.js\.gz|\.css\.gz)$">
       # Serve correct encoding type.
-      Header append Content-Encoding gzip
+      Header set Content-Encoding gzip
       # Force proxies to cache gzipped & non-gzipped css/js files separately.
       Header append Vary Accept-Encoding
     </FilesMatch>

Modified: branches/upstream/current-7/CHANGELOG.txt
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/CHANGELOG.txt?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/CHANGELOG.txt (original)
+++ branches/upstream/current-7/CHANGELOG.txt Wed Nov  2 17:45:27 2011
@@ -1,3 +1,37 @@
+
+Drupal 7.9, 2011-10-26
+----------------------
+- Critical fixes to OpenID to spec violations that could allow for
+  impersonation in certain scenarios. Existing OpenID users should see
+  http://drupal.org/node/1120290#comment-5092796 for more information on
+  transitioning.
+- Fixed files getting lost when adding multiple files to multiple file fields
+  at the same time.
+- Improved usability of the clean URL test screens.
+- Restored height/width attributes on images run through the theme system.
+- Fixed usability bug with first password field being pre-filled by certain
+  browser plugins.
+- Fixed file_usage_list() so that it can return more than one result.
+- Fixed bug preventing preview of private images on node form.
+- Fixed PDO error when inserting an aggregator title longer than 255 characters.
+- Spelled out what TRADITIONAL means in MySQL sql_mode.
+- Deprecated "!=" operator for DBTNG; should be "<>".
+- Added two new API functions (menu_tree_set_path()/menu_tree_get_path()) were
+  added in order to enable setting the active menu trail for dynamically
+  generated menu paths.
+- Added new "fast 404" capability in settings.php to bypass Drupal bootstrap
+  when serving 404 pages for certain file types.
+- Added format_string() function which can perform string munging ala the t()
+  function without the overhead of the translation system.
+- Numerous #states system fixes.
+- Numerous EntityFieldQuery, DBTNG, and SQLite fixes.
+- Numerous Shortcut module fixes.
+- Numerous language system fixes.
+- Numerous token fixes.
+- Numerous CSS fixes.
+- Numerous upgrade path fixes.
+- Numerous minor string fixes.
+- Numerous notice fixes.
 
 Drupal 7.8, 2011-08-31
 ----------------------
@@ -1059,7 +1093,7 @@
 - Filter system:
     * Added support for using multiple input formats on the site
     * Expanded the embedded PHP-code feature so it can be used everywhere
-    * Added support for role-dependant filtering, through input formats
+    * Added support for role-dependent filtering, through input formats
 - UI translation:
     * Managing translations is now completely done through the administration interface
     * Added support for importing/exporting gettext .po files

Modified: branches/upstream/current-7/LICENSE.txt
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/LICENSE.txt?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/LICENSE.txt (original)
+++ branches/upstream/current-7/LICENSE.txt Wed Nov  2 17:45:27 2011
@@ -1,274 +1,339 @@
-GNU GENERAL PUBLIC LICENSE
-
-              Version 2, June 1991
-
-Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave,
-Cambridge, MA 02139, USA. Everyone is permitted to copy and distribute
-verbatim copies of this license document, but changing it is not allowed.
-
-                  Preamble
-
-The licenses for most software are designed to take away your freedom to
-share and change it. By contrast, the GNU General Public License is
-intended to guarantee your freedom to share and change free software--to
-make sure the software is free for all its users. This General Public License
-applies to most of the Free Software Foundation's software and to any other
-program whose authors commit to using it. (Some other Free Software
-Foundation software is covered by the GNU Library General Public License
-instead.) You can apply it to your programs, too.
-
-When we speak of free software, we are referring to freedom, not price. Our
-General Public Licenses are designed to make sure that you have the
-freedom to distribute copies of free software (and charge for this service if
-you wish), that you receive source code or can get it if you want it, that you
-can change the software or use pieces of it in new free programs; and that
-you know you can do these things.
-
-To protect your rights, we need to make restrictions that forbid anyone to
-deny you these rights or to ask you to surrender the rights. These restrictions
-translate to certain responsibilities for you if you distribute copies of the
-software, or if you modify it.
-
-For example, if you distribute copies of such a program, whether gratis or for
-a fee, you must give the recipients all the rights that you have. You must make
-sure that they, too, receive or can get the source code. And you must show
-them these terms so they know their rights.
-
-We protect your rights with two steps: (1) copyright the software, and (2)
-offer you this license which gives you legal permission to copy, distribute
-and/or modify the software.
-
-Also, for each author's protection and ours, we want to make certain that
-everyone understands that there is no warranty for this free software. If the
-software is modified by someone else and passed on, we want its recipients
-to know that what they have is not the original, so that any problems
-introduced by others will not reflect on the original authors' reputations.
-
-Finally, any free program is threatened constantly by software patents. We
-wish to avoid the danger that redistributors of a free program will individually
-obtain patent licenses, in effect making the program proprietary. To prevent
-this, we have made it clear that any patent must be licensed for everyone's
-free use or not licensed at all.
-
-The precise terms and conditions for copying, distribution and modification
-follow.
-
-           GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND
-               MODIFICATION
-
-0. This License applies to any program or other work which contains a notice
-placed by the copyright holder saying it may be distributed under the terms
-of this General Public License. The "Program", below, refers to any such
-program or work, and a "work based on the Program" means either the
-Program or any derivative work under copyright law: that is to say, a work
-containing the Program or a portion of it, either verbatim or with
-modifications and/or translated into another language. (Hereinafter, translation
-is included without limitation in the term "modification".) Each licensee is
-addressed as "you".
-
-Activities other than copying, distribution and modification are not covered
-by this License; they are outside its scope. The act of running the Program is
-not restricted, and the output from the Program is covered only if its contents
-constitute a work based on the Program (independent of having been made
-by running the Program). Whether that is true depends on what the Program
-does.
-
-1. You may copy and distribute verbatim copies of the Program's source
-code as you receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice and
-disclaimer of warranty; keep intact all the notices that refer to this License
-and to the absence of any warranty; and give any other recipients of the
-Program a copy of this License along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and you
-may at your option offer warranty protection in exchange for a fee.
-
-2. You may modify your copy or copies of the Program or any portion of it,
-thus forming a work based on the Program, and copy and distribute such
-modifications or work under the terms of Section 1 above, provided that you
-also meet all of these conditions:
-
-a) You must cause the modified files to carry prominent notices stating that
-you changed the files and the date of any change.
-
-b) You must cause any work that you distribute or publish, that in whole or in
-part contains or is derived from the Program or any part thereof, to be
-licensed as a whole at no charge to all third parties under the terms of this
-License.
-
-c) If the modified program normally reads commands interactively when run,
-you must cause it, when started running for such interactive use in the most
-ordinary way, to print or display an announcement including an appropriate
-copyright notice and a notice that there is no warranty (or else, saying that
-you provide a warranty) and that users may redistribute the program under
-these conditions, and telling the user how to view a copy of this License.
-(Exception: if the Program itself is interactive but does not normally print such
-an announcement, your work based on the Program is not required to print
-an announcement.)
-
-These requirements apply to the modified work as a whole. If identifiable
-sections of that work are not derived from the Program, and can be
-reasonably considered independent and separate works in themselves, then
-this License, and its terms, do not apply to those sections when you distribute
-them as separate works. But when you distribute the same sections as part
-of a whole which is a work based on the Program, the distribution of the
-whole must be on the terms of this License, whose permissions for other
-licensees extend to the entire whole, and thus to each and every part
-regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest your rights to
-work written entirely by you; rather, the intent is to exercise the right to
-control the distribution of derivative or collective works based on the
-Program.
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
 
 In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of a
-storage or distribution medium does not bring the other work under the scope
-of this License.
-
-3. You may copy and distribute the Program (or a work based on it, under
-Section 2) in object code or executable form under the terms of Sections 1
-and 2 above provided that you also do one of the following:
-
-a) Accompany it with the complete corresponding machine-readable source
-code, which must be distributed under the terms of Sections 1 and 2 above
-on a medium customarily used for software interchange; or,
-
-b) Accompany it with a written offer, valid for at least three years, to give
-any third party, for a charge no more than your cost of physically performing
-source distribution, a complete machine-readable copy of the corresponding
-source code, to be distributed under the terms of Sections 1 and 2 above on
-a medium customarily used for software interchange; or,
-
-c) Accompany it with the information you received as to the offer to distribute
-corresponding source code. (This alternative is allowed only for
-noncommercial distribution and only if you received the program in object
-code or executable form with such an offer, in accord with Subsection b
-above.)
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
 
 The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source code
-means all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation and
-installation of the executable. However, as a special exception, the source
-code distributed need not include anything that is normally distributed (in
-either source or binary form) with the major components (compiler, kernel,
-and so on) of the operating system on which the executable runs, unless that
-component itself accompanies the executable.
-
-If distribution of executable or object code is made by offering access to
-copy from a designated place, then offering equivalent access to copy the
-source code from the same place counts as distribution of the source code,
-even though third parties are not compelled to copy the source along with the
-object code.
-
-4. You may not copy, modify, sublicense, or distribute the Program except as
-expressly provided under this License. Any attempt otherwise to copy,
-modify, sublicense or distribute the Program is void, and will automatically
-terminate your rights under this License. However, parties who have received
-copies, or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-5. You are not required to accept this License, since you have not signed it.
-However, nothing else grants you permission to modify or distribute the
-Program or its derivative works. These actions are prohibited by law if you
-do not accept this License. Therefore, by modifying or distributing the
-Program (or any work based on the Program), you indicate your acceptance
-of this License to do so, and all its terms and conditions for copying,
-distributing or modifying the Program or works based on it.
-
-6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the original
-licensor to copy, distribute or modify the Program subject to these terms and
-conditions. You may not impose any further restrictions on the recipients'
-exercise of the rights granted herein. You are not responsible for enforcing
-compliance by third parties to this License.
-
-7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues), conditions
-are imposed on you (whether by court order, agreement or otherwise) that
-contradict the conditions of this License, they do not excuse you from the
-conditions of this License. If you cannot distribute so as to satisfy
-simultaneously your obligations under this License and any other pertinent
-obligations, then as a consequence you may not distribute the Program at all.
-For example, if a patent license would not permit royalty-free redistribution
-of the Program by all those who receive copies directly or indirectly through
-you, then the only way you could satisfy both it and this License would be to
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
 refrain entirely from distribution of the Program.
 
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply and
-the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any patents or
-other property right claims or to contest validity of any such claims; this
-section has the sole purpose of protecting the integrity of the free software
-distribution system, which is implemented by public license practices. Many
-people have made generous contributions to the wide range of software
-distributed through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing to
-distribute software through any other system and a licensee cannot impose
-that choice.
-
-This section is intended to make thoroughly clear what is believed to be a
-consequence of the rest of this License.
-
-8. If the distribution and/or use of the Program is restricted in certain
-countries either by patents or by copyrighted interfaces, the original copyright
-holder who places the Program under this License may add an explicit
-geographical distribution limitation excluding those countries, so that
-distribution is permitted only in or among countries not thus excluded. In such
-case, this License incorporates the limitation as if written in the body of this
-License.
-
-9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will be
-similar in spirit to the present version, but may differ in detail to address new
-problems or concerns.
-
-Each version is given a distinguishing version number. If the Program specifies
-a version number of this License which applies to it and "any later version",
-you have the option of following the terms and conditions either of that
-version or of any later version published by the Free Software Foundation. If
-the Program does not specify a version number of this License, you may
-choose any version ever published by the Free Software Foundation.
-
-10. If you wish to incorporate parts of the Program into other free programs
-whose distribution conditions are different, write to the author to ask for
-permission. For software which is copyrighted by the Free Software
-Foundation, write to the Free Software Foundation; we sometimes make
-exceptions for this. Our decision will be guided by the two goals of
-preserving the free status of all derivatives of our free software and of
-promoting the sharing and reuse of software generally.
-
-               NO WARRANTY
-
-11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE,
-THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT
-PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
-STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
-WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
-PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
-NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR
-AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR
-ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
-LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL,
-SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
-ARISING OUT OF THE USE OR INABILITY TO USE THE
-PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA
-OR DATA BEING RENDERED INACCURATE OR LOSSES
-SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE
-PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN
-IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.
-
-          END OF TERMS AND CONDITIONS
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                            NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License along
+    with this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.

Modified: branches/upstream/current-7/MAINTAINERS.txt
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/MAINTAINERS.txt?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/MAINTAINERS.txt (original)
+++ branches/upstream/current-7/MAINTAINERS.txt Wed Nov  2 17:45:27 2011
@@ -33,6 +33,7 @@
 
 Cache system
 - Damien Tournoud 'DamZ' <http://drupal.org/user/22211>
+- Nathaniel Catchpole 'catch' <http://drupal.org/user/35733>
 
 Cron system
 - Károly Négyesi 'chx' <http://drupal.org/user/9446>

Modified: branches/upstream/current-7/UPGRADE.txt
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/UPGRADE.txt?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/UPGRADE.txt (original)
+++ branches/upstream/current-7/UPGRADE.txt Wed Nov  2 17:45:27 2011
@@ -1,4 +1,3 @@
-
 INTRODUCTION
 ------------
 This document describes how to:
@@ -25,6 +24,11 @@
     applying it to your live site. Even minor updates can cause your site's
     behavior to change.
 
+  * Each new release of Drupal has release notes, which explain the changes made
+    since the previous version and any special instructions needed to update or
+    upgrade to the new version. You can find a link to the release notes for the
+    version you are upgrading or updating to on the Drupal project page
+    (http://drupal.org/project/drupal).
 
 UPGRADE PROBLEMS
 ----------------
@@ -39,7 +43,6 @@
   * Consult one of the support options listed on http://drupal.org/support
 
 More in-depth information on upgrading can be found at http://drupal.org/upgrade
-
 
 MINOR VERSION UPDATES
 ---------------------
@@ -58,11 +61,18 @@
    If you made modifications to files like .htaccess or robots.txt, you will
    need to re-apply them from your backup, after the new files are in place.
 
-   Sometimes an update includes changes to settings.php (this will be noted in
-   the release announcement). If that's the case, replace your old settings.php
-   with the new one, and copy the site-specific entries (especially the lines
-   giving the database name, user, and password) from the old settings.php to
-   the new settings.php.
+   Sometimes an update includes changes to default.settings.php (this will be
+   noted in the release notes). If that's the case, follow these steps:
+
+   - Make a backup copy of your settings.php file, with a different file name.
+
+   - Make a copy of the new default.settings.php file, and name the copy
+     settings.php (overwriting your previous settings.php file).
+
+   - Copy the custom and site-specific entries from the backup you made into the
+     new settings.php file. You will definitely need the lines giving the
+     database information, and you will also want to copy in any other
+     customizations you have added.
 
 4. Download the latest Drupal 7.x release from http://drupal.org to a
    directory outside of your web root. Extract the archive and copy the files
@@ -109,7 +119,6 @@
 9. Go to Administration > Configuration > Development > Maintenance mode.
    Disable the "Put site into maintenance mode" checkbox and save the
    configuration.
-
 
 MAJOR VERSION UPGRADE
 ---------------------
@@ -221,4 +230,3 @@
 
 To get started with Drupal 7 administration, visit
 http://drupal.org/getting-started/7/admin
-

Modified: branches/upstream/current-7/authorize.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/authorize.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/authorize.php (original)
+++ branches/upstream/current-7/authorize.php Wed Nov  2 17:45:27 2011
@@ -35,7 +35,7 @@
 define('MAINTENANCE_MODE', 'update');
 
 /**
- * Render a 403 access denied page for authorize.php
+ * Renders a 403 access denied page for authorize.php.
  */
 function authorize_access_denied_page() {
   drupal_add_http_header('Status', '403 Forbidden');
@@ -45,7 +45,7 @@
 }
 
 /**
- * Determine if the current user is allowed to run authorize.php.
+ * Determines if the current user is allowed to run authorize.php.
  *
  * The killswitch in settings.php overrides all else, otherwise, the user must
  * have access to the 'administer software updates' permission.
@@ -74,7 +74,7 @@
 global $conf;
 
 // We have to enable the user and system modules, even to check access and
-// display errors via the maintainence theme.
+// display errors via the maintenance theme.
 $module_list['system']['filename'] = 'modules/system/system.module';
 $module_list['user']['filename'] = 'modules/user/user.module';
 module_list(TRUE, FALSE, FALSE, $module_list);
@@ -145,7 +145,7 @@
         l(t('Front page'), '<front>'),
       ));
     }
-	
+
     $output .= theme('item_list', array('items' => $links, 'title' => t('Next steps')));
   }
   // If a batch is running, let it run.
@@ -172,4 +172,3 @@
 if (!empty($output)) {
   print theme('update_page', array('content' => $output, 'show_messages' => $show_messages));
 }
-

Modified: branches/upstream/current-7/includes/actions.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/includes/actions.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/includes/actions.inc (original)
+++ branches/upstream/current-7/includes/actions.inc Wed Nov  2 17:45:27 2011
@@ -311,7 +311,7 @@
       $link = l(t('Remove orphaned actions'), 'admin/config/system/actions/orphan');
       $count = count($actions_in_db);
       $orphans = implode(', ', $orphaned);
-      watchdog('actions', '@count orphaned actions (%orphans) exist in the actions table. !link', array('@count' => $count, '%orphans' => $orphans, '!link' => $link), WATCHDOG_WARNING);
+      watchdog('actions', '@count orphaned actions (%orphans) exist in the actions table. !link', array('@count' => $count, '%orphans' => $orphans, '!link' => $link), WATCHDOG_INFO);
     }
   }
 }

Modified: branches/upstream/current-7/includes/bootstrap.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/includes/bootstrap.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/includes/bootstrap.inc (original)
+++ branches/upstream/current-7/includes/bootstrap.inc Wed Nov  2 17:45:27 2011
@@ -8,7 +8,7 @@
 /**
  * The current system version.
  */
-define('VERSION', '7.8');
+define('VERSION', '7.9');
 
 /**
  * Core API compatibility.
@@ -418,7 +418,7 @@
  * Start the timer with the specified name. If you start and stop the same
  * timer multiple times, the measured intervals will be accumulated.
  *
- * @param name
+ * @param $name
  *   The name of the timer.
  */
 function timer_start($name) {
@@ -431,8 +431,9 @@
 /**
  * Read the current timer value without stopping the timer.
  *
- * @param name
+ * @param $name
  *   The name of the timer.
+ *
  * @return
  *   The current timer value in ms.
  */
@@ -454,8 +455,9 @@
 /**
  * Stop the timer with the specified name.
  *
- * @param name
+ * @param $name
  *   The name of the timer.
+ *
  * @return
  *   A timer array. The array contains the number of times the timer has been
  *   started and stopped (count) and the accumulated timer value in ms (time).
@@ -489,22 +491,22 @@
  * With a site located at http://www.example.com:8080/mysite/test/, the file,
  * settings.php, is searched for in the following directories:
  *
- *  1. $confdir/8080.www.example.com.mysite.test
- *  2. $confdir/www.example.com.mysite.test
- *  3. $confdir/example.com.mysite.test
- *  4. $confdir/com.mysite.test
- *
- *  5. $confdir/8080.www.example.com.mysite
- *  6. $confdir/www.example.com.mysite
- *  7. $confdir/example.com.mysite
- *  8. $confdir/com.mysite
- *
- *  9. $confdir/8080.www.example.com
- * 10. $confdir/www.example.com
- * 11. $confdir/example.com
- * 12. $confdir/com
- *
- * 13. $confdir/default
+ * - $confdir/8080.www.example.com.mysite.test
+ * - $confdir/www.example.com.mysite.test
+ * - $confdir/example.com.mysite.test
+ * - $confdir/com.mysite.test
+ *
+ * - $confdir/8080.www.example.com.mysite
+ * - $confdir/www.example.com.mysite
+ * - $confdir/example.com.mysite
+ * - $confdir/com.mysite
+ *
+ * - $confdir/8080.www.example.com
+ * - $confdir/www.example.com
+ * - $confdir/example.com
+ * - $confdir/com
+ *
+ * - $confdir/default
  *
  * If a file named sites.php is present in the $confdir, it will be loaded
  * prior to scanning for directories. It should define an associative array
@@ -824,7 +826,7 @@
 function drupal_get_filename($type, $name, $filename = NULL) {
   // The location of files will not change during the request, so do not use
   // drupal_static().
-  static $files = array();
+  static $files = array(), $dirs = array();
 
   if (!isset($files[$type])) {
     $files[$type] = array();
@@ -870,16 +872,19 @@
         $extension = $type;
       }
 
-      if (!function_exists('drupal_system_listing')) {
-        require_once DRUPAL_ROOT . '/includes/common.inc';
-      }
-      // Scan the appropriate directories for all files with the requested
-      // extension, not just the file we are currently looking for. This
-      // prevents unnecessary scans from being repeated when this function is
-      // called more than once in the same page request.
-      $matches = drupal_system_listing("/^" . DRUPAL_PHP_FUNCTION_PATTERN . "\.$extension$/", $dir, 'name', 0);
-      foreach ($matches as $matched_name => $file) {
-        $files[$type][$matched_name] = $file->uri;
+      if (!isset($dirs[$dir][$extension])) {
+        $dirs[$dir][$extension] = TRUE;
+        if (!function_exists('drupal_system_listing')) {
+          require_once DRUPAL_ROOT . '/includes/common.inc';
+        }
+        // Scan the appropriate directories for all files with the requested
+        // extension, not just the file we are currently looking for. This
+        // prevents unnecessary scans from being repeated when this function is
+        // called more than once in the same page request.
+        $matches = drupal_system_listing("/^" . DRUPAL_PHP_FUNCTION_PATTERN . "\.$extension$/", $dir, 'name', 0);
+        foreach ($matches as $matched_name => $file) {
+          $files[$type][$matched_name] = $file->uri;
+        }
       }
     }
   }
@@ -1391,10 +1396,11 @@
  * The t() function serves two purposes. First, at run-time it translates
  * user-visible text into the appropriate language. Second, various mechanisms
  * that figure out what text needs to be translated work off t() -- the text
- * inside t() calls is added to the database of strings to be translated. So,
- * to enable a fully-translatable site, it is important that all human-readable
- * text that will be displayed on the site or sent to a user is passed through
- * the t() function, or a related function. See the
+ * inside t() calls is added to the database of strings to be translated.
+ * These strings are expected to be in English, so the first argument should
+ * always be in English. To enable a fully-translatable site, it is important
+ * that all human-readable text that will be displayed on the site or sent to
+ * a user is passed through the t() function, or a related function. See the
  * @link http://drupal.org/node/322729 Localization API @endlink pages for
  * more information, including recommendations on how to break up or not
  * break up strings for translation.
@@ -1425,80 +1431,96 @@
  *   A string containing the English string to translate.
  * @param $args
  *   An associative array of replacements to make after translation.
- *   Occurrences in $string of any key in $args are replaced with the
- *   corresponding value, after sanitization. The sanitization function depends
- *   on the first character of the key:
+ *   See format_string().
+ * @param $options
+ *   An associative array of additional options, with the following elements:
+ *   - 'langcode' (defaults to the current language): The language code to
+ *     translate to a language other than what is used to display the page.
+ *   - 'context' (defaults to the empty context): The context the source string
+ *     belongs to.
+ *
+ * @return
+ *   The translated string.
+ *
+ * @see st()
+ * @see get_t()
+ * @ingroup sanitization
+ */
+function t($string, array $args = array(), array $options = array()) {
+  global $language;
+  static $custom_strings;
+
+  // Merge in default.
+  if (empty($options['langcode'])) {
+    $options['langcode'] = isset($language->language) ? $language->language : 'en';
+  }
+  if (empty($options['context'])) {
+    $options['context'] = '';
+  }
+
+  // First, check for an array of customized strings. If present, use the array
+  // *instead of* database lookups. This is a high performance way to provide a
+  // handful of string replacements. See settings.php for examples.
+  // Cache the $custom_strings variable to improve performance.
+  if (!isset($custom_strings[$options['langcode']])) {
+    $custom_strings[$options['langcode']] = variable_get('locale_custom_strings_' . $options['langcode'], array());
+  }
+  // Custom strings work for English too, even if locale module is disabled.
+  if (isset($custom_strings[$options['langcode']][$options['context']][$string])) {
+    $string = $custom_strings[$options['langcode']][$options['context']][$string];
+  }
+  // Translate with locale module if enabled.
+  elseif ($options['langcode'] != 'en' && function_exists('locale')) {
+    $string = locale($string, $options['context'], $options['langcode']);
+  }
+  if (empty($args)) {
+    return $string;
+  }
+  else {
+    return format_string($string, $args);
+  }
+}
+
+/**
+ * Replace placeholders with sanitized values in a string.
+ *
+ * @param $string
+ *   A string containing placeholders.
+ * @param $args
+ *   An associative array of replacements to make. Occurrences in $string of
+ *   any key in $args are replaced with the corresponding value, after
+ *   sanitization. The sanitization function depends on the first character of
+ *   the key:
  *   - !variable: Inserted as is. Use this for text that has already been
  *     sanitized.
  *   - @variable: Escaped to HTML using check_plain(). Use this for anything
  *     displayed on a page on the site.
  *   - %variable: Escaped as a placeholder for user-submitted content using
  *     drupal_placeholder(), which shows up as <em>emphasized</em> text.
- * @param $options
- *   An associative array of additional options, with the following elements:
- *   - 'langcode' (defaults to the current language): The language code to
- *     translate to a language other than what is used to display the page.
- *   - 'context' (defaults to the empty context): The context the source string
- *     belongs to.
- *
- * @return
- *   The translated string.
- *
- * @see st()
- * @see get_t()
+ *
+ * @see t()
  * @ingroup sanitization
  */
-function t($string, array $args = array(), array $options = array()) {
-  global $language;
-  static $custom_strings;
-
-  // Merge in default.
-  if (empty($options['langcode'])) {
-    $options['langcode'] = isset($language->language) ? $language->language : 'en';
-  }
-  if (empty($options['context'])) {
-    $options['context'] = '';
-  }
-
-  // First, check for an array of customized strings. If present, use the array
-  // *instead of* database lookups. This is a high performance way to provide a
-  // handful of string replacements. See settings.php for examples.
-  // Cache the $custom_strings variable to improve performance.
-  if (!isset($custom_strings[$options['langcode']])) {
-    $custom_strings[$options['langcode']] = variable_get('locale_custom_strings_' . $options['langcode'], array());
-  }
-  // Custom strings work for English too, even if locale module is disabled.
-  if (isset($custom_strings[$options['langcode']][$options['context']][$string])) {
-    $string = $custom_strings[$options['langcode']][$options['context']][$string];
-  }
-  // Translate with locale module if enabled.
-  elseif ($options['langcode'] != 'en' && function_exists('locale')) {
-    $string = locale($string, $options['context'], $options['langcode']);
-  }
-  if (empty($args)) {
-    return $string;
-  }
-  else {
-    // Transform arguments before inserting them.
-    foreach ($args as $key => $value) {
-      switch ($key[0]) {
-        case '@':
-          // Escaped only.
-          $args[$key] = check_plain($value);
-          break;
-
-        case '%':
-        default:
-          // Escaped and placeholder.
-          $args[$key] = drupal_placeholder($value);
-          break;
-
-        case '!':
-          // Pass-through.
-      }
-    }
-    return strtr($string, $args);
-  }
+function format_string($string, array $args = array()) {
+  // Transform arguments before inserting them.
+  foreach ($args as $key => $value) {
+    switch ($key[0]) {
+      case '@':
+        // Escaped only.
+        $args[$key] = check_plain($value);
+        break;
+
+      case '%':
+      default:
+        // Escaped and placeholder.
+        $args[$key] = drupal_placeholder($value);
+        break;
+
+      case '!':
+        // Pass-through.
+    }
+  }
+  return strtr($string, $args);
 }
 
 /**
@@ -1555,11 +1577,12 @@
 }
 
 /**
- * Since $_SERVER['REQUEST_URI'] is only available on Apache, we
- * generate an equivalent using other environment variables.
+ * Returns the equivalent of Apache's $_SERVER['REQUEST_URI'] variable.
+ *
+ * Because $_SERVER['REQUEST_URI'] is only available on Apache, we generate an
+ * equivalent using other environment variables.
  */
 function request_uri() {
-
   if (isset($_SERVER['REQUEST_URI'])) {
     $uri = $_SERVER['REQUEST_URI'];
   }
@@ -2401,6 +2424,34 @@
 }
 
 /**
+ * Returns a simple 404 Not Found page.
+ *
+ * If fast 404 pages are enabled, and this is a matching page then print a
+ * simple 404 page and exit.
+ *
+ * This function is called from drupal_deliver_html_page() at the time when a
+ * a normal 404 page is generated, but it can also optionally be called directly
+ * from settings.php to prevent a Drupal bootstrap on these pages. See
+ * documentation in settings.php for the benefits and drawbacks of using this.
+ *
+ * Paths to dynamically-generated content, such as image styles, should also be
+ * accounted for in this function.
+ */
+function drupal_fast_404() {
+  $exclude_paths = variable_get('404_fast_paths_exclude', FALSE);
+  if ($exclude_paths && !preg_match($exclude_paths, $_GET['q'])) {
+    $fast_paths = variable_get('404_fast_paths', FALSE);
+    if ($fast_paths && preg_match($fast_paths, $_GET['q'])) {
+      drupal_add_http_header('Status', '404 Not Found');
+      $fast_404_html = variable_get('404_fast_html', '<html xmlns="http://www.w3.org/1999/xhtml"><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL "@path" was not found on this server.</p></body></html>');
+      // Replace @path in the variable with the page path.
+      print strtr($fast_404_html, array('@path' => check_plain(request_uri())));
+      exit;
+    }
+  }
+}
+
+/**
  * Return TRUE if a Drupal installation is currently being attempted.
  */
 function drupal_installation_attempted() {
@@ -2419,7 +2470,7 @@
  * non-installation time, such as while installing the module from the the
  * module administration page.
  *
- * Example useage:
+ * Example usage:
  * @code
  *   $t = get_t();
  *   $translated = $t('translate this');
@@ -2447,6 +2498,7 @@
  * Initialize all the defined language types.
  */
 function drupal_language_initialize() {
+  global $language;
   $types = language_types();
 
   // Ensure the language is correctly returned, even without multilanguage
@@ -2466,6 +2518,9 @@
     // environments.
     bootstrap_invoke_all('language_init');
   }
+
+  // Send appropriate HTTP-Header for browsers and search engines.
+  header('Content-Language: ' . $language->language);
 }
 
 /**
@@ -2501,9 +2556,18 @@
 }
 
 /**
- * Get a list of languages set up indexed by the specified key
- *
- * @param $field The field to index the list with.
+ * Returns a list of installed languages, indexed by the specified key.
+ *
+ * @param $field
+ *   (optional) The field to index the list with.
+ *
+ * @return
+ *   An associative array, keyed on the values of $field.
+ *   - If $field is 'weight' or 'enabled', the array is nested, with the outer
+ *     array's values each being associative arrays with language codes as
+ *     keys and language objects as values.
+ *   - For all other values of $field, the array is only one level deep, and
+ *     the array's values are language objects.
  */
 function language_list($field = 'language') {
   $languages = &drupal_static(__FUNCTION__);
@@ -2748,7 +2812,7 @@
 
   public function __construct() {
     // Cache by request method.
-    parent::__construct('schema:runtime:' . $_SERVER['REQUEST_METHOD'] == 'GET', 'cache');
+    parent::__construct('schema:runtime:' . ($_SERVER['REQUEST_METHOD'] == 'GET'), 'cache');
   }
 
   protected function resolveCacheMiss($offset) {

Modified: branches/upstream/current-7/includes/common.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/includes/common.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/includes/common.inc (original)
+++ branches/upstream/current-7/includes/common.inc Wed Nov  2 17:45:27 2011
@@ -860,7 +860,7 @@
 
   // If the server URL has a user then attempt to use basic authentication.
   if (isset($uri['user'])) {
-    $options['headers']['Authorization'] = 'Basic ' . base64_encode($uri['user'] . (!empty($uri['pass']) ? ":" . $uri['pass'] : ''));
+    $options['headers']['Authorization'] = 'Basic ' . base64_encode($uri['user'] . (isset($uri['pass']) ? ':' . $uri['pass'] : ''));
   }
 
   // If the database prefix is being used by SimpleTest to run the tests in a copied
@@ -2196,8 +2196,9 @@
  */
 function url_is_external($path) {
   $colonpos = strpos($path, ':');
-  // Only call the slow drupal_strip_dangerous_protocols() if $path contains a
-  // ':' before any / ? or #.
+  // Avoid calling drupal_strip_dangerous_protocols() if there is any
+  // slash (/), hash (#) or question_mark (?) before the colon (:)
+  // occurrence - if any - as this would clearly mean it is not a URL.
   return $colonpos !== FALSE && !preg_match('![/?#]!', substr($path, 0, $colonpos)) && drupal_strip_dangerous_protocols($path) == $path;
 }
 
@@ -2475,6 +2476,9 @@
 
         watchdog('page not found', check_plain($_GET['q']), NULL, WATCHDOG_WARNING);
 
+        // Check for and return a fast 404 page if configured.
+        drupal_fast_404();
+
         // Keep old path for reference, and to allow forms to redirect to it.
         if (!isset($_GET['destination'])) {
           $_GET['destination'] = $_GET['q'];
@@ -2491,7 +2495,7 @@
         if (empty($return) || $return == MENU_NOT_FOUND || $return == MENU_ACCESS_DENIED) {
           // Standard 404 handler.
           drupal_set_title(t('Page not found'));
-          $return = t('The requested page could not be found.');
+          $return = t('The requested page "@path" could not be found.', array('@path' => request_uri()));
         }
 
         drupal_set_page_content($return);
@@ -3015,7 +3019,7 @@
  * are always groupable, and items of the 'external' type are never groupable.
  * This function also ensures that the process of grouping items does not change
  * their relative order. This requirement may result in multiple groups for the
- * same type, media, and browsers, if needed to accomodate other items in
+ * same type, media, and browsers, if needed to accommodate other items in
  * between.
  *
  * @param $css
@@ -5515,15 +5519,24 @@
  *
  * Recursively iterates over each of the array elements, generating HTML code.
  *
- * HTML generation is controlled by two properties containing theme functions,
- * #theme and #theme_wrappers.
+ * Renderable arrays have two kinds of key/value pairs: properties and
+ * children. Properties have keys starting with '#' and their values influence
+ * how the array will be rendered. Children are all elements whose keys do not
+ * start with a '#'. Their values should be renderable arrays themselves,
+ * which will be rendered during the rendering of the parent array. The markup
+ * provided by the children is typically inserted into the markup generated by
+ * the parent array.
+ *
+ * HTML generation for a renderable array, and the treatment of any children,
+ * is controlled by two properties containing theme functions, #theme and
+ * #theme_wrappers.
  *
  * #theme is the theme function called first. If it is set and the element has
- * any children, they have to be rendered there. For elements that are not
- * allowed to have any children, e.g. buttons or textfields, it can be used to
- * render the element itself. If #theme is not present and the element has
- * children, they are rendered and concatenated into a string by
- * drupal_render_children().
+ * any children, it is the responsibility of the theme function to render
+ * these children. For elements that are not allowed to have any children,
+ * e.g. buttons or textfields, the theme function can be used to render the
+ * element itself. If #theme is not present and the element has children, they
+ * are rendered and concatenated into a string by drupal_render_children().
  *
  * The #theme_wrappers property contains an array of theme functions which will
  * be called, in order, after #theme has run. These can be used to add further
@@ -6122,10 +6135,13 @@
 }
 
 /**
- * Return the children of an element, optionally sorted by weight.
+ * Identifies the children of an element array, optionally sorted by weight.
+ *
+ * The children of a element array are those key/value pairs whose key does
+ * not start with a '#'. See drupal_render() for details.
  *
  * @param $elements
- *   The element to be sorted.
+ *   The element array whose children are to be identified.
  * @param $sort
  *   Boolean to indicate whether the children should be sorted by weight.
  * @return
@@ -6163,7 +6179,7 @@
 }
 
 /**
- * Return the visibile children of an element.
+ * Returns the visible children of an element.
  *
  * @param $elements
  *   The parent element.
@@ -7568,44 +7584,30 @@
  *   uri of its own.
  */
 function entity_uri($entity_type, $entity) {
-  // This check enables the URI of an entity to be easily overridden from what
-  // the callback for the entity type or bundle would return, and it helps
-  // minimize performance overhead when entity_uri() is called multiple times
-  // for the same entity.
-  if (!isset($entity->uri)) {
-    $info = entity_get_info($entity_type);
-    list($id, $vid, $bundle) = entity_extract_ids($entity_type, $entity);
-
-    // A bundle-specific callback takes precedence over the generic one for the
-    // entity type.
-    if (isset($info['bundles'][$bundle]['uri callback'])) {
-      $uri_callback = $info['bundles'][$bundle]['uri callback'];
-    }
-    elseif (isset($info['uri callback'])) {
-      $uri_callback = $info['uri callback'];
-    }
-    else {
-      $uri_callback = NULL;
-    }
-
-    // Invoke the callback to get the URI. If there is no callback, set the
-    // entity's 'uri' property to FALSE to indicate that it is known to not have
-    // a URI.
-    if (isset($uri_callback) && function_exists($uri_callback)) {
-      $entity->uri = $uri_callback($entity);
-      if (!isset($entity->uri['options'])) {
-        $entity->uri['options'] = array();
-      }
-      // Pass the entity data to url() so that alter functions do not need to
-      // lookup this entity again.
-      $entity->uri['options']['entity_type'] = $entity_type;
-      $entity->uri['options']['entity'] = $entity;
-    }
-    else {
-      $entity->uri = FALSE;
-    }
-  }
-  return $entity->uri ? $entity->uri : NULL;
+  $info = entity_get_info($entity_type);
+  list($id, $vid, $bundle) = entity_extract_ids($entity_type, $entity);
+
+  // A bundle-specific callback takes precedence over the generic one for the
+  // entity type.
+  if (isset($info['bundles'][$bundle]['uri callback'])) {
+    $uri_callback = $info['bundles'][$bundle]['uri callback'];
+  }
+  elseif (isset($info['uri callback'])) {
+    $uri_callback = $info['uri callback'];
+  }
+  else {
+    return NULL;
+  }
+
+  // Invoke the callback to get the URI. If there is no callback, return NULL.
+  if (isset($uri_callback) && function_exists($uri_callback)) {
+    $uri = $uri_callback($entity);
+    // Pass the entity data to url() so that alter functions do not need to
+    // lookup this entity again.
+    $uri['options']['entity_type'] = $entity_type;
+    $uri['options']['entity'] = $entity;
+    return $uri;
+  }
 }
 
 /**

Modified: branches/upstream/current-7/includes/database/database.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/includes/database/database.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/includes/database/database.inc (original)
+++ branches/upstream/current-7/includes/database/database.inc Wed Nov  2 17:45:27 2011
@@ -152,7 +152,7 @@
  *   }
  *
  *   // $txn goes out of scope here.  Unless the transaction was rolled back, it
- *   // gets automatically commited here.
+ *   // gets automatically committed here.
  * }
  *
  * function my_other_function($id) {
@@ -1899,21 +1899,19 @@
 }
 
 /**
- * A prepared statement.
- *
- * Some methods in that class are purposely commented out. Due to a change in
+ * Represents a prepared statement.
+ *
+ * Some methods in that class are purposefully commented out. Due to a change in
  * how PHP defines PDOStatement, we can't define a signature for those methods
  * that will work the same way between versions older than 5.2.6 and later
- * versions.
- *
- * Please refer to http://bugs.php.net/bug.php?id=42452 for more details.
+ * versions.  See http://bugs.php.net/bug.php?id=42452 for more details.
  *
  * Child implementations should either extend PDOStatement:
  * @code
  * class DatabaseStatement_oracle extends PDOStatement implements DatabaseStatementInterface {}
  * @endcode
- * or implement their own class, but in that case they will also have to
- * implement the Iterator or IteratorArray interfaces before
+ * or define their own class. If defining their own class, they will also have
+ * to implement either the Iterator or IteratorAggregate interface before
  * DatabaseStatementInterface:
  * @code
  * class DatabaseStatement_oracle implements Iterator, DatabaseStatementInterface {}
@@ -1997,7 +1995,7 @@
    *   The numeric index of the field to return. Defaults to the first field.
    *
    * @return
-   *   A single field from the next record.
+   *   A single field from the next record, or FALSE if there is no next record.
    */
   public function fetchField($index = 0);
 
@@ -2017,7 +2015,7 @@
    * helper method, so one is added.
    *
    * @return
-   *   An associative array.
+   *   An associative array, or FALSE if there is no next row.
    */
   public function fetchAssoc();
 
@@ -2045,7 +2043,7 @@
    *   The index of the column number to fetch.
    *
    * @return
-   *   An indexed array.
+   *   An indexed array, or an empty array if there is no result set.
    */
   public function fetchCol($index = 0);
 
@@ -2065,7 +2063,7 @@
    *   The numeric index of the field to use as the array value.
    *
    * @return
-   *   An associative array.
+   *   An associative array, or an empty array if there is no result set.
    */
   public function fetchAllKeyed($key_index = 0, $value_index = 1);
 
@@ -2084,7 +2082,7 @@
    *   set for the query will be used.
    *
    * @return
-   *   An associative array.
+   *   An associative array, or an empty array if there is no result set.
    */
   public function fetchAllAssoc($key, $fetch = NULL);
 }

Modified: branches/upstream/current-7/includes/database/mysql/database.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/includes/database/mysql/database.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/includes/database/mysql/database.inc (original)
+++ branches/upstream/current-7/includes/database/mysql/database.inc Wed Nov  2 17:45:27 2011
@@ -60,8 +60,10 @@
     // This allows Drupal to run almost seamlessly on many different
     // kinds of database systems. These settings force MySQL to behave
     // the same as postgresql, or sqlite in regards to syntax interpretation
-    // and invalid data handling. See http://drupal.org/node/344575 for further discussion.
-    $this->exec("SET sql_mode='ANSI,TRADITIONAL'");
+    // and invalid data handling. See http://drupal.org/node/344575 for
+    // further discussion. Also, as MySQL 5.5 changed the meaning of
+    // TRADITIONAL we need to spell out the modes one by one.
+    $this->exec("SET sql_mode='ANSI,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER'");
   }
 
   public function queryRange($query, $from, $count, array $args = array(), array $options = array()) {

Modified: branches/upstream/current-7/includes/database/prefetch.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/includes/database/prefetch.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/includes/database/prefetch.inc (original)
+++ branches/upstream/current-7/includes/database/prefetch.inc Wed Nov  2 17:45:27 2011
@@ -370,7 +370,7 @@
     }
   }
 
-  public function fetchField($index = 0) {
+  public function fetchColumn($index = 0) {
     if (isset($this->currentRow) && isset($this->columnNames[$index])) {
       // We grab the value directly from $this->data, and format it.
       $return = $this->currentRow[$this->columnNames[$index]];
@@ -380,6 +380,10 @@
     else {
       return FALSE;
     }
+  }
+
+  public function fetchField($index = 0) {
+    return $this->fetchColumn($index);
   }
 
   public function fetchObject($class_name = NULL, $constructor_args = array()) {

Modified: branches/upstream/current-7/includes/database/query.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/includes/database/query.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/includes/database/query.inc (original)
+++ branches/upstream/current-7/includes/database/query.inc Wed Nov  2 17:45:27 2011
@@ -839,7 +839,7 @@
    * Executes the DELETE query.
    *
    * @return
-   *   The return value is dependant on the database connection.
+   *   The return value is dependent on the database connection.
    */
   public function execute() {
     $values = array();

Modified: branches/upstream/current-7/includes/database/sqlite/database.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/includes/database/sqlite/database.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/includes/database/sqlite/database.inc (original)
+++ branches/upstream/current-7/includes/database/sqlite/database.inc Wed Nov  2 17:45:27 2011
@@ -119,7 +119,7 @@
         try {
           $count = $this->query('SELECT COUNT(*) FROM ' . $prefix . '.sqlite_master WHERE type = :type AND name NOT LIKE :pattern', array(':type' => 'table', ':pattern' => 'sqlite_%'))->fetchField();
 
-          // We can prune the database file if it doens't have any tables.
+          // We can prune the database file if it doesn't have any tables.
           if ($count == 0) {
             // Detach the database.
             $this->query('DETACH DATABASE :schema', array(':schema' => $prefix));

Modified: branches/upstream/current-7/includes/database/sqlite/schema.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/includes/database/sqlite/schema.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/includes/database/sqlite/schema.inc (original)
+++ branches/upstream/current-7/includes/database/sqlite/schema.inc Wed Nov  2 17:45:27 2011
@@ -672,9 +672,10 @@
     // Don't add the prefix, $table_expression already includes the prefix.
     $info = $this->getPrefixInfo($table_expression, FALSE);
 
-    // Can't use query placeholders because the query would have to be
-    // :prefixsqlite_master, which does not work.
-    $result = db_query("SELECT name FROM " . $info['schema'] . ".sqlite_master WHERE name LIKE :table_name", array(
+    // Can't use query placeholders for the schema because the query would have
+    // to be :prefixsqlite_master, which does not work.
+    $result = db_query("SELECT name FROM " . $info['schema'] . ".sqlite_master WHERE type = :type AND name LIKE :table_name", array(
+      ':type' => 'table',
       ':table_name' => $info['table'],
     ));
     return $result->fetchAllKeyed(0, 0);

Modified: branches/upstream/current-7/includes/entity.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/includes/entity.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/includes/entity.inc (original)
+++ branches/upstream/current-7/includes/entity.inc Wed Nov  2 17:45:27 2011
@@ -307,7 +307,7 @@
    * @param $queried_entities
    *   Associative array of query results, keyed on the entity ID.
    * @param $revision_id
-   *   ID of the revision that was loaded, or FALSE if teh most current revision
+   *   ID of the revision that was loaded, or FALSE if the most current revision
    *   was loaded.
    */
   protected function attachLoad(&$queried_entities, $revision_id = FALSE) {
@@ -606,18 +606,25 @@
    *   dependent on $operator.
    * @param $operator
    *   Possible values:
-   *   - '=', '!=', '>', '>=', '<', '<=', 'STARTS_WITH', 'CONTAINS': These
+   *   - '=', '<>', '>', '>=', '<', '<=', 'STARTS_WITH', 'CONTAINS': These
    *     operators expect $value to be a literal of the same type as the
    *     column.
    *   - 'IN', 'NOT IN': These operators expect $value to be an array of
    *     literals of the same type as the column.
    *   - 'BETWEEN': This operator expects $value to be an array of two literals
    *     of the same type as the column.
+   *   The operator can be omitted, and will default to 'IN' if the value is an
+   *   array, or to '=' otherwise.
    *
    * @return EntityFieldQuery
    *   The called object.
    */
   public function entityCondition($name, $value, $operator = NULL) {
+    // The '!=' operator is deprecated in favour of the '<>' operator since the
+    // latter is ANSI SQL compatible.
+    if ($operator == '!=') {
+      $operator = '<>';
+    }
     $this->entityConditions[$name] = array(
       'value' => $value,
       'operator' => $operator,
@@ -722,13 +729,15 @@
    *   element in the array is dependent on $operator.
    * @param $operator
    *   Possible values:
-   *   - '=', '!=', '>', '>=', '<', '<=', 'STARTS_WITH', 'CONTAINS': These
+   *   - '=', '<>', '>', '>=', '<', '<=', 'STARTS_WITH', 'CONTAINS': These
    *     operators expect $value to be a literal of the same type as the
    *     column.
    *   - 'IN', 'NOT IN': These operators expect $value to be an array of
    *     literals of the same type as the column.
    *   - 'BETWEEN': This operator expects $value to be an array of two literals
    *     of the same type as the column.
+   *   The operator can be omitted, and will default to 'IN' if the value is an
+   *   array, or to '=' otherwise.
    * @param $delta_group
    *   An arbitrary identifier: conditions in the same group must have the same
    *   $delta_group. For example, let's presume a multivalue field which has
@@ -747,6 +756,11 @@
    *   The called object.
    */
   protected function addFieldCondition(&$conditions, $field, $column = NULL, $value = NULL, $operator = NULL, $delta_group = NULL, $language_group = NULL) {
+    // The '!=' operator is deprecated in favour of the '<>' operator since the
+    // latter is ANSI SQL compatible.
+    if ($operator == '!=') {
+      $operator = '<>';
+    }
     if (is_scalar($field)) {
       $field_definition = field_info_field($field);
       if (empty($field_definition)) {
@@ -787,7 +801,7 @@
    *   array is dependent on $operator.
    * @param $operator
    *   Possible values:
-   *   - '=', '!=', '>', '>=', '<', '<=', 'STARTS_WITH', 'CONTAINS': These
+   *   - '=', '<>', '>', '>=', '<', '<=', 'STARTS_WITH', 'CONTAINS': These
    *     operators expect $value to be a literal of the same type as the
    *     column.
    *   - 'IN', 'NOT IN': These operators expect $value to be an array of
@@ -801,6 +815,11 @@
    *   The called object.
    */
   public function propertyCondition($column, $value, $operator = NULL) {
+    // The '!=' operator is deprecated in favour of the '<>' operator since the
+    // latter is ANSI SQL compatible.
+    if ($operator == '!=') {
+      $operator = '<>';
+    }
     $this->propertyConditions[] = array(
       'column' => $column,
       'value' => $value,

Modified: branches/upstream/current-7/includes/errors.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/includes/errors.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/includes/errors.inc (original)
+++ branches/upstream/current-7/includes/errors.inc Wed Nov  2 17:45:27 2011
@@ -136,7 +136,7 @@
 }
 
 /**
- * Render an error message for an exception without any possibility of a further exception occuring.
+ * Render an error message for an exception without any possibility of a further exception occurring.
  *
  * @param $exception
  *   The exception object that was thrown.

Modified: branches/upstream/current-7/includes/file.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/includes/file.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/includes/file.inc (original)
+++ branches/upstream/current-7/includes/file.inc Wed Nov  2 17:45:27 2011
@@ -605,7 +605,8 @@
  *
  * @return
  *   A nested array with usage data. The first level is keyed by module name,
- *   the second by object type, the third has 'id' and 'count' keys.
+ *   the second by object type and the third by the object id. The value
+ *   of the third level contains the usage count.
  *
  * @see file_usage_add()
  * @see file_usage_delete()
@@ -618,7 +619,7 @@
     ->execute();
   $references = array();
   foreach ($result as $usage) {
-    $references[$usage->module][$usage->type] = array('id' => $usage->id, 'count' => $usage->count);
+    $references[$usage->module][$usage->type][$usage->id] = $usage->count;
   }
   return $references;
 }
@@ -2191,27 +2192,32 @@
 }
 
 /**
- * Returns the absolute path of a file or directory
- *
- * PHP's realpath() does not properly support streams, so this function
- * fills that gap. If a stream wrapped URI is provided, it will be passed
- * to the registered wrapper for handling. If the URI does not contain a
- * scheme or the wrapper implementation does not implement realpath, then
- * FALSE will be returned.
- *
- * @see http://php.net/manual/en/function.realpath.php
- *
- * Compatibility: normal paths and stream wrappers.
- * @see http://drupal.org/node/515192
+ * Returns the absolute local filesystem path of a stream URI.
+ *
+ * This function was originally written to ease the conversion of 6.x code to
+ * use 7.x stream wrappers. However, it assumes that every URI may be resolved
+ * to an absolute local filesystem path, and this assumption fails when stream
+ * wrappers are used to support remote file storage. Remote stream wrappers
+ * may implement the realpath method by always returning FALSE. The use of
+ * drupal_realpath() is discouraged, and is slowly being removed from core
+ * functions where possible.
+ *
+ * Only use this function if you know that the stream wrapper in the URI uses
+ * the local file system, and you need to pass an absolute path to a function
+ * that is incompatible with stream URIs.
  *
  * @param $uri
- *   A string containing the URI to verify.
- *
- * @return
- *   The absolute pathname, or FALSE on failure.
- *
- * @see realpath()
+ *   A stream wrapper URI or a filesystem path, possibly including one or more
+ *   symbolic links.
+ *
+ * @return
+ *   The absolute local filesystem path (with no symbolic links), or FALSE on
+ *   failure.
+ *
+ * @see DrupalStreamWrapperInterface::realpath()
+ * @see http://php.net/manual/function.realpath.php
  * @ingroup php_wrappers
+ * @todo: This function is deprecated, and should be removed wherever possible.
  */
 function drupal_realpath($uri) {
   // If this URI is a stream, pass it off to the appropriate stream wrapper.

Modified: branches/upstream/current-7/includes/file.mimetypes.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/includes/file.mimetypes.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/includes/file.mimetypes.inc (original)
+++ branches/upstream/current-7/includes/file.mimetypes.inc Wed Nov  2 17:45:27 2011
@@ -373,6 +373,7 @@
       333 => 'video/vnd.mpegurl',
       347 => 'video/x-flv',
       334 => 'video/x-la-asf',
+      348 => 'video/x-m4v',
       335 => 'video/x-mng',
       336 => 'video/x-ms-asf',
       337 => 'video/x-ms-wm',
@@ -852,6 +853,7 @@
       'f4a' => 346,
       'f4b' => 346,
       'flv' => 347,
+      'm4v' => 348,
     ),
   );
 }

Modified: branches/upstream/current-7/includes/form.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/includes/form.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/includes/form.inc (original)
+++ branches/upstream/current-7/includes/form.inc Wed Nov  2 17:45:27 2011
@@ -76,7 +76,7 @@
  * workflow, see the
  * @link http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html Form API reference @endlink
  * and the
- * @link http://drupal.org/node/37775 Form API section of the handbook. @endlink
+ * @link http://drupal.org/node/37775 Form API documentation section. @endlink
  * In addition, there is a set of Form API tutorials in
  * @link form_example_tutorial.inc the Form Example Tutorial @endlink which
  * provide basics all the way up through multistep forms.
@@ -86,73 +86,7 @@
  * passed by reference to most functions, so they use it to communicate with
  * the form system and each other.
  *
- * The $form_state keys are:
- * - build_info: Do not change; internal information stored by Form API to be
- *   able to build and rebuild the form:
- *   - args: A list of arguments used to rebuild the form from cache.
- *   - files: A list of include files to be loaded to rebuild the form. See
- *     form_load_include().
- * - 'values': An associative array of values submitted to the form. The
- *   validation functions and submit functions use this array for nearly all
- *   their decision making. (Note that
- *   @link http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html/7#tree #tree @endlink
- *   determines whether the values are a flat array or an array whose structure
- *   parallels the $form array.)
- * - 'rebuild': If the submit function sets $form_state['rebuild'] to TRUE,
- *   submission is not completed and instead the form is rebuilt using any
- *   information that the submit function has made available to the form builder
- *   function via $form_state. This is commonly used for wizard-style
- *   multi-step forms, add-more buttons, and the like. For further information
- *   see drupal_build_form().
- * - 'redirect': $form_state['redirect'] is used to redirect the form on
- *   submission. It may either be a string containing the destination URL, or
- *   an array of arguments compatible with drupal_goto(). See
- *   drupal_redirect_form() for complete information.
- * - 'storage': $form_state['storage'] is not a special key, and no specific
- *   support is provided for it in the Form API, but by tradition it was
- *   the location where application-specific data was stored for communication
- *   between the submit, validation, and form builder functions, especially
- *   in a multi-step-style form. Form implementations may use any key(s) within
- *   $form_state (other than the keys listed here and other reserved ones used
- *   by Form API internals) for this kind of storage. The recommended way to
- *   ensure that the chosen key doesn't conflict with ones used by the Form API
- *   or other modules is to use the module name as the key name or a prefix for
- *   the key name. For example, the Node module uses $form_state['node'] in node
- *   editing forms to store information about the node being edited, and this
- *   information stays available across successive clicks of the "Preview"
- *   button as well as when the "Save" button is finally clicked.
- * - 'temporary': Since values for all non-reserved keys in $form_state persist
- *   throughout a multistep form sequence, the Form API provides the 'temporary'
- *   key for modules to use for communicating information across form-related
- *   functions during a single page request only. There is no use-case for this
- *   functionality in core.
- * - 'triggering_element': (read-only) The form element that triggered
- *   submission. This is the same as the deprecated
- *   $form_state['clicked_button']. It is the element that caused submission,
- *   which may or may not be a button (in the case of Ajax forms.) This is
- *   often used to distinguish between various buttons in a submit handler,
- *   and is also used in Ajax handlers.
- * - 'cache': The typical form workflow involves two page requests. During the
- *   first page request, a form is built and returned for the user to fill in.
- *   Then the user fills the form in and submits it, triggering a second page
- *   request in which the form must be built and processed. By default, $form
- *   and $form_state are built from scratch during each of these page requests.
- *   In some special use-cases, it is necessary or desired to persist the $form
- *   and $form_state variables from the initial page request to the one that
- *   processes the submission. A form builder function can set 'cache' to TRUE
- *   to do this. One example where this is needed is to handle Ajax submissions,
- *   so ajax_process_form() sets this for all forms that include an element with
- *   a #ajax property. (In Ajax, the handler has no way to build the form
- *   itself, so must rely on the cached version created on each page load, so
- *   it's a classic example of this use case.) Note that the persistence of
- *   $form and $form_state across successive submissions of a multi-step form
- *   happens automatically regardless of the value for 'cache'.
- * - 'input': The array of values as they were submitted by the user. These are
- *   raw and unvalidated, so should not be used without a thorough understanding
- *   of security implications. In almost all cases, code should use the data in
- *   the 'values' array exclusively. The most common use of this key is for
- *   multi-step forms that need to clear some of the user input when setting
- *   'rebuild'.
+ * See drupal_build_form() for documentation of $form_state keys.
  */
 
 /**
@@ -211,22 +145,25 @@
  *   persist across page requests when the 'cache' or 'rebuild' flag is set.
  *   The following parameters may be set in $form_state to affect how the form
  *   is rendered:
- *   - build_info: A keyed array of build information that is necessary to
- *     rebuild the form from cache when the original context may no longer be
- *     available:
- *     - args: An array of arguments to pass to the form builder.
+ *   - build_info: Internal. An associative array of information stored by Form
+ *     API that is necessary to build and rebuild the form from cache when the
+ *     original context may no longer be available:
+ *     - args: A list of arguments to pass to the form constructor.
  *     - files: An optional array defining include files that need to be loaded
  *       for building the form. Each array entry may be the path to a file or
  *       another array containing values for the parameters 'type', 'module' and
  *       'name' as needed by module_load_include(). The files listed here are
  *       automatically loaded by form_get_cache(). By default the current menu
- *       router item's 'file' definition is added, if existent.
+ *       router item's 'file' definition is added, if any. Use
+ *       form_load_include() to add include files from a form constructor.
+ *   - rebuild_info: Internal. Similar to 'build_info', but pertaining to
+ *     drupal_rebuild_form().
  *   - rebuild: Normally, after the entire form processing is completed and
- *     submit handlers ran, a form is considered to be done and
+ *     submit handlers have run, a form is considered to be done and
  *     drupal_redirect_form() will redirect the user to a new page using a GET
  *     request (so a browser refresh does not re-submit the form). However, if
  *     'rebuild' has been set to TRUE, then a new copy of the form is
- *     immediately built and sent to the browser; instead of a redirect. This is
+ *     immediately built and sent to the browser, instead of a redirect. This is
  *     used for multi-step forms, such as wizards and confirmation forms.
  *     Normally, $form_state['rebuild'] is set by a submit handler, since it is
  *     usually logic within a submit handler that determines whether a form is
@@ -234,32 +171,107 @@
  *     set $form_state['rebuild'] to cause the form processing to bypass submit
  *     handlers and rebuild the form instead, even if there are no validation
  *     errors.
- *   - input: An array of input that corresponds to $_POST or $_GET, depending
- *     on the 'method' chosen (see below).
+ *   - redirect: Used to redirect the form on submission. It may either be a
+ *     string containing the destination URL, or an array of arguments
+ *     compatible with drupal_goto(). See drupal_redirect_form() for complete
+ *     information.
+ *   - no_redirect: If set to TRUE the form will NOT perform a drupal_goto(),
+ *     even if 'redirect' is set.
  *   - method: The HTTP form method to use for finding the input for this form.
  *     May be 'post' or 'get'. Defaults to 'post'. Note that 'get' method
  *     forms do not use form ids so are always considered to be submitted, which
  *     can have unexpected effects. The 'get' method should only be used on
- *     forms that do not change data, as that is exclusively the domain of post.
- *   - no_redirect: If set to TRUE the form will NOT perform a drupal_goto(),
- *     even if 'redirect' is set.
+ *     forms that do not change data, as that is exclusively the domain of
+ *     'post.'
  *   - cache: If set to TRUE the original, unprocessed form structure will be
- *     cached, which allows to rebuild the entire form from cache.
+ *     cached, which allows the entire form to be rebuilt from cache. A typical
+ *     form workflow involves two page requests; first, a form is built and
+ *     rendered for the user to fill in. Then, the user fills the form in and
+ *     submits it, triggering a second page request in which the form must be
+ *     built and processed. By default, $form and $form_state are built from
+ *     scratch during each of these page requests. Often, it is necessary or
+ *     desired to persist the $form and $form_state variables from the initial
+ *     page request to the one that processes the submission. 'cache' can be set
+ *     to TRUE to do this. A prominent example is an Ajax-enabled form, in which
+ *     ajax_process_form() enables form caching for all forms that include an
+ *     element with the #ajax property. (The Ajax handler has no way to build
+ *     the form itself, so must rely on the cached version.) Note that the
+ *     persistence of $form and $form_state happens automatically for
+ *     (multi-step) forms having the 'rebuild' flag set, regardless of the value
+ *     for 'cache'.
  *   - no_cache: If set to TRUE the form will NOT be cached, even if 'cache' is
  *     set.
+ *   - values: An associative array of values submitted to the form. The
+ *     validation functions and submit functions use this array for nearly all
+ *     their decision making. (Note that
+ *     @link http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html/7#tree #tree @endlink
+ *     determines whether the values are a flat array or an array whose structure
+ *     parallels the $form array.)
+ *   - input: The array of values as they were submitted by the user. These are
+ *     raw and unvalidated, so should not be used without a thorough
+ *     understanding of security implications. In almost all cases, code should
+ *     use the data in the 'values' array exclusively. The most common use of
+ *     this key is for multi-step forms that need to clear some of the user
+ *     input when setting 'rebuild'. The values correspond to $_POST or $_GET,
+ *     depending on the 'method' chosen.
  *   - always_process: If TRUE and the method is GET, a form_id is not
  *     necessary. This should only be used on RESTful GET forms that do NOT
  *     write data, as this could lead to security issues. It is useful so that
  *     searches do not need to have a form_id in their query arguments to
  *     trigger the search.
- *   - must_validate: Ordinarily, a form is only validated once but there are
+ *   - must_validate: Ordinarily, a form is only validated once, but there are
  *     times when a form is resubmitted internally and should be validated
  *     again. Setting this to TRUE will force that to happen. This is most
- *     likely to occur during AHAH or Ajax operations.
+ *     likely to occur during Ajax operations.
+ *   - programmed: If TRUE, the form was submitted programmatically, usually
+ *     invoked via drupal_form_submit(). Defaults to FALSE.
+ *   - process_input: Boolean flag. TRUE signifies correct form submission.
+ *     This is always TRUE for programmed forms coming from drupal_form_submit()
+ *     (see 'programmed' key), or if the form_id coming from the $_POST data is
+ *     set and matches the current form_id.
+ *   - submitted: If TRUE, the form has been submitted. Defaults to FALSE.
+ *   - executed: If TRUE, the form was submitted and has been processed and
+ *     executed. Defaults to FALSE.
+ *   - triggering_element: (read-only) The form element that triggered
+ *     submission. This is the same as the deprecated
+ *     $form_state['clicked_button']. It is the element that caused submission,
+ *     which may or may not be a button (in the case of Ajax forms). This key is
+ *     often used to distinguish between various buttons in a submit handler,
+ *     and is also used in Ajax handlers.
+ *   - clicked_button: Deprecated. Use triggering_element instead.
+ *   - has_file_element: Internal. If TRUE, there is a file element and Form API
+ *     will set the appropriate 'enctype' HTML attribute on the form.
+ *   - groups: Internal. An array containing references to fieldsets to render
+ *     them within vertical tabs.
+ *   - storage: $form_state['storage'] is not a special key, and no specific
+ *     support is provided for it in the Form API. By tradition it was
+ *     the location where application-specific data was stored for communication
+ *     between the submit, validation, and form builder functions, especially
+ *     in a multi-step-style form. Form implementations may use any key(s)
+ *     within $form_state (other than the keys listed here and other reserved
+ *     ones used by Form API internals) for this kind of storage. The
+ *     recommended way to ensure that the chosen key doesn't conflict with ones
+ *     used by the Form API or other modules is to use the module name as the
+ *     key name or a prefix for the key name. For example, the Node module uses
+ *     $form_state['node'] in node editing forms to store information about the
+ *     node being edited, and this information stays available across successive
+ *     clicks of the "Preview" button as well as when the "Save" button is
+ *     finally clicked.
+ *   - buttons: A list containing copies of all submit and button elements in
+ *     the form.
+ *   - complete form: A reference to the $form variable containing the complete
+ *     form structure. #process, #after_build, #element_validate, and other
+ *     handlers being invoked on a form element may use this reference to access
+ *     other information in the form the element is contained in.
  *   - temporary: An array holding temporary data accessible during the current
- *     page request only. It may be used to temporary save any data that doesn't
- *     need to or shouldn't be cached during the whole form workflow, e.g. data
- *     that needs to be accessed during the current form build process only.
+ *     page request only. All $form_state properties that are not reserved keys
+ *     (see form_state_keys_no_cache()) persist throughout a multistep form
+ *     sequence. Form API provides this key for modules to communicate
+ *     information across form-related functions during a single page request.
+ *     It may be used to temporarily save data that does not need to or should
+ *     not be cached during the whole form workflow; e.g., data that needs to be
+ *     accessed during the current form build process only. There is no use-case
+ *     for this functionality in Drupal core.
  *   - wrapper_callback: Modules that wish to pre-populate certain forms with
  *     common elements, such as back/next/save buttons in multi-step form
  *     wizards, may define a form builder function name that returns a form
@@ -268,8 +280,8 @@
  *     hook_forms() or have to invoke drupal_build_form() (instead of
  *     drupal_get_form()) on their own in a custom menu callback to prepare
  *     $form_state accordingly.
- *   Further $form_state properties controlling the redirection behavior after
- *   form submission may be found in drupal_redirect_form().
+ *   Information on how certain $form_state properties control redirection
+ *   behavior after form submission may be found in drupal_redirect_form().
  *
  * @return
  *   The rendered form. This function may also perform a redirect and hence may
@@ -907,7 +919,7 @@
   // have set $form_state['cache'] to indicate that the form and form state
   // shall be cached. But the form may only be cached if the 'no_cache' property
   // is not set to TRUE. Only cache $form as it was prior to form_builder(),
-  // because form_builder() must run for each request to accomodate new user
+  // because form_builder() must run for each request to accommodate new user
   // input. Rebuilt forms are not cached here, because drupal_rebuild_form()
   // already takes care of that.
   if (!$form_state['rebuild'] && $form_state['cache'] && empty($form_state['no_cache'])) {
@@ -1082,8 +1094,12 @@
   // matches the current user's session.
   if (isset($form['#token'])) {
     if (!drupal_valid_token($form_state['values']['form_token'], $form['#token'])) {
+      $path = current_path();
+      $query = drupal_get_query_parameters();
+      $url = url($path, array('query' => $query));
+
       // Setting this error will cause the form to fail validation.
-      form_set_error('form_token', t('This form is outdated. Reload the page and try again. Contact the site administrator if the problem persists.'));
+      form_set_error('form_token', t('The form has become outdated. Copy any unsaved work in the form below and then <a href="@link">reload this page</a>.', array('@link' => $url)));
     }
   }
 
@@ -1925,7 +1941,7 @@
   // drupal_form_submit() must not be able to get around this. Forms that set
   // #access=FALSE on an element usually allow access for some users, so forms
   // submitted with drupal_form_submit() may bypass access restriction and be
-  // treated as high-privelege users instead.
+  // treated as high-privilege users instead.
   $process_input = empty($element['#disabled']) && ($form_state['programmed'] || ($form_state['process_input'] && (!isset($element['#access']) || $element['#access'])));
 
   // Set the element's #value property.
@@ -2388,11 +2404,13 @@
 }
 
 /**
- * Change submitted form values during form validation.
+ * Changes submitted form values in $form_state.
  *
  * Use this function to change the submitted value of a form element in a form
  * validation function, so that the changed value persists in $form_state
- * through to the submission handlers.
+ * through the remaining validation and submission handlers. It does not change
+ * the value in $element['#value'], only in $form_state['values'], which is
+ * where submitted values are always stored.
  *
  * Note that form validation functions are specified in the '#validate'
  * component of the form array (the value of $form['#validate'] is an array of
@@ -2796,7 +2814,17 @@
  */
 function theme_date($variables) {
   $element = $variables['element'];
-  return '<div class="container-inline">' . drupal_render_children($element) . '</div>';
+
+  $attributes = array();
+  if (isset($element['#id'])) {
+    $attributes['id'] = $element['#id'];
+  }
+  if (!empty($element['#attributes']['class'])) {
+    $attributes['class'] = (array) $element['#attributes']['class'];
+  }
+  $attributes['class'][] = 'container-inline';
+
+  return '<div' . drupal_attributes($attributes) . '>' . drupal_render_children($element) . '</div>';
 }
 
 /**

Modified: branches/upstream/current-7/includes/image.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/includes/image.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/includes/image.inc (original)
+++ branches/upstream/current-7/includes/image.inc Wed Nov  2 17:45:27 2011
@@ -160,7 +160,7 @@
  *   The target height, in pixels.
  *
  * @return
- *   TRUE or FALSE, based on success.
+ *   TRUE on success, FALSE on failure.
  *
  * @see image_load()
  * @see image_resize()
@@ -178,12 +178,13 @@
 }
 
 /**
- * Scales an image to the given width and height while maintaining aspect ratio.
- *
- * The resulting image can be smaller for one or both target dimensions.
- *
- * @param $image
- *   An image object returned by image_load().
+ * Scales image dimensions while maintaining aspect ratio.
+ *
+ * The resulting dimensions can be smaller for one or both target dimensions.
+ *
+ * @param $dimensions
+ *   Dimensions to be modified - an array with components width and height, in
+ *   pixels.
  * @param $width
  *   The target width, in pixels. This value is omitted then the scaling will
  *   based only on the height value.
@@ -195,13 +196,12 @@
  *   up. This generally results in a low quality image.
  *
  * @return
- *   TRUE or FALSE, based on success.
- *
- * @see image_load()
- * @see image_scale_and_crop()
- */
-function image_scale(stdClass $image, $width = NULL, $height = NULL, $upscale = FALSE) {
-  $aspect = $image->info['height'] / $image->info['width'];
+ *   TRUE if $dimensions was modified, FALSE otherwise.
+ *
+ * @see image_scale()
+ */
+function image_dimensions_scale(array &$dimensions, $width = NULL, $height = NULL, $upscale = FALSE) {
+  $aspect = $dimensions['height'] / $dimensions['width'];
 
   if ($upscale) {
     // Set width/height according to aspect ratio if either is empty.
@@ -214,19 +214,56 @@
     $height = !empty($height) ? $height : 9999999;
 
     // Don't scale up.
-    if (round($width) >= $image->info['width'] && round($height) >= $image->info['height']) {
-      return TRUE;
+    if (round($width) >= $dimensions['width'] && round($height) >= $dimensions['height']) {
+      return FALSE;
     }
   }
 
   if ($aspect < $height / $width) {
-    $height = $width * $aspect;
+    $dimensions['width'] = $width;
+    $dimensions['height'] = (int) round($width * $aspect);
   }
   else {
-    $width = $height / $aspect;
-  }
-
-  return image_resize($image, $width, $height);
+    $dimensions['width'] = (int) round($height / $aspect);
+    $dimensions['height'] = $height;
+  }
+
+  return TRUE;
+}
+
+/**
+ * Scales an image while maintaining aspect ratio.
+ *
+ * The resulting image can be smaller for one or both target dimensions.
+ *
+ * @param $image
+ *   An image object returned by image_load().
+ * @param $width
+ *   The target width, in pixels. This value is omitted then the scaling will
+ *   based only on the height value.
+ * @param $height
+ *   The target height, in pixels. This value is omitted then the scaling will
+ *   based only on the width value.
+ * @param $upscale
+ *   Boolean indicating that files smaller than the dimensions will be scaled
+ *   up. This generally results in a low quality image.
+ *
+ * @return
+ *   TRUE on success, FALSE on failure.
+ *
+ * @see image_dimensions_scale()
+ * @see image_load()
+ * @see image_scale_and_crop()
+ */
+function image_scale(stdClass $image, $width = NULL, $height = NULL, $upscale = FALSE) {
+  $dimensions = $image->info;
+
+  // Scale the dimensions - if they don't change then just return success.
+  if (!image_dimensions_scale($dimensions, $width, $height, $upscale)) {
+    return TRUE;
+  }
+
+  return image_resize($image, $dimensions['width'], $dimensions['height']);
 }
 
 /**
@@ -240,7 +277,7 @@
  *   The target height, in pixels.
  *
  * @return
- *   TRUE or FALSE, based on success.
+ *   TRUE on success, FALSE on failure.
  *
  * @see image_load()
  * @see image_gd_resize()
@@ -267,7 +304,7 @@
  *   be white.
  *
  * @return
- *   TRUE or FALSE, based on success.
+ *   TRUE on success, FALSE on failure.
  *
  * @see image_load()
  * @see image_gd_rotate()
@@ -291,7 +328,7 @@
  *   The target height, in pixels.
  *
  * @return
- *   TRUE or FALSE, based on success.
+ *   TRUE on success, FALSE on failure.
  *
  * @see image_load()
  * @see image_scale_and_crop()
@@ -315,7 +352,7 @@
  *   An image object returned by image_load().
  *
  * @return
- *   TRUE or FALSE, based on success.
+ *   TRUE on success, FALSE on failure.
  *
  * @see image_load()
  * @see image_gd_desaturate()
@@ -379,7 +416,7 @@
  *   original image file will be overwritten.
  *
  * @return
- *   TRUE or FALSE, based on success.
+ *   TRUE on success, FALSE on failure.
  *
  * @see image_load()
  * @see image_gd_save()

Modified: branches/upstream/current-7/includes/install.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/includes/install.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/includes/install.inc (original)
+++ branches/upstream/current-7/includes/install.inc Wed Nov  2 17:45:27 2011
@@ -1183,10 +1183,11 @@
  *    dependencies[] = dblog
  * @endcode
  *
- * @param profile
+ * @param $profile
  *   Name of profile.
- * @param locale
+ * @param $locale
  *   Name of locale used (if any).
+ *
  * @return
  *   The info array.
  */

Modified: branches/upstream/current-7/includes/locale.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/includes/locale.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/includes/locale.inc (original)
+++ branches/upstream/current-7/includes/locale.inc Wed Nov  2 17:45:27 2011
@@ -93,39 +93,82 @@
  * otherwise we would cache a user-specific preference.
  *
  * @param $languages
- *   An array of valid language objects.
+ *   An array of language objects for enabled languages ordered by weight.
  *
  * @return
  *   A valid language code on success, FALSE otherwise.
  */
 function locale_language_from_browser($languages) {
-  // Specified by the user via the browser's Accept Language setting
+  if (empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
+    return FALSE;
+  }
+
+  // The Accept-Language header contains information about the language
+  // preferences configured in the user's browser / operating system.
+  // RFC 2616 (section 14.4) defines the Accept-Language header as follows:
+  //   Accept-Language = "Accept-Language" ":"
+  //                  1#( language-range [ ";" "q" "=" qvalue ] )
+  //   language-range  = ( ( 1*8ALPHA *( "-" 1*8ALPHA ) ) | "*" )
   // Samples: "hu, en-us;q=0.66, en;q=0.33", "hu,en-us;q=0.5"
-  $browser_langs = array();
-
-  if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
-    $browser_accept = explode(",", $_SERVER['HTTP_ACCEPT_LANGUAGE']);
-    foreach ($browser_accept as $langpart) {
-      // The language part is either a code or a code with a quality.
-      // We cannot do anything with a * code, so it is skipped.
-      // If the quality is missing, it is assumed to be 1 according to the RFC.
-      if (preg_match("!([a-z-]+)(;q=([0-9\\.]+))?!", trim($langpart), $found)) {
-        $browser_langs[$found[1]] = (isset($found[3]) ? (float) $found[3] : 1.0);
-      }
-    }
-  }
-
-  // Order the codes by quality
-  arsort($browser_langs);
-
-  // Try to find the first preferred language we have
-  foreach ($browser_langs as $langcode => $q) {
-    if (isset($languages[$langcode])) {
-      return $langcode;
-    }
-  }
-
-  return FALSE;
+  $browser_langcodes = array();
+  if (preg_match_all('@([a-zA-Z-]+|\*)(?:;q=([0-9.]+))?(?:$|\s*,\s*)@', trim($_SERVER['HTTP_ACCEPT_LANGUAGE']), $matches, PREG_SET_ORDER)) {
+    foreach ($matches as $match) {
+      // We can safely use strtolower() here, tags are ASCII.
+      // RFC2616 mandates that the decimal part is no more than three digits,
+      // so we multiply the qvalue by 1000 to avoid floating point comparisons.
+      $langcode = strtolower($match[1]);
+      $qvalue = isset($match[2]) ? (float) $match[2] : 1;
+      $browser_langcodes[$langcode] = (int) ($qvalue * 1000);
+    }
+  }
+
+  // We should take pristine values from the HTTP headers, but Internet Explorer
+  // from version 7 sends only specific language tags (eg. fr-CA) without the
+  // corresponding generic tag (fr) unless explicitly configured. In that case,
+  // we assume that the lowest value of the specific tags is the value of the
+  // generic language to be as close to the HTTP 1.1 spec as possible.
+  // See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4 and
+  // http://blogs.msdn.com/b/ie/archive/2006/10/17/accept-language-header-for-internet-explorer-7.aspx
+  asort($browser_langcodes);
+  foreach ($browser_langcodes as $langcode => $qvalue) {
+    $generic_tag = strtok($langcode, '-');
+    if (!isset($browser_langcodes[$generic_tag])) {
+      $browser_langcodes[$generic_tag] = $qvalue;
+    }
+  }
+
+  // Find the enabled language with the greatest qvalue, following the rules
+  // of RFC 2616 (section 14.4). If several languages have the same qvalue,
+  // prefer the one with the greatest weight.
+  $best_match_langcode = FALSE;
+  $max_qvalue = 0;
+  foreach ($languages as $langcode => $language) {
+    // Language tags are case insensitive (RFC2616, sec 3.10).
+    $langcode = strtolower($langcode);
+
+    // If nothing matches below, the default qvalue is the one of the wildcard
+    // language, if set, or is 0 (which will never match).
+    $qvalue = isset($browser_langcodes['*']) ? $browser_langcodes['*'] : 0;
+
+    // Find the longest possible prefix of the browser-supplied language
+    // ('the language-range') that matches this site language ('the language tag').
+    $prefix = $langcode;
+    do {
+      if (isset($browser_langcodes[$prefix])) {
+        $qvalue = $browser_langcodes[$prefix];
+        break;
+      }
+    }
+    while ($prefix = substr($prefix, 0, strrpos($prefix, '-')));
+
+    // Find the best match.
+    if ($qvalue > $max_qvalue) {
+      $best_match_langcode = $language->language;
+      $max_qvalue = $qvalue;
+    }
+  }
+
+  return $best_match_langcode;
 }
 
 /**
@@ -207,10 +250,16 @@
 
     case LOCALE_LANGUAGE_NEGOTIATION_URL_DOMAIN:
       foreach ($languages as $language) {
-        $host = parse_url($language->domain, PHP_URL_HOST);
-        if ($host && ($_SERVER['HTTP_HOST'] == $host)) {
-          $language_url = $language->language;
-          break;
+        // Skip check if the language doesn't have a domain.
+        if ($language->domain) {
+          // Only compare the domains not the protocols or ports.
+          // Remove protocol and add http:// so parse_url works
+          $host = 'http://' . str_replace(array('http://', 'https://'), '', $language->domain);
+          $host = parse_url($host, PHP_URL_HOST);
+          if ($_SERVER['HTTP_HOST'] == $host) {
+            $language_url = $language->language;
+            break;
+          }
         }
       }
       break;
@@ -1394,10 +1443,40 @@
 
   // Match all calls to Drupal.t() in an array.
   // Note: \s also matches newlines with the 's' modifier.
-  preg_match_all('~[^\w]Drupal\s*\.\s*t\s*\(\s*(' . LOCALE_JS_STRING . ')\s*[,\)]~s', $file, $t_matches);
+  preg_match_all('~
+    [^\w]Drupal\s*\.\s*t\s*                       # match "Drupal.t" with whitespace
+    \(\s*                                         # match "(" argument list start
+    (' . LOCALE_JS_STRING . ')\s*                 # capture string argument
+    [,\)]                                         # match ")" or "," to finish
+    ~sx', $file, $t_matches);
 
   // Match all Drupal.formatPlural() calls in another array.
-  preg_match_all('~[^\w]Drupal\s*\.\s*formatPlural\s*\(\s*.+?\s*,\s*(' . LOCALE_JS_STRING . ')\s*,\s*((?:(?:\'(?:\\\\\'|[^\'])*@count(?:\\\\\'|[^\'])*\'|"(?:\\\\"|[^"])*@count(?:\\\\"|[^"])*")(?:\s*\+\s*)?)+)\s*[,\)]~s', $file, $plural_matches);
+  preg_match_all('~
+    [^\w]Drupal\s*\.\s*formatPlural\s*  # match "Drupal.formatPlural" with whitespace
+    \(                                  # match "(" argument list start
+    \s*.+?\s*,\s*                       # match count argument
+    (' . LOCALE_JS_STRING . ')\s*,\s*   # match singular string argument
+    (                             # capture plural string argument
+      (?:                         # non-capturing group to repeat string pieces
+        (?:
+          \'                      # match start of single-quoted string
+          (?:\\\\\'|[^\'])*       # match any character except unescaped single-quote
+          @count                  # match "@count"
+          (?:\\\\\'|[^\'])*       # match any character except unescaped single-quote
+          \'                      # match end of single-quoted string
+          |
+          "                       # match start of double-quoted string
+          (?:\\\\"|[^"])*         # match any character except unescaped double-quote
+          @count                  # match "@count"
+          (?:\\\\"|[^"])*         # match any character except unescaped double-quote
+          "                       # match end of double-quoted string
+        )
+        (?:\s*\+\s*)?             # match "+" with possible whitespace, for str concat
+      )+                          # match multiple because we supports concatenating strs
+    )\s*                          # end capturing of plural string argument
+    [,\)]
+    ~sx', $file, $plural_matches);
+
 
   // Loop through all matches and process them.
   $all_matches = array_merge($plural_matches[1], $t_matches[1]);

Modified: branches/upstream/current-7/includes/menu.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/includes/menu.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/includes/menu.inc (original)
+++ branches/upstream/current-7/includes/menu.inc Wed Nov  2 17:45:27 2011
@@ -1134,6 +1134,45 @@
 }
 
 /**
+ * Set the path for determining the active trail of the specified menu tree.
+ *
+ * This path will also affect the breadcrumbs under some circumstances.
+ * Breadcrumbs are built using the preferred link returned by
+ * menu_link_get_preferred(). If the preferred link is inside one of the menus
+ * specified in calls to menu_tree_set_path(), the preferred link will be
+ * overridden by the corresponding path returned by menu_tree_get_path().
+ *
+ * Setting this path does not affect the main content; for that use
+ * menu_set_active_item() instead.
+ *
+ * @param $menu_name
+ *   The name of the affected menu tree.
+ * @param $path
+ *   The path to use when finding the active trail.
+ */
+function menu_tree_set_path($menu_name, $path = NULL) {
+  $paths = &drupal_static(__FUNCTION__);
+  if (isset($path)) {
+    $paths[$menu_name] = $path;
+  }
+  return isset($paths[$menu_name]) ? $paths[$menu_name] : NULL;
+}
+
+/**
+ * Get the path for determining the active trail of the specified menu tree.
+ *
+ * @param $menu_name
+ *   The menu name of the requested tree.
+ *
+ * @return
+ *   A string containing the path. If no path has been specified with
+ *   menu_tree_set_path(), NULL is returned.
+ */
+function menu_tree_get_path($menu_name) {
+  return menu_tree_set_path($menu_name);
+}
+
+/**
  * Get the data structure representing a named menu tree, based on the current page.
  *
  * The tree order is maintained by storing each parent in an individual
@@ -1158,8 +1197,10 @@
 function menu_tree_page_data($menu_name, $max_depth = NULL, $only_active_trail = FALSE) {
   $tree = &drupal_static(__FUNCTION__, array());
 
+  // Check if the active trail has been overridden for this menu tree.
+  $active_path = menu_tree_get_path($menu_name);
   // Load the menu item corresponding to the current page.
-  if ($item = menu_get_item()) {
+  if ($item = menu_get_item($active_path)) {
     if (isset($max_depth)) {
       $max_depth = min($max_depth, MENU_MAX_DEPTH);
     }
@@ -1198,8 +1239,9 @@
         // If the item for the current page is accessible, build the tree
         // parameters accordingly.
         if ($item['access']) {
-          // Find a menu link corresponding to the current path.
-          if ($active_link = menu_link_get_preferred()) {
+          // Find a menu link corresponding to the current path. If $active_path
+          // is NULL, let menu_link_get_preferred() determine the path.
+          if ($active_link = menu_link_get_preferred($active_path)) {
             // The active link may only be taken into account to build the
             // active trail, if it resides in the requested menu. Otherwise,
             // we'd needlessly re-run _menu_build_tree() queries for every menu
@@ -1459,18 +1501,30 @@
 }
 
 /**
- * Build the data representing a menu tree.
+ * Builds the data representing a menu tree.
  *
  * @param $links
- *   An array of links (associative arrays) ordered by p1..p9.
+ *   A flat array of menu links that are part of the menu. Each array element
+ *   is an associative array of information about the menu link, containing the
+ *   fields from the {menu_links} table, and optionally additional information
+ *   from the {menu_router} table, if the menu item appears in both tables.
+ *   This array must be ordered depth-first. See _menu_build_tree() for a sample
+ *   query.
  * @param $parents
- *   An array of the plid values that represent the path from the current page
- *   to the root of the menu tree.
+ *   An array of the menu link ID values that are in the path from the current
+ *   page to the root of the menu tree.
  * @param $depth
- *   The minimum depth of any link in the $links array.
+ *   The minimum depth to include in the returned menu tree.
  *
  * @return
- *   See menu_tree_page_data for a description of the data structure.
+ *   An array of menu links in the form of a tree. Each item in the tree is an
+ *   associative array containing:
+ *   - link: The menu link item from $links, with additional element
+ *     'in_active_trail' (TRUE if the link ID was in $parents).
+ *   - below: An array containing the sub-tree of this item, where each element
+ *     is a tree item array with 'link' and 'below' elements. This array will be
+ *     empty if the menu item has no items in its sub-tree having a depth
+ *     greater than or equal to $depth.
  */
 function menu_tree_data(array $links, array $parents = array(), $depth = 1) {
   // Reverse the array so we can use the more efficient array_pop() function.
@@ -2229,38 +2283,36 @@
 /**
  * Set the active path, which determines which page is loaded.
  *
- * @param $path
- *   A Drupal path - not a path alias.
- *
  * Note that this may not have the desired effect unless invoked very early
  * in the page load, such as during hook_boot, or unless you call
  * menu_execute_active_handler() to generate your page output.
+ *
+ * @param $path
+ *   A Drupal path - not a path alias.
  */
 function menu_set_active_item($path) {
   $_GET['q'] = $path;
 }
 
 /**
- * Sets or gets the active trail (path to menu tree root) of the current page.
+ * Sets the active trail (path to menu tree root) of the current page.
+ *
+ * Any trail set by this function will only be used for functionality that calls
+ * menu_get_active_trail(). Drupal core only uses trails set here for
+ * breadcrumbs and the page title and not for menu trees or page content.
+ * Additionally, breadcrumbs set by drupal_set_breadcrumb() will override any
+ * trail set here.
+ *
+ * To affect the trail used by menu trees, use menu_tree_set_path(). To affect
+ * the page content, use menu_set_active_item() instead.
  *
  * @param $new_trail
- *   Menu trail to set, or NULL to use previously-set or calculated trail. If
- *   supplying a trail, use the same format as the return value (see below).
+ *   Menu trail to set; the value is saved in a static variable and can be
+ *   retrieved by menu_get_active_trail(). The format of this array should be
+ *   the same as the return value of menu_get_active_trail().
  *
  * @return
- *   Path to menu root of the current page, as an array of menu link items,
- *   starting with the site's home page. Each link item is an associative array
- *   with the following components:
- *   - title: Title of the item.
- *   - href: Drupal path of the item.
- *   - localized_options: Options for passing into the l() function.
- *   - type: A menu type constant, such as MENU_DEFAULT_LOCAL_TASK, or 0 to
- *     indicate it's not really in the menu (used for the home page item).
- *   If $new_trail is supplied, the value is saved in a static variable and
- *   returned. If $new_trail is not supplied, and there is a saved value from
- *   a previous call, the saved value is returned. If $new_trail is not supplied
- *   and there is no saved value, the path to the current page is calculated,
- *   saved as the static value, and returned.
+ *   The active trail. See menu_get_active_trail() for details.
  */
 function menu_set_active_trail($new_trail = NULL) {
   $trail = &drupal_static(__FUNCTION__);
@@ -2419,7 +2471,20 @@
 /**
  * Gets the active trail (path to root menu root) of the current page.
  *
- * See menu_set_active_trail() for details of return value.
+ * If a trail is supplied to menu_set_active_trail(), that value is returned. If
+ * a trail is not supplied to menu_set_active_trail(), the path to the current
+ * page is calculated and returned. The calculated trail is also saved as a
+ * static value for use by subsequent calls to menu_get_active_trail().
+ *
+ * @return
+ *   Path to menu root of the current page, as an array of menu link items,
+ *   starting with the site's home page. Each link item is an associative array
+ *   with the following components:
+ *   - title: Title of the item.
+ *   - href: Drupal path of the item.
+ *   - localized_options: Options for passing into the l() function.
+ *   - type: A menu type constant, such as MENU_DEFAULT_LOCAL_TASK, or 0 to
+ *     indicate it's not really in the menu (used for the home page item).
  */
 function menu_get_active_trail() {
   return menu_set_active_trail();

Modified: branches/upstream/current-7/includes/module.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/includes/module.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/includes/module.inc (original)
+++ branches/upstream/current-7/includes/module.inc Wed Nov  2 17:45:27 2011
@@ -786,10 +786,9 @@
  * @return
  *   The return value of the hook implementation.
  */
-function module_invoke() {
+function module_invoke($module, $hook) {
   $args = func_get_args();
-  $module = $args[0];
-  $hook = $args[1];
+  // Remove $module and $hook from the arguments.
   unset($args[0], $args[1]);
   if (module_hook($module, $hook)) {
     return call_user_func_array($module . '_' . $hook, $args);
@@ -808,9 +807,9 @@
  *   An array of return values of the hook implementations. If modules return
  *   arrays from their implementations, those are merged into one array.
  */
-function module_invoke_all() {
+function module_invoke_all($hook) {
   $args = func_get_args();
-  $hook = $args[0];
+  // Remove $hook from the arguments.
   unset($args[0]);
   $return = array();
   foreach (module_implements($hook) as $module) {

Modified: branches/upstream/current-7/includes/pager.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/includes/pager.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/includes/pager.inc (original)
+++ branches/upstream/current-7/includes/pager.inc Wed Nov  2 17:45:27 2011
@@ -200,7 +200,7 @@
  * to theme('pager') will render a pager that correctly corresponds to the
  * items being displayed.
  *
- * If the items being displayed result from a database query peformed using
+ * If the items being displayed result from a database query performed using
  * Drupal's database API, and if you have control over the construction of the
  * database query, you do not need to call this function directly; instead, you
  * can simply extend the query object with the 'PagerDefault' extender before

Modified: branches/upstream/current-7/includes/session.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/includes/session.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/includes/session.inc (original)
+++ branches/upstream/current-7/includes/session.inc Wed Nov  2 17:45:27 2011
@@ -49,21 +49,23 @@
 }
 
 /**
- * Session handler assigned by session_set_save_handler().
- *
- * This function will be called by PHP to retrieve the current user's
- * session data, which is stored in the database. It also loads the
- * current user's appropriate roles into the user object.
- *
- * This function should not be called directly. Session data should
- * instead be accessed via the $_SESSION superglobal.
+ * Reads an entire session from the database (internal use only).
+ *
+ * Also initializes the $user object for the user associated with the session.
+ * This function is registered with session_set_save_handler() to support
+ * database-backed sessions. It is called on every page load when PHP sets
+ * up the $_SESSION superglobal.
+ *
+ * This function is an internal function and must not be called directly.
+ * Doing so may result in logging out the current user, corrupting session data
+ * or other unexpected behavior. Session data must always be accessed via the
+ * $_SESSION superglobal.
  *
  * @param $sid
- *   Session ID.
+ *   The session ID of the session to retrieve.
  *
  * @return
- *   Either an array of the session data, or an empty string, if no data
- *   was found or the user is anonymous.
+ *   The user's session, or an empty string if no session exists.
  */
 function _drupal_session_read($sid) {
   global $user, $is_https;
@@ -136,21 +138,22 @@
 }
 
 /**
- * Session handler assigned by session_set_save_handler().
- *
- * This function will be called by PHP to store the current user's
- * session, which Drupal saves to the database.
- *
- * This function should not be called directly. Session data should
- * instead be accessed via the $_SESSION superglobal.
+ * Writes an entire session to the database (internal use only).
+ *
+ * This function is registered with session_set_save_handler() to support
+ * database-backed sessions.
+ *
+ * This function is an internal function and must not be called directly.
+ * Doing so may result in corrupted session data or other unexpected behavior.
+ * Session data must always be accessed via the $_SESSION superglobal.
  *
  * @param $sid
- *   Session ID.
+ *   The session ID of the session to write to.
  * @param $value
- *   Serialized array of the session data.
+ *   Session data to write as a serialized string.
  *
  * @return
- *   This function will always return TRUE.
+ *   Always returns TRUE.
  */
 function _drupal_session_write($sid, $value) {
   global $user, $is_https;

Modified: branches/upstream/current-7/includes/stream_wrappers.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/includes/stream_wrappers.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/includes/stream_wrappers.inc (original)
+++ branches/upstream/current-7/includes/stream_wrappers.inc Wed Nov  2 17:45:27 2011
@@ -356,10 +356,18 @@
   }
 
   /**
-   * Return the local filesystem path.
-   *
-   * @param $uri
-   *   Optional URI, supplied when doing a move or rename.
+   * Returns the canonical absolute path of the URI, if possible.
+   *
+   * @param string $uri
+   *   (optional) The stream wrapper URI to be converted to a canonical
+   *   absolute path. This may point to a directory or another type of file.
+   *
+   * @return string|false
+   *   If $uri is not set, returns the canonical absolute path of the URI
+   *   previously set by the DrupalStreamWrapperInterface::setUri() function.
+   *   If $uri is set and valid for this class, returns its canonical absolute
+   *   path, as determined by the realpath() function. If $uri is set but not
+   *   valid, returns FALSE.
    */
   protected function getLocalPath($uri = NULL) {
     if (!isset($uri)) {

Modified: branches/upstream/current-7/includes/theme.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/includes/theme.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/includes/theme.inc (original)
+++ branches/upstream/current-7/includes/theme.inc Wed Nov  2 17:45:27 2011
@@ -275,7 +275,7 @@
  * @param $base_theme
  *   An array of loaded $theme objects representing the ancestor themes in
  *   oldest first order.
- * @param theme_engine
+ * @param $theme_engine
  *   The name of the theme engine.
  */
 function _theme_load_registry($theme, $base_theme = NULL, $theme_engine = NULL) {
@@ -512,22 +512,33 @@
 }
 
 /**
- * Rebuild the theme registry cache.
+ * Build the theme registry cache.
  *
  * @param $theme
  *   The loaded $theme object as returned by list_themes().
  * @param $base_theme
  *   An array of loaded $theme objects representing the ancestor themes in
  *   oldest first order.
- * @param theme_engine
+ * @param $theme_engine
  *   The name of the theme engine.
  */
 function _theme_build_registry($theme, $base_theme, $theme_engine) {
   $cache = array();
   // First, process the theme hooks advertised by modules. This will
-  // serve as the basic registry.
-  foreach (module_implements('theme') as $module) {
-    _theme_process_registry($cache, $module, 'module', $module, drupal_get_path('module', $module));
+  // serve as the basic registry. Since the list of enabled modules is the same
+  // regardless of the theme used, this is cached in its own entry to save
+  // building it for every theme.
+  if ($cached = cache_get('theme_registry:build:modules')) {
+    $cache = $cached->data;
+  }
+  else {
+    foreach (module_implements('theme') as $module) {
+      _theme_process_registry($cache, $module, 'module', $module, drupal_get_path('module', $module));
+    }
+    // Only cache this registry if all modules are loaded.
+    if (module_load_all(NULL)) {
+      cache_set('theme_registry:build:modules', $cache);
+    }
   }
 
   // Process each base theme.
@@ -1388,7 +1399,8 @@
  *     - html: (optional) Whether or not 'title' is HTML. If set, the title
  *       will not be passed through check_plain().
  *     - attributes: (optional) Attributes for the anchor, or for the <span> tag
- *       used in its place if no 'href' is supplied.
+ *       used in its place if no 'href' is supplied. If element 'class' is
+ *       included, it must be an array of one or more class names.
  *     If the 'href' element is supplied, the entire link array is passed to l()
  *     as its $options parameter.
  *   - attributes: A keyed array of attributes for the UL containing the
@@ -1902,11 +1914,12 @@
  */
 function theme_html_tag($variables) {
   $element = $variables['element'];
+  $attributes = isset($element['#attributes']) ? drupal_attributes($element['#attributes']) : '';
   if (!isset($element['#value'])) {
-    return '<' . $element['#tag'] . drupal_attributes($element['#attributes']) . " />\n";
+    return '<' . $element['#tag'] . $attributes . " />\n";
   }
   else {
-    $output = '<' . $element['#tag'] . drupal_attributes($element['#attributes']) . '>';
+    $output = '<' . $element['#tag'] . $attributes . '>';
     if (isset($element['#value_prefix'])) {
       $output .= $element['#value_prefix'];
     }
@@ -2085,7 +2098,7 @@
 }
 
 /**
- * Returns hook-independant variables to template_preprocess().
+ * Returns hook-independent variables to template_preprocess().
  */
 function _template_preprocess_default_variables() {
   global $user;

Modified: branches/upstream/current-7/includes/update.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/includes/update.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/includes/update.inc (original)
+++ branches/upstream/current-7/includes/update.inc Wed Nov  2 17:45:27 2011
@@ -1426,7 +1426,7 @@
   $return = array();
   // Get a list of installed modules, arranged so that we invoke their hooks in
   // the same order that module_invoke_all() does.
-  $modules = db_query("SELECT name FROM {system} WHERE type = 'module' AND schema_version != :schema ORDER BY weight ASC, name ASC", array(':schema' => SCHEMA_UNINSTALLED))->fetchCol();
+  $modules = db_query("SELECT name FROM {system} WHERE type = 'module' AND schema_version <> :schema ORDER BY weight ASC, name ASC", array(':schema' => SCHEMA_UNINSTALLED))->fetchCol();
   foreach ($modules as $module) {
     $function = $module . '_update_dependencies';
     if (function_exists($function)) {

Modified: branches/upstream/current-7/includes/utility.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/includes/utility.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/includes/utility.inc (original)
+++ branches/upstream/current-7/includes/utility.inc Wed Nov  2 17:45:27 2011
@@ -11,7 +11,7 @@
  * @param $var
  *   The variable to export.
  * @param $prefix
- *   A prefix that will be added at the begining of every lines of the output.
+ *   A prefix that will be added at the beginning of every lines of the output.
  * @return
  *   The variable exported in a way compatible to Drupal's coding standards.
  */

Modified: branches/upstream/current-7/misc/drupal.js
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/misc/drupal.js?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/misc/drupal.js (original)
+++ branches/upstream/current-7/misc/drupal.js Wed Nov  2 17:45:27 2011
@@ -111,6 +111,8 @@
 
 /**
  * Encode special characters in a plain-text string for display as HTML.
+ *
+ * @ingroup sanitization
  */
 Drupal.checkPlain = function (str) {
   var character, regex,
@@ -126,6 +128,45 @@
 };
 
 /**
+ * Replace placeholders with sanitized values in a string.
+ *
+ * @param str
+ *   A string with placeholders.
+ * @param args
+ *   An object of replacements pairs to make. Incidences of any key in this
+ *   array are replaced with the corresponding value. Based on the first
+ *   character of the key, the value is escaped and/or themed:
+ *    - !variable: inserted as is
+ *    - @variable: escape plain text to HTML (Drupal.checkPlain)
+ *    - %variable: escape text and theme as a placeholder for user-submitted
+ *      content (checkPlain + Drupal.theme('placeholder'))
+ *
+ * @see Drupal.t()
+ * @ingroup sanitization
+ */
+Drupal.formatString = function(str, args) {
+  // Transform arguments before inserting them.
+  for (var key in args) {
+    switch (key.charAt(0)) {
+      // Escaped only.
+      case '@':
+        args[key] = Drupal.checkPlain(args[key]);
+      break;
+      // Pass-through.
+      case '!':
+        break;
+      // Escaped and placeholder.
+      case '%':
+      default:
+        args[key] = Drupal.theme('placeholder', args[key]);
+        break;
+    }
+    str = str.replace(key, args[key]);
+  }
+  return str;
+}
+
+/**
  * Translate strings to the page language or a given language.
  *
  * See the documentation of the server-side t() function for further details.
@@ -135,11 +176,7 @@
  * @param args
  *   An object of replacements pairs to make after translation. Incidences
  *   of any key in this array are replaced with the corresponding value.
- *   Based on the first character of the key, the value is escaped and/or themed:
- *    - !variable: inserted as is
- *    - @variable: escape plain text to HTML (Drupal.checkPlain)
- *    - %variable: escape text and theme as a placeholder for user-submitted
- *      content (checkPlain + Drupal.theme('placeholder'))
+ *   See Drupal.formatString().
  * @return
  *   The translated string.
  */
@@ -150,24 +187,7 @@
   }
 
   if (args) {
-    // Transform arguments before inserting them.
-    for (var key in args) {
-      switch (key.charAt(0)) {
-        // Escaped only.
-        case '@':
-          args[key] = Drupal.checkPlain(args[key]);
-        break;
-        // Pass-through.
-        case '!':
-          break;
-        // Escaped and placeholder.
-        case '%':
-        default:
-          args[key] = Drupal.theme('placeholder', args[key]);
-          break;
-      }
-      str = str.replace(key, args[key]);
-    }
+    str = Drupal.formatString(str, args);
   }
   return str;
 };
@@ -193,11 +213,7 @@
  * @param args
  *   An object of replacements pairs to make after translation. Incidences
  *   of any key in this array are replaced with the corresponding value.
- *   Based on the first character of the key, the value is escaped and/or themed:
- *    - !variable: inserted as is
- *    - @variable: escape plain text to HTML (Drupal.checkPlain)
- *    - %variable: escape text and theme as a placeholder for user-submitted
- *      content (checkPlain + Drupal.theme('placeholder'))
+ *   See Drupal.formatString().
  *   Note that you do not need to include @count in this array.
  *   This replacement is done automatically for the plural case.
  * @return

Modified: branches/upstream/current-7/misc/favicon.ico
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/misc/favicon.ico?rev=2238&op=diff
==============================================================================
Binary files - no diff available.

Modified: branches/upstream/current-7/misc/states.js
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/misc/states.js?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/misc/states.js (original)
+++ branches/upstream/current-7/misc/states.js Wed Nov  2 17:45:27 2011
@@ -63,6 +63,13 @@
   'Function': function (reference, value) {
     // The "reference" variable is a comparison function.
     return reference(value);
+  },
+  'Number': function (reference, value) {
+    // If "reference" is a number and "value" is a string, then cast reference
+    // as a string before applying the strict comparison in compare(). Otherwise
+    // numeric keys in the form's #states array fail to match string values
+    // returned from jQuery's val().
+    return (value.constructor.name === 'String') ? compare(String(reference), value) : compare(reference, value);
   }
 };
 

Modified: branches/upstream/current-7/misc/tableselect.js
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/misc/tableselect.js?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/misc/tableselect.js (original)
+++ branches/upstream/current-7/misc/tableselect.js Wed Nov  2 17:45:27 2011
@@ -36,8 +36,8 @@
     }
   });
 
-  // For each of the checkboxes within the table.
-  checkboxes = $('td input:checkbox', table).click(function (e) {
+  // For each of the checkboxes within the table that are not disabled.
+  checkboxes = $('td input:checkbox:enabled', table).click(function (e) {
     // Either add or remove the selected class based on the state of the check all checkbox.
     $(this).parents('tr:first')[ this.checked ? 'addClass' : 'removeClass' ]('selected');
 

Modified: branches/upstream/current-7/modules/aggregator/aggregator-item.tpl.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/aggregator/aggregator-item.tpl.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/aggregator/aggregator-item.tpl.php (original)
+++ branches/upstream/current-7/modules/aggregator/aggregator-item.tpl.php Wed Nov  2 17:45:27 2011
@@ -24,19 +24,19 @@
   </h3>
 
   <div class="feed-item-meta">
-  <?php if ($source_url) : ?>
+  <?php if ($source_url): ?>
     <a href="<?php print $source_url; ?>" class="feed-item-source"><?php print $source_title; ?></a> -
   <?php endif; ?>
     <span class="feed-item-date"><?php print $source_date; ?></span>
   </div>
 
-<?php if ($content) : ?>
+<?php if ($content): ?>
   <div class="feed-item-body">
     <?php print $content; ?>
   </div>
 <?php endif; ?>
 
-<?php if ($categories) : ?>
+<?php if ($categories): ?>
   <div class="feed-item-categories">
     <?php print t('Categories'); ?>: <?php print implode(', ', $categories); ?>
   </div>

Modified: branches/upstream/current-7/modules/aggregator/aggregator-summary-item.tpl.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/aggregator/aggregator-summary-item.tpl.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/aggregator/aggregator-summary-item.tpl.php (original)
+++ branches/upstream/current-7/modules/aggregator/aggregator-summary-item.tpl.php Wed Nov  2 17:45:27 2011
@@ -18,6 +18,6 @@
 <a href="<?php print $feed_url; ?>"><?php print $feed_title; ?></a>
 <span class="age"><?php print $feed_age; ?></span>
 
-<?php if ($source_url) : ?>,
-<span class="source"><a href="<?php print $source_url; ?>"><?php print $source_title; ?></a></span>
+<?php if ($source_url): ?>,
+  <span class="source"><a href="<?php print $source_url; ?>"><?php print $source_title; ?></a></span>
 <?php endif; ?>

Modified: branches/upstream/current-7/modules/aggregator/aggregator.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/aggregator/aggregator.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/aggregator/aggregator.info (original)
+++ branches/upstream/current-7/modules/aggregator/aggregator.info Wed Nov  2 17:45:27 2011
@@ -7,8 +7,8 @@
 configure = admin/config/services/aggregator/settings
 stylesheets[all][] = aggregator.css
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/aggregator/aggregator.pages.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/aggregator/aggregator.pages.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/aggregator/aggregator.pages.inc (original)
+++ branches/upstream/current-7/modules/aggregator/aggregator.pages.inc Wed Nov  2 17:45:27 2011
@@ -89,29 +89,60 @@
 }
 
 /**
- * Load feed items
+ * Loads and optionally filters feed items.
  *
  * @param $type
- *   The filter for the items. Possible values: 'sum', 'source', 'category'
+ *   The type of filter for the items. Possible values are:
+ *   - sum: No filtering.
+ *   - source: Filter the feed items, limiting the result to items from a
+ *     single source.
+ *   - category: Filter the feed items by category.
  * @param $data
- *   Feed or category data for filtering
+ *   Feed or category data used for filtering. The type and value of $data
+ *   depends on $type:
+ *   - source: $data is an object with $data->fid identifying the feed used to
+ *     as filter.
+ *   - category: $data is an array with $data['cid'] being the category id to
+ *     filter on.
+ *   The $data parameter is not used when $type is 'sum'.
+ *
  * @return
  *   An array of the feed items.
  */
 function aggregator_feed_items_load($type, $data = NULL) {
   $items = array();
-  $range_limit = 20;
   switch ($type) {
     case 'sum':
-      $result = db_query_range('SELECT i.*, f.title AS ftitle, f.link AS flink FROM {aggregator_item} i INNER JOIN {aggregator_feed} f ON i.fid = f.fid ORDER BY i.timestamp DESC, i.iid DESC', 0, $range_limit);
+      $query = db_select('aggregator_item', 'i');
+      $query->join('aggregator_feed', 'f', 'i.fid = f.fid');
+      $query->fields('i');
+      $query->addField('f', 'title', 'ftitle');
+      $query->addField('f', 'link', 'flink');
       break;
     case 'source':
-      $result = db_query_range('SELECT * FROM {aggregator_item} WHERE fid = :fid ORDER BY timestamp DESC, iid DESC', 0, $range_limit, array(':fid' => $data->fid));
+      $query = db_select('aggregator_item', 'i');
+      $query
+        ->fields('i')
+        ->condition('i.fid', $data->fid);
       break;
     case 'category':
-      $result = db_query_range('SELECT i.*, f.title AS ftitle, f.link AS flink FROM {aggregator_category_item} c LEFT JOIN {aggregator_item} i ON c.iid = i.iid LEFT JOIN {aggregator_feed} f ON i.fid = f.fid WHERE cid = :cid ORDER BY timestamp DESC, i.iid DESC', 0, $range_limit, array(':cid' => $data['cid']));
+      $query = db_select('aggregator_category_item', 'c');
+      $query->leftJoin('aggregator_item', 'i', 'c.iid = i.iid');
+      $query->leftJoin('aggregator_feed', 'f', 'i.fid = f.fid');
+      $query
+        ->fields('i')
+        ->condition('cid', $data['cid']);
+      $query->addField('f', 'title', 'ftitle');
+      $query->addField('f', 'link', 'flink');
       break;
   }
+
+  $result = $query
+    ->extend('PagerDefault')
+    ->limit(20)
+    ->orderBy('i.timestamp', 'DESC')
+    ->orderBy('i.iid', 'DESC')
+    ->execute();
 
   foreach ($result as $item) {
     $item->categories = db_query('SELECT c.title, c.cid FROM {aggregator_category_item} ci LEFT JOIN {aggregator_category} c ON ci.cid = c.cid WHERE ci.iid = :iid ORDER BY c.title', array(':iid' => $item->iid))->fetchAll();
@@ -507,7 +538,14 @@
   $feed = $variables['feed'];
 
   $variables['source_icon'] = theme('feed_icon', array('url' => $feed->url, 'title' => t('!title feed', array('!title' => $feed->title))));
-  $variables['source_image'] = $feed->image;
+
+  if (!empty($feed->image) && !empty($feed->title) && !empty($feed->link)) {
+    $variables['source_image'] = l(theme('image', array('path' => $feed->image, 'alt' => $feed->title)), $feed->link, array('html' => TRUE, 'attributes' => array('class' => 'feed-image')));
+  }
+  else {
+    $variables['source_image'] = '';
+  }
+
   $variables['source_description'] = aggregator_filter_xss($feed->description);
   $variables['source_url'] = check_url(url($feed->link, array('absolute' => TRUE)));
 

Modified: branches/upstream/current-7/modules/aggregator/aggregator.parser.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/aggregator/aggregator.parser.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/aggregator/aggregator.parser.inc (original)
+++ branches/upstream/current-7/modules/aggregator/aggregator.parser.inc Wed Nov  2 17:45:27 2011
@@ -35,19 +35,12 @@
       $image[$key] = trim($value);
     }
 
-    if (!empty($image['link']) && !empty($image['url']) && !empty($image['title'])) {
-      $image = l(theme('image', array('path' => $image['url'], 'alt' => $image['title'])), $image['link'], array('html' => TRUE));
-    }
-    else {
-      $image = '';
-    }
-
     $etag = empty($feed->http_headers['etag']) ? '' : $feed->http_headers['etag'];
 
     // Add parsed data to the feed object.
-    $feed->link = !empty($channel['LINK']) ? $channel['LINK'] : '';
-    $feed->description = !empty($channel['DESCRIPTION']) ? $channel['DESCRIPTION'] : '';
-    $feed->image = $image;
+    $feed->link = !empty($channel['link']) ? $channel['link'] : '';
+    $feed->description = !empty($channel['description']) ? $channel['description'] : '';
+    $feed->image = !empty($image['url']) ? $image['url'] : '';
     $feed->etag = $etag;
     $feed->modified = $modified;
 

Modified: branches/upstream/current-7/modules/aggregator/aggregator.processor.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/aggregator/aggregator.processor.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/aggregator/aggregator.processor.inc (original)
+++ branches/upstream/current-7/modules/aggregator/aggregator.processor.inc Wed Nov  2 17:45:27 2011
@@ -37,6 +37,9 @@
         if (!$item['timestamp']) {
           $item['timestamp'] = isset($entry->timestamp) ? $entry->timestamp : REQUEST_TIME;
         }
+
+        // Make sure the item title fits in 255 varchar column.
+        $item['title'] = truncate_utf8($item['title'], 255, TRUE, TRUE);
         aggregator_save_item(array('iid' => (isset($entry->iid) ? $entry->iid : ''), 'fid' => $feed->fid, 'timestamp' => $item['timestamp'], 'title' => $item['title'], 'link' => $item['link'], 'author' => $item['author'], 'description' => $item['description'], 'guid' => $item['guid']));
       }
     }

Modified: branches/upstream/current-7/modules/aggregator/aggregator.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/aggregator/aggregator.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/aggregator/aggregator.test (original)
+++ branches/upstream/current-7/modules/aggregator/aggregator.test Wed Nov  2 17:45:27 2011
@@ -266,10 +266,16 @@
     return $GLOBALS['base_url'] . '/' . drupal_get_path('module', 'aggregator') . '/tests/aggregator_test_atom.xml';
   }
 
-  function createSampleNodes() {
+  /**
+   * Creates sample article nodes.
+   *
+   * @param $count
+   *   (optional) The number of nodes to generate.
+   */
+  function createSampleNodes($count = 5) {
     $langcode = LANGUAGE_NONE;
-    // Post 5 articles.
-    for ($i = 0; $i < 5; $i++) {
+    // Post $count article nodes.
+    for ($i = 0; $i < $count; $i++) {
       $edit = array();
       $edit['title'] = $this->randomName();
       $edit["body[$langcode][0][value]"] = $this->randomName();
@@ -807,6 +813,28 @@
     $correct_titles = $this->xpath('//h1[normalize-space(text())=:title]', array(':title' => $feed->title));
     $this->assertFalse(empty($correct_titles), t('Aggregator feed page is available and has the correct title.'));
   }
+
+  /**
+   * Create a feed and check that feed's page.
+   */
+  public function testFeedPage() {
+    // Increase the number of items published in the rss.xml feed so we have
+    // enough articles to test paging.
+    variable_set('feed_default_items', 30);
+
+    // Create a feed with 30 items.
+    $this->createSampleNodes(30);
+    $feed = $this->createFeed();
+    $this->updateFeedItems($feed, 30);
+
+    // Check for the presence of a pager.
+    $this->drupalGet('aggregator/sources/' . $feed->fid);
+    $elements = $this->xpath("//ul[@class=:class]", array(':class' => 'pager'));
+    $this->assertTrue(!empty($elements), t('Individual source page contains a pager.'));
+
+    // Reset the number of items in rss.xml to the default value.
+    variable_set('feed_default_items', 10);
+  }
 }
 
 /**

Modified: branches/upstream/current-7/modules/aggregator/tests/aggregator_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/aggregator/tests/aggregator_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/aggregator/tests/aggregator_test.info (original)
+++ branches/upstream/current-7/modules/aggregator/tests/aggregator_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/aggregator/tests/aggregator_test_rss091.xml
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/aggregator/tests/aggregator_test_rss091.xml?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/aggregator/tests/aggregator_test_rss091.xml (original)
+++ branches/upstream/current-7/modules/aggregator/tests/aggregator_test_rss091.xml Wed Nov  2 17:45:27 2011
@@ -22,7 +22,7 @@
       <description>First example feed item description.</description>
     </item>
     <item>
-      <title>Second example feed item title</title>
+      <title>Second example feed item title. This title is extremely long so that it exceeds the 255 character limit for titles in feed item storage. In fact it's so long that this sentence isn't long enough so I'm rambling a bit to make it longer, nearly there now. Ah now it's long enough so I'll shut up.</title>
       <link>http://example.com/example-turns-two</link>
       <description>Second example feed item description.</description>
     </item>

Modified: branches/upstream/current-7/modules/block/block.admin.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/block/block.admin.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/block/block.admin.inc (original)
+++ branches/upstream/current-7/modules/block/block.admin.inc Wed Nov  2 17:45:27 2011
@@ -77,7 +77,7 @@
  */
 function block_admin_display_form($form, &$form_state, $blocks, $theme, $block_regions = NULL) {
 
-  drupal_add_css(drupal_get_path('module', 'block') . '/block.css');
+  $form['#attached']['css'] = array(drupal_get_path('module', 'block') . '/block.css');
 
   // Get a list of block regions if one was not provided.
   if (!isset($block_regions)) {
@@ -276,7 +276,7 @@
     '#maxlength' => 64,
     '#description' => $block->module == 'block' ? t('The title of the block as shown to the user.') : t('Override the default title for the block. Use <em>!placeholder</em> to display no title, or leave blank to use the default block title.', array('!placeholder' => '<none>')),
     '#default_value' => isset($block->title) ? $block->title : '',
-    '#weight' => -18,
+    '#weight' => -19,
   );
 
   // Module-specific block configuration.

Modified: branches/upstream/current-7/modules/block/block.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/block/block.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/block/block.info (original)
+++ branches/upstream/current-7/modules/block/block.info Wed Nov  2 17:45:27 2011
@@ -6,8 +6,8 @@
 files[] = block.test
 configure = admin/structure/block
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/block/block.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/block/block.module?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/block/block.module (original)
+++ branches/upstream/current-7/modules/block/block.module Wed Nov  2 17:45:27 2011
@@ -500,7 +500,7 @@
     '#maxlength' => 64,
     '#description' => t('A brief description of your block. Used on the <a href="@overview">Blocks administration page</a>.', array('@overview' => url('admin/structure/block'))),
     '#required' => TRUE,
-    '#weight' => -19,
+    '#weight' => -18,
   );
   $form['body_field']['#weight'] = -17;
   $form['body_field']['body'] = array(
@@ -668,7 +668,7 @@
  *   Name of the module that implements the block to load.
  * @param $delta
  *   Unique ID of the block within the context of $module. Pass NULL to return
- *   an empty $block object for $module.
+ *   an empty block object for $module.
  *
  * @return
  *   A block object.

Modified: branches/upstream/current-7/modules/block/block.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/block/block.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/block/block.test (original)
+++ branches/upstream/current-7/modules/block/block.test Wed Nov  2 17:45:27 2011
@@ -83,7 +83,7 @@
     $this->assertTrue(array_key_exists('subject', $data) && empty($data['subject']), t('block_block_view() provides an empty block subject, since custom blocks do not have default titles.'));
     $this->assertEqual(check_markup($custom_block['body[value]'], $format), $data['content'], t('block_block_view() provides correct block content.'));
 
-    // Check if the block can be moved to all availble regions.
+    // Check whether the block can be moved to all available regions.
     $custom_block['module'] = 'block';
     $custom_block['delta'] = $bid;
     foreach ($this->regions as $region) {
@@ -307,7 +307,7 @@
     // Check to see if the block was created by checking that it's in the database.
     $this->assertNotNull($bid, t('Block found in database'));
 
-    // Check if the block can be moved to all availble regions.
+    // Check whether the block can be moved to all available regions.
     foreach ($this->regions as $region) {
       $this->moveBlockToRegion($block, $region);
     }
@@ -321,7 +321,7 @@
     $this->assertText(t('The block settings have been updated.'), t('Block successfully move to disabled region.'));
     $this->assertNoText(t($block['title']), t('Block no longer appears on page.'));
 
-    // Confirm that the regions xpath is not availble
+    // Confirm that the region's xpath is not available.
     $xpath = $this->buildXPathQuery('//div[@id=:id]/*', array(':id' => 'block-block-' . $bid));
     $this->assertNoFieldByXPath($xpath, FALSE, t('Custom block found in no regions.'));
 

Modified: branches/upstream/current-7/modules/block/tests/block_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/block/tests/block_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/block/tests/block_test.info (original)
+++ branches/upstream/current-7/modules/block/tests/block_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/blog/blog.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/blog/blog.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/blog/blog.info (original)
+++ branches/upstream/current-7/modules/blog/blog.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 files[] = blog.test
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/book/book-all-books-block.tpl.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/book/book-all-books-block.tpl.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/book/book-all-books-block.tpl.php (original)
+++ branches/upstream/current-7/modules/book/book-all-books-block.tpl.php Wed Nov  2 17:45:27 2011
@@ -11,8 +11,8 @@
  *   render() on each to print it as an unordered list.
  */
 ?>
-<?php foreach ($book_menus as $book_id => $menu) : ?>
-<div id="book-block-menu-<?php print $book_id; ?>" class="book-block-menu">
-  <?php print render($menu); ?>
-</div>
+<?php foreach ($book_menus as $book_id => $menu): ?>
+  <div id="book-block-menu-<?php print $book_id; ?>" class="book-block-menu">
+    <?php print render($menu); ?>
+  </div>
 <?php endforeach; ?>

Modified: branches/upstream/current-7/modules/book/book-export-html.tpl.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/book/book-export-html.tpl.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/book/book-export-html.tpl.php (original)
+++ branches/upstream/current-7/modules/book/book-export-html.tpl.php Wed Nov  2 17:45:27 2011
@@ -40,7 +40,7 @@
      */
     $div_close = '';
     ?>
-    <?php for ($i = 1; $i < $depth; $i++) : ?>
+    <?php for ($i = 1; $i < $depth; $i++): ?>
       <div class="section-<?php print $i; ?>">
       <?php $div_close .= '</div>'; ?>
     <?php endfor; ?>

Modified: branches/upstream/current-7/modules/book/book-navigation.tpl.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/book/book-navigation.tpl.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/book/book-navigation.tpl.php (original)
+++ branches/upstream/current-7/modules/book/book-navigation.tpl.php Wed Nov  2 17:45:27 2011
@@ -35,13 +35,13 @@
 
     <?php if ($has_links): ?>
     <div class="page-links clearfix">
-      <?php if ($prev_url) : ?>
+      <?php if ($prev_url): ?>
         <a href="<?php print $prev_url; ?>" class="page-previous" title="<?php print t('Go to previous page'); ?>"><?php print t('‹ ') . $prev_title; ?></a>
       <?php endif; ?>
-      <?php if ($parent_url) : ?>
+      <?php if ($parent_url): ?>
         <a href="<?php print $parent_url; ?>" class="page-up" title="<?php print t('Go to parent page'); ?>"><?php print t('up'); ?></a>
       <?php endif; ?>
-      <?php if ($next_url) : ?>
+      <?php if ($next_url): ?>
         <a href="<?php print $next_url; ?>" class="page-next" title="<?php print t('Go to next page'); ?>"><?php print $next_title . t(' ›'); ?></a>
       <?php endif; ?>
     </div>

Modified: branches/upstream/current-7/modules/book/book.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/book/book.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/book/book.info (original)
+++ branches/upstream/current-7/modules/book/book.info Wed Nov  2 17:45:27 2011
@@ -7,8 +7,8 @@
 configure = admin/content/book/settings
 stylesheets[all][] = book.css
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/book/book.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/book/book.module?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/book/book.module (original)
+++ branches/upstream/current-7/modules/book/book.module Wed Nov  2 17:45:27 2011
@@ -281,7 +281,7 @@
     // Only display this block when the user is browsing a book.
   $select = db_select('node', 'n')
     ->fields('n', array('title'))
-    ->condition('nid', $node->book['bid'])
+    ->condition('n.nid', $node->book['bid'])
     ->addTag('node_access');
     $title = $select->execute()->fetchField();
     // Only show the block if the user has view access for the top-level node.

Modified: branches/upstream/current-7/modules/book/book.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/book/book.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/book/book.test (original)
+++ branches/upstream/current-7/modules/book/book.test Wed Nov  2 17:45:27 2011
@@ -24,12 +24,15 @@
   }
 
   function setUp() {
-    parent::setUp('book');
+    parent::setUp(array('book', 'node_access_test'));
+
+    // node_access_test requires a node_access_rebuild().
+    node_access_rebuild();
 
     // Create users.
     $this->book_author = $this->drupalCreateUser(array('create new books', 'create book content', 'edit own book content', 'add content to books'));
-    $this->web_user = $this->drupalCreateUser(array('access printer-friendly version'));
-    $this->admin_user = $this->drupalCreateUser(array('create new books', 'create book content', 'edit own book content', 'add content to books', 'administer blocks'));
+    $this->web_user = $this->drupalCreateUser(array('access printer-friendly version', 'node test view'));
+    $this->admin_user = $this->drupalCreateUser(array('create new books', 'create book content', 'edit own book content', 'add content to books', 'administer blocks', 'administer permissions'));
   }
 
   /**
@@ -274,6 +277,12 @@
     $this->drupalPost('admin/structure/block', $edit, t('Save blocks'));
     $this->assertText(t('The block settings have been updated.'), t('Block successfully move to footer region.'));
 
+     // Give anonymous users the permission 'node test view'.
+     $edit = array();
+     $edit['1[node test view]'] = TRUE;
+     $this->drupalPost('admin/people/permissions/1', $edit, t('Save permissions'));
+     $this->assertText(t('The changes have been saved.'), t("Permission 'node test view' successfully assigned to anonymous users."));
+
     // Test correct display of the block.
     $nodes = $this->createBook();
     $this->drupalGet('<front>');
@@ -281,4 +290,46 @@
     $this->assertText($this->book->title, t('Link to book root (@title) is displayed.', array('@title' => $nodes[0]->title)));
     $this->assertNoText($nodes[0]->title, t('No links to individual book pages are displayed.'));
   }
+
+  /**
+   * Test the book navigation block when an access module is enabled.
+   */
+   function testNavigationBlockOnAccessModuleEnabled() {
+     $this->drupalLogin($this->admin_user);
+     $edit = array();
+
+     // Set the block title.
+     $block_title = $this->randomName(16);
+     $edit['title'] = $block_title;
+
+     // Set block display to 'Show block only on book pages'.
+     $edit['book_block_mode'] = 'book pages';
+     $this->drupalPost('admin/structure/block/manage/book/navigation/configure', $edit, t('Save block'));
+     $this->assertText(t('The block configuration has been saved.'), t('Block configuration set.'));
+
+     // Set the block to a region to confirm block is available.
+     $edit = array();
+     $edit['blocks[book_navigation][region]'] = 'footer';
+     $this->drupalPost('admin/structure/block', $edit, t('Save blocks'));
+     $this->assertText(t('The block settings have been updated.'), t('Block successfully move to footer region.'));
+
+     // Give anonymous users the permission 'node test view'.
+     $edit = array();
+     $edit['1[node test view]'] = TRUE;
+     $this->drupalPost('admin/people/permissions/1', $edit, t('Save permissions'));
+     $this->assertText(t('The changes have been saved.'), t('Permission \'node test view\' successfully assigned to anonymous users.'));
+
+     // Create a book.
+     $this->createBook();
+
+     // Test correct display of the block to registered users.
+     $this->drupalLogin($this->web_user);
+     $this->drupalGet('node/' . $this->book->nid);
+     $this->assertText($block_title, t('Book navigation block is displayed to registered users.'));
+     $this->drupalLogout();
+
+     // Test correct display of the block to anonymous users.
+     $this->drupalGet('node/' . $this->book->nid);
+     $this->assertText($block_title, t('Book navigation block is displayed to anonymous users.'));
+   }
 }

Modified: branches/upstream/current-7/modules/color/color.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/color/color.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/color/color.info (original)
+++ branches/upstream/current-7/modules/color/color.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 files[] = color.test
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/comment/comment.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/comment/comment.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/comment/comment.info (original)
+++ branches/upstream/current-7/modules/comment/comment.info Wed Nov  2 17:45:27 2011
@@ -9,8 +9,8 @@
 configure = admin/content/comment
 stylesheets[all][] = comment.css
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/comment/comment.install
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/comment/comment.install?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/comment/comment.install (original)
+++ branches/upstream/current-7/modules/comment/comment.install Wed Nov  2 17:45:27 2011
@@ -371,6 +371,27 @@
  */
 
 /**
+ * @addtogroup updates-7.x-extra
+ * @{
+ */
+
+/**
+ * Change the last_comment_timestamp column description.
+ */
+function comment_update_7009() {
+  db_change_field('node_comment_statistics', 'last_comment_timestamp', 'last_comment_timestamp', array(
+    'type' => 'int',
+    'not null' => TRUE,
+    'default' => 0,
+    'description' => 'The Unix timestamp of the last comment that was posted within this node, from {comment}.changed.',
+  ));
+}
+
+/**
+ * @} End of "addtogroup updates-7.x-extra"
+ */
+
+/**
  * Implements hook_schema().
  */
 function comment_schema() {
@@ -506,7 +527,7 @@
         'type' => 'int',
         'not null' => TRUE,
         'default' => 0,
-        'description' => 'The Unix timestamp of the last comment that was posted within this node, from {comment}.timestamp.',
+        'description' => 'The Unix timestamp of the last comment that was posted within this node, from {comment}.changed.',
       ),
       'last_comment_name' => array(
         'type' => 'varchar',

Modified: branches/upstream/current-7/modules/comment/comment.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/comment/comment.module?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/comment/comment.module (original)
+++ branches/upstream/current-7/modules/comment/comment.module Wed Nov  2 17:45:27 2011
@@ -92,7 +92,7 @@
  * Implements hook_entity_info().
  */
 function comment_entity_info() {
-  $return =  array(
+  $return = array(
     'comment' => array(
       'label' => t('Comment'),
       'base table' => 'comment',
@@ -118,6 +118,9 @@
   foreach (node_type_get_names() as $type => $name) {
     $return['comment']['bundles']['comment_node_' . $type] = array(
       'label' => t('@node_type comment', array('@node_type' => $name)),
+      // Provide the node type/bundle name for other modules, so it does not
+      // have to be extracted manually from the bundle name.
+      'node bundle' => $type,
       'admin' => array(
         // Place the Field UI paths for comments one level below the
         // corresponding paths for nodes, so that they appear in the same set
@@ -542,7 +545,7 @@
   elseif ($flat) {
     // Flat comments.
     $count = $num_comments - $new_replies;
-    $pageno =  $count / $comments_per_page;
+    $pageno = $count / $comments_per_page;
   }
   else {
     // Threaded comments: we build a query with a subquery to find the first
@@ -575,7 +578,7 @@
       ':thread' => $first_thread,
     ))->fetchField();
 
-    $pageno =  $count / $comments_per_page;
+    $pageno = $count / $comments_per_page;
   }
 
   if ($pageno >= 1) {
@@ -1439,7 +1442,7 @@
 
   $transaction = db_transaction();
   try {
-    $defaults =  array(
+    $defaults = array(
       'mail' => '',
       'homepage' => '',
       'name' => '',
@@ -1633,6 +1636,9 @@
  *   values those fields must have. Instead, it is preferable to use
  *   EntityFieldQuery to retrieve a list of entity IDs loadable by
  *   this function.
+ * @param $reset
+ *   Whether to reset the internal static entity cache. Note that the static
+ *   cache is disabled in comment_entity_info() by default.
  *
  * @return
  *   An array of comment objects, indexed by comment ID.
@@ -1642,8 +1648,8 @@
  *
  * @todo Remove $conditions in Drupal 8.
  */
-function comment_load_multiple($cids = array(), $conditions = array()) {
-  return entity_load('comment', $cids, $conditions);
+function comment_load_multiple($cids = array(), $conditions = array(), $reset = FALSE) {
+  return entity_load('comment', $cids, $conditions, $reset);
 }
 
 /**
@@ -1651,11 +1657,15 @@
  *
  * @param $cid
  *   The identifying comment id.
+ * @param $reset
+ *   Whether to reset the internal static entity cache. Note that the static
+ *   cache is disabled in comment_entity_info() by default.
+ *
  * @return
  *   The comment object.
  */
-function comment_load($cid) {
-  $comment = comment_load_multiple(array($cid));
+function comment_load($cid, $reset = FALSE) {
+  $comment = comment_load_multiple(array($cid), array(), $reset);
   return $comment ? $comment[$cid] : FALSE;
 }
 
@@ -1711,7 +1721,7 @@
     $timestamp = ($timestamp > NODE_NEW_LIMIT ? $timestamp : NODE_NEW_LIMIT);
 
     // Use the timestamp to retrieve the number of new comments.
-    return db_query('SELECT COUNT(cid) FROM {comment} WHERE nid = :nid  AND created > :timestamp AND status = :status', array(
+    return db_query('SELECT COUNT(cid) FROM {comment} WHERE nid = :nid AND created > :timestamp AND status = :status', array(
       ':nid' => $nid,
       ':timestamp' => $timestamp,
       ':status' => COMMENT_PUBLISHED,
@@ -2279,13 +2289,13 @@
 
   // Set status to a string representation of comment->status.
   if (isset($comment->in_preview)) {
-    $variables['status']  = 'comment-preview';
+    $variables['status'] = 'comment-preview';
   }
   else {
-    $variables['status']  = ($comment->status == COMMENT_NOT_PUBLISHED) ? 'comment-unpublished' : 'comment-published';
+    $variables['status'] = ($comment->status == COMMENT_NOT_PUBLISHED) ? 'comment-unpublished' : 'comment-published';
   }
   // Gather comment classes.
-  if ($comment->uid === 0) {
+  if ($comment->uid == 0) {
     $variables['classes_array'][] = 'comment-by-anonymous';
   }
   else {

Modified: branches/upstream/current-7/modules/comment/comment.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/comment/comment.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/comment/comment.test (original)
+++ branches/upstream/current-7/modules/comment/comment.test Wed Nov  2 17:45:27 2011
@@ -331,6 +331,8 @@
     $comment = $this->postComment($this->node, $comment_text);
     $comment_loaded = comment_load($comment->id);
     $this->assertTrue($this->commentExists($comment), t('Comment found.'));
+    $by_viewer_class = $this->xpath('//a[@id=:comment_id]/following-sibling::div[1][contains(@class, "comment-by-viewer")]', array(':comment_id' => 'comment-' . $comment->id));
+    $this->assertTrue(!empty($by_viewer_class), t('HTML class for comments by viewer found.'));
 
     // Set comments to have subject and preview to required.
     $this->drupalLogout();
@@ -416,6 +418,11 @@
     $this->drupalGet('node/' . $this->node->nid, array('query' => array('page' => 1)));
     $this->assertTrue($this->commentExists($reply, TRUE), t('Page two exists. %s'));
     $this->setCommentsPerPage(50);
+
+    // Create comment #5 to assert HTML class.
+    $comment = $this->postComment($this->node, $this->randomName(), $this->randomName());
+    $by_node_author_class = $this->xpath('//a[@id=:comment_id]/following-sibling::div[1][contains(@class, "comment-by-node-author")]', array(':comment_id' => 'comment-' . $comment->id));
+    $this->assertTrue(!empty($by_node_author_class), t('HTML class for node author found.'));
 
     // Attempt to post to node with comments disabled.
     $this->node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'comment' => COMMENT_NODE_HIDDEN));
@@ -963,6 +970,8 @@
     // Post anonymous comment without contact info.
     $anonymous_comment1 = $this->postComment($this->node, $this->randomName(), $this->randomName());
     $this->assertTrue($this->commentExists($anonymous_comment1), t('Anonymous comment without contact info found.'));
+    $anonymous_class = $this->xpath('//a[@id=:comment_id]/following-sibling::div[1][contains(@class, "comment-by-anonymous")]', array(':comment_id' => 'comment-' . $anonymous_comment1->id));
+    $this->assertTrue(!empty($anonymous_class), t('HTML class for anonymous comments found.'));
 
     // Allow contact info.
     $this->drupalLogin($this->admin_user);

Modified: branches/upstream/current-7/modules/comment/comment.tokens.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/comment/comment.tokens.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/comment/comment.tokens.inc (original)
+++ branches/upstream/current-7/modules/comment/comment.tokens.inc Wed Nov  2 17:45:27 2011
@@ -155,9 +155,11 @@
           break;
 
         case 'body':
-          $item = $comment->comment_body[LANGUAGE_NONE][0];
-          $instance = field_info_instance('comment', 'body', 'comment_body');
-          $replacements[$original] = $sanitize ? _text_sanitize($instance, LANGUAGE_NONE, $item, 'value') : $item['value'];
+          if ($items = field_get_items('comment', $comment, 'comment_body', $language_code)) {
+            $instance = field_info_instance('comment', 'body', 'comment_body');
+            $field_langcode = field_language('comment', $comment, 'comment_body', $language_code);
+            $replacements[$original] = $sanitize ? _text_sanitize($instance, $field_langcode, $items[0], 'value') : $items[0]['value'];
+          }
           break;
 
         // Comment related URLs.

Modified: branches/upstream/current-7/modules/contact/contact.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/contact/contact.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/contact/contact.info (original)
+++ branches/upstream/current-7/modules/contact/contact.info Wed Nov  2 17:45:27 2011
@@ -6,8 +6,8 @@
 files[] = contact.test
 configure = admin/structure/contact
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/contact/contact.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/contact/contact.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/contact/contact.test (original)
+++ branches/upstream/current-7/modules/contact/contact.test Wed Nov  2 17:45:27 2011
@@ -262,7 +262,7 @@
     foreach ($categories as $category) {
       $category_name = db_query("SELECT category FROM {contact} WHERE cid = :cid", array(':cid' => $category))->fetchField();
       $this->drupalPost('admin/structure/contact/delete/' . $category, array(), t('Delete'));
-      $this->assertRaw(t('Category %category has been deleted.', array('%category' => $category_name)), t('Category deleted sucessfully.'));
+      $this->assertRaw(t('Category %category has been deleted.', array('%category' => $category_name)), t('Category deleted successfully.'));
     }
   }
 

Modified: branches/upstream/current-7/modules/contextual/contextual.css
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/contextual/contextual.css?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/contextual/contextual.css (original)
+++ branches/upstream/current-7/modules/contextual/contextual.css Wed Nov  2 17:45:27 2011
@@ -45,7 +45,6 @@
   background-position: 2px -18px;
 }
 div.contextual-links-active a.contextual-links-trigger {
-  background-position: 2px -18px;
   background-color: #fff;
   border-color: #ccc;
   border-bottom: none;

Modified: branches/upstream/current-7/modules/contextual/contextual.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/contextual/contextual.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/contextual/contextual.info (original)
+++ branches/upstream/current-7/modules/contextual/contextual.info Wed Nov  2 17:45:27 2011
@@ -4,8 +4,8 @@
 version = VERSION
 core = 7.x
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/dashboard/dashboard.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/dashboard/dashboard.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/dashboard/dashboard.info (original)
+++ branches/upstream/current-7/modules/dashboard/dashboard.info Wed Nov  2 17:45:27 2011
@@ -7,8 +7,8 @@
 dependencies[] = block
 configure = admin/dashboard/customize
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/dblog/dblog.css
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/dblog/dblog.css?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/dblog/dblog.css (original)
+++ branches/upstream/current-7/modules/dblog/dblog.css Wed Nov  2 17:45:27 2011
@@ -1,4 +1,3 @@
-
 .form-item-type,
 .form-item-severity {
   float: left; /* LTR */
@@ -52,7 +51,9 @@
 table#admin-dblog tr.dblog-warning td.icon {
   background-image: url(../../misc/message-16-warning.png);
 }
-table#admin-dblog tr.dblog-error td.icon {
+table#admin-dblog tr.dblog-error td.icon,
+table#admin-dblog tr.dblog-critical td.icon,
+table#admin-dblog tr.dblog-alert td.icon,
+table#admin-dblog tr.dblog-emerg td.icon {
   background-image: url(../../misc/message-16-error.png);
 }
-

Modified: branches/upstream/current-7/modules/dblog/dblog.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/dblog/dblog.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/dblog/dblog.info (original)
+++ branches/upstream/current-7/modules/dblog/dblog.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 files[] = dblog.test
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/field/field.api.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/field/field.api.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/field/field.api.php (original)
+++ branches/upstream/current-7/modules/field/field.api.php Wed Nov  2 17:45:27 2011
@@ -2531,7 +2531,7 @@
  * @param $instance
  *   The instance being purged.
  */
-function hook_field_purge_field_instance($instance) {
+function hook_field_purge_instance($instance) {
   db_delete('my_module_field_instance_info')
     ->condition('id', $instance['id'])
     ->execute();

Modified: branches/upstream/current-7/modules/field/field.crud.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/field/field.crud.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/field/field.crud.inc (original)
+++ branches/upstream/current-7/modules/field/field.crud.inc Wed Nov  2 17:45:27 2011
@@ -727,7 +727,7 @@
  *   An instance structure.
  * @param $field_cleanup
  *   If TRUE, the field will be deleted as well if its last instance is being
- *   deleted. If FALSE, it is the caller's responsability to handle the case of
+ *   deleted. If FALSE, it is the caller's responsibility to handle the case of
  *   fields left without instances. Defaults to TRUE.
  */
 function field_delete_instance($instance, $field_cleanup = TRUE) {

Modified: branches/upstream/current-7/modules/field/field.form.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/field/field.form.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/field/field.form.inc (original)
+++ branches/upstream/current-7/modules/field/field.form.inc Wed Nov  2 17:45:27 2011
@@ -273,7 +273,7 @@
   if ($element['#cardinality'] > 1 || $element['#cardinality'] == FIELD_CARDINALITY_UNLIMITED) {
     $table_id = drupal_html_id($element['#field_name'] . '_values');
     $order_class = $element['#field_name'] . '-delta-order';
-    $required = !empty($element['#required']) ? '<span class="form-required" title="' . t('This field is required. ') . '">*</span>' : '';
+    $required = !empty($element['#required']) ? theme('form_required_marker', $variables) : '';
 
     $header = array(
       array(

Modified: branches/upstream/current-7/modules/field/field.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/field/field.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/field/field.info (original)
+++ branches/upstream/current-7/modules/field/field.info Wed Nov  2 17:45:27 2011
@@ -10,8 +10,8 @@
 required = TRUE
 stylesheets[all][] = theme/field.css
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/field/field.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/field/field.module?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/field/field.module (original)
+++ branches/upstream/current-7/modules/field/field.module Wed Nov  2 17:45:27 2011
@@ -221,6 +221,9 @@
  *     - other_mode
  *        - ...
  *
+ * The (default) render arrays produced for field instances are documented at
+ * field_attach_view().
+ *
  * Bundles are represented by two strings, an entity type and a bundle name.
  *
  * - @link field_types Field Types API @endlink. Defines field types,
@@ -515,7 +518,6 @@
  */
 function _field_filter_items($field, $items) {
   $function = $field['module'] . '_field_is_empty';
-  function_exists($function);
   foreach ((array) $items as $delta => $item) {
     // Explicitly break if the function is undefined.
     if ($function($item, $field)) {

Modified: branches/upstream/current-7/modules/field/modules/field_sql_storage/field_sql_storage.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/field/modules/field_sql_storage/field_sql_storage.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/field/modules/field_sql_storage/field_sql_storage.info (original)
+++ branches/upstream/current-7/modules/field/modules/field_sql_storage/field_sql_storage.info Wed Nov  2 17:45:27 2011
@@ -7,8 +7,8 @@
 files[] = field_sql_storage.test
 required = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/field/modules/field_sql_storage/field_sql_storage.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/field/modules/field_sql_storage/field_sql_storage.module?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/field/modules/field_sql_storage/field_sql_storage.module (original)
+++ branches/upstream/current-7/modules/field/modules/field_sql_storage/field_sql_storage.module Wed Nov  2 17:45:27 2011
@@ -236,13 +236,37 @@
 function field_sql_storage_field_storage_update_field($field, $prior_field, $has_data) {
   if (! $has_data) {
     // There is no data. Re-create the tables completely.
-    $prior_schema = _field_sql_storage_schema($prior_field);
-    foreach ($prior_schema as $name => $table) {
-      db_drop_table($name, $table);
-    }
-    $schema = _field_sql_storage_schema($field);
-    foreach ($schema as $name => $table) {
-      db_create_table($name, $table);
+
+    if (Database::getConnection()->supportsTransactionalDDL()) {
+      // If the database supports transactional DDL, we can go ahead and rely
+      // on it. If not, we will have to rollback manually if something fails.
+      $transaction = db_transaction();
+    }
+
+    try {
+      $prior_schema = _field_sql_storage_schema($prior_field);
+      foreach ($prior_schema as $name => $table) {
+        db_drop_table($name, $table);
+      }
+      $schema = _field_sql_storage_schema($field);
+      foreach ($schema as $name => $table) {
+        db_create_table($name, $table);
+      }
+    }
+    catch (Exception $e) {
+      if (Database::getConnection()->supportsTransactionalDDL()) {
+        $transaction->rollback();
+      }
+      else {
+        // Recreate tables.
+        $prior_schema = _field_sql_storage_schema($prior_field);
+        foreach ($prior_schema as $name => $table) {
+          if (!db_table_exists($name)) {
+            db_create_table($name, $table);
+          }
+        }
+      }
+      throw $e;
     }
   }
   else {
@@ -493,7 +517,7 @@
       $select_query->fields($table_alias, array('entity_type', 'entity_id', 'revision_id', 'bundle'));
       $field_base_table = $table_alias;
     }
-    if ($field['cardinality'] != 1) {
+    if ($field['cardinality'] != 1 || $field['translatable']) {
       $select_query->distinct();
     }
   }

Modified: branches/upstream/current-7/modules/field/modules/field_sql_storage/field_sql_storage.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/field/modules/field_sql_storage/field_sql_storage.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/field/modules/field_sql_storage/field_sql_storage.test (original)
+++ branches/upstream/current-7/modules/field/modules/field_sql_storage/field_sql_storage.test Wed Nov  2 17:45:27 2011
@@ -302,6 +302,31 @@
     }
     catch (FieldException $e) {
       $this->pass(t('Cannot update field schema with data.'));
+    }
+  }
+
+  /**
+   * Test that failure to create fields is handled gracefully.
+   */
+  function testFieldUpdateFailure() {
+    // Create a text field.
+    $field = array('field_name' => 'test_text', 'type' => 'text', 'settings' => array('max_length' => 255));
+    $field = field_create_field($field);
+
+    // Attempt to update the field in a way that would break the storage.
+    $prior_field = $field;
+    $field['settings']['max_length'] = -1;
+    try {
+      field_update_field($field);
+      $this->fail(t('Update succeeded.'));
+    }
+    catch (Exception $e) {
+      $this->pass(t('Update properly failed.'));
+    }
+
+    // Ensure that the field tables are still there.
+    foreach (_field_sql_storage_schema($prior_field) as $table_name => $table_info) {
+      $this->assertTrue(db_table_exists($table_name), t('Table %table exists.', array('%table' => $table_name)));
     }
   }
 

Modified: branches/upstream/current-7/modules/field/modules/list/list.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/field/modules/list/list.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/field/modules/list/list.info (original)
+++ branches/upstream/current-7/modules/field/modules/list/list.info Wed Nov  2 17:45:27 2011
@@ -7,8 +7,8 @@
 dependencies[] = options
 files[] = tests/list.test
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/field/modules/list/list.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/field/modules/list/list.module?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/field/modules/list/list.module (original)
+++ branches/upstream/current-7/modules/field/modules/list/list.module Wed Nov  2 17:45:27 2011
@@ -248,7 +248,7 @@
  * Parses a string of 'allowed values' into an array.
  *
  * @param $string
- *   The list of allowed values in string format descibed in
+ *   The list of allowed values in string format described in
  *   list_allowed_values_string().
  * @param $field_type
  *   The field type. Either 'list_number' or 'list_text'.

Modified: branches/upstream/current-7/modules/field/modules/list/tests/list.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/field/modules/list/tests/list.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/field/modules/list/tests/list.test (original)
+++ branches/upstream/current-7/modules/field/modules/list/tests/list.test Wed Nov  2 17:45:27 2011
@@ -303,7 +303,7 @@
     $this->field_name = 'field_list_boolean';
     $this->createListField('list_boolean');
 
-    // Check that the seperate 'On' and 'Off' form fields work.
+    // Check that the separate 'On' and 'Off' form fields work.
     $on = $this->randomName();
     $off = $this->randomName();
     $allowed_values = array(1 => $on, 0 => $off);

Modified: branches/upstream/current-7/modules/field/modules/list/tests/list_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/field/modules/list/tests/list_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/field/modules/list/tests/list_test.info (original)
+++ branches/upstream/current-7/modules/field/modules/list/tests/list_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 version = VERSION
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/field/modules/number/number.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/field/modules/number/number.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/field/modules/number/number.info (original)
+++ branches/upstream/current-7/modules/field/modules/number/number.info Wed Nov  2 17:45:27 2011
@@ -6,8 +6,8 @@
 dependencies[] = field
 files[] = number.test
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/field/modules/number/number.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/field/modules/number/number.module?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/field/modules/number/number.module (original)
+++ branches/upstream/current-7/modules/field/modules/number/number.module Wed Nov  2 17:45:27 2011
@@ -181,11 +181,18 @@
  */
 function number_field_formatter_info() {
   return array(
+    // The 'Default' formatter is different for integer fields on the one hand,
+    // and for decimal and float fields on the other hand, in order to be able
+    // to use different default values for the settings.
     'number_integer' => array(
       'label' => t('Default'),
       'field types' => array('number_integer'),
       'settings' =>  array(
         'thousand_separator' => ' ',
+        // The 'decimal_separator' and 'scale' settings are not configurable
+        // through the UI, and will therefore keep their default values. They
+        // are only present so that the 'number_integer' and 'number_decimal'
+        // formatters can use the same code.
         'decimal_separator' => '.',
         'scale' => 0,
         'prefix_suffix' => TRUE,
@@ -215,40 +222,42 @@
   $display = $instance['display'][$view_mode];
   $settings = $display['settings'];
 
-  $options = array(
-    ''  => t('<none>'),
-    '.' => t('Decimal point'),
-    ',' => t('Comma'),
-    ' ' => t('Space'),
-  );
-  $element['thousand_separator'] = array(
-    '#type' => 'select',
-    '#title' => t('Thousand marker'),
-    '#options' => $options,
-    '#default_value' => $settings['thousand_separator'],
-  );
-
-  if ($display['type'] == 'number_decimal' || $display['type'] == 'number_float') {
-    $element['decimal_separator'] = array(
+  if ($display['type'] == 'number_decimal' || $display['type'] == 'number_integer') {
+    $options = array(
+      ''  => t('<none>'),
+      '.' => t('Decimal point'),
+      ',' => t('Comma'),
+      ' ' => t('Space'),
+    );
+    $element['thousand_separator'] = array(
       '#type' => 'select',
-      '#title' => t('Decimal marker'),
-      '#options' => array('.' => t('Decimal point'), ',' => t('Comma')),
-      '#default_value' => $settings['decimal_separator'],
-    );
-    $element['scale'] = array(
-      '#type' => 'select',
-      '#title' => t('Scale'),
-      '#options' => drupal_map_assoc(range(0, 10)),
-      '#default_value' => $settings['scale'],
-      '#description' => t('The number of digits to the right of the decimal.'),
-    );
-  }
-
-  $element['prefix_suffix'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Display prefix and suffix.'),
-    '#default_value' => $settings['prefix_suffix'],
-  );
+      '#title' => t('Thousand marker'),
+      '#options' => $options,
+      '#default_value' => $settings['thousand_separator'],
+    );
+
+    if ($display['type'] == 'number_decimal') {
+      $element['decimal_separator'] = array(
+        '#type' => 'select',
+        '#title' => t('Decimal marker'),
+        '#options' => array('.' => t('Decimal point'), ',' => t('Comma')),
+        '#default_value' => $settings['decimal_separator'],
+      );
+      $element['scale'] = array(
+        '#type' => 'select',
+        '#title' => t('Scale'),
+        '#options' => drupal_map_assoc(range(0, 10)),
+        '#default_value' => $settings['scale'],
+        '#description' => t('The number of digits to the right of the decimal.'),
+      );
+    }
+
+    $element['prefix_suffix'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Display prefix and suffix.'),
+      '#default_value' => $settings['prefix_suffix'],
+    );
+  }
 
   return $element;
 }
@@ -261,9 +270,11 @@
   $settings = $display['settings'];
 
   $summary = array();
-  $summary[] = number_format(1234.1234567890, $settings['scale'], $settings['decimal_separator'], $settings['thousand_separator']);
-  if ($settings['prefix_suffix']) {
-    $summary[] = t('Display with prefix and suffix.');
+  if ($display['type'] == 'number_decimal' || $display['type'] == 'number_integer') {
+    $summary[] = number_format(1234.1234567890, $settings['scale'], $settings['decimal_separator'], $settings['thousand_separator']);
+    if ($settings['prefix_suffix']) {
+      $summary[] = t('Display with prefix and suffix.');
+    }
   }
 
   return implode('<br />', $summary);

Modified: branches/upstream/current-7/modules/field/modules/number/number.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/field/modules/number/number.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/field/modules/number/number.test (original)
+++ branches/upstream/current-7/modules/field/modules/number/number.test Wed Nov  2 17:45:27 2011
@@ -23,7 +23,7 @@
 
   function setUp() {
     parent::setUp('field_test');
-    $this->web_user = $this->drupalCreateUser(array('access field_test content', 'administer field_test content'));
+    $this->web_user = $this->drupalCreateUser(array('access field_test content', 'administer field_test content', 'administer content types'));
     $this->drupalLogin($this->web_user);
   }
 
@@ -93,4 +93,41 @@
       );
     }
   }
+
+  /**
+   * Test number_integer field.
+   */
+  function testNumberIntegerField() {
+    // Display the "Add content type" form.
+    $this->drupalGet('admin/structure/types/add');
+
+    // Add a content type.
+    $name = $this->randomName();
+    $type = drupal_strtolower($name);
+    $edit = array('name' => $name, 'type' => $type);
+    $this->drupalPost(NULL, $edit, t('Save and add fields'));
+
+    // Add an integer field to the newly-created type.
+    $label = $this->randomName();
+    $field_name = drupal_strtolower($label);
+    $edit = array(
+      'fields[_add_new_field][label]'=> $label,
+      'fields[_add_new_field][field_name]' => $field_name,
+      'fields[_add_new_field][type]' => 'number_integer',
+      'fields[_add_new_field][widget_type]' => 'number',
+    );
+    $this->drupalPost(NULL, $edit, t('Save'));
+
+    // Set the formatter to "number_integer" and to "unformatted", and just
+    // check that the settings summary does not generate warnings.
+    $this->drupalGet("admin/structure/types/manage/$type/display");
+    $edit = array(
+      "fields[field_$field_name][type]" => 'number_integer',
+    );
+    $this->drupalPost(NULL, $edit, t('Save'));
+    $edit = array(
+      "fields[field_$field_name][type]" => 'number_unformatted',
+    );
+    $this->drupalPost(NULL, $edit, t('Save'));
+  }
 }

Modified: branches/upstream/current-7/modules/field/modules/options/options.api.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/field/modules/options/options.api.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/field/modules/options/options.api.php (original)
+++ branches/upstream/current-7/modules/field/modules/options/options.api.php Wed Nov  2 17:45:27 2011
@@ -15,6 +15,11 @@
  *
  * @param $field
  *   The field definition.
+ * @param $instance
+ *   (optional) The instance definition. The hook might be called without an
+ *   $instance parameter in contexts where no specific instance can be targeted.
+ *   It is recommended to only use instance level properties to filter out
+ *   values from a list defined by field level properties.
  *
  * @return
  *   The array of options for the field. Array keys are the values to be
@@ -25,7 +30,7 @@
  *   widget. The HTML tags defined in _field_filter_xss_allowed_tags() are
  *   allowed, other tags will be filtered.
  */
-function hook_options_list($field) {
+function hook_options_list($field, $instance = NULL) {
   // Sample structure.
   $options = array(
     0 => t('Zero'),

Modified: branches/upstream/current-7/modules/field/modules/options/options.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/field/modules/options/options.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/field/modules/options/options.info (original)
+++ branches/upstream/current-7/modules/field/modules/options/options.info Wed Nov  2 17:45:27 2011
@@ -6,8 +6,8 @@
 dependencies[] = field
 files[] = options.test
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/field/modules/options/options.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/field/modules/options/options.module?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/field/modules/options/options.module (original)
+++ branches/upstream/current-7/modules/field/modules/options/options.module Wed Nov  2 17:45:27 2011
@@ -231,7 +231,7 @@
  */
 function _options_get_options($field, $instance, $properties) {
   // Get the list of options.
-  $options = (array) module_invoke($field['module'], 'options_list', $field);
+  $options = (array) module_invoke($field['module'], 'options_list', $field, $instance);
 
   // Sanitize the options.
   _options_prepare_options($options, $properties);

Modified: branches/upstream/current-7/modules/field/modules/text/text.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/field/modules/text/text.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/field/modules/text/text.info (original)
+++ branches/upstream/current-7/modules/field/modules/text/text.info Wed Nov  2 17:45:27 2011
@@ -7,8 +7,8 @@
 files[] = text.test
 required = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/field/tests/field_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/field/tests/field_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/field/tests/field_test.info (original)
+++ branches/upstream/current-7/modules/field/tests/field_test.info Wed Nov  2 17:45:27 2011
@@ -6,8 +6,8 @@
 version = VERSION
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/field/tests/field_test.storage.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/field/tests/field_test.storage.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/field/tests/field_test.storage.inc (original)
+++ branches/upstream/current-7/modules/field/tests/field_test.storage.inc Wed Nov  2 17:45:27 2011
@@ -282,7 +282,7 @@
           case '=':
             $match = $match && $row->{$column} == $value;
             break;
-          case '!=':
+          case '<>':
           case '<':
           case '<=':
           case '>':

Modified: branches/upstream/current-7/modules/field/theme/field.tpl.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/field/theme/field.tpl.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/field/theme/field.tpl.php (original)
+++ branches/upstream/current-7/modules/field/theme/field.tpl.php Wed Nov  2 17:45:27 2011
@@ -49,11 +49,11 @@
 HTML comment.
 -->
 <div class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>
-  <?php if (!$label_hidden) : ?>
+  <?php if (!$label_hidden): ?>
     <div class="field-label"<?php print $title_attributes; ?>><?php print $label ?>: </div>
   <?php endif; ?>
   <div class="field-items"<?php print $content_attributes; ?>>
-    <?php foreach ($items as $delta => $item) : ?>
+    <?php foreach ($items as $delta => $item): ?>
       <div class="field-item <?php print $delta % 2 ? 'odd' : 'even'; ?>"<?php print $item_attributes[$delta]; ?>><?php print render($item); ?></div>
     <?php endforeach; ?>
   </div>

Modified: branches/upstream/current-7/modules/field_ui/field_ui.admin.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/field_ui/field_ui.admin.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/field_ui/field_ui.admin.inc (original)
+++ branches/upstream/current-7/modules/field_ui/field_ui.admin.inc Wed Nov  2 17:45:27 2011
@@ -254,12 +254,17 @@
         $row += $element['#attributes'];
       }
 
+      // Render children as table cells.
       foreach (element_children($element) as $cell_key) {
-        $cell = array('data' => drupal_render($element[$cell_key]));
-        if (isset($element[$cell_key]['#cell_attributes'])) {
-          $cell += $element[$cell_key]['#cell_attributes'];
+        $child = &$element[$cell_key];
+        // Do not render a cell for children of #type 'value'.
+        if (!(isset($child['#type']) && $child['#type'] == 'value')) {
+          $cell = array('data' => drupal_render($child));
+          if (isset($child['#cell_attributes'])) {
+            $cell += $child['#cell_attributes'];
+          }
+          $row['data'][] = $cell;
         }
-        $row['data'][] = $cell;
       }
       $table['rows'][] = $row;
     }
@@ -519,6 +524,8 @@
         '#cell_attributes' => array('colspan' => 3),
         '#prefix' => '<div class="add-new-placeholder"> </div>',
       ),
+      // Place the 'translatable' property as an explicit value so that contrib
+      // modules can form_alter() the value for newly created fields.
       'translatable' => array(
         '#type' => 'value',
         '#value' => FALSE,
@@ -792,7 +799,7 @@
       $form_state['fields_added']['_add_new_field'] = $field['field_name'];
     }
     catch (Exception $e) {
-      drupal_set_message(t('There was a problem creating field %label: @message.', array('%label' => $instance['label'], '@message' => $e->getMessage())));
+      drupal_set_message(t('There was a problem creating field %label: @message.', array('%label' => $instance['label'], '@message' => $e->getMessage())), 'error');
     }
   }
 
@@ -822,7 +829,7 @@
         $form_state['fields_added']['_add_existing_field'] = $instance['field_name'];
       }
       catch (Exception $e) {
-        drupal_set_message(t('There was a problem creating field instance %label: @message.', array('%label' => $instance['label'], '@message' => $e->getMessage())));
+        drupal_set_message(t('There was a problem creating field instance %label: @message.', array('%label' => $instance['label'], '@message' => $e->getMessage())), 'error');
       }
     }
   }
@@ -1590,10 +1597,8 @@
     drupal_set_message(t('Updated field %label field settings.', array('%label' => $instance['label'])));
     $form_state['redirect'] = field_ui_next_destination($entity_type, $bundle);
   }
-  catch (FieldException $e) {
+  catch (Exception $e) {
     drupal_set_message(t('Attempt to update field %label failed: %message.', array('%label' => $instance['label'], '%message' => $e->getMessage())), 'error');
-    // TODO: Where do we go from here?
-    $form_state['redirect'] = field_ui_next_destination($entity_type, $bundle);
   }
 }
 
@@ -1664,7 +1669,7 @@
     field_update_instance($instance);
     drupal_set_message(t('Changed the widget for field %label.', array('%label' => $instance['label'])));
   }
-  catch (FieldException $e) {
+  catch (Exception $e) {
     drupal_set_message(t('There was a problem changing the widget for field %label.', array('%label' => $instance['label'])));
   }
 
@@ -1992,7 +1997,13 @@
   // Update any field settings that have changed.
   $field_source = field_info_field($instance['field_name']);
   $field = array_merge($field_source, $field);
-  field_update_field($field);
+  try {
+    field_update_field($field);
+  }
+  catch (Exception $e) {
+    drupal_set_message(t('Attempt to update field %label failed: %message.', array('%label' => $instance['label'], '%message' => $e->getMessage())), 'error');
+    return;
+  }
 
   // Handle the default value.
   if (isset($form['instance']['default_value_widget'])) {

Modified: branches/upstream/current-7/modules/field_ui/field_ui.api.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/field_ui/field_ui.api.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/field_ui/field_ui.api.php (original)
+++ branches/upstream/current-7/modules/field_ui/field_ui.api.php Wed Nov  2 17:45:27 2011
@@ -82,7 +82,7 @@
         t('No'),
         t('Yes'),
       ),
-      '#description' => t('Display the summary to allow the user to input a summary value. Hide the summary to automatically fill it with a trimmed portion from the main post. '),
+      '#description' => t('Display the summary to allow the user to input a summary value. Hide the summary to automatically fill it with a trimmed portion from the main post.'),
       '#default_value' => !empty($settings['display_summary']) ? $settings['display_summary'] :  0,
     );
   }

Modified: branches/upstream/current-7/modules/field_ui/field_ui.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/field_ui/field_ui.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/field_ui/field_ui.info (original)
+++ branches/upstream/current-7/modules/field_ui/field_ui.info Wed Nov  2 17:45:27 2011
@@ -6,8 +6,8 @@
 dependencies[] = field
 files[] = field_ui.test
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/field_ui/field_ui.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/field_ui/field_ui.module?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/field_ui/field_ui.module (original)
+++ branches/upstream/current-7/modules/field_ui/field_ui.module Wed Nov  2 17:45:27 2011
@@ -17,7 +17,7 @@
       $output .= '<h3>' . t('Uses') . '</h3>';
       $output .= '<dl>';
       $output .= '<dt>' . t('Planning fields') . '</dt>';
-      $output .= '<dd>' . t('There are several decisions you will need to make before definining a field for content, comments, etc.:') . '<dl>';
+      $output .= '<dd>' . t('There are several decisions you will need to make before defining a field for content, comments, etc.:') . '<dl>';
       $output .= '<dt>' . t('What the field will be called') . '</dt>';
       $output .= '<dd>' . t('A field has a <em>label</em> (the name displayed in the user interface) and a <em>machine name</em> (the name used internally). The label can be changed after you create the field, if needed, but the machine name cannot be changed after you have created the field.') . '</li>';
       $output .= '<dt>' . t('What type of data the field will store') . '</dt>';
@@ -45,6 +45,17 @@
     case 'admin/reports/fields':
       return '<p>' . t('This list shows all fields currently in use for easy reference.') . '</p>';
   }
+}
+
+/**
+ * Implements hook_field_attach_rename_bundle().
+ */
+function field_ui_field_attach_rename_bundle($entity_type, $bundle_old, $bundle_new) {
+  // The Field UI relies on entity_get_info() to build menu items for entity
+  // field administration pages. Clear the entity info cache and ensure that
+  // the menu is rebuilt.
+  entity_info_cache_clear();
+  menu_rebuild();
 }
 
 /**

Modified: branches/upstream/current-7/modules/field_ui/field_ui.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/field_ui/field_ui.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/field_ui/field_ui.test (original)
+++ branches/upstream/current-7/modules/field_ui/field_ui.test Wed Nov  2 17:45:27 2011
@@ -26,7 +26,7 @@
     $this->drupalLogin($admin_user);
 
     // Create content type, with underscores.
-    $type_name =  strtolower($this->randomName(8)) . '_' .'test';
+    $type_name = strtolower($this->randomName(8)) . '_test';
     $type = $this->drupalCreateContentType(array('name' => $type_name, 'type' => $type_name));
     $this->type = $type->type;
     // Store a valid URL name, with hyphens instead of underscores.
@@ -343,7 +343,7 @@
     $this->fieldUIAddNewField($bundle_path1, $edit1);
 
     // Create an additional node type.
-    $type_name2 =  strtolower($this->randomName(8)) . '_' .'test';
+    $type_name2 = strtolower($this->randomName(8)) . '_test';
     $type2 = $this->drupalCreateContentType(array('name' => $type_name2, 'type' => $type_name2));
     $type_name2 = $type2->type;
     $hyphen_type2 = str_replace('_', '-', $type_name2);
@@ -410,6 +410,21 @@
     $bundle_path = 'admin/structure/types/manage/article/fields/';
     $this->drupalGet($bundle_path);
     $this->assertFalse($this->xpath('//select[@id="edit-add-existing-field-field-name"]//option[@value=:field_name]', array(':field_name' => $field_name)), t("The 'add existing field' select respects field types 'no_ui' property."));
+  }
+
+  /**
+   * Tests renaming a bundle.
+   */
+  function testRenameBundle() {
+    $type2 = strtolower($this->randomName(8)) . '_' .'test';
+    $hyphen_type2 = str_replace('_', '-', $type2);
+
+    $options = array(
+      'type' => $type2,
+    );
+    $this->drupalPost('admin/structure/types/manage/' . $this->hyphen_type, $options, t('Save content type'));
+
+    $this->drupalGet('admin/structure/types/manage/' . $hyphen_type2 . '/fields');
   }
 }
 

Modified: branches/upstream/current-7/modules/file/file.field.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/file/file.field.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/file/file.field.inc (original)
+++ branches/upstream/current-7/modules/file/file.field.inc Wed Nov  2 17:45:27 2011
@@ -428,7 +428,7 @@
       'bar' => t('Bar with progress meter'),
     ),
     '#default_value' => $settings['progress_indicator'],
-    '#description' => t('The throbber display does not show the status of uploads but takes up space. The progress bar is helpful for monitoring progress on large uploads.'),
+    '#description' => t('The throbber display does not show the status of uploads but takes up less space. The progress bar is helpful for monitoring progress on large uploads.'),
     '#weight' => 16,
     '#access' => file_progress_implementation(),
   );
@@ -447,37 +447,18 @@
     'description' => '',
   );
 
-  // Retrieve any values set in $form_state, as will be the case during Ajax
-  // rebuilds of this form.
-  if (isset($form_state['values'])) {
-    $path = array_merge($element['#field_parents'], array($field['field_name'], $langcode));
-    $path_exists = FALSE;
-    $values = drupal_array_get_nested_value($form_state['values'], $path, $path_exists);
-    if ($path_exists) {
-      $items = $values;
-      drupal_array_set_nested_value($form_state['values'], $path, NULL);
-    }
-  }
-
-  foreach ($items as $delta => $item) {
-    $items[$delta] = array_merge($defaults, $items[$delta]);
-    // Remove any items from being displayed that are not needed.
-    if ($items[$delta]['fid'] == 0) {
-      unset($items[$delta]);
-    }
-  }
-
-  // Re-index deltas after removing empty items.
-  $items = array_values($items);
-
-  // Update order according to weight.
-  $items = _field_sort_items($field, $items);
+  // Load the items for form rebuilds from the field state as they might not be
+  // in $form_state['values'] because of validation limitations. Also, they are
+  // only passed in as $items when editing existing entities.
+  $field_state = field_form_get_state($element['#field_parents'], $field['field_name'], $langcode, $form_state);
+  if (isset($field_state['items'])) {
+    $items = $field_state['items'];
+  }
 
   // Essentially we use the managed_file type, extended with some enhancements.
   $element_info = element_info('managed_file');
   $element += array(
     '#type' => 'managed_file',
-    '#default_value' => isset($items[$delta]) ? $items[$delta] : $defaults,
     '#upload_location' => file_field_widget_uri($field, $instance),
     '#upload_validators' => file_field_widget_upload_validators($field, $instance),
     '#value_callback' => 'file_field_widget_value',
@@ -487,6 +468,8 @@
   );
 
   if ($field['cardinality'] == 1) {
+    // Set the default value.
+    $element['#default_value'] = !empty($items) ? $items[0] : $defaults;
     // If there's only one field, return it as delta 0.
     if (empty($element['#default_value']['fid'])) {
       $element['#description'] = theme('file_upload_help', array('description' => $element['#description'], 'upload_validators' => $element['#upload_validators']));
@@ -495,15 +478,15 @@
   }
   else {
     // If there are multiple values, add an element for each existing one.
-    $delta = -1;
-    foreach ($items as $delta => $item) {
+    foreach ($items as $item) {
       $elements[$delta] = $element;
       $elements[$delta]['#default_value'] = $item;
       $elements[$delta]['#weight'] = $delta;
-    }
-    // And then add one more empty row for new uploads.
-    $delta++;
-    if ($field['cardinality'] == FIELD_CARDINALITY_UNLIMITED || $delta < $field['cardinality']) {
+      $delta++;
+    }
+    // And then add one more empty row for new uploads except when this is a
+    // programmed form as it is not necessary.
+    if (($field['cardinality'] == FIELD_CARDINALITY_UNLIMITED || $delta < $field['cardinality']) && empty($form_state['programmed'])) {
       $elements[$delta] = $element;
       $elements[$delta]['#default_value'] = $defaults;
       $elements[$delta]['#weight'] = $delta;
@@ -757,6 +740,32 @@
   // so nothing is lost in doing this.
   $parents = array_slice($form_state['triggering_element']['#parents'], 0, -2);
   drupal_array_set_nested_value($form_state['input'], $parents, NULL);
+
+  $button = $form_state['triggering_element'];
+
+  // Go one level up in the form, to the widgets container.
+  $element = drupal_array_get_nested_value($form, array_slice($button['#array_parents'], 0, -1));
+  $field_name = $element['#field_name'];
+  $langcode = $element['#language'];
+  $parents = $element['#field_parents'];
+
+  $submitted_values = drupal_array_get_nested_value($form_state['values'], array_slice($button['#array_parents'], 0, -2));
+  foreach ($submitted_values as $delta => $submitted_value) {
+    if (!$submitted_value['fid']) {
+      unset($submitted_values[$delta]);
+    }
+  }
+
+  // Re-index deltas after removing empty items.
+  $submitted_values = array_values($submitted_values);
+
+  // Update form_state values.
+  drupal_array_set_nested_value($form_state['values'], array_slice($button['#array_parents'], 0, -2), $submitted_values);
+
+  // Update items.
+  $field_state = field_form_get_state($parents, $field_name, $langcode, $form_state);
+  $field_state['items'] = $submitted_values;
+  field_form_set_state($parents, $field_name, $langcode, $form_state, $field_state);
 }
 
 /**

Modified: branches/upstream/current-7/modules/file/file.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/file/file.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/file/file.info (original)
+++ branches/upstream/current-7/modules/file/file.info Wed Nov  2 17:45:27 2011
@@ -6,8 +6,8 @@
 dependencies[] = field
 files[] = tests/file.test
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/file/file.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/file/file.module?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/file/file.module (original)
+++ branches/upstream/current-7/modules/file/file.module Wed Nov  2 17:45:27 2011
@@ -142,10 +142,13 @@
   // Find out which (if any) fields of this type contain the file.
   $references = file_get_file_references($file, NULL, FIELD_LOAD_CURRENT, $field_type);
 
-  // If there are no references, stop processing, to avoid returning headers
-  // for files controlled by other modules.
-  if (empty($references)) {
-    return;
+  // Stop processing if there are no references in order to avoid returning
+  // headers for files controlled by other modules. Make an exception for
+  // temporary files where the host entity has not yet been saved (for example,
+  // an image preview on a node/add form) in which case, allow download by the
+  // file's owner.
+  if (empty($references) && ($file->status == FILE_STATUS_PERMANENT || $file->uid != $user->uid)) {
+      return;
   }
 
   // Default to allow access.
@@ -643,9 +646,18 @@
 function theme_file_managed_file($variables) {
   $element = $variables['element'];
 
+  $attributes = array();
+  if (isset($element['#id'])) {
+    $attributes['id'] = $element['#id'];
+  }
+  if (!empty($element['#attributes']['class'])) {
+    $attributes['class'] = (array) $element['#attributes']['class'];
+  }
+  $attributes['class'][] = 'form-managed-file';
+
   // This wrapper is required to apply JS behaviors and CSS styling.
   $output = '';
-  $output .= '<div class="form-managed-file">';
+  $output .= '<div' . drupal_attributes($attributes) . '>';
   $output .= drupal_render_children($element);
   $output .= '</div>';
   return $output;

Modified: branches/upstream/current-7/modules/file/tests/file.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/file/tests/file.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/file/tests/file.test (original)
+++ branches/upstream/current-7/modules/file/tests/file.test Wed Nov  2 17:45:27 2011
@@ -380,7 +380,7 @@
   }
 
   /**
-   * Tests upload and remove buttons, with and without Ajax, for a multi-valued File field.
+   * Tests upload and remove buttons, with and without Ajax, for multiple multi-valued File field.
    */
   function testMultiValuedWidget() {
     // Use 'page' instead of 'article', so that the 'article' image field does
@@ -389,77 +389,106 @@
     // using a custom node type.
     $type_name = 'page';
     $field_name = strtolower($this->randomName());
+    $field_name2 = strtolower($this->randomName());
     $this->createFileField($field_name, $type_name, array('cardinality' => 3));
+    $this->createFileField($field_name2, $type_name, array('cardinality' => 3));
+
     $field = field_info_field($field_name);
     $instance = field_info_instance('node', $field_name, $type_name);
 
+    $field2 = field_info_field($field_name2);
+    $instance2 = field_info_instance('node', $field_name2, $type_name);
+
     $test_file = $this->getTestFile('text');
 
     foreach (array('nojs', 'js') as $type) {
-      // Visit the node creation form, and upload 3 files. Since the field has
-      // cardinality of 3, ensure the "Upload" button is displayed until after
-      // the 3rd file, and after that, isn't displayed.
+      // Visit the node creation form, and upload 3 files for each field. Since
+      // the field has cardinality of 3, ensure the "Upload" button is displayed
+      // until after the 3rd file, and after that, isn't displayed. Because
+      // SimpleTest triggers the last button with a given name, so upload to the
+      // second field first.
       // @todo This is only testing a non-Ajax upload, because drupalPostAJAX()
       //   does not yet emulate jQuery's file upload.
+      //
       $this->drupalGet("node/add/$type_name");
-      for ($delta = 0; $delta < 3; $delta++) {
-        $edit = array('files[' . $field_name . '_' . LANGUAGE_NONE . '_' . $delta . ']' => drupal_realpath($test_file->uri));
-        // If the Upload button doesn't exist, drupalPost() will automatically
-        // fail with an assertion message.
-        $this->drupalPost(NULL, $edit, t('Upload'));
+      foreach (array($field_name2, $field_name) as $each_field_name) {
+        for ($delta = 0; $delta < 3; $delta++) {
+          $edit = array('files[' . $each_field_name . '_' . LANGUAGE_NONE . '_' . $delta . ']' => drupal_realpath($test_file->uri));
+          // If the Upload button doesn't exist, drupalPost() will automatically
+          // fail with an assertion message.
+          $this->drupalPost(NULL, $edit, t('Upload'));
+        }
       }
-      $this->assertNoFieldByXpath('//input[@type="submit"]', t('Upload'), t('After uploading 3 files, the "Upload" button is no longer displayed.'));
-
-      // Test clicking each "Remove" button. For extra robustness, test them out
-      // of sequential order. They are 0-indexed, and get renumbered after each
-      // iteration, so array(1, 1, 0) means:
-      // - First remove the 2nd file.
-      // - Then remove what is then the 2nd file (was originally the 3rd file).
-      // - Then remove the first file.
-      $num_expected_remove_buttons = 3;
-      foreach (array(1, 1, 0) as $delta) {
-        // Ensure we have the expected number of Remove buttons, and that they
-        // are numbered sequentially.
-        $buttons = $this->xpath('//input[@type="submit" and @value="Remove"]');
-        $this->assertTrue(is_array($buttons) && count($buttons) === $num_expected_remove_buttons, t('There are %n "Remove" buttons displayed (JSMode=%type).', array('%n' => $num_expected_remove_buttons, '%type' => $type)));
-        foreach ($buttons as $i => $button) {
-          $this->assertIdentical((string) $button['name'], $field_name . '_' . LANGUAGE_NONE . '_' . $i . '_remove_button');
+      $this->assertNoFieldByXpath('//input[@type="submit"]', t('Upload'), t('After uploading 3 files for each field, the "Upload" button is no longer displayed.'));
+
+      $num_expected_remove_buttons = 6;
+
+      foreach (array($field_name, $field_name2) as $current_field_name) {
+        // How many uploaded files for the current field are remaining.
+        $remaining = 3;
+        // Test clicking each "Remove" button. For extra robustness, test them out
+        // of sequential order. They are 0-indexed, and get renumbered after each
+        // iteration, so array(1, 1, 0) means:
+        // - First remove the 2nd file.
+        // - Then remove what is then the 2nd file (was originally the 3rd file).
+        // - Then remove the first file.
+        foreach (array(1,1,0) as $delta) {
+          // Ensure we have the expected number of Remove buttons, and that they
+          // are numbered sequentially.
+          $buttons = $this->xpath('//input[@type="submit" and @value="Remove"]');
+          $this->assertTrue(is_array($buttons) && count($buttons) === $num_expected_remove_buttons, t('There are %n "Remove" buttons displayed (JSMode=%type).', array('%n' => $num_expected_remove_buttons, '%type' => $type)));
+          foreach ($buttons as $i => $button) {
+            $key = $i >= $remaining ? $i - $remaining : $i;
+            $check_field_name = $field_name2;
+            if ($current_field_name == $field_name && $i < $remaining) {
+              $check_field_name = $field_name;
+            }
+
+            $this->assertIdentical((string) $button['name'], $check_field_name . '_' . LANGUAGE_NONE . '_' . $key. '_remove_button');
+          }
+
+          // "Click" the remove button (emulating either a nojs or js submission).
+          $button_name = $current_field_name . '_' . LANGUAGE_NONE . '_' . $delta . '_remove_button';
+          switch ($type) {
+            case 'nojs':
+              // drupalPost() takes a $submit parameter that is the value of the
+              // button whose click we want to emulate. Since we have multiple
+              // buttons with the value "Remove", and want to control which one we
+              // use, we change the value of the other ones to something else.
+              // Since non-clicked buttons aren't included in the submitted POST
+              // data, and since drupalPost() will result in $this being updated
+              // with a newly rebuilt form, this doesn't cause problems.
+              foreach ($buttons as $button) {
+                if ($button['name'] != $button_name) {
+                  $button['value'] = 'DUMMY';
+                }
+              }
+              $this->drupalPost(NULL, array(), t('Remove'));
+              break;
+            case 'js':
+              // drupalPostAJAX() lets us target the button precisely, so we don't
+              // require the workaround used above for nojs.
+              $this->drupalPostAJAX(NULL, array(), array($button_name => t('Remove')));
+              break;
+          }
+          $num_expected_remove_buttons--;
+          $remaining--;
+
+          // Ensure an "Upload" button for the current field is displayed with the
+          // correct name.
+          $upload_button_name = $current_field_name . '_' . LANGUAGE_NONE . '_' . $remaining . '_upload_button';
+          $buttons = $this->xpath('//input[@type="submit" and @value="Upload" and @name=:name]', array(':name' => $upload_button_name));
+          $this->assertTrue(is_array($buttons) && count($buttons) == 1, t('The upload button is displayed with the correct name (JSMode=%type).', array('%type' => $type)));
+
+          // Ensure only at most one button per field is displayed.
+          $buttons = $this->xpath('//input[@type="submit" and @value="Upload"]');
+          $expected = $current_field_name == $field_name ? 1 : 2;
+          $this->assertTrue(is_array($buttons) && count($buttons) == $expected, t('After removing a file, only one "Upload" button for each possible field is displayed (JSMode=%type).', array('%type' => $type)));
         }
-
-        // "Click" the remove button (emulating either a nojs or js submission).
-        $button_name = $field_name . '_' . LANGUAGE_NONE . '_' . $delta . '_remove_button';
-        switch ($type) {
-          case 'nojs':
-            // drupalPost() takes a $submit parameter that is the value of the
-            // button whose click we want to emulate. Since we have multiple
-            // buttons with the value "Remove", and want to control which one we
-            // use, we change the value of the other ones to something else.
-            // Since non-clicked buttons aren't included in the submitted POST
-            // data, and since drupalPost() will result in $this being updated
-            // with a newly rebuilt form, this doesn't cause problems.
-            foreach ($buttons as $button) {
-              if ($button['name'] != $button_name) {
-                $button['value'] = 'DUMMY';
-              }
-            }
-            $this->drupalPost(NULL, array(), t('Remove'));
-            break;
-          case 'js':
-            // drupalPostAJAX() lets us target the button precisely, so we don't
-            // require the workaround used above for nojs.
-            $this->drupalPostAJAX(NULL, array(), array($button_name => t('Remove')));
-            break;
-        }
-        $num_expected_remove_buttons--;
-
-        // Ensure we have a single Upload button, and that it is numbered
-        // sequentially after the Remove buttons.
-        $buttons = $this->xpath('//input[@type="submit" and @value="Upload"]');
-        $this->assertTrue(is_array($buttons) && count($buttons) == 1 && ((string) $buttons[0]['name'] === ($field_name . '_' . LANGUAGE_NONE . '_' . $num_expected_remove_buttons . '_upload_button')), t('After removing a file, an "Upload" button is displayed (JSMode=%type).'));
       }
 
       // Ensure the page now has no Remove buttons.
-      $this->assertNoFieldByXPath('//input[@type="submit"]', t('Remove'), t('After removing all files, there is no "Remove" button displayed.', array('%n' => $num_expected_remove_buttons, '%type' => $type)));
+      $this->assertNoFieldByXPath('//input[@type="submit"]', t('Remove'), t('After removing all files, there is no "Remove" button displayed (JSMode=%type).', array('%type' => $type)));
 
       // Save the node and ensure it does not have any files.
       $this->drupalPost(NULL, array('title' => $this->randomName()), t('Save'));

Modified: branches/upstream/current-7/modules/file/tests/file_module_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/file/tests/file_module_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/file/tests/file_module_test.info (original)
+++ branches/upstream/current-7/modules/file/tests/file_module_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/filter/filter.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/filter/filter.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/filter/filter.info (original)
+++ branches/upstream/current-7/modules/filter/filter.info Wed Nov  2 17:45:27 2011
@@ -7,8 +7,8 @@
 required = TRUE
 configure = admin/config/content/formats
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/filter/filter.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/filter/filter.module?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/filter/filter.module (original)
+++ branches/upstream/current-7/modules/filter/filter.module Wed Nov  2 17:45:27 2011
@@ -1090,7 +1090,7 @@
  * throw exceptions.
  *
  * This function attempts to solve the problem by creating a DocumentFragment
- * and immitating the behavior in drupal_get_js(), commenting the CDATA tag.
+ * and imitating the behavior in drupal_get_js(), commenting the CDATA tag.
  *
  * @param $dom_document
  *   The DOMDocument containing the $dom_element.

Modified: branches/upstream/current-7/modules/forum/forum.admin.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/forum/forum.admin.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/forum/forum.admin.inc (original)
+++ branches/upstream/current-7/modules/forum/forum.admin.inc Wed Nov  2 17:45:27 2011
@@ -55,7 +55,7 @@
 
   $form['vid'] = array('#type' => 'hidden', '#value' => variable_get('forum_nav_vocabulary', ''));
   $form['actions'] = array('#type' => 'actions');
-  $form['actions']['submit' ] = array('#type' => 'submit', '#value' => t('Save'));
+  $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save'));
   if ($edit['tid']) {
     $form['actions']['delete'] = array('#type' => 'submit', '#value' => t('Delete'));
     $form['tid'] = array('#type' => 'hidden', '#value' => $edit['tid']);

Modified: branches/upstream/current-7/modules/forum/forum.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/forum/forum.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/forum/forum.info (original)
+++ branches/upstream/current-7/modules/forum/forum.info Wed Nov  2 17:45:27 2011
@@ -9,8 +9,8 @@
 configure = admin/structure/forum
 stylesheets[all][] = forum.css
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/forum/forum.install
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/forum/forum.install?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/forum/forum.install (original)
+++ branches/upstream/current-7/modules/forum/forum.install Wed Nov  2 17:45:27 2011
@@ -239,6 +239,21 @@
 }
 
 /**
+ * Implements hook_update_dependencies().
+ */
+function forum_update_dependencies() {
+  $dependencies['forum'][7003] = array(
+    // Forum update 7003 uses field API update functions, so must run after
+    // Field API has been enabled.
+    'system' => 7020,
+    // Forum update 7003 relies on updated taxonomy module schema. Ensure it
+    // runs after all taxonomy updates.
+    'taxonomy' => 7010,
+  );
+  return $dependencies;
+}
+
+/**
  * Add new index to forum table.
  */
 function forum_update_7000() {

Modified: branches/upstream/current-7/modules/forum/forum.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/forum/forum.module?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/forum/forum.module (original)
+++ branches/upstream/current-7/modules/forum/forum.module Wed Nov  2 17:45:27 2011
@@ -215,7 +215,7 @@
  * Implements hook_entity_info_alter().
  */
 function forum_entity_info_alter(&$info) {
-  // Take over URI constuction for taxonomy terms that are forums.
+  // Take over URI construction for taxonomy terms that are forums.
   if ($vid = variable_get('forum_nav_vocabulary', 0)) {
     // Within hook_entity_info(), we can't invoke entity_load() as that would
     // cause infinite recursion, so we call taxonomy_vocabulary_get_names()
@@ -582,7 +582,7 @@
  */
 function forum_form_alter(&$form, $form_state, $form_id) {
   $vid = variable_get('forum_nav_vocabulary', 0);
-  if (isset($form['vid']) && $form['vid']['#value'] == $vid) {
+  if (isset($form['vid']['#value']) && $form['vid']['#value'] == $vid) {
     // Hide critical options from forum vocabulary.
     if ($form_id == 'taxonomy_form_vocabulary') {
       $form['help_forum_vocab'] = array(
@@ -1127,7 +1127,6 @@
         $variables['topics'][$id]->title = l($topic->title, "node/$topic->nid");
         $variables['topics'][$id]->message = '';
       }
-      $topic->uid = $topic->last_comment_uid ? $topic->last_comment_uid : $topic->uid;
       $variables['topics'][$id]->created = theme('forum_submitted', array('topic' => $topic));
       $variables['topics'][$id]->last_reply = theme('forum_submitted', array('topic' => isset($topic->last_reply) ? $topic->last_reply : NULL));
 

Modified: branches/upstream/current-7/modules/help/help.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/help/help.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/help/help.info (original)
+++ branches/upstream/current-7/modules/help/help.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 files[] = help.test
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/image/image.api.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/image/image.api.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/image/image.api.php (original)
+++ branches/upstream/current-7/modules/image/image.api.php Wed Nov  2 17:45:27 2011
@@ -22,6 +22,10 @@
  *   following items:
  *   - "label": The human-readable name of the effect.
  *   - "effect callback": The function to call to perform this image effect.
+ *   - "dimensions passthrough": (optional) Set this item if the effect doesn't
+ *     change the dimensions of the image.
+ *   - "dimensions callback": (optional) The function to call to transform
+ *     dimensions for this effect.
  *   - "help": (optional) A brief description of the effect that will be shown
  *     when adding or configuring this image effect.
  *   - "form callback": (optional) The name of a function that will return a
@@ -37,7 +41,8 @@
   $effects['mymodule_resize'] = array(
     'label' => t('Resize'),
     'help' => t('Resize an image to an exact set of dimensions, ignoring aspect ratio.'),
-    'effect callback' => 'mymodule_resize_image',
+    'effect callback' => 'mymodule_resize_effect',
+    'dimensions callback' => 'mymodule_resize_dimensions',
     'form callback' => 'mymodule_resize_form',
     'summary theme' => 'mymodule_resize_summary',
   );
@@ -56,6 +61,7 @@
 function hook_image_effect_info_alter(&$effects) {
   // Override the Image module's crop effect with more options.
   $effects['image_crop']['effect callback'] = 'mymodule_crop_effect';
+  $effects['image_crop']['dimensions callback'] = 'mymodule_crop_dimensions';
   $effects['image_crop']['form callback'] = 'mymodule_crop_form';
 }
 

Modified: branches/upstream/current-7/modules/image/image.effects.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/image/image.effects.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/image/image.effects.inc (original)
+++ branches/upstream/current-7/modules/image/image.effects.inc Wed Nov  2 17:45:27 2011
@@ -14,6 +14,7 @@
       'label' => t('Resize'),
       'help' => t('Resizing will make images an exact set of dimensions. This may cause images to be stretched or shrunk disproportionately.'),
       'effect callback' => 'image_resize_effect',
+      'dimensions callback' => 'image_resize_dimensions',
       'form callback' => 'image_resize_form',
       'summary theme' => 'image_resize_summary',
     ),
@@ -21,6 +22,7 @@
       'label' => t('Scale'),
       'help' => t('Scaling will maintain the aspect-ratio of the original image. If only a single dimension is specified, the other dimension will be calculated.'),
       'effect callback' => 'image_scale_effect',
+      'dimensions callback' => 'image_scale_dimensions',
       'form callback' => 'image_scale_form',
       'summary theme' => 'image_scale_summary',
     ),
@@ -28,6 +30,7 @@
       'label' => t('Scale and crop'),
       'help' => t('Scale and crop will maintain the aspect-ratio of the original image, then crop the larger dimension. This is most useful for creating perfectly square thumbnails without stretching the image.'),
       'effect callback' => 'image_scale_and_crop_effect',
+      'dimensions callback' => 'image_resize_dimensions',
       'form callback' => 'image_resize_form',
       'summary theme' => 'image_resize_summary',
     ),
@@ -35,6 +38,7 @@
       'label' => t('Crop'),
       'help' => t('Cropping will remove portions of an image to make it the specified dimensions.'),
       'effect callback' => 'image_crop_effect',
+      'dimensions callback' => 'image_resize_dimensions',
       'form callback' => 'image_crop_form',
       'summary theme' => 'image_crop_summary',
     ),
@@ -42,11 +46,13 @@
       'label' => t('Desaturate'),
       'help' => t('Desaturate converts an image to grayscale.'),
       'effect callback' => 'image_desaturate_effect',
+      'dimensions passthrough' => TRUE,
     ),
     'image_rotate' => array(
       'label' => t('Rotate'),
       'help' => t('Rotating an image may cause the dimensions of an image to increase to fit the diagonal.'),
       'effect callback' => 'image_rotate_effect',
+      'dimensions callback' => 'image_rotate_dimensions',
       'form callback' => 'image_rotate_form',
       'summary theme' => 'image_rotate_summary',
     ),
@@ -80,6 +86,24 @@
 }
 
 /**
+ * Image dimensions callback; Resize.
+ *
+ * @param $dimensions
+ *   Dimensions to be modified - an array with components width and height, in
+ *   pixels.
+ * @param $data
+ *   An array of attributes to use when performing the resize effect with the
+ *   following items:
+ *   - "width": An integer representing the desired width in pixels.
+ *   - "height": An integer representing the desired height in pixels.
+ */
+function image_resize_dimensions(array &$dimensions, array $data) {
+  // The new image will have the exact dimensions defined for the effect.
+  $dimensions['width'] = $data['width'];
+  $dimensions['height'] = $data['height'];
+}
+
+/**
  * Image effect callback; Scale an image resource.
  *
  * @param $image
@@ -89,8 +113,8 @@
  *   following items:
  *   - "width": An integer representing the desired width in pixels.
  *   - "height": An integer representing the desired height in pixels.
- *   - "upscale": A Boolean indicating that the image should be upscalled if
- *     the dimensions are larger than the original image.
+ *   - "upscale": A boolean indicating that the image should be upscaled if the
+ *     dimensions are larger than the original image.
  *
  * @return
  *   TRUE on success. FALSE on failure to scale image.
@@ -115,6 +139,26 @@
 }
 
 /**
+ * Image dimensions callback; Scale.
+ *
+ * @param $dimensions
+ *   Dimensions to be modified - an array with components width and height, in
+ *   pixels.
+ * @param $data
+ *   An array of attributes to use when performing the scale effect with the
+ *   following items:
+ *   - "width": An integer representing the desired width in pixels.
+ *   - "height": An integer representing the desired height in pixels.
+ *   - "upscale": A boolean indicating that the image should be upscaled if the
+ *     dimensions are larger than the original image.
+ */
+function image_scale_dimensions(array &$dimensions, array $data) {
+  if ($dimensions['width'] && $dimensions['height']) {
+    image_dimensions_scale($dimensions, $data['width'], $data['height'], $data['upscale']);
+  }
+}
+
+/**
  * Image effect callback; Crop an image resource.
  *
  * @param $image
@@ -198,7 +242,7 @@
  *   An array of attributes to use when performing the rotate effect containing
  *   the following items:
  *   - "degrees": The number of (clockwise) degrees to rotate the image.
- *   - "random": A Boolean indicating that a random rotation angle should be
+ *   - "random": A boolean indicating that a random rotation angle should be
  *     used for this image. The angle specified in "degrees" is used as a
  *     positive and negative maximum.
  *   - "bgcolor": The background color to use for exposed areas of the image.
@@ -241,3 +285,32 @@
   }
   return TRUE;
 }
+
+/**
+ * Image dimensions callback; Rotate.
+ *
+ * @param $dimensions
+ *   Dimensions to be modified - an array with components width and height, in
+ *   pixels.
+ * @param $data
+ *   An array of attributes to use when performing the rotate effect containing
+ *   the following items:
+ *   - "degrees": The number of (clockwise) degrees to rotate the image.
+ *   - "random": A boolean indicating that a random rotation angle should be
+ *     used for this image. The angle specified in "degrees" is used as a
+ *     positive and negative maximum.
+ */
+function image_rotate_dimensions(array &$dimensions, array $data) {
+  // If the rotate is not random and the angle is a multiple of 90 degrees,
+  // then the new dimensions can be determined.
+  if (!$data['random'] && ((int) ($data['degrees']) == $data['degrees']) && ($data['degrees'] % 90 == 0)) {
+    if ($data['degrees'] % 180 != 0) {
+      $temp = $dimensions['width'];
+      $dimensions['width'] = $dimensions['height'];
+      $dimensions['height'] = $temp;
+    }
+  }
+  else {
+    $dimensions['width'] = $dimensions['height'] = NULL;
+  }
+}

Modified: branches/upstream/current-7/modules/image/image.field.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/image/image.field.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/image/image.field.inc (original)
+++ branches/upstream/current-7/modules/image/image.field.inc Wed Nov  2 17:45:27 2011
@@ -208,6 +208,18 @@
  */
 function image_field_presave($entity_type, $entity, $field, $instance, $langcode, &$items) {
   file_field_presave($entity_type, $entity, $field, $instance, $langcode, $items);
+
+  // Determine the dimensions if necessary.
+  foreach ($items as &$item) {
+    if (!isset($item['width']) || !isset($item['height'])) {
+      $info = image_get_info(file_load($item['fid'])->uri);
+
+      if (is_array($info)) {
+        $item['width'] = $info['width'];
+        $item['height'] = $info['height'];
+      }
+    }
+  }
 }
 
 /**
@@ -346,9 +358,42 @@
 
   // Add the image preview.
   if ($element['#file'] && $widget_settings['preview_image_style']) {
+    $variables = array(
+      'style_name' => $widget_settings['preview_image_style'],
+      'path' => $element['#file']->uri,
+    );
+
+    // Determine image dimensions.
+    if (isset($element['#value']['width']) && isset($element['#value']['height'])) {
+      $variables['width'] = $element['#value']['width'];
+      $variables['height'] = $element['#value']['height'];
+    }
+    else {
+      $info = image_get_info($element['#file']->uri);
+
+      if (is_array($info)) {
+        $variables['width'] = $info['width'];
+        $variables['height'] = $info['height'];
+      }
+      else {
+        $variables['width'] = $variables['height'] = NULL;
+      }
+    }
+
     $element['preview'] = array(
       '#type' => 'markup',
-      '#markup' => theme('image_style', array('style_name' => $widget_settings['preview_image_style'], 'path' => $element['#file']->uri)),
+      '#markup' => theme('image_style', $variables),
+    );
+
+    // Store the dimensions in the form so the file doesn't have to be accessed
+    // again. This is important for remote files.
+    $element['width'] = array(
+      '#type' => 'hidden',
+      '#value' => $variables['width'],
+    );
+    $element['height'] = array(
+      '#type' => 'hidden',
+      '#value' => $variables['height'],
     );
   }
 
@@ -534,6 +579,12 @@
     'path' => $item['uri'],
     'alt' => $item['alt'],
   );
+
+  if (isset($item['width']) && isset($item['height'])) {
+    $image['width'] = $item['width'];
+    $image['height'] = $item['height'];
+  }
+
   // Do not output an empty 'title' attribute.
   if (drupal_strlen($item['title']) > 0) {
     $image['title'] = $item['title'];

Modified: branches/upstream/current-7/modules/image/image.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/image/image.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/image/image.info (original)
+++ branches/upstream/current-7/modules/image/image.info Wed Nov  2 17:45:27 2011
@@ -7,8 +7,8 @@
 files[] = image.test
 configure = admin/config/media/image-styles
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/image/image.install
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/image/image.install?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/image/image.install (original)
+++ branches/upstream/current-7/modules/image/image.install Wed Nov  2 17:45:27 2011
@@ -130,6 +130,16 @@
         'length' => 128,
         'not null' => FALSE,
       ),
+      'width' => array(
+        'description' => 'The width of the image in pixels.',
+        'type' => 'int',
+        'unsigned' => TRUE,
+      ),
+      'height' => array(
+        'description' => 'The height of the image in pixels.',
+        'type' => 'int',
+        'unsigned' => TRUE,
+      ),
     ),
     'indexes' => array(
       'fid' => array('fid'),
@@ -241,6 +251,138 @@
   if (!db_table_exists('image_effects') && db_table_exists('image_effect')) {
     db_rename_table('image_effect', 'image_effects');
   }
+}
+
+/**
+ * Add width and height columns to a specific table.
+ *
+ * @param $table
+ *   The name of the database table to be updated.
+ * @param $columns
+ *   Keyed array of columns this table is supposed to have.
+ */
+function _image_update_7002_add_columns($table, $field_name) {
+  $spec = array(
+    'type' => 'int',
+    'unsigned' => TRUE,
+  );
+
+  $spec['description'] = 'The width of the image in pixels.';
+  db_add_field($table, $field_name . '_width', $spec);
+
+  $spec['description'] = 'The height of the image in pixels.';
+  db_add_field($table, $field_name . '_height', $spec);
+}
+
+/**
+ * Populate image dimensions in a specific table.
+ *
+ * @param $table
+ *   The name of the database table to be updated.
+ * @param $columns
+ *   Keyed array of columns this table is supposed to have.
+ * @param $last_fid
+ *   The fid of the last image to have been processed.
+ *
+ * @return
+ *   The number of images that were processed.
+ */
+function _image_update_7002_populate_dimensions($table, $field_name, &$last_fid) {
+  // Define how many images to process per pass.
+  $images_per_pass = 100;
+
+  // Query the database for fid / URI pairs.
+  $query = db_select($table, NULL, array('fetch' => PDO::FETCH_ASSOC));
+  $query->join('file_managed', NULL, $table . '.' . $field_name . '_fid = file_managed.fid');
+
+  if ($last_fid) {
+    $query->condition('file_managed.fid', $last_fid, '>');
+  }
+
+  $result = $query->fields('file_managed', array('fid', 'uri'))
+    ->orderBy('file_managed.fid')
+    ->range(0, $images_per_pass)
+    ->execute();
+
+  $count = 0;
+  foreach ($result as $file) {
+    $count++;
+    $info = image_get_info($file['uri']);
+
+    if (is_array($info)) {
+      db_update($table)
+        ->fields(array(
+          $field_name . '_width' => $info['width'],
+          $field_name . '_height' => $info['height'],
+        ))
+        ->condition($field_name . '_fid', $file['fid'])
+        ->execute();
+    }
+  }
+
+  // If less than the requested number of rows were returned then this table
+  // has been fully processed.
+  $last_fid = ($count < $images_per_pass) ? NULL : $file['fid'];
+  return $count;
+}
+
+/**
+ * Add width and height columns to image field schema and populate.
+ */
+function image_update_7002(array &$sandbox) {
+  if (empty($sandbox)) {
+    // Setup the sandbox.
+    $sandbox = array(
+      'tables' => array(),
+      'total' => 0,
+      'processed' => 0,
+      'last_fid' => NULL,
+    );
+
+    $fields = _update_7000_field_read_fields(array(
+      'module' => 'image',
+      'storage_type' => 'field_sql_storage',
+      'deleted' => 0,
+    ));
+
+    foreach ($fields as $field) {
+      $tables = array(
+        _field_sql_storage_tablename($field),
+        _field_sql_storage_revision_tablename($field),
+      );
+      foreach ($tables as $table) {
+        // Add the width and height columns to the table.
+        _image_update_7002_add_columns($table, $field['field_name']);
+
+        // How many rows need dimensions populated?
+        $count = db_select($table)->countQuery()->execute()->fetchField();
+
+        if (!$count) {
+          continue;
+        }
+
+        $sandbox['total'] += $count;
+        $sandbox['tables'][$table] = $field['field_name'];
+      }
+    }
+
+    // If no tables need rows populated with dimensions then we are done.
+    if (empty($sandbox['tables'])) {
+      $sandbox = array();
+      return;
+    }
+  }
+
+  // Process the table at the top of the list.
+  $table = reset(array_keys($sandbox['tables']));
+  $sandbox['processed'] += _image_update_7002_populate_dimensions($table, $sandbox['tables'][$table], $sandbox['last_fid']);
+
+  // Has the table been fully processed?
+  if (!$sandbox['last_fid']) {
+    unset($sandbox['tables'][$table]);
+  }
+
+  $sandbox['#finished'] = count($sandbox['tables']) ? ($sandbox['processed'] / $sandbox['total']) : 1;
 }
 
 /**

Modified: branches/upstream/current-7/modules/image/image.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/image/image.module?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/image/image.module (original)
+++ branches/upstream/current-7/modules/image/image.module Wed Nov  2 17:45:27 2011
@@ -185,6 +185,8 @@
       'variables' => array(
         'style_name' => NULL,
         'path' => NULL,
+        'width' => NULL,
+        'height' => NULL,
         'alt' => '',
         'title' => NULL,
         'attributes' => array(),
@@ -812,6 +814,39 @@
 }
 
 /**
+ * Determines the dimensions of the styled image.
+ *
+ * Applies all of an image style's effects to $dimensions.
+ *
+ * @param $style_name
+ *   The name of the style to be applied.
+ * @param $dimensions
+ *   Dimensions to be modified - an array with components width and height, in
+ *   pixels.
+ */
+function image_style_transform_dimensions($style_name, array &$dimensions) {
+  module_load_include('inc', 'image', 'image.effects');
+  $style = image_style_load($style_name);
+
+  if (!is_array($style)) {
+    return;
+  }
+
+  foreach ($style['effects'] as $effect) {
+    if (isset($effect['dimensions passthrough'])) {
+      continue;
+    }
+
+    if (isset($effect['dimensions callback'])) {
+      $effect['dimensions callback']($dimensions, $effect['data']);
+    }
+    else {
+      $dimensions['width'] = $dimensions['height'] = NULL;
+    }
+  }
+}
+
+/**
  * Flush cached media for a style.
  *
  * @param $style
@@ -1137,6 +1172,8 @@
  *   - path: The path of the image file relative to the Drupal files directory.
  *     This function does not work with images outside the files directory nor
  *     with remotely hosted images.
+ *   - width: The width of the source image (if known).
+ *   - height: The height of the source image (if known).
  *   - alt: The alternative text for text-based browsers.
  *   - title: The title text is displayed when the image is hovered in some
  *     popular browsers.
@@ -1145,6 +1182,18 @@
  * @ingroup themeable
  */
 function theme_image_style($variables) {
+  // Determine the dimensions of the styled image.
+  $dimensions = array(
+    'width' => $variables['width'],
+    'height' => $variables['height'],
+  );
+
+  image_style_transform_dimensions($variables['style_name'], $dimensions);
+
+  $variables['width'] = $dimensions['width'];
+  $variables['height'] = $dimensions['height'];
+
+  // Determine the url for the styled image.
   $variables['path'] = image_style_url($variables['style_name'], $variables['path']);
   return theme('image', $variables);
 }

Modified: branches/upstream/current-7/modules/image/image.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/image/image.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/image/image.test (original)
+++ branches/upstream/current-7/modules/image/image.test Wed Nov  2 17:45:27 2011
@@ -667,6 +667,8 @@
     $image_uri = $node->{$field_name}[LANGUAGE_NONE][0]['uri'];
     $image_info = array(
       'path' => $image_uri,
+      'width' => 40,
+      'height' => 20,
     );
     $default_output = theme('image', $image_info);
     $this->assertRaw($default_output, t('Default formatter displaying correctly on full node view.'));
@@ -712,6 +714,8 @@
     // image style callback paths.
     $this->drupalGet(image_style_url('thumbnail', $image_uri));
     $image_info['path'] = image_style_path('thumbnail', $image_uri);
+    $image_info['width'] = 100;
+    $image_info['height'] = 50;
     $default_output = theme('image', $image_info);
     $this->drupalGet('node/' . $nid);
     $this->assertRaw($default_output, t('Image style thumbnail formatter displaying correctly on full node view.'));
@@ -761,6 +765,8 @@
     $node = node_load($nid, NULL, TRUE);
     $image_info = array(
       'path' => image_style_url('medium', $node->{$field_name}[LANGUAGE_NONE][0]['uri']),
+      'width' => 220,
+      'height' => 110,
     );
     $default_output = theme('image', $image_info);
     $this->assertRaw($default_output, t("Preview image is displayed using 'medium' style."));
@@ -770,6 +776,8 @@
       'path' => $node->{$field_name}[LANGUAGE_NONE][0]['uri'],
       'alt' => $this->randomName(),
       'title' => $this->randomName(),
+      'width' => 40,
+      'height' => 20,
     );
     $edit = array(
       $field_name . '[' . LANGUAGE_NONE . '][0][alt]' => $image_info['alt'],
@@ -817,6 +825,8 @@
     $node = node_load($nid, NULL, TRUE);
     $image_info = array(
       'path' => $node->{$field_name}[LANGUAGE_NONE][0]['uri'],
+      'width' => 40,
+      'height' => 20,
     );
     $image_output = theme('image', $image_info);
     $this->drupalGet('node/' . $nid);
@@ -901,3 +911,221 @@
     $this->assertText(t('The image was resized to fit within the maximum allowed dimensions of 100x100 pixels.'), t('Image exceeding max resolution was properly resized.'));
   }
 }
+
+/**
+ * Tests that images have correct dimensions when styled.
+ */
+class ImageDimensionsUnitTest extends DrupalWebTestCase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Image dimensions',
+      'description' => 'Tests that images have correct dimensions when styled.',
+      'group' => 'Image',
+    );
+  }
+
+  function setUp() {
+    parent::setUp('image_module_test');
+  }
+
+  /**
+   * Test styled image dimensions cumulatively.
+   */
+  function testImageDimensions() {
+    // Create a working copy of the file.
+    $files = $this->drupalGetTestFiles('image');
+    $file = reset($files);
+    $original_uri = file_unmanaged_copy($file->uri, 'public://', FILE_EXISTS_RENAME);
+
+    // Create a style.
+    $style = image_style_save(array('name' => 'test'));
+    $generated_uri = 'public://styles/test/public/'. basename($original_uri);
+    $url = image_style_url('test', $original_uri);
+
+    $variables = array(
+      'style_name' => 'test',
+      'path' => $original_uri,
+      'width' => 40,
+      'height' => 20,
+    );
+
+    // Scale an image that is wider than it is high.
+    $effect = array(
+      'name' => 'image_scale',
+      'data' => array(
+        'width' => 120,
+        'height' => 90,
+        'upscale' => TRUE,
+      ),
+      'isid' => $style['isid'],
+    );
+
+    image_effect_save($effect);
+    $img_tag = theme_image_style($variables);
+    $this->assertEqual($img_tag, '<img typeof="foaf:Image" src="' . $url . '" width="120" height="60" alt="" />', t('Expected img tag was found.'));
+    $this->assertFalse(file_exists($generated_uri), t('Generated file does not exist.'));
+    $this->drupalGet($url);
+    $this->assertResponse(200, t('Image was generated at the URL.'));
+    $this->assertTrue(file_exists($generated_uri), t('Generated file does exist after we accessed it.'));
+    $image_info = image_get_info($generated_uri);
+    $this->assertEqual($image_info['width'], 120, t('Expected width was found.'));
+    $this->assertEqual($image_info['height'], 60, t('Expected height was found.'));
+
+    // Rotate 90 degrees anticlockwise.
+    $effect = array(
+      'name' => 'image_rotate',
+      'data' => array(
+        'degrees' => -90,
+        'random' => FALSE,
+      ),
+      'isid' => $style['isid'],
+    );
+
+    image_effect_save($effect);
+    $img_tag = theme_image_style($variables);
+    $this->assertEqual($img_tag, '<img typeof="foaf:Image" src="' . $url . '" width="60" height="120" alt="" />', t('Expected img tag was found.'));
+    $this->assertFalse(file_exists($generated_uri), t('Generated file does not exist.'));
+    $this->drupalGet($url);
+    $this->assertResponse(200, t('Image was generated at the URL.'));
+    $this->assertTrue(file_exists($generated_uri), t('Generated file does exist after we accessed it.'));
+    $image_info = image_get_info($generated_uri);
+    $this->assertEqual($image_info['width'], 60, t('Expected width was found.'));
+    $this->assertEqual($image_info['height'], 120, t('Expected height was found.'));
+
+    // Scale an image that is higher than it is wide (rotated by previous effect).
+    $effect = array(
+      'name' => 'image_scale',
+      'data' => array(
+        'width' => 120,
+        'height' => 90,
+        'upscale' => TRUE,
+      ),
+      'isid' => $style['isid'],
+    );
+
+    image_effect_save($effect);
+    $img_tag = theme_image_style($variables);
+    $this->assertEqual($img_tag, '<img typeof="foaf:Image" src="' . $url . '" width="45" height="90" alt="" />', t('Expected img tag was found.'));
+    $this->assertFalse(file_exists($generated_uri), t('Generated file does not exist.'));
+    $this->drupalGet($url);
+    $this->assertResponse(200, t('Image was generated at the URL.'));
+    $this->assertTrue(file_exists($generated_uri), t('Generated file does exist after we accessed it.'));
+    $image_info = image_get_info($generated_uri);
+    $this->assertEqual($image_info['width'], 45, t('Expected width was found.'));
+    $this->assertEqual($image_info['height'], 90, t('Expected height was found.'));
+
+    // Test upscale disabled.
+    $effect = array(
+      'name' => 'image_scale',
+      'data' => array(
+        'width' => 400,
+        'height' => 200,
+        'upscale' => FALSE,
+      ),
+      'isid' => $style['isid'],
+    );
+
+    image_effect_save($effect);
+    $img_tag = theme_image_style($variables);
+    $this->assertEqual($img_tag, '<img typeof="foaf:Image" src="' . $url . '" width="45" height="90" alt="" />', t('Expected img tag was found.'));
+    $this->assertFalse(file_exists($generated_uri), t('Generated file does not exist.'));
+    $this->drupalGet($url);
+    $this->assertResponse(200, t('Image was generated at the URL.'));
+    $this->assertTrue(file_exists($generated_uri), t('Generated file does exist after we accessed it.'));
+    $image_info = image_get_info($generated_uri);
+    $this->assertEqual($image_info['width'], 45, t('Expected width was found.'));
+    $this->assertEqual($image_info['height'], 90, t('Expected height was found.'));
+
+    // Add a desaturate effect.
+    $effect = array(
+      'name' => 'image_desaturate',
+      'data' => array(),
+      'isid' => $style['isid'],
+    );
+
+    image_effect_save($effect);
+    $img_tag = theme_image_style($variables);
+    $this->assertEqual($img_tag, '<img typeof="foaf:Image" src="' . $url . '" width="45" height="90" alt="" />', t('Expected img tag was found.'));
+    $this->assertFalse(file_exists($generated_uri), t('Generated file does not exist.'));
+    $this->drupalGet($url);
+    $this->assertResponse(200, t('Image was generated at the URL.'));
+    $this->assertTrue(file_exists($generated_uri), t('Generated file does exist after we accessed it.'));
+    $image_info = image_get_info($generated_uri);
+    $this->assertEqual($image_info['width'], 45, t('Expected width was found.'));
+    $this->assertEqual($image_info['height'], 90, t('Expected height was found.'));
+
+    // Add a random rotate effect.
+    $effect = array(
+      'name' => 'image_rotate',
+      'data' => array(
+        'degrees' => 180,
+        'random' => TRUE,
+      ),
+      'isid' => $style['isid'],
+    );
+
+    image_effect_save($effect);
+    $img_tag = theme_image_style($variables);
+    $this->assertEqual($img_tag, '<img typeof="foaf:Image" src="' . $url . '" alt="" />', t('Expected img tag was found.'));
+    $this->assertFalse(file_exists($generated_uri), t('Generated file does not exist.'));
+    $this->drupalGet($url);
+    $this->assertResponse(200, t('Image was generated at the URL.'));
+    $this->assertTrue(file_exists($generated_uri), t('Generated file does exist after we accessed it.'));
+
+
+    // Add a crop effect.
+    $effect = array(
+      'name' => 'image_crop',
+      'data' => array(
+        'width' => 30,
+        'height' => 30,
+        'anchor' => 'center-center',
+      ),
+      'isid' => $style['isid'],
+    );
+
+    image_effect_save($effect);
+    $img_tag = theme_image_style($variables);
+    $this->assertEqual($img_tag, '<img typeof="foaf:Image" src="' . $url . '" width="30" height="30" alt="" />', t('Expected img tag was found.'));
+    $this->assertFalse(file_exists($generated_uri), t('Generated file does not exist.'));
+    $this->drupalGet($url);
+    $this->assertResponse(200, t('Image was generated at the URL.'));
+    $this->assertTrue(file_exists($generated_uri), t('Generated file does exist after we accessed it.'));
+    $image_info = image_get_info($generated_uri);
+    $this->assertEqual($image_info['width'], 30, t('Expected width was found.'));
+    $this->assertEqual($image_info['height'], 30, t('Expected height was found.'));
+
+    // Rotate to a non-multiple of 90 degrees.
+    $effect = array(
+      'name' => 'image_rotate',
+      'data' => array(
+        'degrees' => 57,
+        'random' => FALSE,
+      ),
+      'isid' => $style['isid'],
+    );
+
+    $effect = image_effect_save($effect);
+    $img_tag = theme_image_style($variables);
+    $this->assertEqual($img_tag, '<img typeof="foaf:Image" src="' . $url . '" alt="" />', t('Expected img tag was found.'));
+    $this->assertFalse(file_exists($generated_uri), t('Generated file does not exist.'));
+    $this->drupalGet($url);
+    $this->assertResponse(200, t('Image was generated at the URL.'));
+    $this->assertTrue(file_exists($generated_uri), t('Generated file does exist after we accessed it.'));
+
+    image_effect_delete($effect);
+
+    // Ensure that an effect with no dimensions callback unsets the dimensions.
+    // This ensures compatibility with 7.0 contrib modules.
+    $effect = array(
+      'name' => 'image_module_test_null',
+      'data' => array(),
+      'isid' => $style['isid'],
+    );
+
+    image_effect_save($effect);
+    $img_tag = theme_image_style($variables);
+    $this->assertEqual($img_tag, '<img typeof="foaf:Image" src="' . $url . '" alt="" />', t('Expected img tag was found.'));
+  }
+}

Modified: branches/upstream/current-7/modules/image/tests/image_module_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/image/tests/image_module_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/image/tests/image_module_test.info (original)
+++ branches/upstream/current-7/modules/image/tests/image_module_test.info Wed Nov  2 17:45:27 2011
@@ -6,8 +6,8 @@
 files[] = image_module_test.module
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/image/tests/image_module_test.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/image/tests/image_module_test.module?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/image/tests/image_module_test.module (original)
+++ branches/upstream/current-7/modules/image/tests/image_module_test.module Wed Nov  2 17:45:27 2011
@@ -11,3 +11,31 @@
   }
   return -1;
 }
+
+/**
+ * Implements hook_image_effect_info().
+ */
+function image_module_test_image_effect_info() {
+  $effects = array(
+    'image_module_test_null' => array(
+    'effect callback' => 'image_module_test_null_effect',
+    ),
+  );
+
+  return $effects;
+}
+
+/**
+ * Image effect callback; Null.
+ *
+ * @param $image
+ *   An image object returned by image_load().
+ * @param $data
+ *   An array with no attributes.
+ *
+ * @return
+ *   TRUE
+ */
+function image_module_test_null_effect(array &$image, array $data) {
+  return TRUE;
+}

Modified: branches/upstream/current-7/modules/locale/locale.admin.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/locale/locale.admin.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/locale/locale.admin.inc (original)
+++ branches/upstream/current-7/modules/locale/locale.admin.inc Wed Nov  2 17:45:27 2011
@@ -307,7 +307,7 @@
     '#title' => t('Language domain'),
     '#maxlength' => 128,
     '#default_value' => @$language->domain,
-    '#description' => t('URL <strong>including protocol</strong> to use for this language, if your <em>Detection and selection</em> settings use URL domains. For the default language, this value may be left blank. <strong>Modifying this value may break existing URLs. Use with caution in a production environment.</strong> Example: Specifying "http://example.de" or "http://de.example.com" as language domains for German results in URLs like "http://example.de/contact" and "http://de.example.com/contact", respectively.'),
+    '#description' => t('The domain name to use for this language if URL domains are used for <em>Detection and selection</em>. Leave blank for the default language. <strong>Changing this value may break existing URLs.</strong> Example: Specifying "de.example.com" as language domain for German will result in an URL like "http://de.example.com/contact".'),
   );
   $form['direction'] = array('#type' => 'radios',
     '#title' => t('Direction'),

Modified: branches/upstream/current-7/modules/locale/locale.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/locale/locale.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/locale/locale.info (original)
+++ branches/upstream/current-7/modules/locale/locale.info Wed Nov  2 17:45:27 2011
@@ -6,8 +6,8 @@
 files[] = locale.test
 configure = admin/config/regional/language
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/locale/locale.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/locale/locale.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/locale/locale.test (original)
+++ branches/upstream/current-7/modules/locale/locale.test Wed Nov  2 17:45:27 2011
@@ -180,6 +180,73 @@
 }
 
 /**
+ * Functional tests for JavaScript parsing for translatable strings.
+ */
+class LocaleJavascriptTranslationTest extends DrupalWebTestCase {
+  public static function getInfo() {
+    return array(
+      'name' => 'Javascript translation',
+      'description' => 'Tests parsing js files for translatable strings',
+      'group' => 'Locale',
+    );
+  }
+
+  function setUp() {
+    parent::setUp('locale', 'locale_test');
+  }
+
+  function testFileParsing() {
+
+    $filename = drupal_get_path('module', 'locale_test') . '/locale_test.js';
+
+    // Parse the file to look for source strings.
+    _locale_parse_js_file($filename);
+
+    // Get all of the source strings that were found.
+    $source_strings = db_select('locales_source', 's')
+      ->fields('s', array('source', 'lid'))
+      ->condition('s.location', $filename)
+      ->execute()
+      ->fetchAllKeyed();
+
+    // List of all strings that should be in the file.
+    $test_strings = array(
+      "Standard Call t",
+      "Whitespace Call t",
+
+      "Single Quote t",
+      "Single Quote \\'Escaped\\' t",
+      "Single Quote Concat strings t",
+
+      "Double Quote t",
+      "Double Quote \\\"Escaped\\\" t",
+      "Double Quote Concat strings t",
+
+      "Standard Call plural",
+      "Standard Call @count plural",
+      "Whitespace Call plural",
+      "Whitespace Call @count plural",
+
+      "Single Quote plural",
+      "Single Quote @count plural",
+      "Single Quote \\'Escaped\\' plural",
+      "Single Quote \\'Escaped\\' @count plural",
+
+      "Double Quote plural",
+      "Double Quote @count plural",
+      "Double Quote \\\"Escaped\\\" plural",
+      "Double Quote \\\"Escaped\\\" @count plural",
+    );
+
+    // Assert that all strings were found properly.
+    foreach ($test_strings as $str) {
+      $this->assertTrue(isset($source_strings[$str]), t("Found source string: %source", array('%source' => $str)));
+    }
+
+    $this->assertEqual(count($source_strings), count($test_strings), t("Found correct number of source strings."));
+  }
+}
+/**
  * Functional test for string translation and validation.
  */
 class LocaleTranslationFunctionalTest extends DrupalWebTestCase {
@@ -291,9 +358,8 @@
     $this->assertRaw(t('The language %locale has been removed.', array('%locale' => $name)), t('The test language has been removed.'));
     // Reload to remove $name.
     $this->drupalGet($path);
-    $this->assertNoText($langcode, t('Language code not found.'));
-    $this->assertNoText($name, t('Name not found.'));
-    $this->assertNoText($native, t('Native not found.'));
+    // Verify that language is no longer found.
+    $this->assertResponse(404, t('Language no longer found.'));
     $this->drupalLogout();
 
     // Delete the string.
@@ -1318,6 +1384,125 @@
     }
     $this->assertIdentical($links, array('active' => array('en'), 'inactive' => array('fr')), t('Only the current language list item is marked as active on the language switcher block.'));
     $this->assertIdentical($anchors, array('active' => array('en'), 'inactive' => array('fr')), t('Only the current language anchor is marked as active on the language switcher block.'));
+  }
+}
+
+/**
+ * Test browser language detection.
+ */
+class LocaleBrowserDetectionTest extends DrupalUnitTestCase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Browser language detection',
+      'description' => 'Tests for the browser language detection.',
+      'group' => 'Locale',
+    );
+  }
+
+  /**
+   * Unit tests for the locale_language_from_browser() function.
+   */
+  function testLanguageFromBrowser() {
+    // Load the required functions.
+    require_once DRUPAL_ROOT . '/includes/locale.inc';
+
+    $languages = array(
+      // In our test case, 'en' has priority over 'en-US'.
+      'en' => (object) array(
+        'language' => 'en',
+      ),
+      'en-US' => (object) array(
+        'language' => 'en-US',
+      ),
+      // But 'fr-CA' has priority over 'fr'.
+      'fr-CA' => (object) array(
+        'language' => 'fr-CA',
+      ),
+      'fr' => (object) array(
+        'language' => 'fr',
+      ),
+      // 'es-MX' is alone.
+      'es-MX' => (object) array(
+        'language' => 'es-MX',
+      ),
+      // 'pt' is alone.
+      'pt' => (object) array(
+        'language' => 'pt',
+      ),
+      // Language codes with more then one dash are actually valid.
+      // eh-oh-laa-laa is the official language code of the Teletubbies.
+      'eh-oh-laa-laa' => (object) array(
+        'language' => 'eh-oh-laa-laa',
+      ),
+    );
+
+    $test_cases = array(
+      // Equal qvalue for each language, choose the site prefered one.
+      'en,en-US,fr-CA,fr,es-MX' => 'en',
+      'en-US,en,fr-CA,fr,es-MX' => 'en',
+      'fr,en' => 'en',
+      'en,fr' => 'en',
+      'en-US,fr' => 'en',
+      'fr,en-US' => 'en',
+      'fr,fr-CA' => 'fr-CA',
+      'fr-CA,fr' => 'fr-CA',
+      'fr' => 'fr-CA',
+      'fr;q=1' => 'fr-CA',
+      'fr,es-MX' => 'fr-CA',
+      'fr,es' => 'fr-CA',
+      'es,fr' => 'fr-CA',
+      'es-MX,de' => 'es-MX',
+      'de,es-MX' => 'es-MX',
+
+      // Different cases and whitespace.
+      'en' => 'en',
+      'En' => 'en',
+      'EN' => 'en',
+      ' en' => 'en',
+      'en ' => 'en',
+
+      // A less specific language from the browser matches a more specific one
+      // from the website, and the other way around for compatibility with
+      // some versions of Internet Explorer.
+      'es' => 'es-MX',
+      'es-MX' => 'es-MX',
+      'pt' => 'pt',
+      'pt-PT' => 'pt',
+      'pt-PT;q=0.5,pt-BR;q=1,en;q=0.7' => 'en',
+      'pt-PT;q=1,pt-BR;q=0.5,en;q=0.7' => 'en',
+      'pt-PT;q=0.4,pt-BR;q=0.1,en;q=0.7' => 'en',
+      'pt-PT;q=0.1,pt-BR;q=0.4,en;q=0.7' => 'en',
+
+      // Language code with several dashes are valid. The less specific language
+      // from the browser matches the more specific one from the website.
+      'eh-oh-laa-laa' => 'eh-oh-laa-laa',
+      'eh-oh-laa' => 'eh-oh-laa-laa',
+      'eh-oh' => 'eh-oh-laa-laa',
+      'eh' => 'eh-oh-laa-laa',
+
+      // Different qvalues.
+      'en-US,en;q=0.5,fr;q=0.25' => 'en-US',
+      'fr,en;q=0.5' => 'fr-CA',
+      'fr,en;q=0.5,fr-CA;q=0.25' => 'fr',
+
+      // Silly wildcards are also valid.
+      '*,fr-CA;q=0.5' => 'en',
+      '*,en;q=0.25' => 'fr-CA',
+      'en,en-US;q=0.5,fr;q=0.25' => 'en',
+      'en-US,en;q=0.5,fr;q=0.25' => 'en-US',
+
+      // Unresolvable cases.
+      '' => FALSE,
+      'de,pl' => FALSE,
+      $this->randomName(10) => FALSE,
+    );
+
+    foreach ($test_cases as $accept_language => $expected_result) {
+      $_SERVER['HTTP_ACCEPT_LANGUAGE'] = $accept_language;
+      $result = locale_language_from_browser($languages);
+      $this->assertIdentical($result, $expected_result, t("Language selection '@accept-language' selects '@result', result = '@actual'", array('@accept-language' => $accept_language, '@result' => $expected_result, '@actual' => isset($result) ? $result : 'none')));
+    }
   }
 }
 
@@ -1930,8 +2115,8 @@
     $this->assertResponse(404, "Unknown language path prefix should return 404");
 
     // Setup for domain negotiation, first configure the language to have domain
-    // URL.
-    $edit = array('prefix' => '', 'domain' => "http://$language_domain");
+    // URL. We use https and a port to make sure that only the domain name is used.
+    $edit = array('prefix' => '', 'domain' => "https://$language_domain:99");
     $this->drupalPost("admin/config/regional/language/edit/$language", $edit, t('Save language'));
     // Set the site to use domain language negotiation.
 

Modified: branches/upstream/current-7/modules/locale/tests/locale_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/locale/tests/locale_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/locale/tests/locale_test.info (original)
+++ branches/upstream/current-7/modules/locale/tests/locale_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 version = VERSION
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Added: branches/upstream/current-7/modules/locale/tests/locale_test.js
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/locale/tests/locale_test.js?rev=2238&op=file
==============================================================================
--- branches/upstream/current-7/modules/locale/tests/locale_test.js (added)
+++ branches/upstream/current-7/modules/locale/tests/locale_test.js Wed Nov  2 17:45:27 2011
@@ -1,0 +1,35 @@
+
+Drupal.t("Standard Call t");
+Drupal
+.
+t
+(
+"Whitespace Call t"
+)
+;
+
+Drupal.t('Single Quote t');
+Drupal.t('Single Quote \'Escaped\' t');
+Drupal.t('Single Quote ' + 'Concat ' + 'strings ' + 't');
+
+Drupal.t("Double Quote t");
+Drupal.t("Double Quote \"Escaped\" t");
+Drupal.t("Double Quote " + "Concat " + "strings " + "t");
+
+
+Drupal.formatPlural(1, "Standard Call plural", "Standard Call @count plural");
+Drupal
+.
+formatPlural
+(
+1,
+"Whitespace Call plural",
+"Whitespace Call @count plural",
+)
+;
+
+Drupal.formatPlural(1, 'Single Quote plural', 'Single Quote @count plural');
+Drupal.formatPlural(1, 'Single Quote \'Escaped\' plural', 'Single Quote \'Escaped\' @count plural');
+
+Drupal.formatPlural(1, "Double Quote plural", "Double Quote @count plural");
+Drupal.formatPlural(1, "Double Quote \"Escaped\" plural", "Double Quote \"Escaped\" @count plural");

Modified: branches/upstream/current-7/modules/menu/menu.admin.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/menu/menu.admin.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/menu/menu.admin.inc (original)
+++ branches/upstream/current-7/modules/menu/menu.admin.inc Wed Nov  2 17:45:27 2011
@@ -286,6 +286,7 @@
     $form['link_path'] = array(
       '#type' => 'textfield',
       '#title' => t('Path'),
+      '#maxlength' => 255,
       '#default_value' => $path,
       '#description' => t('The path for this menu link. This can be an internal Drupal path such as %add-node or an external URL such as %drupal. Enter %front to link to the front page.', array('%front' => '<front>', '%add-node' => 'node/add', '%drupal' => 'http://drupal.org')),
       '#required' => TRUE,

Modified: branches/upstream/current-7/modules/menu/menu.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/menu/menu.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/menu/menu.info (original)
+++ branches/upstream/current-7/modules/menu/menu.info Wed Nov  2 17:45:27 2011
@@ -6,8 +6,8 @@
 files[] = menu.test
 configure = admin/structure/menu
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/menu/menu.install
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/menu/menu.install?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/menu/menu.install (original)
+++ branches/upstream/current-7/modules/menu/menu.install Wed Nov  2 17:45:27 2011
@@ -166,18 +166,21 @@
  * Rename the primary/secondary menu blocks to match previously renamed menus.
  */
 function menu_update_7002(&$sandbox) {
-  $renamed_deltas = array(
-    'menu' => array(
-      'primary-links' => 'main-menu',
-      'secondary-links' => 'secondary-menu',
-    ),
-  );
+  // Check for the presence of old or new table names.
+  if (db_table_exists('blocks') || db_table_exists('block')) {
+    $renamed_deltas = array(
+      'menu' => array(
+        'primary-links' => 'main-menu',
+        'secondary-links' => 'secondary-menu',
+      ),
+    );
 
-  $moved_deltas = array(
-    'menu' => array('main-menu' => 'system'),
-  );
+    $moved_deltas = array(
+      'menu' => array('main-menu' => 'system'),
+    );
 
-  update_fix_d7_block_deltas($sandbox, $renamed_deltas, $moved_deltas);
+    update_fix_d7_block_deltas($sandbox, $renamed_deltas, $moved_deltas);
+  }
 }
 /**
  * @} End of "defgroup updates-7.x-extra"

Modified: branches/upstream/current-7/modules/menu/menu.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/menu/menu.module?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/menu/menu.module (original)
+++ branches/upstream/current-7/modules/menu/menu.module Wed Nov  2 17:45:27 2011
@@ -322,6 +322,9 @@
  * @param $item
  *   The menu item or the node type for which to generate a list of parents.
  *   If $item['mlid'] == 0 then the complete tree is returned.
+ * @param $type
+ *   The node type for which to generate a list of parents.
+ *   If $item itself is a node type then $type is ignored.
  * @return
  *   An array of menu link titles keyed on the a string containing the menu name
  *   and mlid. The list excludes the given item and its children.
@@ -329,7 +332,7 @@
  * @todo This has to be turned into a #process form element callback. The
  *   'menu_override_parent_selector' variable is entirely superfluous.
  */
-function menu_parent_options($menus, $item) {
+function menu_parent_options($menus, $item, $type = '') {
   // The menu_links table can be practically any size and we need a way to
   // allow contrib modules to provide more scalable pattern choosers.
   // hook_form_alter is too late in itself because all the possible parents are
@@ -339,18 +342,22 @@
   }
 
   $available_menus = array();
-  if (is_array($item)) {
-    // If $item is an array fill it with all menus given to this function.
+  if (!is_array($item)) {
+    // If $item is not an array then it is a node type.
+    // Use it as $type and prepare a dummy menu item for _menu_get_options().
+    $type = $item;
+    $item = array('mlid' => 0);
+  }
+  if (empty($type)) {
+    // If no node type is set, use all menus given to this function.
     $available_menus = $menus;
   }
   else {
-    // If $item is a node type, get all available menus for this type and
-    // prepare a dummy menu item for _menu_parent_depth_limit().
-    $type_menus = variable_get('menu_options_' . $item, array('main-menu' => 'main-menu'));
+    // If a node type is set, use all available menus for this type.
+    $type_menus = variable_get('menu_options_' . $type, array('main-menu' => 'main-menu'));
     foreach ($type_menus as $menu) {
       $available_menus[$menu] = $menu;
     }
-    $item = array('mlid' => 0);
   }
 
   return _menu_get_options($menus, $available_menus, $item);
@@ -600,15 +607,18 @@
  * @see menu_node_submit()
  */
 function menu_form_node_form_alter(&$form, $form_state) {
-  // Generate a list of possible parents.
+  // Generate a list of possible parents (not including this link or descendants).
   // @todo This must be handled in a #process handler.
+  $link = $form['#node']->menu;
   $type = $form['#node']->type;
-  $options = menu_parent_options(menu_get_menus(), $type);
+  // menu_parent_options() is goofy and can actually handle either a menu link
+  // or a node type both as second argument. Pick based on whether there is
+  // a link already (menu_node_prepare() sets mlid default to 0).
+  $options = menu_parent_options(menu_get_menus(), $link['mlid'] ? $link : $type);
   // If no possible parent menu items were found, there is nothing to display.
   if (empty($options)) {
     return;
   }
-  $link = $form['#node']->menu;
 
   $form['menu'] = array(
     '#type' => 'fieldset',
@@ -659,9 +669,13 @@
   );
 
   $default = ($link['mlid'] ? $link['menu_name'] . ':' . $link['plid'] : variable_get('menu_parent_' . $type, 'main-menu:0'));
-  // @todo This will fail with the new selective menus per content type.
+  // If the current parent menu item is not present in options, use the first
+  // available option as default value.
+  // @todo User should not be allowed to access menu link settings in such a
+  // case.
   if (!isset($options[$default])) {
-    $default = 'navigation:0';
+    $array = array_keys($options);
+    $default = reset($array);
   }
   $form['menu']['link']['parent'] = array(
     '#type' => 'select',

Modified: branches/upstream/current-7/modules/menu/menu.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/menu/menu.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/menu/menu.test (original)
+++ branches/upstream/current-7/modules/menu/menu.test Wed Nov  2 17:45:27 2011
@@ -680,5 +680,43 @@
     $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
     $link = menu_link_load($item['mlid']);
     $this->assertTrue($link, t('Link in not allowed menu still exists after saving node'));
+
+    // Move the menu link back to the Navigation menu.
+    $item['menu_name'] = 'navigation';
+    menu_link_save($item);
+    // Create a second node.
+    $child_node = $this->drupalCreateNode(array('type' => 'article'));
+    // Assign a menu link to the second node, being a child of the first one.
+    $child_item = array(
+      'link_path' => 'node/'. $child_node->nid,
+      'link_title' => $this->randomName(16),
+      'plid' => $item['mlid'],
+    );
+    menu_link_save($child_item);
+    // Edit the first node.
+    $this->drupalGet('node/'. $node->nid .'/edit');
+    // Assert that it is not possible to set the parent of the first node to itself or the second node.
+    $this->assertNoOption('edit-menu-parent', 'navigation:'. $item['mlid']);
+    $this->assertNoOption('edit-menu-parent', 'navigation:'. $child_item['mlid']);
+  }
+
+  /**
+   * Asserts that a select option in the current page does not exist.
+   *
+   * @param $id
+   *   Id of select field to assert.
+   * @param $option
+   *   Option to assert.
+   * @param $message
+   *   Message to display.
+   * @return
+   *   TRUE on pass, FALSE on fail.
+   *
+   * @todo move to simpletest drupal_web_test_case.php.
+   */
+  protected function assertNoOption($id, $option, $message = '') {
+    $selects = $this->xpath('//select[@id=:id]', array(':id' => $id));
+    $options = $this->xpath('//select[@id=:id]//option[@value=:option]', array(':id' => $id, ':option' => $option));
+    return $this->assertTrue(isset($selects[0]) && !isset($options[0]), $message ? $message : t('Option @option for field @id does not exist.', array('@option' => $option, '@id' => $id)), t('Browser'));
   }
 }

Modified: branches/upstream/current-7/modules/node/node.admin.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/node/node.admin.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/node/node.admin.inc (original)
+++ branches/upstream/current-7/modules/node/node.admin.inc Wed Nov  2 17:45:27 2011
@@ -121,10 +121,6 @@
   foreach ($filter_data as $index => $filter) {
     list($key, $value) = $filter;
     switch ($key) {
-      case 'term':
-        $alias = $query->join('taxonomy_index', 'ti', "n.nid = %alias.nid");
-        $query->condition($alias . '.tid', $value);
-        break;
       case 'status':
         // Note: no exploitable hole as $key/$value have already been checked when submitted
         list($key, $value) = explode('-', $value, 2);

Modified: branches/upstream/current-7/modules/node/node.api.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/node/node.api.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/node/node.api.php (original)
+++ branches/upstream/current-7/modules/node/node.api.php Wed Nov  2 17:45:27 2011
@@ -570,11 +570,9 @@
  * block access, return NODE_ACCESS_IGNORE or simply return nothing.
  * Blindly returning FALSE will break other node access modules.
  *
- * @link http://api.drupal.org/api/group/node_access/7 More on the node access system @endlink
- * @ingroup node_access
- * @param $node
- *   The node on which the operation is to be performed, or, if it does
- *   not yet exist, the type of node to be created.
+ * @param $node
+ *   Either a node object or a (machine-readable) content type on which to
+ *   perform the access check.
  * @param $op
  *   The operation to be performed. Possible values:
  *   - "create"
@@ -582,13 +580,14 @@
  *   - "update"
  *   - "view"
  * @param $account
- *   A user object representing the user for whom the operation is to be
- *   performed.
+ *   The user object to perform the access check operation on.
  *
  * @return
  *   NODE_ACCESS_ALLOW if the operation is to be allowed;
  *   NODE_ACCESS_DENY if the operation is to be denied;
  *   NODE_ACCESS_IGNORE to not affect this operation at all.
+ *
+ * @ingroup node_access
  */
 function hook_node_access($node, $op, $account) {
   $type = is_string($node) ? $node : $node->type;
@@ -880,9 +879,9 @@
  *      machine name of this type. FALSE = changeable (not locked),
  *      TRUE = unchangeable (locked). Optional (defaults to TRUE).
  *
- * The machine-readable name of a node type should contain only letters,
- * numbers, and underscores. Underscores will be converted into hyphens for the
- * purpose of constructing URLs.
+ * The machine name of a node type should contain only letters, numbers, and
+ * underscores. Underscores will be converted into hyphens for the purpose of
+ * constructing URLs.
  *
  * All attributes of a node type that are defined through this hook (except for
  * 'locked') can be edited by a site administrator. This includes the

Modified: branches/upstream/current-7/modules/node/node.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/node/node.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/node/node.info (original)
+++ branches/upstream/current-7/modules/node/node.info Wed Nov  2 17:45:27 2011
@@ -9,8 +9,8 @@
 configure = admin/structure/types
 stylesheets[all][] = node.css
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/node/node.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/node/node.module?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/node/node.module (original)
+++ branches/upstream/current-7/modules/node/node.module Wed Nov  2 17:45:27 2011
@@ -272,10 +272,10 @@
  * Gathers a listing of links to nodes.
  *
  * @param $result
- *   A DB result object from a query to fetch node entities. If your query
- *   joins the <code>node_comment_statistics</code> table so that the
- *   <code>comment_count</code> field is available, a title attribute will
- *   be added to show the number of comments.
+ *   A database result object from a query to fetch node entities. If your
+ *   query joins the {node_comment_statistics} table so that the comment_count
+ *   field is available, a title attribute will be added to show the number of
+ *   comments.
  * @param $title
  *   A heading for the resulting list.
  *
@@ -1073,7 +1073,7 @@
         $node->log = '';
       }
     }
-    elseif (empty($node->log)) {
+    elseif (!isset($node->log) || $node->log === '') {
       // If we are updating an existing node without adding a new revision, we
       // need to make sure $node->log is unset whenever it is empty. As long as
       // $node->log is unset, drupal_write_record() will not attempt to update
@@ -2447,7 +2447,7 @@
     $nids = db_select('node', 'n')
       ->fields('n', array('nid', 'created'))
       ->condition('n.promote', 1)
-      ->condition('status', 1)
+      ->condition('n.status', 1)
       ->orderBy('n.created', 'DESC')
       ->range(0, variable_get('feed_default_items', 10))
       ->addTag('node_access')
@@ -2828,8 +2828,6 @@
  *   TRUE if the operation may be performed, FALSE otherwise.
  */
 function node_access($op, $node, $account = NULL) {
-  global $user;
-
   $rights = &drupal_static(__FUNCTION__, array());
 
   if (!$node || !in_array($op, array('view', 'update', 'delete', 'create'), TRUE)) {
@@ -2839,7 +2837,7 @@
   }
   // If no user object is supplied, the access check is for the current user.
   if (empty($account)) {
-    $account = $user;
+    $account = $GLOBALS['user'];
   }
 
   // $node may be either an object or a node type. Since node types cannot be

Modified: branches/upstream/current-7/modules/node/node.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/node/node.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/node/node.test (original)
+++ branches/upstream/current-7/modules/node/node.test Wed Nov  2 17:45:27 2011
@@ -1957,7 +1957,7 @@
   function testNodeRebuildContent() {
     $node = $this->drupalCreateNode();
 
-    // Set a property in the content array so we can test for its existance later on.
+    // Set a property in the content array so we can test for its existence later on.
     $node->content['test_content_property'] = array('#value' => $this->randomString());
     $content = node_build_content($node);
 
@@ -2270,6 +2270,7 @@
     $tests['[node:language]'] = check_plain($node->language);
     $tests['[node:url]'] = url('node/' . $node->nid, $url_options);
     $tests['[node:edit-url]'] = url('node/' . $node->nid . '/edit', $url_options);
+    $tests['[node:author]'] = check_plain(format_username($account));
     $tests['[node:author:uid]'] = $node->uid;
     $tests['[node:author:name]'] = check_plain(format_username($account));
     $tests['[node:created:since]'] = format_interval(REQUEST_TIME - $node->created, 2, $language->language);

Modified: branches/upstream/current-7/modules/node/node.tokens.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/node/node.tokens.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/node/node.tokens.inc (original)
+++ branches/upstream/current-7/modules/node/node.tokens.inc Wed Nov  2 17:45:27 2011
@@ -135,11 +135,11 @@
 
         case 'body':
         case 'summary':
-          if (!empty($node->body)) {
-            $item = $node->body[$node->language][0];
+          if ($items = field_get_items('node', $node, 'body', $language_code)) {
             $column = ($name == 'body') ? 'value' : 'summary';
             $instance = field_info_instance('node', 'body', $node->type);
-            $replacements[$original] = $sanitize ? _text_sanitize($instance, $node->language, $item, $column) : $item[$column];
+            $field_langcode = field_language('node', $node, 'body', $language_code);
+            $replacements[$original] = $sanitize ? _text_sanitize($instance, $field_langcode, $items[0], $column) : $items[0][$column];
           }
           break;
 
@@ -157,8 +157,9 @@
 
         // Default values for the chained tokens handled below.
         case 'author':
-          $name = ($node->uid == 0) ? variable_get('anonymous', t('Anonymous')) : $node->name;
-          $replacements[$original] = $sanitize ? filter_xss($name) : $name;
+          $account = user_load($node->uid);
+          $name = format_username($account);
+          $replacements[$original] = $sanitize ? check_plain($name) : $name;
           break;
 
         case 'created':

Modified: branches/upstream/current-7/modules/node/tests/node_access_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/node/tests/node_access_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/node/tests/node_access_test.info (original)
+++ branches/upstream/current-7/modules/node/tests/node_access_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/node/tests/node_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/node/tests/node_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/node/tests/node_test.info (original)
+++ branches/upstream/current-7/modules/node/tests/node_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/node/tests/node_test_exception.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/node/tests/node_test_exception.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/node/tests/node_test_exception.info (original)
+++ branches/upstream/current-7/modules/node/tests/node_test_exception.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/openid/openid.api.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/openid/openid.api.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/openid/openid.api.php (original)
+++ branches/upstream/current-7/modules/openid/openid.api.php Wed Nov  2 17:45:27 2011
@@ -49,8 +49,13 @@
  * Allow modules to declare OpenID discovery methods.
  *
  * The discovery function callbacks will be called in turn with an unique
- * parameter, the claimed identifier. They have to return an array of services,
- * in the same form returned by openid_discover().
+ * parameter, the claimed identifier. They have to return an associative array
+ * with array of services and claimed identifier in the same form as returned by
+ * openid_discover(). The resulting array must contain following keys:
+ *   - 'services' (required) an array of discovered services (including OpenID
+ *   version, endpoint URI, etc).
+ *   - 'claimed_id' (optional) new claimed identifer, found by following HTTP
+ *   redirects during the services discovery.
  *
  * The first discovery method that succeed (return at least one services) will
  * stop the discovery process.
@@ -58,6 +63,7 @@
  * @return
  *   An associative array which keys are the name of the discovery methods and
  *   values are function callbacks.
+ *
  * @see hook_openid_discovery_method_info_alter()
  */
 function hook_openid_discovery_method_info() {

Modified: branches/upstream/current-7/modules/openid/openid.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/openid/openid.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/openid/openid.inc (original)
+++ branches/upstream/current-7/modules/openid/openid.inc Wed Nov  2 17:45:27 2011
@@ -89,7 +89,7 @@
  */
 function openid_redirect($url, $message) {
   global $language;
-  
+
   $output = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n";
   $output .= '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="' . $language->language . '" lang="' . $language->language . '">' . "\n";
   $output .= "<head>\n";
@@ -793,3 +793,77 @@
       return bcpowmod($x, $y, $z);
   }
 }
+
+/**
+ * Provides transition for accounts with possibly invalid OpenID identifiers in authmap.
+ *
+ * This function provides a less safe but more unobtrusive procedure for users
+ * who cannot login with their OpenID identifiers. OpenID identifiers in the
+ * authmap could be incomplete due to invalid OpenID implementation in previous
+ * versions of Drupal (e.g. fragment part of the identifier could be missing).
+ * For more information see http://drupal.org/node/1120290.
+ *
+ * @param string $identity
+ *   The user's claimed OpenID identifier.
+ *
+ * @return
+ *   A fully-loaded user object if the user is found or FALSE if not found.
+ */
+function _openid_invalid_openid_transition($identity, $response) {
+  $account = FALSE;
+  $fallback_account = NULL;
+  $fallback_identity = $identity;
+
+  // Try to strip the fragment if it is present.
+  if (strpos($fallback_identity, '#') !== FALSE) {
+    $fallback_identity = preg_replace('/#.*/', '', $fallback_identity);
+    $fallback_account = user_external_load($fallback_identity);
+  }
+
+  // Try to replace https with http. OpenID providers often redirect
+  // from http to https, but Drupal didn't follow the redirect.
+  if (!$fallback_account && strpos($fallback_identity, 'https://') !== FALSE) {
+    $fallback_identity = str_replace('https://', 'http://', $fallback_identity);
+    $fallback_account = user_external_load($fallback_identity);
+  }
+
+  // Try to use original identifier.
+  if (!$fallback_account && isset($_SESSION['openid']['user_login_values']['openid_identifier'])) {
+    $fallback_identity = openid_normalize($_SESSION['openid']['user_login_values']['openid_identifier']);
+    $fallback_account = user_external_load($fallback_identity);
+  }
+
+  if ($fallback_account) {
+    // Try to extract e-mail address from Simple Registration (SREG) or
+    // Attribute Exchanges (AX) keys.
+    $email = '';
+    $sreg_values = openid_extract_namespace($response, OPENID_NS_SREG, 'sreg');
+    $ax_values = openid_extract_namespace($response, OPENID_NS_AX, 'ax');
+    if (!empty($sreg_values['email']) && valid_email_address($sreg_values['email'])) {
+      $email = $sreg_values['email'];
+    }
+    elseif ($ax_mail_values = openid_extract_ax_values($ax_values, array('http://axschema.org/contact/email', 'http://schema.openid.net/contact/email'))) {
+      $email = current($ax_mail_values);
+    }
+
+    // If this e-mail address is the same as the e-mail address found in user
+    // account, login the user and update the claimed identifier.
+    if ($email && ($email == $fallback_account->mail || $email == $fallback_account->init)) {
+      $query = db_insert('authmap')
+        ->fields(array(
+          'authname' => $identity,
+          'uid' => $fallback_account->uid,
+          'module' => 'openid',
+        ))
+        ->execute();
+      drupal_set_message(t('New OpenID identifier %identity was added as a replacement for invalid identifier %invalid_identity. To finish the invalid OpenID transition process, please go to your <a href="@openid_url">OpenID identities page</a> and remove the old identifier %invalid_identity.', array('%invalid_identity' => $fallback_identity, '%identity' => $identity, '@openid_url' => 'user/' . $fallback_account->uid . '/openid')));
+      // Set the account to the found one.
+      $account = $fallback_account;
+    }
+    else {
+      drupal_set_message(t('There is already an existing account associated with the OpenID identifier that you have provided. However, due to a bug in the previous version of the authentication system, we can\'t be sure that this account belongs to you. If you are new on this site, please continue registering the new user account. If you already have a registered account on this site associated with the provided OpenID identifier, please try to <a href="@url_password">reset the password</a> or contact the site administrator.', array('@url_password' => 'user/password')), 'warning');
+    }
+  }
+
+  return $account;
+}

Modified: branches/upstream/current-7/modules/openid/openid.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/openid/openid.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/openid/openid.info (original)
+++ branches/upstream/current-7/modules/openid/openid.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 files[] = openid.test
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/openid/openid.js
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/openid/openid.js?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/openid/openid.js (original)
+++ branches/upstream/current-7/modules/openid/openid.js Wed Nov  2 17:45:27 2011
@@ -11,10 +11,10 @@
       if (cookie) {
         $('#edit-openid-identifier').val(cookie);
       }
-      if ($('#edit-openid-identifier').val()) {
+      if ($('#edit-openid-identifier').val() || location.hash == '#openid-login') {
         $('#edit-openid-identifier').addClass('openid-processed');
         loginElements.hide();
-        // Use .css('display', 'block') instead of .show() to  Konqueror friendly.
+        // Use .css('display', 'block') instead of .show() to be Konqueror friendly.
         openidElements.css('display', 'block');
       }
     }

Modified: branches/upstream/current-7/modules/openid/openid.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/openid/openid.module?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/openid/openid.module (original)
+++ branches/upstream/current-7/modules/openid/openid.module Wed Nov  2 17:45:27 2011
@@ -146,11 +146,11 @@
 
   $items = array();
   $items[] = array(
-    'data' => l(t('Log in using OpenID'), '#'),
+    'data' => l(t('Log in using OpenID'), '#openid-login', array('external' => TRUE)),
     'class' => array('openid-link'),
   );
   $items[] = array(
-    'data' => l(t('Cancel OpenID login'), '#'),
+    'data' => l(t('Cancel OpenID login'), '#', array('external' => TRUE)),
     'class' => array('user-link'),
   );
 
@@ -256,14 +256,23 @@
 function openid_begin($claimed_id, $return_to = '', $form_values = array()) {
   module_load_include('inc', 'openid');
 
+  $service = NULL;
   $claimed_id = openid_normalize($claimed_id);
-
-  $services = openid_discovery($claimed_id);
-  $service = _openid_select_service($services);
-
-  if (!$service) {
+  $discovery = openid_discovery($claimed_id);
+
+  if (!empty($discovery['services'])) {
+    $service = _openid_select_service($discovery['services']);
+  }
+
+  // Quit if the discovery result was empty or if we can't select any service.
+  if (!$discovery || !$service) {
     form_set_error('openid_identifier', t('Sorry, that is not a valid OpenID. Ensure you have spelled your ID correctly.'));
     return;
+  }
+
+  // Set claimed id from discovery.
+  if (!empty($discovery['claimed_id'])) {
+    $claimed_id = $discovery['claimed_id'];
   }
 
   // Store discovered information in the users' session so we don't have to rediscover.
@@ -341,18 +350,24 @@
             $response['openid.claimed_id'] = $service['claimed_id'];
           }
           elseif ($service['version'] == 2) {
-            $response['openid.claimed_id'] = openid_normalize($response['openid.claimed_id']);
+            // Returned Claimed Identifier could contain unique fragment
+            // identifier to allow identifier recycling so we need to preserve
+            // it in the response.
+            $response_claimed_id = openid_normalize($response['openid.claimed_id']);
+
             // OpenID Authentication, section 11.2:
             // If the returned Claimed Identifier is different from the one sent
             // to the OpenID Provider, we need to do discovery on the returned
             // identififer to make sure that the provider is authorized to
             // respond on behalf of this.
-            if ($response['openid.claimed_id'] != $claimed_id) {
-              $services = openid_discovery($response['openid.claimed_id']);
-              $uris = array();
-              foreach ($services as $discovered_service) {
-                if (in_array('http://specs.openid.net/auth/2.0/server', $discovered_service['types']) || in_array('http://specs.openid.net/auth/2.0/signon', $discovered_service['types'])) {
-                  $uris[] = $discovered_service['uri'];
+            if ($response_claimed_id != $claimed_id) {
+              $discovery = openid_discovery($response['openid.claimed_id']);
+              if ($discovery && !empty($discovery['services'])) {
+                $uris = array();
+                foreach ($discovery['services'] as $discovered_service) {
+                  if (in_array('http://specs.openid.net/auth/2.0/server', $discovered_service['types']) || in_array('http://specs.openid.net/auth/2.0/signon', $discovered_service['types'])) {
+                    $uris[] = $discovered_service['uri'];
+                  }
                 }
               }
               if (!in_array($service['uri'], $uris)) {
@@ -374,10 +389,21 @@
 /**
  * Perform discovery on a claimed ID to determine the OpenID provider endpoint.
  *
- * @param $claimed_id The OpenID URL to perform discovery on.
- *
- * @return Array of services discovered (including OpenID version, endpoint
- * URI, etc).
+ * Discovery methods are provided by the hook_openid_discovery_method_info and
+ * could be further altered using the hook_openid_discovery_method_info_alter.
+ *
+ * @param $claimed_id
+ *   The OpenID URL to perform discovery on.
+ *
+ * @return
+ *   The resulting discovery array from the first successful discovery method,
+ *   which must contain following keys:
+ *   - 'services' (required) an array of discovered services (including OpenID
+ *   version, endpoint URI, etc).
+ *   - 'claimed_id' (optional) new claimed identifer, found by following HTTP
+ *   redirects during the services discovery.
+ *   If all the discovery method fails or if no appropriate discovery method is
+ *   found, FALSE is returned.
  */
 function openid_discovery($claimed_id) {
   module_load_include('inc', 'openid');
@@ -385,15 +411,15 @@
   $methods = module_invoke_all('openid_discovery_method_info');
   drupal_alter('openid_discovery_method_info', $methods);
 
-  // Execute each method in turn.
+  // Execute each method in turn and return first successful discovery.
   foreach ($methods as $method) {
-    $discovered_services = $method($claimed_id);
-    if (!empty($discovered_services)) {
-      return $discovered_services;
-    }
-  }
-
-  return array();
+    $discovery = $method($claimed_id);
+    if (!empty($discovery)) {
+      return $discovery;
+    }
+  }
+
+  return FALSE;
 }
 
 /**
@@ -417,24 +443,33 @@
  *
  * @see http://openid.net/specs/openid-authentication-2_0.html#discovery
  * @see hook_openid_discovery_method_info()
+ * @see openid_discovery()
+ *
+ * @return
+ *   An array of discovered services and claimed identifier or NULL. See
+ *   openid_discovery() for more specific information.
  */
 function _openid_xri_discovery($claimed_id) {
   if (_openid_is_xri($claimed_id)) {
     // Resolve XRI using a proxy resolver (Extensible Resource Identifier (XRI)
     // Resolution Version 2.0, section 11.2 and 14.3).
     $xrds_url = variable_get('xri_proxy_resolver', 'http://xri.net/') . rawurlencode($claimed_id) . '?_xrd_r=application/xrds+xml';
-    $services = _openid_xrds_discovery($xrds_url);
-    foreach ($services as $i => &$service) {
-      $status = $service['xrd']->children(OPENID_NS_XRD)->Status;
-      if ($status && $status->attributes()->cid == 'verified') {
-        $service['claimed_id'] = openid_normalize((string)$service['xrd']->children(OPENID_NS_XRD)->CanonicalID);
-      }
-      else {
-        // Ignore service if CanonicalID could not be verified.
-        unset($services[$i]);
-      }
-    }
-    return $services;
+    $discovery = _openid_xrds_discovery($xrds_url);
+    if (!empty($discovery['services']) && is_array($discovery['services'])) {
+      foreach ($discovery['services'] as $i => &$service) {
+        $status = $service['xrd']->children(OPENID_NS_XRD)->Status;
+        if ($status && $status->attributes()->cid == 'verified') {
+          $service['claimed_id'] = openid_normalize((string)$service['xrd']->children(OPENID_NS_XRD)->CanonicalID);
+        }
+        else {
+          // Ignore service if the Canonical ID could not be verified.
+          unset($discovery['services'][$i]);
+        }
+      }
+      if (!empty($discovery['services'])) {
+        return $discovery;
+      }
+    }
   }
 }
 
@@ -443,6 +478,11 @@
  *
  * @see http://openid.net/specs/openid-authentication-2_0.html#discovery
  * @see hook_openid_discovery_method_info()
+ * @see openid_discovery()
+ *
+ * @return
+ *   An array of discovered services and claimed identifier or NULL. See
+ *   openid_discovery() for more specific information.
  */
 function _openid_xrds_discovery($claimed_id) {
   $services = array();
@@ -454,7 +494,18 @@
     $headers = array('Accept' => 'application/xrds+xml');
     $result = drupal_http_request($xrds_url, array('headers' => $headers));
 
-    if (!isset($result->error)) {
+    // Check for HTTP error and make sure, that we reach the target. If the
+    // maximum allowed redirects are exhausted, final destination URL isn't
+    // reached, but drupal_http_request() doesn't return any error.
+    // @todo Remove the check for 200 HTTP result code after the following issue
+    // will be fixed: http://drupal.org/node/1096890.
+    if (!isset($result->error) && $result->code == 200) {
+
+      // Replace the user-entered claimed_id if we received a redirect.
+      if (!empty($result->redirect_url)) {
+        $claimed_id = openid_normalize($result->redirect_url);
+      }
+
       if (isset($result->headers['content-type']) && preg_match("/application\/xrds\+xml/", $result->headers['content-type'])) {
         // Parse XML document to find URL
         $services = _openid_xrds_parse($result->data);
@@ -500,7 +551,13 @@
       }
     }
   }
-  return $services;
+
+  if (!empty($services)) {
+    return array(
+      'services' => $services,
+      'claimed_id' => $claimed_id,
+    );
+  }
 }
 
 /**
@@ -589,8 +646,15 @@
  */
 function openid_authentication($response) {
   $identity = $response['openid.claimed_id'];
-
   $account = user_external_load($identity);
+
+  // Tries to load user account if user_external_load fails due to possibly
+  // incompletely stored OpenID identifier in the authmap.
+  if (!isset($account->uid) && variable_get('openid_less_obtrusive_transition', FALSE)) {
+    module_load_include('inc', 'openid');
+    $account = _openid_invalid_openid_transition($identity, $response);
+  }
+
   if (isset($account->uid)) {
     if (!variable_get('user_email_verification', TRUE) || $account->login) {
       // Check if user is blocked.
@@ -634,7 +698,7 @@
       drupal_set_message(t('Account registration using the information provided by your OpenID provider failed due to the reasons listed below. Complete the registration by filling out the form below. If you already have an account, you can <a href="@login">log in</a> now and add your OpenID under "My account".', array('@login' => url('user/login'))), 'warning');
       // Append form validation errors below the above warning.
       foreach ($messages['error'] as $message) {
-        drupal_set_message( $message, 'error');
+        drupal_set_message($message, 'error');
       }
     }
 

Modified: branches/upstream/current-7/modules/openid/openid.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/openid/openid.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/openid/openid.test (original)
+++ branches/upstream/current-7/modules/openid/openid.test Wed Nov  2 17:45:27 2011
@@ -89,12 +89,12 @@
     // Identifier is the URL of an XRDS document containing an OP Identifier
     // Element. The Relying Party sends the special value
     // "http://specs.openid.net/auth/2.0/identifier_select" as Claimed
-    // Identifier. The OpenID Provider responds with the actual identifier.
-    $identity = url('openid-test/yadis/xrds/dummy-user', array('absolute' => TRUE));
-    // Tell openid_test.module to respond with this identifier. The URL scheme
-    // is stripped in order to test that the returned identifier is normalized in
-    // openid_complete().
-    variable_set('openid_test_response', array('openid.claimed_id' => preg_replace('@^https?://@', '', $identity)));
+    // Identifier. The OpenID Provider responds with the actual identifier
+    // including the fragment.
+    $identity = url('openid-test/yadis/xrds/dummy-user', array('absolute' => TRUE, 'fragment' => $this->randomName()));
+    // Tell openid_test.module to respond with this identifier. We test if
+    // openid_complete() processes it right.
+    variable_set('openid_test_response', array('openid.claimed_id' => $identity));
     $this->addIdentity(url('openid-test/yadis/xrds/server', array('absolute' => TRUE)), 2, 'http://specs.openid.net/auth/2.0/identifier_select', $identity);
     variable_set('openid_test_response', array());
 
@@ -124,6 +124,28 @@
 
     // OpenID Authentication 2.0, section 7.3.3:
     $this->addIdentity(url('openid-test/html/openid2', array('absolute' => TRUE)), 2, 'http://example.com/html-openid2');
+
+    // OpenID Authentication 2.0, section 7.2.4:
+    // URL Identifiers MUST then be further normalized by both (1) following
+    // redirects when retrieving their content and finally (2) applying the
+    // rules in Section 6 of RFC3986 to the final destination URL. This final
+    // URL MUST be noted by the Relying Party as the Claimed Identifier and be
+    // used when requesting authentication.
+
+    // Single redirect.
+    $identity = $expected_claimed_id = url('openid-test/redirected/yadis/xrds/1', array('absolute' => TRUE));
+    $this->addRedirectedIdentity($identity, 2, 'http://example.com/xrds', $expected_claimed_id, 0);
+
+    // Exact 3 redirects (default value for the 'max_redirects' option in
+    // drupal_http_request()).
+    $identity = $expected_claimed_id = url('openid-test/redirected/yadis/xrds/2', array('absolute' => TRUE));
+    $this->addRedirectedIdentity($identity, 2, 'http://example.com/xrds', $expected_claimed_id, 2);
+
+    // Fails because there are more than 3 redirects (default value for the
+    // 'max_redirects' option in drupal_http_request()).
+    $identity = url('openid-test/redirected/yadis/xrds/3', array('absolute' => TRUE));
+    $expected_claimed_id = FALSE;
+    $this->addRedirectedIdentity($identity, 2, 'http://example.com/xrds', $expected_claimed_id, 3);
   }
 
   /**
@@ -280,6 +302,41 @@
   }
 
   /**
+   * Add OpenID identity, changed by the following redirects, to user's profile.
+   *
+   * According to OpenID Authentication 2.0, section 7.2.4, URL Identifiers MUST
+   * be further normalized by following redirects when retrieving their content
+   * and this final URL MUST be noted by the Relying Party as the Claimed
+   * Identifier and be used when requesting authentication.
+   *
+   * @param $identity
+   *   The User-supplied Identifier.
+   * @param $version
+   *   The protocol version used by the service.
+   * @param $local_id
+   *   The expected OP-Local Identifier found during discovery.
+   * @param $claimed_id
+   *   The expected Claimed Identifier returned by the OpenID Provider, or FALSE
+   *   if the discovery is expected to fail.
+   * @param $redirects
+   *   The number of redirects.
+   */
+  function addRedirectedIdentity($identity, $version = 2, $local_id = 'http://example.com/xrds', $claimed_id = NULL, $redirects = 0) {
+    // Set the final destination URL which is the same as the Claimed
+    // Identifier, we insert the same identifier also to the provider response,
+    // but provider could further change the Claimed ID actually (e.g. it could
+    // add unique fragment).
+    variable_set('openid_test_redirect_url', $identity);
+    variable_set('openid_test_response', array('openid.claimed_id' => $identity));
+
+    $this->addIdentity(url('openid-test/redirect/' . $redirects, array('absolute' => TRUE)), $version, $local_id, $claimed_id);
+
+    // Clean up.
+    variable_del('openid_test_redirect_url');
+    variable_del('openid_test_response');
+  }
+
+  /**
    * Tests that openid.signed is verified.
    */
   function testSignatureValidation() {
@@ -475,6 +532,89 @@
     $user = user_load_by_name('john');
     $this->assertTrue($user, t('User was registered with right username.'));
     $this->assertEqual($user->mail, 'john at example.com', t('User was registered with right email address.'));
+  }
+}
+
+/**
+ * Test account registration using Simple Registration and Attribute Exchange.
+ */
+class OpenIDInvalidIdentifierTransitionTestCase extends OpenIDFunctionalTestCase  {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'OpenID account update',
+      'description' => 'Tries to correct OpenID identifiers attached to accounts if their identifiers were stripped.',
+      'group' => 'OpenID',
+    );
+  }
+
+  function setUp() {
+    parent::setUp('openid', 'openid_test');
+    variable_set('user_register', USER_REGISTER_VISITORS);
+    variable_set('openid_less_obtrusive_transition', TRUE);
+  }
+
+  /**
+   * Test OpenID transition with e-mail mismatch.
+   */
+  function testStrippedFragmentAccountEmailMismatch() {
+    $this->drupalLogin($this->web_user);
+
+    // Use a User-supplied Identity that is the URL of an XRDS document.
+    $identity = url('openid-test/yadis/xrds', array('absolute' => TRUE, 'fragment' => $this->randomName()));
+    $identity_stripped = preg_replace('/#.*/', '', $identity);
+
+    // Add invalid identifier to the authmap (identifier has stripped fragment).
+    $this->addIdentity($identity_stripped);
+    $this->drupalLogout();
+
+    // Test logging in via the login form, provider will respond with full
+    // identifier (including fragment) but with different email, so we can't
+    // provide auto-update.
+    variable_set('openid_test_response', array(
+      'openid.claimed_id' => $identity,
+      'openid.sreg.nickname' => $this->web_user->name,
+      'openid.sreg.email' => 'invalid-' . $this->web_user->mail));
+
+    $edit = array('openid_identifier' => $identity_stripped);
+    $this->submitLoginForm($identity_stripped);
+
+    // Verify user was redirected away from user login to an accessible page.
+    $this->assertResponse(200);
+
+    // Verify the message.
+    $this->assertRaw(t('There is already an existing account associated with the OpenID identifier that you have provided.'), t('Message that OpenID identifier must be updated manually was displayed.'));
+  }
+
+  /**
+   * Test OpenID auto transition with e-mail.
+   */
+  function testStrippedFragmentAccountAutoUpdateSreg() {
+    $this->drupalLogin($this->web_user);
+
+    // Use a User-supplied Identity that is the URL of an XRDS document.
+    $identity = url('openid-test/yadis/xrds', array('absolute' => TRUE, 'fragment' => $this->randomName()));
+    $identity_stripped = preg_replace('/#.*/', '', $identity);
+
+    // Add invalid identifier to the authmap (identifier has stripped fragment).
+    $this->addIdentity($identity_stripped);
+    $this->drupalLogout();
+
+    // Test logging in via the login form, provider will respond with full
+    // identifier (including fragment) but with different email, so we can't
+    // provide auto-update.
+    variable_set('openid_test_response', array(
+      'openid.claimed_id' => $identity,
+      'openid.sreg.nickname' => $this->web_user->name,
+      'openid.sreg.email' => $this->web_user->mail));
+
+    $this->submitLoginForm($identity_stripped);
+
+    // Verify user was redirected away from user login to an accessible page.
+    $this->assertResponse(200);
+
+    // Verify the message.
+    $this->assertRaw(t('New OpenID identifier %identity was added as a replacement for invalid identifier %invalid_identity.', array('%invalid_identity' => $identity_stripped, '%identity' => $identity)), t('Message that OpenID identifier was added automatically was displayed.'));
   }
 }
 

Modified: branches/upstream/current-7/modules/openid/tests/openid_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/openid/tests/openid_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/openid/tests/openid_test.info (original)
+++ branches/upstream/current-7/modules/openid/tests/openid_test.info Wed Nov  2 17:45:27 2011
@@ -6,8 +6,8 @@
 dependencies[] = openid
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/openid/tests/openid_test.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/openid/tests/openid_test.module?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/openid/tests/openid_test.module (original)
+++ branches/upstream/current-7/modules/openid/tests/openid_test.module Wed Nov  2 17:45:27 2011
@@ -57,6 +57,19 @@
   $items['openid-test/endpoint'] = array(
     'title' => 'OpenID Provider Endpoint',
     'page callback' => 'openid_test_endpoint',
+    'access callback' => TRUE,
+    'type' => MENU_CALLBACK,
+  );
+  $items['openid-test/redirect'] = array(
+    'title' => 'OpenID Provider Redirection Point',
+    'page callback' => 'openid_test_redirect',
+    'access callback' => TRUE,
+    'type' => MENU_CALLBACK,
+  );
+  $items['openid-test/redirected/%/%'] = array(
+    'title' => 'OpenID Provider Final URL',
+    'page callback' => 'openid_test_redirected_method',
+    'page arguments' => array(2, 3),
     'access callback' => TRUE,
     'type' => MENU_CALLBACK,
   );
@@ -213,6 +226,28 @@
 }
 
 /**
+ * Menu callback; redirect during Normalization/Discovery.
+ */
+function openid_test_redirect($count = 0) {
+  if ($count == 0) {
+    $url = variable_get('openid_test_redirect_url', '');
+  }
+  else {
+    $url = url('openid-test/redirect/' . --$count, array('absolute' => TRUE));
+  }
+  $http_response_code = variable_get('openid_test_redirect_http_reponse_code', 301);
+  header('Location: ' . $url, TRUE, $http_response_code);
+  exit();
+}
+
+/**
+ * Menu callback; respond with appropriate callback.
+ */
+function openid_test_redirected_method($method1, $method2) {
+  return call_user_func('openid_test_' . $method1 . '_' . $method2);
+}
+
+/**
  * OpenID endpoint; handle "associate" requests (see OpenID Authentication 2.0,
  * section 8).
  *

Modified: branches/upstream/current-7/modules/overlay/overlay-child.css
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/overlay/overlay-child.css?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/overlay/overlay-child.css (original)
+++ branches/upstream/current-7/modules/overlay/overlay-child.css Wed Nov  2 17:45:27 2011
@@ -17,6 +17,7 @@
   min-width: 700px;
   position: relative;
   padding: .2em;
+  padding-bottom: 2em;
   padding-right: 26px; /* LTR */
   width: 88%;
 }

Modified: branches/upstream/current-7/modules/overlay/overlay.api.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/overlay/overlay.api.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/overlay/overlay.api.php (original)
+++ branches/upstream/current-7/modules/overlay/overlay.api.php Wed Nov  2 17:45:27 2011
@@ -15,7 +15,7 @@
  *
  * The parent window is initialized when a page is displayed in which the
  * overlay might be required to be displayed, so modules can act here if they
- * need to take action to accomodate the possibility of the overlay appearing
+ * need to take action to accommodate the possibility of the overlay appearing
  * within a Drupal page.
  */
 function hook_overlay_parent_initialize() {

Modified: branches/upstream/current-7/modules/overlay/overlay.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/overlay/overlay.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/overlay/overlay.info (original)
+++ branches/upstream/current-7/modules/overlay/overlay.info Wed Nov  2 17:45:27 2011
@@ -4,8 +4,8 @@
 version = VERSION
 core = 7.x
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/path/path.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/path/path.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/path/path.info (original)
+++ branches/upstream/current-7/modules/path/path.info Wed Nov  2 17:45:27 2011
@@ -6,8 +6,8 @@
 files[] = path.test
 configure = admin/config/search/path
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/php/php.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/php/php.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/php/php.info (original)
+++ branches/upstream/current-7/modules/php/php.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 files[] = php.test
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/poll/poll.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/poll/poll.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/poll/poll.info (original)
+++ branches/upstream/current-7/modules/poll/poll.info Wed Nov  2 17:45:27 2011
@@ -6,8 +6,8 @@
 files[] = poll.test
 stylesheets[all][] = poll.css
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/poll/poll.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/poll/poll.module?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/poll/poll.module (original)
+++ branches/upstream/current-7/modules/poll/poll.module Wed Nov  2 17:45:27 2011
@@ -299,7 +299,9 @@
   $form['choice_wrapper']['poll_more'] = array(
     '#type' => 'submit',
     '#value' => t('More choices'),
-    '#description' => t("If the amount of boxes above isn't enough, click here to add more choices."),
+    '#attributes' => array(
+      'title' => t("If the amount of boxes above isn't enough, click here to add more choices."),
+    ),
     '#weight' => 1,
     '#limit_validation_errors' => array(array('choice')),
     '#submit' => array('poll_more_choices_submit'),

Modified: branches/upstream/current-7/modules/profile/profile-block.tpl.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/profile/profile-block.tpl.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/profile/profile-block.tpl.php (original)
+++ branches/upstream/current-7/modules/profile/profile-block.tpl.php Wed Nov  2 17:45:27 2011
@@ -31,9 +31,9 @@
 ?>
 <?php print $user_picture; ?>
 
-<?php foreach ($profile as $field) : ?>
+<?php foreach ($profile as $field): ?>
   <p>
-    <?php if ($field->type != 'checkbox') : ?>
+    <?php if ($field->type != 'checkbox'): ?>
       <strong><?php print $field->title; ?></strong><br />
     <?php endif; ?>
     <?php print $field->value; ?>

Modified: branches/upstream/current-7/modules/profile/profile-listing.tpl.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/profile/profile-listing.tpl.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/profile/profile-listing.tpl.php (original)
+++ branches/upstream/current-7/modules/profile/profile-listing.tpl.php Wed Nov  2 17:45:27 2011
@@ -43,7 +43,7 @@
     <?php print $name; ?>
   </div>
 
-  <?php foreach ($profile as $field) : ?>
+  <?php foreach ($profile as $field): ?>
     <div class="field">
       <?php print $field->value; ?>
     </div>

Modified: branches/upstream/current-7/modules/profile/profile.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/profile/profile.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/profile/profile.info (original)
+++ branches/upstream/current-7/modules/profile/profile.info Wed Nov  2 17:45:27 2011
@@ -11,8 +11,8 @@
 ; See user_system_info_alter().
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/profile/profile.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/profile/profile.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/profile/profile.test (original)
+++ branches/upstream/current-7/modules/profile/profile.test Wed Nov  2 17:45:27 2011
@@ -399,7 +399,7 @@
   }
 
   function testAuthorInformationBlock() {
-    // Set the block to a region to confirm the block is availble.
+    // Set the block to a region to confirm the block is available.
     $edit = array();
     $edit['blocks[profile_author-information][region]'] = 'footer';
     $this->drupalPost('admin/structure/block', $edit, t('Save blocks'));

Modified: branches/upstream/current-7/modules/rdf/rdf.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/rdf/rdf.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/rdf/rdf.info (original)
+++ branches/upstream/current-7/modules/rdf/rdf.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 files[] = rdf.test
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/rdf/tests/rdf_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/rdf/tests/rdf_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/rdf/tests/rdf_test.info (original)
+++ branches/upstream/current-7/modules/rdf/tests/rdf_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/search/search-block-form.tpl.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/search/search-block-form.tpl.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/search/search-block-form.tpl.php (original)
+++ branches/upstream/current-7/modules/search/search-block-form.tpl.php Wed Nov  2 17:45:27 2011
@@ -30,7 +30,7 @@
  */
 ?>
 <div class="container-inline">
-  <?php if (empty($variables['form']['#block']->subject)) : ?>
+  <?php if (empty($variables['form']['#block']->subject)): ?>
     <h2 class="element-invisible"><?php print t('Search form'); ?></h2>
   <?php endif; ?>
   <?php print $search_form; ?>

Modified: branches/upstream/current-7/modules/search/search-result.tpl.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/search/search-result.tpl.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/search/search-result.tpl.php (original)
+++ branches/upstream/current-7/modules/search/search-result.tpl.php Wed Nov  2 17:45:27 2011
@@ -45,7 +45,7 @@
  * for its existence before printing. The default keys of 'type', 'user' and
  * 'date' always exist for node searches. Modules may provide other data.
  * @code
- *   <?php if (isset($info_split['comment'])) : ?>
+ *   <?php if (isset($info_split['comment'])): ?>
  *     <span class="info-comment">
  *       <?php print $info_split['comment']; ?>
  *     </span>
@@ -69,10 +69,10 @@
   </h3>
   <?php print render($title_suffix); ?>
   <div class="search-snippet-info">
-    <?php if ($snippet) : ?>
+    <?php if ($snippet): ?>
       <p class="search-snippet"<?php print $content_attributes; ?>><?php print $snippet; ?></p>
     <?php endif; ?>
-    <?php if ($info) : ?>
+    <?php if ($info): ?>
       <p class="search-info"><?php print $info; ?></p>
     <?php endif; ?>
   </div>

Modified: branches/upstream/current-7/modules/search/search-results.tpl.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/search/search-results.tpl.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/search/search-results.tpl.php (original)
+++ branches/upstream/current-7/modules/search/search-results.tpl.php Wed Nov  2 17:45:27 2011
@@ -21,7 +21,7 @@
  * @see template_preprocess_search_results()
  */
 ?>
-<?php if ($search_results) : ?>
+<?php if ($search_results): ?>
   <h2><?php print t('Search results');?></h2>
   <ol class="search-results <?php print $module; ?>-results">
     <?php print $search_results; ?>

Modified: branches/upstream/current-7/modules/search/search.admin.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/search/search.admin.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/search/search.admin.inc (original)
+++ branches/upstream/current-7/modules/search/search.admin.inc Wed Nov  2 17:45:27 2011
@@ -10,7 +10,7 @@
  */
 function search_reindex_confirm() {
   return confirm_form(array(), t('Are you sure you want to re-index the site?'),
-                  'admin/config/search/settings', t(' The search index is not cleared but systematically updated to reflect the new settings. Searching will continue to work but new content won\'t be indexed until all existing content has been re-indexed. This action cannot be undone.'), t('Re-index site'), t('Cancel'));
+                  'admin/config/search/settings', t('The search index is not cleared but systematically updated to reflect the new settings. Searching will continue to work but new content won\'t be indexed until all existing content has been re-indexed. This action cannot be undone.'), t('Re-index site'), t('Cancel'));
 }
 
 /**
@@ -106,7 +106,7 @@
 
   $form['active'] = array(
     '#type' => 'fieldset',
-    '#title' => t('Active search modules ')
+    '#title' => t('Active search modules')
   );
   $module_options = _search_get_module_names();
   $form['active']['search_active_modules'] = array(

Modified: branches/upstream/current-7/modules/search/search.api.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/search/search.api.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/search/search.api.php (original)
+++ branches/upstream/current-7/modules/search/search.api.php Wed Nov  2 17:45:27 2011
@@ -172,7 +172,7 @@
  * parameters to the search expression.
  *
  * See node_search_execute() for an example of a module that uses the search
- * index, and user_search_execute() for an example that doesn't ues the search
+ * index, and user_search_execute() for an example that doesn't use the search
  * index.
  *
  * @param $keys

Modified: branches/upstream/current-7/modules/search/search.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/search/search.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/search/search.info (original)
+++ branches/upstream/current-7/modules/search/search.info Wed Nov  2 17:45:27 2011
@@ -8,8 +8,8 @@
 configure = admin/config/search/settings
 stylesheets[all][] = search.css
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/search/search.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/search/search.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/search/search.test (original)
+++ branches/upstream/current-7/modules/search/search.test Wed Nov  2 17:45:27 2011
@@ -332,7 +332,7 @@
 
     // Assert that the dummy title doesn't equal the real title.
     $dummy_title = 'Lorem ipsum';
-    $this->assertNotEqual($dummy_title, $this->node->title, t("Dummy title doens't equal node title"));
+    $this->assertNotEqual($dummy_title, $this->node->title, t("Dummy title doesn't equal node title"));
 
     // Search for the dummy title with a GET query.
     $this->drupalGet('search/node/' . $dummy_title);
@@ -584,11 +584,11 @@
   }
 
   function testSearchFormBlock() {
-    // Set block title to confirm that the interface is availble.
+    // Set block title to confirm that the interface is available.
     $this->drupalPost('admin/structure/block/manage/search/form/configure', array('title' => $this->randomName(8)), t('Save block'));
     $this->assertText(t('The block configuration has been saved.'), t('Block configuration set.'));
 
-    // Set the block to a region to confirm block is availble.
+    // Set the block to a region to confirm block is available.
     $edit = array();
     $edit['blocks[search_form][region]'] = 'footer';
     $this->drupalPost('admin/structure/block', $edit, t('Save blocks'));

Modified: branches/upstream/current-7/modules/search/tests/search_embedded_form.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/search/tests/search_embedded_form.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/search/tests/search_embedded_form.info (original)
+++ branches/upstream/current-7/modules/search/tests/search_embedded_form.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/search/tests/search_extra_type.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/search/tests/search_extra_type.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/search/tests/search_extra_type.info (original)
+++ branches/upstream/current-7/modules/search/tests/search_extra_type.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/shortcut/shortcut.admin.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/shortcut/shortcut.admin.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/shortcut/shortcut.admin.inc (original)
+++ branches/upstream/current-7/modules/shortcut/shortcut.admin.inc Wed Nov  2 17:45:27 2011
@@ -264,6 +264,7 @@
  * @see shortcut_set_customize_submit()
  */
 function shortcut_set_customize($form, &$form_state, $shortcut_set) {
+  $form['#shortcut_set_name'] = $shortcut_set->set_name;
   $form['shortcuts'] = array(
     '#tree' => TRUE,
     '#weight' => -20,
@@ -299,7 +300,10 @@
     'js' => array(drupal_get_path('module', 'shortcut') . '/shortcut.admin.js'),
   );
 
-  $form['actions'] = array('#type' => 'actions');
+  $form['actions'] = array(
+    '#type' => 'actions',
+    '#access' => !empty($shortcut_set->links),
+  );
   $form['actions']['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Save changes'),
@@ -336,9 +340,15 @@
 function theme_shortcut_set_customize($variables) {
   $form = $variables['form'];
   $map = array('disabled' => t('Disabled'), 'enabled' => t('Enabled'));
+  $shortcuts_by_status = array(
+    'enabled' => element_children($form['shortcuts']['enabled']),
+    'disabled' => element_children($form['shortcuts']['disabled']),
+  );
+  // Do not add any rows to the table if there are no shortcuts to display.
+  $statuses = empty($shortcuts_by_status['enabled']) && empty($shortcuts_by_status['disabled']) ? array() : array_keys($shortcuts_by_status);
 
   $rows = array();
-  foreach (array('enabled', 'disabled') as $status) {
+  foreach ($statuses as $status) {
     drupal_add_tabledrag('shortcuts', 'match', 'sibling', 'shortcut-status-select');
     drupal_add_tabledrag('shortcuts', 'order', 'sibling', 'shortcut-weight');
     $rows[] = array(
@@ -349,7 +359,7 @@
       'class' => array('shortcut-status', 'shortcut-status-' . $status),
     );
 
-    foreach (element_children($form['shortcuts'][$status]) as $key) {
+    foreach ($shortcuts_by_status[$status] as $key) {
       $shortcut = &$form['shortcuts'][$status][$key];
       $row = array();
       $row[] = drupal_render($shortcut['name']);
@@ -373,7 +383,7 @@
           'class' => array('shortcut-slot-empty'),
         );
       }
-      $count_shortcuts = count(element_children($form['shortcuts'][$status]));
+      $count_shortcuts = count($shortcuts_by_status[$status]);
       if (!empty($count_shortcuts)) {
         for ($i = 0; $i < min($count_shortcuts, shortcut_max_slots()); $i++) {
           $rows['empty-' . $i]['class'][] = 'shortcut-slot-hidden';
@@ -383,7 +393,7 @@
   }
 
   $header = array(t('Name'), t('Weight'), t('Status'), array('data' => t('Operations'), 'colspan' => 2));
-  $output = theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'shortcuts')));
+  $output = theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'shortcuts'), 'empty' => t('No shortcuts available. <a href="@link">Add a shortcut</a>.', array('@link' => url('admin/config/user-interface/shortcut/' . $form['#shortcut_set_name'] . '/add-link')))));
   $output .= drupal_render($form['actions']);
   $output = drupal_render_children($form) . $output;
   return $output;
@@ -472,6 +482,7 @@
     '#size' => 40,
     '#maxlength' => 255,
     '#default_value' => $shortcut_link['link_title'],
+    '#required' => TRUE,
   );
 
   $form['shortcut_link']['link_path'] = array(

Modified: branches/upstream/current-7/modules/shortcut/shortcut.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/shortcut/shortcut.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/shortcut/shortcut.info (original)
+++ branches/upstream/current-7/modules/shortcut/shortcut.info Wed Nov  2 17:45:27 2011
@@ -6,8 +6,8 @@
 files[] = shortcut.test
 configure = admin/config/user-interface/shortcut
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/shortcut/shortcut.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/shortcut/shortcut.module?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/shortcut/shortcut.module (original)
+++ branches/upstream/current-7/modules/shortcut/shortcut.module Wed Nov  2 17:45:27 2011
@@ -643,7 +643,11 @@
  * Implements hook_preprocess_page().
  */
 function shortcut_preprocess_page(&$variables) {
-  if (shortcut_set_edit_access()) {
+  // Only display the shortcut link if the user has the ability to edit
+  // shortcuts and if the page's actual content is being shown (for example,
+  // we do not want to display it on "access denied" or "page not found"
+  // pages).
+  if (shortcut_set_edit_access() && ($item = menu_get_item()) && $item['access']) {
     $link = $_GET['q'];
     $query_parameters = drupal_get_query_parameters();
     if (!empty($query_parameters)) {

Modified: branches/upstream/current-7/modules/shortcut/shortcut.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/shortcut/shortcut.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/shortcut/shortcut.test (original)
+++ branches/upstream/current-7/modules/shortcut/shortcut.test Wed Nov  2 17:45:27 2011
@@ -197,6 +197,29 @@
     $mlids = $this->getShortcutInformation($saved_set, 'mlid');
     $this->assertFalse(in_array($set->links[0]['mlid'], $mlids), 'Successfully deleted a shortcut.');
   }
+
+  /**
+   * Tests that the add shortcut link is not displayed for 404/403 errors.
+   *
+   * Tests that the "Add to shortcuts" link is not displayed on a page not
+   * found or a page the user does not have access to.
+   */
+  function testNoShortcutLink() {
+    // Change to a theme that displays shortcuts.
+    variable_set('theme_default', 'seven');
+
+    $this->drupalGet('page-that-does-not-exist');
+    $this->assertNoRaw('add-shortcut', t('Add to shortcuts link was not shown on a page not found.'));
+
+    // The user does not have access to this path.
+    $this->drupalGet('admin/modules');
+    $this->assertNoRaw('add-shortcut', t('Add to shortcuts link was not shown on a page the user does not have access to.'));
+
+    // Verify that the testing mechanism works by verifying the shortcut
+    // link appears on admin/content/node.
+    $this->drupalGet('admin/content/node');
+    $this->assertRaw('add-shortcut', t('Add to shortcuts link was shown on a page the user does have access to.'));
+  }
 }
 
 /**

Modified: branches/upstream/current-7/modules/simpletest/drupal_web_test_case.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/drupal_web_test_case.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/drupal_web_test_case.php (original)
+++ branches/upstream/current-7/modules/simpletest/drupal_web_test_case.php Wed Nov  2 17:45:27 2011
@@ -845,7 +845,7 @@
   /**
    * Get a node from the database based on its title.
    *
-   * @param title
+   * @param $title
    *   A node title, usually generated by $this->randomName().
    * @param $reset
    *   (optional) Whether to reset the internal node_load() cache.
@@ -1446,7 +1446,7 @@
   protected function tearDown() {
     global $user, $language;
 
-    // In case a fatal error occured that was not in the test process read the
+    // In case a fatal error occurred that was not in the test process read the
     // log to pick up any fatal errors.
     simpletest_log_read($this->testId, $this->databasePrefix, get_class($this), TRUE);
 

Modified: branches/upstream/current-7/modules/simpletest/files/css_test_files/comment_hacks.css.unoptimized.css
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/files/css_test_files/comment_hacks.css.unoptimized.css?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/files/css_test_files/comment_hacks.css.unoptimized.css (original)
+++ branches/upstream/current-7/modules/simpletest/files/css_test_files/comment_hacks.css.unoptimized.css Wed Nov  2 17:45:27 2011
@@ -4,7 +4,7 @@
 *
 */
 /*
-A large comment block to test for segfaults and speed. This is 60K a's. Extreme but usefull to demonstrate flaws in comment striping regexp. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa*/
 .test1 { display:block;}
 
 /* A multiline IE-mac hack (v.2) taken fron Zen theme*/

Modified: branches/upstream/current-7/modules/simpletest/simpletest.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/simpletest.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/simpletest.info (original)
+++ branches/upstream/current-7/modules/simpletest/simpletest.info Wed Nov  2 17:45:27 2011
@@ -49,8 +49,8 @@
 files[] = tests/upgrade/upgrade.upload.test
 files[] = tests/upgrade/upgrade.user.test
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/simpletest.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/simpletest.module?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/simpletest.module (original)
+++ branches/upstream/current-7/modules/simpletest/simpletest.module Wed Nov  2 17:45:27 2011
@@ -272,7 +272,7 @@
         DrupalTestCase::insertAssert($test_id, $test_class, FALSE, $match[2], $match[1], $caller);
       }
       else {
-        // Unkown format, place the entire message in the log.
+        // Unknown format, place the entire message in the log.
         DrupalTestCase::insertAssert($test_id, $test_class, FALSE, $line, 'Fatal error');
       }
       $found = TRUE;
@@ -398,7 +398,7 @@
         break;
     }
   }
-  $text = wordwrap($text, $width - 1, "\n", TRUE) . "\n"; // Add \n for symetrical file.
+  $text = wordwrap($text, $width - 1, "\n", TRUE) . "\n"; // Add \n for symmetrical file.
 
   // Create filename.
   file_put_contents('public://' . $filename . '.txt', $text);

Modified: branches/upstream/current-7/modules/simpletest/simpletest.pages.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/simpletest.pages.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/simpletest.pages.inc (original)
+++ branches/upstream/current-7/modules/simpletest/simpletest.pages.inc Wed Nov  2 17:45:27 2011
@@ -305,7 +305,7 @@
   );
   $form['action']['filter']['#default_value'] = ($filter['fail'] ? 'fail' : 'all');
 
-  // Catagorized test classes for to be used with selected filter value.
+  // Categorized test classes for to be used with selected filter value.
   $form['action']['filter_pass'] = array(
     '#type' => 'hidden',
     '#default_value' => implode(',', $filter['pass']),
@@ -428,6 +428,9 @@
 
 /**
  * Provides settings form for SimpleTest variables.
+ *
+ * @ingroup forms
+ * @see simpletest_settings_form_validate()
  */
 function simpletest_settings_form($form, &$form_state) {
   $form['general'] = array(
@@ -467,16 +470,41 @@
     ),
     '#default_value' => variable_get('simpletest_httpauth_method', CURLAUTH_BASIC),
   );
+  $username = variable_get('simpletest_httpauth_username');
+  $password = variable_get('simpletest_httpauth_password');
   $form['httpauth']['simpletest_httpauth_username'] = array(
     '#type' => 'textfield',
     '#title' => t('Username'),
-    '#default_value' => variable_get('simpletest_httpauth_username', ''),
-  );
+    '#default_value' => $username,
+  );
+  if ($username && $password) {
+    $form['httpauth']['simpletest_httpauth_username']['#description'] = t('Leave this blank to delete both the existing username and password.');
+  }
   $form['httpauth']['simpletest_httpauth_password'] = array(
-    '#type' => 'textfield',
+    '#type' => 'password',
     '#title' => t('Password'),
-    '#default_value' => variable_get('simpletest_httpauth_password', ''),
-  );
+  );
+  if ($password) {
+    $form['httpauth']['simpletest_httpauth_password']['#description'] = t('To change the password, enter the new password here.');
+  }
 
   return system_settings_form($form);
 }
+
+/**
+ * Validation handler for simpletest_settings_form().
+ */
+function simpletest_settings_form_validate($form, &$form_state) {
+  // If a username was provided but a password wasn't, preserve the existing
+  // password.
+  if (!empty($form_state['values']['simpletest_httpauth_username']) && empty($form_state['values']['simpletest_httpauth_password'])) {
+    $form_state['values']['simpletest_httpauth_password'] = variable_get('simpletest_httpauth_password', '');
+  }
+
+  // If a password was provided but a username wasn't, the credentials are
+  // incorrect, so throw an error.
+  if (empty($form_state['values']['simpletest_httpauth_username']) && !empty($form_state['values']['simpletest_httpauth_password'])) {
+    form_set_error('simpletest_httpauth_username', t('HTTP authentication credentials must include a username in addition to a password.'));
+  }
+}
+

Modified: branches/upstream/current-7/modules/simpletest/tests/actions_loop_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/actions_loop_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/actions_loop_test.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/actions_loop_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/ajax_forms_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/ajax_forms_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/ajax_forms_test.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/ajax_forms_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 version = VERSION
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/ajax_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/ajax_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/ajax_test.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/ajax_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/batch_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/batch_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/batch_test.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/batch_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/bootstrap.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/bootstrap.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/bootstrap.test (original)
+++ branches/upstream/current-7/modules/simpletest/tests/bootstrap.test Wed Nov  2 17:45:27 2011
@@ -308,15 +308,15 @@
     variable_set('page_cache_invoke_hooks', FALSE);
     $this->assertTrue(cache_get(url('', array('absolute' => TRUE)), 'cache_page'), t('Page has been cached.'));
     $this->drupalGet('');
-    $this->assertEqual(db_query('SELECT COUNT(*) FROM {watchdog} WHERE type = :type AND message = :message', array(':type' => 'system_test', ':message' => 'hook_boot'))->fetchField(), $calls, t('hook_boot not called with agressive cache and a cached page.'));
-    $this->assertEqual(db_query('SELECT COUNT(*) FROM {watchdog} WHERE type = :type AND message = :message', array(':type' => 'system_test', ':message' => 'hook_exit'))->fetchField(), $calls, t('hook_exit not called with agressive cache and a cached page.'));
+    $this->assertEqual(db_query('SELECT COUNT(*) FROM {watchdog} WHERE type = :type AND message = :message', array(':type' => 'system_test', ':message' => 'hook_boot'))->fetchField(), $calls, t('hook_boot not called with aggressive cache and a cached page.'));
+    $this->assertEqual(db_query('SELECT COUNT(*) FROM {watchdog} WHERE type = :type AND message = :message', array(':type' => 'system_test', ':message' => 'hook_exit'))->fetchField(), $calls, t('hook_exit not called with aggressive cache and a cached page.'));
 
     // Test with page cache cleared, boot and exit should be called.
     $this->assertTrue(db_delete('cache_page')->execute(), t('Page cache cleared.'));
     $this->drupalGet('');
     $calls++;
-    $this->assertEqual(db_query('SELECT COUNT(*) FROM {watchdog} WHERE type = :type AND message = :message', array(':type' => 'system_test', ':message' => 'hook_boot'))->fetchField(), $calls, t('hook_boot called with agressive cache and no cached page.'));
-    $this->assertEqual(db_query('SELECT COUNT(*) FROM {watchdog} WHERE type = :type AND message = :message', array(':type' => 'system_test', ':message' => 'hook_exit'))->fetchField(), $calls, t('hook_exit called with agressive cache and no cached page.'));
+    $this->assertEqual(db_query('SELECT COUNT(*) FROM {watchdog} WHERE type = :type AND message = :message', array(':type' => 'system_test', ':message' => 'hook_boot'))->fetchField(), $calls, t('hook_boot called with aggressive cache and no cached page.'));
+    $this->assertEqual(db_query('SELECT COUNT(*) FROM {watchdog} WHERE type = :type AND message = :message', array(':type' => 'system_test', ':message' => 'hook_exit'))->fetchField(), $calls, t('hook_exit called with aggressive cache and no cached page.'));
   }
 }
 

Modified: branches/upstream/current-7/modules/simpletest/tests/cache.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/cache.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/cache.test (original)
+++ branches/upstream/current-7/modules/simpletest/tests/cache.test Wed Nov  2 17:45:27 2011
@@ -151,13 +151,21 @@
     $this->assertTrue(isset($cache->data) && $cache->data == $test_object, t('Object is saved and restored properly.'));
   }
 
-  /*
+  /**
    * Check or a variable is stored and restored properly.
-   **/
+   */
   function checkVariable($var) {
     cache_set('test_var', $var, 'cache');
     $cache = cache_get('test_var', 'cache');
     $this->assertTrue(isset($cache->data) && $cache->data === $var, t('@type is saved and restored properly.', array('@type' => ucfirst(gettype($var)))));
+  }
+
+  /**
+   * Test no empty cids are written in cache table.
+   */
+  function testNoEmptyCids() {
+    $this->drupalGet('user/register');
+    $this->assertFalse(cache_get(''), t('No cache entry is written with an empty cid.'));
   }
 }
 

Modified: branches/upstream/current-7/modules/simpletest/tests/common.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/common.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/common.test (original)
+++ branches/upstream/current-7/modules/simpletest/tests/common.test Wed Nov  2 17:45:27 2011
@@ -345,14 +345,14 @@
 }
 
 /**
- * Tests for the check_plain() and filter_xss() functions.
+ * Tests for the check_plain(), filter_xss() and format_string() functions.
  */
 class CommonXssUnitTest extends DrupalUnitTestCase {
 
   public static function getInfo() {
     return array(
       'name' => 'String filtering tests',
-      'description' => 'Confirm that check_plain(), filter_xss(), and check_url() work correctly, including invalid multi-byte sequences.',
+      'description' => 'Confirm that check_plain(), filter_xss(), format_string() and check_url() work correctly, including invalid multi-byte sequences.',
       'group' => 'System',
     );
   }
@@ -383,6 +383,22 @@
      $this->assertEqual($text, '<script>', 'check_plain() escapes <script>');
      $text = check_plain('<>&"\'');
      $this->assertEqual($text, '<>&"'', 'check_plain() escapes reserved HTML characters.');
+  }
+
+  /**
+   * Test t() and format_string() replacement functionality.
+   */
+  function testFormatStringAndT() {
+    foreach (array('format_string', 't') as $function) {
+      $text = $function('Simple text');
+      $this->assertEqual($text, 'Simple text', $function . ' leaves simple text alone.');
+      $text = $function('Escaped text: @value', array('@value' => '<script>'));
+      $this->assertEqual($text, 'Escaped text: <script>', $function . ' replaces and escapes string.');
+      $text = $function('Placeholder text: %value', array('%value' => '<script>'));
+      $this->assertEqual($text, 'Placeholder text: <em class="placeholder"><script></em>', $function . ' replaces, escapes and themes string.');
+      $text = $function('Verbatim text: !value', array('!value' => '<script>'));
+      $this->assertEqual($text, 'Verbatim text: <script>', $function . ' replaces verbatim string as-is.');
+    }
   }
 
   /**
@@ -1095,7 +1111,7 @@
     $destination = 'common-test/drupal_goto/destination?foo=%2525&bar=123';
     $this->drupalGet('common-test/drupal_goto/redirect', array('query' => array('destination' => $destination)));
     $this->assertText('drupal_goto', t('Drupal goto redirect with destination succeeded.'));
-    $this->assertEqual($this->getUrl(), url('common-test/drupal_goto/destination', array('query' => array('foo' => '%25', 'bar' => '123'), 'absolute' => TRUE)), t('Drupal goto redirected to given query string destination. '));
+    $this->assertEqual($this->getUrl(), url('common-test/drupal_goto/destination', array('query' => array('foo' => '%25', 'bar' => '123'), 'absolute' => TRUE)), t('Drupal goto redirected to given query string destination.'));
   }
 
   /**

Modified: branches/upstream/current-7/modules/simpletest/tests/common_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/common_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/common_test.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/common_test.info Wed Nov  2 17:45:27 2011
@@ -7,8 +7,8 @@
 stylesheets[print][] = common_test.print.css
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/common_test_cron_helper.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/common_test_cron_helper.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/common_test_cron_helper.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/common_test_cron_helper.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/database_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/database_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/database_test.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/database_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 version = VERSION
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/database_test.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/database_test.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/database_test.test (original)
+++ branches/upstream/current-7/modules/simpletest/tests/database_test.test Wed Nov  2 17:45:27 2011
@@ -2096,7 +2096,7 @@
    */
   function testCountQueryFieldRemovals() {
     // countQuery should remove all fields and expressions, so this can be
-    // tested by adding a non-existant field and expression: if it ends
+    // tested by adding a non-existent field and expression: if it ends
     // up in the query, an error will be thrown. If not, it will return the
     // number of records, which in this case happens to be 4 (there are four
     // records in the {test} table).
@@ -2364,8 +2364,8 @@
   }
 
   /**
-  * Confirm that every pager gets a valid non-overlaping element ID.
-  */
+   * Confirm that every pager gets a valid non-overlaping element ID.
+   */
   function testElementNumbers() {
     $_GET['page'] = '3, 2, 1, 0';
 

Modified: branches/upstream/current-7/modules/simpletest/tests/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/entity_cache_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/entity_cache_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/entity_cache_test.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/entity_cache_test.info Wed Nov  2 17:45:27 2011
@@ -6,8 +6,8 @@
 dependencies[] = entity_cache_test_dependency
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/entity_cache_test_dependency.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/entity_cache_test_dependency.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/entity_cache_test_dependency.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/entity_cache_test_dependency.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/entity_crud_hook_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/entity_crud_hook_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/entity_crud_hook_test.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/entity_crud_hook_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 version = VERSION
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/entity_query.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/entity_query.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/entity_query.test (original)
+++ branches/upstream/current-7/modules/simpletest/tests/entity_query.test Wed Nov  2 17:45:27 2011
@@ -722,6 +722,31 @@
     $query = new EntityFieldQuery();
     $query
       ->entityCondition('entity_type', 'test_entity_bundle_key')
+      ->propertyCondition('ftid', 3, '<>');
+    $this->assertEntityFieldQuery($query, array(
+      array('test_entity_bundle_key', 1),
+      array('test_entity_bundle_key', 2),
+      array('test_entity_bundle_key', 4),
+      array('test_entity_bundle_key', 5),
+      array('test_entity_bundle_key', 6),
+    ), t('Test the "not equal to" operation on a property.'));
+
+    $query = new EntityFieldQuery();
+    $query->fieldCondition($this->fields[0], 'value', 3, '<>');
+    $this->assertEntityFieldQuery($query, array(
+      array('test_entity_bundle_key', 1),
+      array('test_entity_bundle_key', 2),
+      array('test_entity_bundle_key', 4),
+      array('test_entity_bundle_key', 5),
+      array('test_entity_bundle_key', 6),
+      array('test_entity', 1),
+      array('test_entity', 2),
+      array('test_entity', 4),
+    ), t('Test the "not equal to" operation on a field.'));
+
+    $query = new EntityFieldQuery();
+    $query
+      ->entityCondition('entity_type', 'test_entity_bundle_key')
       ->propertyCondition('ftid', 3, '!=');
     $this->assertEntityFieldQuery($query, array(
       array('test_entity_bundle_key', 1),
@@ -1047,6 +1072,45 @@
       $pass = ($exception->getMessage() == t('For this query an entity type must be specified.'));
     }
     $this->assertTrue($pass, t("Can't query the universe."));
+  }
+
+  /**
+   * Tests querying translatable fields.
+   */
+  function testEntityFieldQueryTranslatable() {
+
+    // Make a test field translatable AND cardinality one.
+    $this->fields[0]['translatable'] = TRUE;
+    $this->fields[0]['cardinality'] = 1;
+    field_update_field($this->fields[0]);
+    field_test_entity_info_translatable('test_entity', TRUE);
+    drupal_static_reset('field_available_languages');
+
+    // Create more items with different languages.
+    $entity = new stdClass();
+    $entity->ftid = 1;
+    $entity->ftvid = 1;
+    $entity->fttype = 'test_bundle';
+
+    // Set fields in two languages with one field value.
+    foreach (array(LANGUAGE_NONE, 'en') as $langcode) {
+      $entity->{$this->field_names[0]}[$langcode][0]['value'] = 1234;
+    }
+
+    field_attach_update('test_entity', $entity);
+
+    // Look up number of results when querying a single entity with multilingual
+    // field values.
+    $query = new EntityFieldQuery();
+    $query_count = $query
+      ->entityCondition('entity_type', 'test_entity')
+      ->entityCondition('bundle', 'test_bundle')
+      ->entityCondition('entity_id', '1')
+      ->fieldCondition($this->fields[0])
+      ->count()
+      ->execute();
+
+    $this->assertEqual($query_count, 1, t("Count on translatable cardinality one field is correct."));
   }
 
   /**
@@ -1088,6 +1152,15 @@
     $query = new EntityFieldQuery();
     $query
       ->entityCondition('entity_type', 'test_entity', '=')
+      ->fieldLanguageCondition($this->fields[0], LANGUAGE_NONE, '<>');
+    $this->assertEntityFieldQuery($query, array(
+      array('test_entity', 1),
+    ), t('Test with a language meta condition.'));
+
+    // Test language field meta condition.
+    $query = new EntityFieldQuery();
+    $query
+      ->entityCondition('entity_type', 'test_entity', '=')
       ->fieldLanguageCondition($this->fields[0], LANGUAGE_NONE, '!=');
     $this->assertEntityFieldQuery($query, array(
       array('test_entity', 1),
@@ -1115,10 +1188,27 @@
     $query
       ->entityCondition('entity_type', 'test_entity', '=')
       ->fieldCondition($this->fields[0], 'value', 0, '=', NULL, 'group')
+      ->fieldLanguageCondition($this->fields[0], 'en', '<>', NULL, 'group');
+    $this->assertEntityFieldQuery($query, array(
+      array('test_entity', 1),
+    ), t('Test with a grouped language meta condition.'));
+
+    // Test language grouping.
+    $query = new EntityFieldQuery();
+    $query
+      ->entityCondition('entity_type', 'test_entity', '=')
+      ->fieldCondition($this->fields[0], 'value', 0, '=', NULL, 'group')
       ->fieldLanguageCondition($this->fields[0], 'en', '!=', NULL, 'group');
     $this->assertEntityFieldQuery($query, array(
       array('test_entity', 1),
     ), t('Test with a grouped language meta condition.'));
+
+    $query = new EntityFieldQuery();
+    $query
+      ->entityCondition('entity_type', 'test_entity', '=')
+      ->fieldCondition($this->fields[0], 'value', 0, '=', NULL, 'group')
+      ->fieldLanguageCondition($this->fields[0], LANGUAGE_NONE, '<>', NULL, 'group');
+    $this->assertEntityFieldQuery($query, array(), t('Test with a grouped language meta condition (empty result set).'));
 
     $query = new EntityFieldQuery();
     $query
@@ -1133,10 +1223,29 @@
       ->entityCondition('entity_type', 'test_entity', '=')
       ->fieldCondition($this->fields[0], 'value', 0, '=', 'delta', 'language')
       ->fieldDeltaCondition($this->fields[0], 1, '<', 'delta', 'language')
+      ->fieldLanguageCondition($this->fields[0], 'en', '<>', 'delta', 'language');
+    $this->assertEntityFieldQuery($query, array(
+      array('test_entity', 1),
+    ), t('Test with a grouped delta + language meta condition.'));
+
+    // Test delta and language grouping.
+    $query = new EntityFieldQuery();
+    $query
+      ->entityCondition('entity_type', 'test_entity', '=')
+      ->fieldCondition($this->fields[0], 'value', 0, '=', 'delta', 'language')
+      ->fieldDeltaCondition($this->fields[0], 1, '<', 'delta', 'language')
       ->fieldLanguageCondition($this->fields[0], 'en', '!=', 'delta', 'language');
     $this->assertEntityFieldQuery($query, array(
       array('test_entity', 1),
     ), t('Test with a grouped delta + language meta condition.'));
+
+    $query = new EntityFieldQuery();
+    $query
+      ->entityCondition('entity_type', 'test_entity', '=')
+      ->fieldCondition($this->fields[0], 'value', 0, '=', 'delta', 'language')
+      ->fieldDeltaCondition($this->fields[0], 1, '>=', 'delta', 'language')
+      ->fieldLanguageCondition($this->fields[0], 'en', '<>', 'delta', 'language');
+    $this->assertEntityFieldQuery($query, array(), t('Test with a grouped delta + language meta condition (empty result set, delta condition unsatisifed).'));
 
     $query = new EntityFieldQuery();
     $query
@@ -1151,8 +1260,24 @@
       ->entityCondition('entity_type', 'test_entity', '=')
       ->fieldCondition($this->fields[0], 'value', 0, '=', 'delta', 'language')
       ->fieldDeltaCondition($this->fields[0], 1, '<', 'delta', 'language')
+      ->fieldLanguageCondition($this->fields[0], LANGUAGE_NONE, '<>', 'delta', 'language');
+    $this->assertEntityFieldQuery($query, array(), t('Test with a grouped delta + language meta condition (empty result set, language condition unsatisifed).'));
+
+    $query = new EntityFieldQuery();
+    $query
+      ->entityCondition('entity_type', 'test_entity', '=')
+      ->fieldCondition($this->fields[0], 'value', 0, '=', 'delta', 'language')
+      ->fieldDeltaCondition($this->fields[0], 1, '<', 'delta', 'language')
       ->fieldLanguageCondition($this->fields[0], LANGUAGE_NONE, '!=', 'delta', 'language');
     $this->assertEntityFieldQuery($query, array(), t('Test with a grouped delta + language meta condition (empty result set, language condition unsatisifed).'));
+
+    $query = new EntityFieldQuery();
+    $query
+      ->entityCondition('entity_type', 'test_entity', '=')
+      ->fieldCondition($this->fields[0], 'value', 0, '=', 'delta', 'language')
+      ->fieldDeltaCondition($this->fields[0], 1, '>=', 'delta', 'language')
+      ->fieldLanguageCondition($this->fields[0], LANGUAGE_NONE, '<>', 'delta', 'language');
+    $this->assertEntityFieldQuery($query, array(), t('Test with a grouped delta + language meta condition (empty result set, both conditions unsatisifed).'));
 
     $query = new EntityFieldQuery();
     $query

Modified: branches/upstream/current-7/modules/simpletest/tests/error_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/error_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/error_test.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/error_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/file.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/file.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/file.test (original)
+++ branches/upstream/current-7/modules/simpletest/tests/file.test Wed Nov  2 17:45:27 2011
@@ -689,7 +689,7 @@
 
     $this->drupalPost('file-test/upload', $edit, t('Submit'));
     $this->assertResponse(200, t('Received a 200 response for posted test file.'));
-    $message = t('Only files with the following extensions are allowed: ') . '<em class="placeholder">' . $extensions . '</em>';
+    $message = t('Only files with the following extensions are allowed:') . ' <em class="placeholder">' . $extensions . '</em>';
     $this->assertRaw($message, t('Can\'t upload a disallowed extension'));
     $this->assertRaw(t('Epic upload FAIL!'), t('Found the failure message.'));
 
@@ -748,7 +748,7 @@
 
     $this->drupalPost('file-test/upload', $edit, t('Submit'));
     $this->assertResponse(200, t('Received a 200 response for posted test file.'));
-    $message = t('For security reasons, your upload has been renamed to ') . '<em class="placeholder">' . $this->phpfile->filename . '.txt' . '</em>';
+    $message = t('For security reasons, your upload has been renamed to') . ' <em class="placeholder">' . $this->phpfile->filename . '.txt' . '</em>';
     $this->assertRaw($message, t('Dangerous file was renamed.'));
     $this->assertRaw(t('File MIME type is text/plain.'), t('Dangerous file\'s MIME type was changed.'));
     $this->assertRaw(t('You WIN!'), t('Found the success message.'));
@@ -1563,7 +1563,7 @@
     file_usage_delete($file, 'testing', 'test', 1);
     file_delete($file);
     $usage = file_usage_list($file);
-    $this->assertEqual($usage['testing']['test'], array('id' => 1, 'count' => 1), t('Test file is still in use.'));
+    $this->assertEqual($usage['testing']['test'], array(1 => 1), t('Test file is still in use.'));
     $this->assertTrue(file_exists($file->uri), t('File still exists on the disk.'));
     $this->assertTrue(file_load($file->fid), t('File still exists in the database.'));
 
@@ -1606,7 +1606,7 @@
     $result = file_move(clone $source, $desired_filepath, FILE_EXISTS_ERROR);
 
     // Check the return status and that the contents changed.
-    $this->assertTrue($result, t('File moved sucessfully.'));
+    $this->assertTrue($result, t('File moved successfully.'));
     $this->assertFalse(file_exists($source->uri));
     $this->assertEqual($contents, file_get_contents($result->uri), t('Contents of file correctly written.'));
 
@@ -1638,7 +1638,7 @@
     $result = file_move(clone $source, $target->uri, FILE_EXISTS_RENAME);
 
     // Check the return status and that the contents changed.
-    $this->assertTrue($result, t('File moved sucessfully.'));
+    $this->assertTrue($result, t('File moved successfully.'));
     $this->assertFalse(file_exists($source->uri));
     $this->assertEqual($contents, file_get_contents($result->uri), t('Contents of file correctly written.'));
 
@@ -1675,7 +1675,7 @@
     // Look at the results.
     $this->assertEqual($contents, file_get_contents($result->uri), t('Contents of file were overwritten.'));
     $this->assertFalse(file_exists($source->uri));
-    $this->assertTrue($result, t('File moved sucessfully.'));
+    $this->assertTrue($result, t('File moved successfully.'));
 
     // Check that the correct hooks were called.
     $this->assertFileHooksCalled(array('move', 'update', 'delete', 'load'));
@@ -1767,7 +1767,7 @@
     $result = file_copy(clone $source, $desired_uri, FILE_EXISTS_ERROR);
 
     // Check the return status and that the contents changed.
-    $this->assertTrue($result, t('File copied sucessfully.'));
+    $this->assertTrue($result, t('File copied successfully.'));
     $this->assertEqual($contents, file_get_contents($result->uri), t('Contents of file were copied correctly.'));
 
     // Check that the correct hooks were called.
@@ -1798,7 +1798,7 @@
     $result = file_copy(clone $source, $target->uri, FILE_EXISTS_RENAME);
 
     // Check the return status and that the contents changed.
-    $this->assertTrue($result, t('File copied sucessfully.'));
+    $this->assertTrue($result, t('File copied successfully.'));
     $this->assertEqual($contents, file_get_contents($result->uri), t('Contents of file were copied correctly.'));
     $this->assertNotEqual($result->uri, $source->uri, t('Returned file path has changed from the original.'));
 
@@ -1838,7 +1838,7 @@
     $result = file_copy(clone $source, $target->uri, FILE_EXISTS_REPLACE);
 
     // Check the return status and that the contents changed.
-    $this->assertTrue($result, t('File copied sucessfully.'));
+    $this->assertTrue($result, t('File copied successfully.'));
     $this->assertEqual($contents, file_get_contents($result->uri), t('Contents of file were overwritten.'));
     $this->assertDifferentFile($source, $result);
 
@@ -2066,10 +2066,10 @@
     $usage = file_usage_list($file);
 
     $this->assertEqual(count($usage['testing']), 2, t('Returned the correct number of items.'));
-    $this->assertEqual($usage['testing']['foo']['id'], 1, t('Returned the correct id.'));
-    $this->assertEqual($usage['testing']['bar']['id'], 2, t('Returned the correct id.'));
-    $this->assertEqual($usage['testing']['foo']['count'], 1, t('Returned the correct count.'));
-    $this->assertEqual($usage['testing']['bar']['count'], 2, t('Returned the correct count.'));
+    $this->assertTrue(isset($usage['testing']['foo'][1]), t('Returned the correct id.'));
+    $this->assertTrue(isset($usage['testing']['bar'][2]), t('Returned the correct id.'));
+    $this->assertEqual($usage['testing']['foo'][1], 1, t('Returned the correct count.'));
+    $this->assertEqual($usage['testing']['bar'][2], 2, t('Returned the correct count.'));
   }
 
   /**
@@ -2160,7 +2160,7 @@
     $file = $this->createFile();
 
     // Empty validators.
-    $this->assertEqual(file_validate($file, array()), array(), t('Validating an empty array works succesfully.'));
+    $this->assertEqual(file_validate($file, array()), array(), t('Validating an empty array works successfully.'));
     $this->assertFileHooksCalled(array('validate'));
 
     // Use the file_test.module's test validator to ensure that passing tests
@@ -2245,7 +2245,7 @@
     $contents = $this->randomName(8);
 
     $result = file_save_data($contents, $existing->uri, FILE_EXISTS_RENAME);
-    $this->assertTrue($result, t("File saved sucessfully."));
+    $this->assertTrue($result, t("File saved successfully."));
 
     $this->assertEqual('public', file_uri_scheme($result->uri), t("File was placed in Drupal's files directory."));
     $this->assertEqual($result->filename, $existing->filename, t("Filename was set to the basename of the source, rather than that of the renamed file."));
@@ -2273,7 +2273,7 @@
     $contents = $this->randomName(8);
 
     $result = file_save_data($contents, $existing->uri, FILE_EXISTS_REPLACE);
-    $this->assertTrue($result, t('File saved sucessfully.'));
+    $this->assertTrue($result, t('File saved successfully.'));
 
     $this->assertEqual('public', file_uri_scheme($result->uri), t("File was placed in Drupal's files directory."));
     $this->assertEqual($result->filename, $existing->filename, t('Filename was set to the basename of the existing file, rather than preserving the original name.'));

Modified: branches/upstream/current-7/modules/simpletest/tests/file_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/file_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/file_test.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/file_test.info Wed Nov  2 17:45:27 2011
@@ -6,8 +6,8 @@
 files[] = file_test.module
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/filter_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/filter_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/filter_test.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/filter_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/form.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/form.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/form.test (original)
+++ branches/upstream/current-7/modules/simpletest/tests/form.test Wed Nov  2 17:45:27 2011
@@ -599,13 +599,13 @@
     // Exercise various defaults for textboxes and modifications to ensure
     // appropriate override and correct behaviour.
     $elements = $this->xpath('//label[@for="edit-form-textfield-test-title-and-required"]/child::span[@class="form-required"]/parent::*/following-sibling::input[@id="edit-form-textfield-test-title-and-required"]');
-    $this->assertTrue(isset($elements[0]), t("Label preceeds textfield, with required marker inside label."));
+    $this->assertTrue(isset($elements[0]), t("Label precedes textfield, with required marker inside label."));
 
     $elements = $this->xpath('//input[@id="edit-form-textfield-test-no-title-required"]/preceding-sibling::label[@for="edit-form-textfield-test-no-title-required"]/span[@class="form-required"]');
-    $this->assertTrue(isset($elements[0]), t("Label tag with required marker preceeds required textfield with no title."));
+    $this->assertTrue(isset($elements[0]), t("Label tag with required marker precedes required textfield with no title."));
 
     $elements = $this->xpath('//input[@id="edit-form-textfield-test-title-invisible"]/preceding-sibling::label[@for="edit-form-textfield-test-title-invisible" and @class="element-invisible"]');
-    $this->assertTrue(isset($elements[0]), t("Label preceeding field and label class is element-invisible."));
+    $this->assertTrue(isset($elements[0]), t("Label preceding field and label class is element-invisible."));
 
     $elements = $this->xpath('//input[@id="edit-form-textfield-test-title"]/preceding-sibling::span[@class="form-required"]');
     $this->assertFalse(isset($elements[0]), t("No required marker on non-required field."));

Modified: branches/upstream/current-7/modules/simpletest/tests/form_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/form_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/form_test.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/form_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/form_test.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/form_test.module?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/form_test.module (original)
+++ branches/upstream/current-7/modules/simpletest/tests/form_test.module Wed Nov  2 17:45:27 2011
@@ -713,7 +713,7 @@
   );
   $form['form_textfield_test_no_title_required'] = array(
     '#type' => 'textfield',
-    // We use an empty title, since not setting #title supresses the label
+    // We use an empty title, since not setting #title suppresses the label
     // and required marker.
     '#title' => '',
     '#required' => TRUE,

Modified: branches/upstream/current-7/modules/simpletest/tests/image_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/image_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/image_test.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/image_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/menu.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/menu.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/menu.test (original)
+++ branches/upstream/current-7/modules/simpletest/tests/menu.test Wed Nov  2 17:45:27 2011
@@ -4,6 +4,122 @@
  * @file
  * Provides SimpleTests for menu.inc.
  */
+
+class MenuWebTestCase extends DrupalWebTestCase {
+  function setUp() {
+    $modules = func_get_args();
+    if (isset($modules[0]) && is_array($modules[0])) {
+      $modules = $modules[0];
+    }
+    parent::setUp($modules);
+  }
+
+  /**
+   * Assert that a given path shows certain breadcrumb links.
+   *
+   * @param string $goto
+   *   (optional) A system path to pass to DrupalWebTestCase::drupalGet().
+   * @param array $trail
+   *   An associative array whose keys are expected breadcrumb link paths and
+   *   whose values are expected breadcrumb link texts (not sanitized).
+   * @param string $page_title
+   *   (optional) A page title to additionally assert via
+   *   DrupalWebTestCase::assertTitle(). Without site name suffix.
+   * @param array $tree
+   *   (optional) An associative array whose keys are link paths and whose
+   *   values are link titles (not sanitized) of an expected active trail in a
+   *   menu tree output on the page.
+   * @param $last_active
+   *   (optional) Whether the last link in $tree is expected to be active (TRUE)
+   *   or just to be in the active trail (FALSE).
+   */
+  protected function assertBreadcrumb($goto, array $trail, $page_title = NULL, array $tree = array(), $last_active = TRUE) {
+    if (isset($goto)) {
+      $this->drupalGet($goto);
+    }
+    // Compare paths with actual breadcrumb.
+    $parts = $this->getParts();
+    $pass = TRUE;
+    foreach ($trail as $path => $title) {
+      $url = url($path);
+      $part = array_shift($parts);
+      $pass = ($pass && $part['href'] === $url && $part['text'] === check_plain($title));
+    }
+    // No parts must be left, or an expected "Home" will always pass.
+    $pass = ($pass && empty($parts));
+
+    $this->assertTrue($pass, t('Breadcrumb %parts found on @path.', array(
+      '%parts' => implode(' » ', $trail),
+      '@path' => $this->getUrl(),
+    )));
+
+    // Additionally assert page title, if given.
+    if (isset($page_title)) {
+      $this->assertTitle(strtr('@title | Drupal', array('@title' => $page_title)));
+    }
+
+    // Additionally assert active trail in a menu tree output, if given.
+    if ($tree) {
+      end($tree);
+      $active_link_path = key($tree);
+      $active_link_title = array_pop($tree);
+      $xpath = '';
+      if ($tree) {
+        $i = 0;
+        foreach ($tree as $link_path => $link_title) {
+          $part_xpath = (!$i ? '//' : '/following-sibling::ul/descendant::');
+          $part_xpath .= 'li[contains(@class, :class)]/a[contains(@href, :href) and contains(text(), :title)]';
+          $part_args = array(
+            ':class' => 'active-trail',
+            ':href' => url($link_path),
+            ':title' => $link_title,
+          );
+          $xpath .= $this->buildXPathQuery($part_xpath, $part_args);
+          $i++;
+        }
+        $elements = $this->xpath($xpath);
+        $this->assertTrue(!empty($elements), t('Active trail to current page was found in menu tree.'));
+
+        // Append prefix for active link asserted below.
+        $xpath .= '/following-sibling::ul/descendant::';
+      }
+      else {
+        $xpath .= '//';
+      }
+      $xpath_last_active = ($last_active ? 'and contains(@class, :class-active)' : '');
+      $xpath .= 'li[contains(@class, :class-trail)]/a[contains(@href, :href) ' . $xpath_last_active . 'and contains(text(), :title)]';
+      $args = array(
+        ':class-trail' => 'active-trail',
+        ':class-active' => 'active',
+        ':href' => url($active_link_path),
+        ':title' => $active_link_title,
+      );
+      $elements = $this->xpath($xpath, $args);
+      $this->assertTrue(!empty($elements), t('Active link %title was found in menu tree, including active trail links %tree.', array(
+        '%title' => $active_link_title,
+        '%tree' => implode(' » ', $tree),
+      )));
+    }
+  }
+
+  /**
+   * Returns the breadcrumb contents of the current page in the internal browser.
+   */
+  protected function getParts() {
+    $parts = array();
+    $elements = $this->xpath('//div[@class="breadcrumb"]/a');
+    if (!empty($elements)) {
+      foreach ($elements as $element) {
+        $parts[] = array(
+          'text' => (string) $element,
+          'href' => (string) $element['href'],
+          'title' => (string) $element['title'],
+        );
+      }
+    }
+    return $parts;
+  }
+}
 
 class MenuRouterTestCase extends DrupalWebTestCase {
   public static function getInfo() {
@@ -420,7 +536,7 @@
   }
 
   /**
-   * Test menu maintainance hooks.
+   * Test menu maintenance hooks.
    */
   function testMenuItemHooks() {
     // Create an item.
@@ -897,7 +1013,7 @@
       'group' => 'Menu',
     );
   }
-  
+
   function setUp() {
     parent::setUp();
   }
@@ -925,7 +1041,7 @@
 /**
  * Menu breadcrumbs related tests.
  */
-class MenuBreadcrumbTestCase extends DrupalWebTestCase {
+class MenuBreadcrumbTestCase extends MenuWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Breadcrumbs',
@@ -935,7 +1051,12 @@
   }
 
   function setUp() {
-    parent::setUp(array('menu_test'));
+    $modules = func_get_args();
+    if (isset($modules[0]) && is_array($modules[0])) {
+      $modules = $modules[0];
+    }
+    $modules[] = 'menu_test';
+    parent::setUp($modules);
     $perms = array_keys(module_invoke_all('permission'));
     $this->admin_user = $this->drupalCreateUser($perms);
     $this->drupalLogin($this->admin_user);
@@ -1249,8 +1370,7 @@
       $tree += array(
         $link['link_path'] => $link['link_title'],
       );
-      // @todo Normally, you'd expect $term->name as page title here.
-      $this->assertBreadcrumb($link['link_path'], $trail, $link['link_title'], $tree);
+      $this->assertBreadcrumb($link['link_path'], $trail, $term->name, $tree);
       $this->assertRaw(check_plain($parent->title), 'Tagged node found.');
 
       // Additionally make sure that this link appears only once; i.e., the
@@ -1410,110 +1530,117 @@
     $this->assertBreadcrumb('admin/reports/dblog', $trail, t('Recent log messages'));
     $this->assertNoResponse(403);
   }
-
-  /**
-   * Assert that a given path shows certain breadcrumb links.
-   *
-   * @param string $goto
-   *   (optional) A system path to pass to DrupalWebTestCase::drupalGet().
-   * @param array $trail
-   *   An associative array whose keys are expected breadcrumb link paths and
-   *   whose values are expected breadcrumb link texts (not sanitized).
-   * @param string $page_title
-   *   (optional) A page title to additionally assert via
-   *   DrupalWebTestCase::assertTitle(). Without site name suffix.
-   * @param array $tree
-   *   (optional) An associative array whose keys are link paths and whose
-   *   values are link titles (not sanitized) of an expected active trail in a
-   *   menu tree output on the page.
-   * @param $last_active
-   *   (optional) Whether the last link in $tree is expected to be active (TRUE)
-   *   or just to be in the active trail (FALSE).
-   */
-  protected function assertBreadcrumb($goto, array $trail, $page_title = NULL, array $tree = array(), $last_active = TRUE) {
-    if (isset($goto)) {
-      $this->drupalGet($goto);
-    }
-    // Compare paths with actual breadcrumb.
-    $parts = $this->getParts();
-    $pass = TRUE;
-    foreach ($trail as $path => $title) {
-      $url = url($path);
-      $part = array_shift($parts);
-      $pass = ($pass && $part['href'] === $url && $part['text'] === check_plain($title));
-    }
-    // No parts must be left, or an expected "Home" will always pass.
-    $pass = ($pass && empty($parts));
-
-    $this->assertTrue($pass, t('Breadcrumb %parts found on @path.', array(
-      '%parts' => implode(' » ', $trail),
-      '@path' => $this->getUrl(),
-    )));
-
-    // Additionally assert page title, if given.
-    if (isset($page_title)) {
-      $this->assertTitle(strtr('@title | Drupal', array('@title' => $page_title)));
-    }
-
-    // Additionally assert active trail in a menu tree output, if given.
-    if ($tree) {
-      end($tree);
-      $active_link_path = key($tree);
-      $active_link_title = array_pop($tree);
-      $xpath = '';
-      if ($tree) {
-        $i = 0;
-        foreach ($tree as $link_path => $link_title) {
-          $part_xpath = (!$i ? '//' : '/following-sibling::ul/descendant::');
-          $part_xpath .= 'li[contains(@class, :class)]/a[contains(@href, :href) and contains(text(), :title)]';
-          $part_args = array(
-            ':class' => 'active-trail',
-            ':href' => url($link_path),
-            ':title' => $link_title,
-          );
-          $xpath .= $this->buildXPathQuery($part_xpath, $part_args);
-          $i++;
-        }
-        $elements = $this->xpath($xpath);
-        $this->assertTrue(!empty($elements), t('Active trail to current page was found in menu tree.'));
-
-        // Append prefix for active link asserted below.
-        $xpath .= '/following-sibling::ul/descendant::';
-      }
-      else {
-        $xpath .= '//';
-      }
-      $xpath_last_active = ($last_active ? 'and contains(@class, :class-active)' : '');
-      $xpath .= 'li[contains(@class, :class-trail)]/a[contains(@href, :href) ' . $xpath_last_active . 'and contains(text(), :title)]';
-      $args = array(
-        ':class-trail' => 'active-trail',
-        ':class-active' => 'active',
-        ':href' => url($active_link_path),
-        ':title' => $active_link_title,
-      );
-      $elements = $this->xpath($xpath, $args);
-      $this->assertTrue(!empty($elements), t('Active link %title was found in menu tree, including active trail links %tree.', array(
-        '%title' => $active_link_title,
-        '%tree' => implode(' » ', $tree),
-      )));
-    }
-  }
-
-  /**
-   * Returns the breadcrumb contents of the current page in the internal browser.
-   */
-  protected function getParts() {
-    $parts = array();
-    $elements = $this->xpath('//div[@class="breadcrumb"]/a');
-    if (!empty($elements)) {
-      foreach ($elements as $element) {
-        $parts[] = array(
-          'text' => (string) $element,
-          'href' => (string) $element['href'],
-          'title' => (string) $element['title'],
-        );
-      }
-    }
-    return $parts;
-  }
 }
+
+/**
+ * Tests active menu trails.
+ */
+class MenuTrailTestCase extends MenuWebTestCase {
+  public static function getInfo() {
+    return array(
+      'name' => 'Active trail',
+      'description' => 'Tests active menu trails and alteration functionality.',
+      'group' => 'Menu',
+    );
+  }
+
+  function setUp() {
+    $modules = func_get_args();
+    if (isset($modules[0]) && is_array($modules[0])) {
+      $modules = $modules[0];
+    }
+    $modules[] = 'menu_test';
+    parent::setUp($modules);
+    $this->admin_user = $this->drupalCreateUser(array('administer site configuration', 'access administration pages'));
+    $this->drupalLogin($this->admin_user);
+
+    // This test puts menu links in the Navigation menu and then tests for
+    // their presence on the page, so we need to ensure that the Navigation
+    // block will be displayed in all active themes.
+    db_update('block')
+      ->fields(array(
+        // Use a region that is valid for all themes.
+        'region' => 'content',
+        'status' => 1,
+      ))
+      ->condition('module', 'system')
+      ->condition('delta', 'navigation')
+      ->execute();
+
+    // This test puts menu links in the Management menu and then tests for
+    // their presence on the page, so we need to ensure that the Management
+    // block will be displayed in all active themes.
+    db_update('block')
+      ->fields(array(
+        // Use a region that is valid for all themes.
+        'region' => 'content',
+        'status' => 1,
+      ))
+      ->condition('module', 'system')
+      ->condition('delta', 'management')
+      ->execute();
+  }
+
+  /**
+   * Tests active trails are properly affected by menu_tree_set_path().
+   */
+  function testMenuTreeSetPath() {
+    $home = array('<front>' => 'Home');
+    $config_tree = array(
+      'admin' => t('Administration'),
+      'admin/config' => t('Configuration'),
+    );
+    $config = $home + $config_tree;
+
+    // The menu_test_menu_tree_set_path system variable controls whether or not
+    // the menu_test_menu_trail_callback() callback (used by all paths in these
+    // tests) issues an overriding call to menu_trail_set_path().
+    $test_menu_path = array(
+      'menu_name' => 'management',
+      'path' => 'admin/config/system/site-information',
+    );
+
+    $breadcrumb = $home + array(
+      'menu-test' => t('Menu test root'),
+    );
+    $tree = array(
+      'menu-test' => t('Menu test root'),
+      'menu-test/menu-trail' => t('Menu trail - Case 1'),
+    );
+
+    // Test the tree generation for the Navigation menu.
+    variable_del('menu_test_menu_tree_set_path');
+    $this->assertBreadcrumb('menu-test/menu-trail', $breadcrumb, t('Menu trail - Case 1'), $tree);
+
+    // Override the active trail for the Management tree; it should not affect
+    // the Navigation tree.
+    variable_set('menu_test_menu_tree_set_path', $test_menu_path);
+    $this->assertBreadcrumb('menu-test/menu-trail', $breadcrumb, t('Menu trail - Case 1'), $tree);
+
+    $breadcrumb = $config + array(
+      'admin/config/development' => t('Development'),
+    );
+    $tree = $config_tree + array(
+      'admin/config/development' => t('Development'),
+      'admin/config/development/menu-trail' => t('Menu trail - Case 2'),
+    );
+
+    $override_breadcrumb = $config + array(
+      'admin/config/system' => t('System'),
+      'admin/config/system/site-information' => t('Site information'),
+    );
+    $override_tree = $config_tree + array(
+      'admin/config/system' => t('System'),
+      'admin/config/system/site-information' => t('Site information'),
+    );
+
+    // Test the tree generation for the Management menu.
+    variable_del('menu_test_menu_tree_set_path');
+    $this->assertBreadcrumb('admin/config/development/menu-trail', $breadcrumb, t('Menu trail - Case 2'), $tree);
+
+    // Override the active trail for the Management tree; it should affect the
+    // breadcrumbs and Management tree.
+    variable_set('menu_test_menu_tree_set_path', $test_menu_path);
+    $this->assertBreadcrumb('admin/config/development/menu-trail', $override_breadcrumb, t('Menu trail - Case 2'), $override_tree);
+  }
+}

Modified: branches/upstream/current-7/modules/simpletest/tests/menu_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/menu_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/menu_test.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/menu_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/menu_test.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/menu_test.module?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/menu_test.module (original)
+++ branches/upstream/current-7/modules/simpletest/tests/menu_test.module Wed Nov  2 17:45:27 2011
@@ -216,6 +216,20 @@
     'title' => 'Second second',
     'type' => MENU_LOCAL_TASK,
   ) + $base;
+
+  // Menu trail tests.
+  // @see MenuTrailTestCase
+  $items['menu-test/menu-trail'] = array(
+    'title' => 'Menu trail - Case 1',
+    'page callback' => 'menu_test_menu_trail_callback',
+    'access arguments' => array('access content'),
+  );
+  $items['admin/config/development/menu-trail'] = array(
+    'title' => 'Menu trail - Case 2',
+    'description' => 'Tests menu_tree_set_path()',
+    'page callback' => 'menu_test_menu_trail_callback',
+    'access arguments' => array('access administration pages'),
+  );
 
   // File inheritance tests. This menu item should inherit the page callback
   // system_admin_menu_block_page() and therefore render its children as links
@@ -342,6 +356,17 @@
  */
 function menu_test_callback() {
   return 'This is menu_test_callback().';
+}
+
+/**
+ * Callback that test menu_test_menu_tree_set_path().
+ */
+function menu_test_menu_trail_callback() {
+  $menu_path = variable_get('menu_test_menu_tree_set_path', array());
+  if (!empty($menu_path)) {
+    menu_tree_set_path($menu_path['menu_name'], $menu_path['path']);
+  }
+  return 'This is menu_test_menu_trail_callback().';
 }
 
 /**

Modified: branches/upstream/current-7/modules/simpletest/tests/module_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/module_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/module_test.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/module_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/path.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/path.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/path.test (original)
+++ branches/upstream/current-7/modules/simpletest/tests/path.test Wed Nov  2 17:45:27 2011
@@ -171,7 +171,7 @@
     $this->assertUrlInboundAlter('alias/test2', "user/$uid/edit");
     $this->assertUrlOutboundAlter("user/$uid/edit", 'alias/test2');
 
-    // Test a non-existant user is not altered.
+    // Test a non-existent user is not altered.
     $uid++;
     $this->assertUrlInboundAlter("user/$uid", "user/$uid");
     $this->assertUrlOutboundAlter("user/$uid", "user/$uid");

Modified: branches/upstream/current-7/modules/simpletest/tests/requirements1_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/requirements1_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/requirements1_test.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/requirements1_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/requirements2_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/requirements2_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/requirements2_test.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/requirements2_test.info Wed Nov  2 17:45:27 2011
@@ -7,8 +7,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/session_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/session_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/session_test.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/session_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/system_dependencies_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/system_dependencies_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/system_dependencies_test.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/system_dependencies_test.info Wed Nov  2 17:45:27 2011
@@ -6,8 +6,8 @@
 hidden = TRUE
 dependencies[] = _missing_dependency
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/system_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/system_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/system_test.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/system_test.info Wed Nov  2 17:45:27 2011
@@ -6,8 +6,8 @@
 files[] = system_test.module
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/taxonomy_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/taxonomy_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/taxonomy_test.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/taxonomy_test.info Wed Nov  2 17:45:27 2011
@@ -6,8 +6,8 @@
 hidden = TRUE
 dependencies[] = taxonomy
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/theme.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/theme.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/theme.test (original)
+++ branches/upstream/current-7/modules/simpletest/tests/theme.test Wed Nov  2 17:45:27 2011
@@ -354,3 +354,29 @@
     $this->assertText('registry not initialized', t('The registry was not initialized'));
   }
 }
+
+/**
+ * Unit tests for theme_html_tag().
+ */
+class ThemeHtmlTag extends DrupalUnitTestCase {
+  public static function getInfo() {
+    return array(
+      'name' => 'Theme HTML Tag',
+      'description' => 'Tests theme_html_tag() built-in theme functions.',
+      'group' => 'Theme',
+    );
+  }
+
+  /**
+   * Test function theme_html_tag()
+   */
+  function testThemeHtmlTag() {
+    // Test auto-closure meta tag generation
+    $tag['element'] = array('#tag' => 'meta', '#attributes' => array('name' => 'description', 'content' => 'Drupal test'));
+    $this->assertEqual('<meta name="description" content="Drupal test" />'."\n", theme_html_tag($tag), t('Test auto-closure meta tag generation.'));
+
+    // Test title tag generation
+    $tag['element'] = array('#tag' => 'title', '#value' => 'title test');
+    $this->assertEqual('<title>title test</title>'."\n", theme_html_tag($tag), t('Test title tag generation.'));
+  }
+}

Modified: branches/upstream/current-7/modules/simpletest/tests/theme_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/theme_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/theme_test.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/theme_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/update_test_1.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/update_test_1.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/update_test_1.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/update_test_1.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/update_test_2.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/update_test_2.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/update_test_2.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/update_test_2.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/update_test_3.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/update_test_3.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/update_test_3.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/update_test_3.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/upgrade/drupal-6.user-password-token.database.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/upgrade/drupal-6.user-password-token.database.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/upgrade/drupal-6.user-password-token.database.php (original)
+++ branches/upstream/current-7/modules/simpletest/tests/upgrade/drupal-6.user-password-token.database.php Wed Nov  2 17:45:27 2011
@@ -8,3 +8,48 @@
   'value' => 's:97:"!password, !username, !site, !uri, !uri_brief, !mailto, !date, !login_uri, !edit_uri, !login_url.";',
 ))
 ->execute();
+
+db_insert('users')->fields(array(
+  'uid',
+  'name',
+  'pass',
+  'mail',
+  'mode',
+  'sort',
+  'threshold',
+  'theme',
+  'signature',
+  'signature_format',
+  'created',
+  'access',
+  'login',
+  'status',
+  'timezone',
+  'language',
+  'picture',
+  'init',
+  'data',
+))
+->values(array(
+  'uid' => 3,
+  'name' => 'hashtester',
+  // This is not a valid D7 hash, but a truncated one.
+  'pass' => '$S$DAK00p3Dkojkf4O/UizYxenguXnjv',
+  'mail' => 'hashtester at example.com',
+  'mode' => '0',
+  'sort' => '0',
+  'threshold' => '0',
+  'theme' => '',
+  'signature' => '',
+  'signature_format' => '0',
+  'created' => '1277671599',
+  'access' => '1277671612',
+  'login' => '1277671612',
+  'status' => '1',
+  'timezone' => '-21600',
+  'language' => '',
+  'picture' => '',
+  'init' => 'hashtester at example.com',
+  'data' => 'a:0:{}',
+))
+->execute();

Modified: branches/upstream/current-7/modules/simpletest/tests/upgrade/upgrade.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/upgrade/upgrade.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/upgrade/upgrade.test (original)
+++ branches/upstream/current-7/modules/simpletest/tests/upgrade/upgrade.test Wed Nov  2 17:45:27 2011
@@ -137,7 +137,7 @@
   protected function tearDown() {
     global $user, $language;
 
-    // In case a fatal error occured that was not in the test process read the
+    // In case a fatal error occurred that was not in the test process read the
     // log to pick up any fatal errors.
     simpletest_log_read($this->testId, $this->databasePrefix, get_class($this), TRUE);
 

Modified: branches/upstream/current-7/modules/simpletest/tests/upgrade/upgrade.user.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/upgrade/upgrade.user.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/upgrade/upgrade.user.test (original)
+++ branches/upstream/current-7/modules/simpletest/tests/upgrade/upgrade.user.test Wed Nov  2 17:45:27 2011
@@ -26,6 +26,9 @@
   public function testUserUpgrade() {
     $this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
     $this->assertEqual(variable_get('user_mail_register_no_approval_required_body'), ', [user:name], [site:name], [site:url], [site:url-brief], [user:mail], [date:medium], [site:login-url], [user:edit-url], [user:one-time-login-url].', 'Existing email templates have been modified (password token involved).');
+    // Check that a non-md5 hash was untouched.
+    $pass = db_query('SELECT pass FROM {users} WHERE uid = 3')->fetchField();
+    $this->assertEqual('$S$DAK00p3Dkojkf4O/UizYxenguXnjv', $pass, 'Pre-existing non-MD5 password hash was not altered');
   }
 }
 

Modified: branches/upstream/current-7/modules/simpletest/tests/url_alter_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/url_alter_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/url_alter_test.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/url_alter_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 version = VERSION
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/simpletest/tests/xmlrpc_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/simpletest/tests/xmlrpc_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/simpletest/tests/xmlrpc_test.info (original)
+++ branches/upstream/current-7/modules/simpletest/tests/xmlrpc_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/statistics/statistics.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/statistics/statistics.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/statistics/statistics.info (original)
+++ branches/upstream/current-7/modules/statistics/statistics.info Wed Nov  2 17:45:27 2011
@@ -6,8 +6,8 @@
 files[] = statistics.test
 configure = admin/config/system/statistics
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/syslog/syslog.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/syslog/syslog.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/syslog/syslog.info (original)
+++ branches/upstream/current-7/modules/syslog/syslog.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 files[] = syslog.test
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/system/system.admin.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/system/system.admin.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/system/system.admin.inc (original)
+++ branches/upstream/current-7/modules/system/system.admin.inc Wed Nov  2 17:45:27 2011
@@ -19,7 +19,7 @@
       SELECT m.*, ml.*
       FROM {menu_links} ml
       INNER JOIN {menu_router} m ON ml.router_path = m.path
-      WHERE ml.link_path != 'admin/help' AND menu_name = :menu_name AND ml.plid = :mlid AND hidden = 0", $admin, array('fetch' => PDO::FETCH_ASSOC));
+      WHERE ml.link_path <> 'admin/help' AND menu_name = :menu_name AND ml.plid = :mlid AND hidden = 0", $admin, array('fetch' => PDO::FETCH_ASSOC));
     foreach ($result as $item) {
       _menu_link_translate($item);
       if (!$item['access']) {
@@ -965,7 +965,7 @@
   // Check the core compatibility.
   if (!isset($info['core']) || $info['core'] != DRUPAL_CORE_COMPATIBILITY) {
     $compatible = FALSE;
-    $status_short .= t('Incompatible with this version of Drupal core. ');
+    $status_short .= t('Incompatible with this version of Drupal core.');
     $status_long .= t('This version is not compatible with Drupal !core_version and should be replaced.', array('!core_version' => DRUPAL_CORE_COMPATIBILITY));
   }
 
@@ -1561,7 +1561,7 @@
  */
 function system_cron_settings() {
   $form['description'] = array(
-    '#markup' => '<p>'.t('Cron takes care of running periodical tasks like checking for updates and indexing content for search.').'</p>',
+    '#markup' => '<p>' . t('Cron takes care of running periodic tasks like checking for updates and indexing content for search.') . '</p>',
   );
   $form['run'] = array(
     '#type' => 'submit',
@@ -1582,7 +1582,7 @@
     '#options' => array(0 => t('Never')) + drupal_map_assoc(array(3600, 10800, 21600, 43200, 86400, 604800), 'format_interval'),
   );
 
-  return system_settings_form($form, FALSE);
+  return system_settings_form($form);
 }
 
 /**
@@ -2181,24 +2181,45 @@
  * @see system_settings_form()
  */
 function system_clean_url_settings($form, &$form_state) {
-  global $base_url;
-
-  // When accessing this form using a non-clean URL, allow a re-check to make
-  // sure clean URLs can be disabled at all times.
   $available = FALSE;
-  if (strpos(request_uri(), '?q=') === FALSE || !empty($_SESSION['clean_url'])) {
+  $conflict = FALSE;
+
+  // If the request URI is a clean URL, clean URLs must be available.
+  // Otherwise, run a test.
+  if (strpos(request_uri(), '?q=') === FALSE && strpos(request_uri(), '&q=') === FALSE) {
     $available = TRUE;
   }
   else {
-    $request = drupal_http_request($base_url . '/admin/config/search/clean-urls/check');
+    $request = drupal_http_request($GLOBALS['base_url'] . '/admin/config/search/clean-urls/check');
+    // If the request returns HTTP 200, clean URLs are available.
     if (isset($request->code) && $request->code == 200) {
       $available = TRUE;
-    }
-  }
-
-  if ($available) {
-    $_SESSION['clean_url'] = TRUE;
-
+      // If the user started the clean URL test, provide explicit feedback.
+      if (isset($form_state['input']['clean_url_test_execute'])) {
+        drupal_set_message(t('The clean URL test passed.'));
+      }
+    }
+    else {
+      // If the test failed while clean URLs are enabled, make sure clean URLs
+      // can be disabled.
+      if (variable_get('clean_url', 0)) {
+        $conflict = TRUE;
+        // Warn the user of a conflicting situation, unless after processing
+        // a submitted form.
+        if (!isset($form_state['input']['op'])) {
+          drupal_set_message(t('Clean URLs are enabled, but the clean URL test failed. Uncheck the box below to disable clean URLs.'), 'warning');
+        }
+      }
+      // If the user started the clean URL test, provide explicit feedback.
+      elseif (isset($form_state['input']['clean_url_test_execute'])) {
+        drupal_set_message(t('The clean URL test failed.'), 'warning');
+      }
+    }
+  }
+
+  // Show the enable/disable form if clean URLs are available or if the user
+  // must be able to resolve a conflicting setting.
+  if ($available || $conflict) {
     $form['clean_url'] = array(
       '#type' => 'checkbox',
       '#title' => t('Enable clean URLs'),
@@ -2206,18 +2227,37 @@
       '#description' => t('Use URLs like <code>example.com/user</code> instead of <code>example.com/?q=user</code>.'),
     );
     $form = system_settings_form($form);
-  }
+    if ($conflict) {
+      // $form_state['redirect'] needs to be set to the non-clean URL,
+      // otherwise the setting is not saved.
+      $form_state['redirect'] = url('', array('query' => array('q' => '/admin/config/search/clean-urls')));
+    }
+  }
+  // Show the clean URLs test form.
   else {
     drupal_add_js(drupal_get_path('module', 'system') . '/system.js');
 
-    $form_state['redirect'] = $base_url . '/admin/config/search/clean-urls';
+    $form_state['redirect'] = url('admin/config/search/clean-urls');
     $form['clean_url_description'] = array(
       '#type' => 'markup',
-      '#markup' => '<p>' . t('Use URLs like <code>example.com/user</code> instead of <code>example.com/?q=user</code>.') . ' ' . t('If you are directed to a <em>Page not found (404)</em> error after testing for clean URLs, see the <a href="@handbook">online handbook</a>.', array('@handbook' => 'http://drupal.org/node/15365')) . '</p>',
+      '#markup' => '<p>' . t('Use URLs like <code>example.com/user</code> instead of <code>example.com/?q=user</code>.'),
     );
-    $form['clean_url_test'] = array(
-      '#type' => 'submit',
-      '#value' => t('Run the clean URL test'),
+    // Explain why the user is seeing this page and what to expect after
+    // clicking the 'Run the clean URL test' button.
+    $form['clean_url_test_result'] = array(
+      '#type' => 'markup',
+      '#markup' => '<p>' . t('Clean URLs cannot be enabled. If you are directed to this page or to a <em>Page not found (404)</em> error after testing for clean URLs, see the <a href="@handbook">online handbook</a>.', array('@handbook' => 'http://drupal.org/node/15365')) . '</p>',
+    );
+    $form['actions'] = array(
+      '#type' => 'actions',
+      'clean_url_test' => array(
+        '#type' => 'submit',
+        '#value' => t('Run the clean URL test'),
+      ),
+    );
+    $form['clean_url_test_execute'] = array(
+      '#type' => 'hidden',
+      '#value' => 1,
     );
   }
 

Modified: branches/upstream/current-7/modules/system/system.api.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/system/system.api.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/system/system.api.php (original)
+++ branches/upstream/current-7/modules/system/system.api.php Wed Nov  2 17:45:27 2011
@@ -544,7 +544,7 @@
 
   // Long-running operation example, leveraging a queue:
   // Fetch feeds from other sites.
-  $result = db_query('SELECT * FROM {aggregator_feed} WHERE checked + refresh < :time AND refresh != :never', array(
+  $result = db_query('SELECT * FROM {aggregator_feed} WHERE checked + refresh < :time AND refresh <> :never', array(
     ':time' => REQUEST_TIME,
     ':never' => AGGREGATOR_CLEAR_NEVER,
   ));
@@ -672,8 +672,8 @@
  * page logging and specialized cleanup. This hook MUST NOT print anything.
  *
  * Only use this hook if your code must run even for cached page views.
- * If you have code which must run once on all non cached pages, use
- * hook_init instead. Thats the usual case. If you implement this hook
+ * If you have code which must run once on all non-cached pages, use
+ * hook_init() instead. That is the usual case. If you implement this hook
  * and see an error like 'Call to undefined function', it is likely that
  * you are depending on the presence of a module which has not been loaded yet.
  * It is not loaded because Drupal is still in bootstrap mode.
@@ -1053,24 +1053,24 @@
  * MENU_LOCAL_TASK. Example:
  * @code
  * // Make "Foo settings" appear on the admin Config page
- * $items['admin/config/foo'] = array(
+ * $items['admin/config/system/foo'] = array(
  *   'title' => 'Foo settings',
  *   'type' => MENU_NORMAL_ITEM,
  *   // Page callback, etc. need to be added here.
  * );
- * // Make "Global settings" the main tab on the "Foo settings" page
- * $items['admin/config/foo/global'] = array(
- *   'title' => 'Global settings',
+ * // Make "Tab 1" the main tab on the "Foo settings" page
+ * $items['admin/config/system/foo/tab1'] = array(
+ *   'title' => 'Tab 1',
  *   'type' => MENU_DEFAULT_LOCAL_TASK,
  *   // Access callback, page callback, and theme callback will be inherited
- *   // from 'admin/config/foo', if not specified here to override.
+ *   // from 'admin/config/system/foo', if not specified here to override.
  * );
- * // Make an additional tab called "Node settings" on "Foo settings"
- * $items['admin/config/foo/node'] = array(
- *   'title' => 'Node settings',
+ * // Make an additional tab called "Tab 2" on "Foo settings"
+ * $items['admin/config/system/foo/tab2'] = array(
+ *   'title' => 'Tab 2',
  *   'type' => MENU_LOCAL_TASK,
  *   // Page callback and theme callback will be inherited from
- *   // 'admin/config/foo', if not specified here to override.
+ *   // 'admin/config/system/foo', if not specified here to override.
  *   // Need to add access callback or access arguments.
  * );
  * @endcode
@@ -1744,32 +1744,36 @@
 }
 
 /**
- * Perform setup tasks. See also, hook_init.
+ * Perform setup tasks for all page requests.
  *
  * This hook is run at the beginning of the page request. It is typically
- * used to set up global parameters which are needed later in the request.
- *
- * Only use this hook if your code must run even for cached page views.This hook
- * is called before modules or most include files are loaded into memory.
+ * used to set up global parameters that are needed later in the request.
+ *
+ * Only use this hook if your code must run even for cached page views. This
+ * hook is called before modules or most include files are loaded into memory.
  * It happens while Drupal is still in bootstrap mode.
+ *
+ * @see hook_init()
  */
 function hook_boot() {
-  // we need user_access() in the shutdown function. make sure it gets loaded
+  // We need user_access() in the shutdown function. Make sure it gets loaded.
   drupal_load('module', 'user');
   drupal_register_shutdown_function('devel_shutdown');
 }
 
 /**
- * Perform setup tasks. See also, hook_boot.
+ * Perform setup tasks for non-cached page requests.
  *
  * This hook is run at the beginning of the page request. It is typically
- * used to set up global parameters which are needed later in the request.
- * when this hook is called, all modules are already loaded in memory.
+ * used to set up global parameters that are needed later in the request.
+ * When this hook is called, all modules are already loaded in memory.
  *
  * This hook is not run on cached pages.
  *
  * To add CSS or JS that should be present on all pages, modules should not
  * implement this hook, but declare these files in their .info file.
+ *
+ * @see hook_boot()
  */
 function hook_init() {
   // Since this file should only be loaded on the front page, it cannot be
@@ -1967,6 +1971,12 @@
 /**
  * Register a module (or theme's) theme implementations.
  *
+ * The implementations declared by this hook have two purposes: either they
+ * specify how a particular render array is to be rendered as HTML (this is
+ * usually the case if the theme function is assigned to the render array's
+ * #theme property), or they return the HTML that should be returned by an
+ * invocation of theme().
+ *
  * The following parameters are all optional.
  *
  * @param array $existing
@@ -1994,21 +2004,26 @@
  * @return array
  *   An associative array of theme hook information. The keys on the outer
  *   array are the internal names of the hooks, and the values are arrays
- *   containing information about the hook. Each array may contain the
- *   following elements:
- *   - variables: (required if "render element" not present) An array of
- *     variables that this theme hook uses. This value allows the theme layer
- *     to properly utilize templates. Each array key represents the name of the
- *     variable and the value will be used as the default value if it is not
- *     given when theme() is called. Template implementations receive these
- *     arguments as variables in the template file. Function implementations
- *     are passed this array data in the $variables parameter.
- *   - render element: (required if "variables" not present) A string that is
- *     the name of the sole renderable element to pass to the theme function.
- *     The string represents the name of the "variable" that will hold the
- *     renderable array inside any optional preprocess or process functions.
- *     Cannot be used with the "variables" item; only one or the other, not
- *     both, can be present in a hook's info array.
+ *   containing information about the hook. Each information array must contain
+ *   either a 'variables' element or a 'render element' element, but not both.
+ *   Use 'render element' if you are theming a single element or element tree
+ *   composed of elements, such as a form array, a page array, or a single
+ *   checkbox element. Use 'variables' if your theme implementation is
+ *   intended to be called directly through theme() and has multiple arguments
+ *   for the data and style; in this case, the variables not supplied by the
+ *   calling function will be given default values and passed to the template
+ *   or theme function. The returned theme information array can contain the
+ *   following key/value pairs:
+ *   - variables: (see above) Each array key is the name of the variable, and
+ *     the value given is used as the default value if the function calling
+ *     theme() does not supply it. Template implementations receive each array
+ *     key as a variable in the template file (so they must be legal PHP
+ *     variable names). Function implementations are passed the variables in a
+ *     single $variables function argument.
+ *   - render element: (see above) The name of the renderable element or element
+ *     tree to pass to the theme function. This name is used as the name of the
+ *     variable that holds the renderable element or tree in preprocess and
+ *     process functions.
  *   - file: The file the implementation resides in. This file will be included
  *     prior to the theme being rendered, to make sure that the function or
  *     preprocess function (as needed) is actually loaded; this makes it
@@ -2119,7 +2134,7 @@
 function hook_theme_registry_alter(&$theme_registry) {
   // Kill the next/previous forum topic navigation links.
   foreach ($theme_registry['forum_topic_navigation']['preprocess functions'] as $key => $value) {
-    if ($value = 'template_preprocess_forum_topic_navigation') {
+    if ($value == 'template_preprocess_forum_topic_navigation') {
       unset($theme_registry['forum_topic_navigation']['preprocess functions'][$key]);
     }
   }
@@ -2627,17 +2642,21 @@
 /**
  * Respond to a file being added.
  *
- * This hook is called before a file has been added to the database. The hook
+ * This hook is called after a file has been added to the database. The hook
  * doesn't distinguish between files created as a result of a copy or those
  * created by an upload.
  *
  * @param $file
- *   The file that is about to be saved.
+ *   The file that has been added.
  *
  * @see file_save()
  */
 function hook_file_insert($file) {
-
+  // Add a message to the log, if the file is a jpg
+  $validate = file_validate_extensions($file, 'jpg');
+  if (empty($validate)) {
+    watchdog('file', 'A jpg has been added.');
+  }
 }
 
 /**
@@ -2899,12 +2918,19 @@
  * more tables and their related keys and indexes. A schema is defined by
  * hook_schema() which must live in your module's .install file.
  *
- * By implementing hook_schema() and specifying the tables your module
- * declares, you can easily create and drop these tables on all
- * supported database engines. You don't have to deal with the
- * different SQL dialects for table creation and alteration of the
- * supported database engines.
- *
+ * This hook is called at both install and uninstall time, and in the latter
+ * case, it cannot rely on the .module file being loaded or hooks being known.
+ * If the .module file is needed, it may be loaded with drupal_load().
+ *
+ * The tables declared by this hook will be automatically created when
+ * the module is first enabled, and removed when the module is uninstalled.
+ * This happens before hook_install() is invoked, and after hook_uninstall()
+ * is invoked, respectively.
+ *
+ * By declaring the tables used by your module via an implementation of
+ * hook_schema(), these tables will be available on all supported database
+ * engines. You don't have to deal with the different SQL dialects for table
+ * creation and alteration of the supported database engines *
  * See the Schema API Handbook at http://drupal.org/node/146843 for
  * details on schema definition structures.
  *
@@ -3060,11 +3086,13 @@
  * If the module implements hook_schema(), the database tables will
  * be created before this hook is fired.
  *
- * This hook will only be called the first time a module is enabled or after it
+ * Implementations of this hook are by convention declared in the module's
+ * .install file. The implementation can rely on the .module file being loaded.
+ * The hook will only be called the first time a module is enabled or after it
  * is re-enabled after being uninstalled. The module's schema version will be
- * set to the module's greatest numbered update hook. Because of this, anytime a
- * hook_update_N() is added to the module, this function needs to be updated to
- * reflect the current version of the database schema.
+ * set to the module's greatest numbered update hook. Because of this, any time
+ * a hook_update_N() is added to the module, this function needs to be updated
+ * to reflect the current version of the database schema.
  *
  * See the Schema API documentation at
  * @link http://drupal.org/node/146843 http://drupal.org/node/146843 @endlink
@@ -3290,9 +3318,10 @@
  * The module should not remove its entry from the {system} table. Database
  * tables defined by hook_schema() will be removed automatically.
  *
- * The uninstall hook will fire when the module gets uninstalled but before the
- * module's database tables are removed, allowing your module to query its own
- * tables during this routine.
+ * The uninstall hook must be implemented in the module's .install file. It
+ * will fire when the module gets uninstalled but before the module's database
+ * tables are removed, allowing your module to query its own tables during
+ * this routine.
  *
  * When hook_uninstall() is called, your module will already be disabled, so
  * its .module file will not be automatically included. If you need to call API
@@ -3314,7 +3343,9 @@
 /**
  * Perform necessary actions after module is enabled.
  *
- * The hook is called every time the module is enabled.
+ * The hook is called every time the module is enabled. It should be
+ * implemented in the module's .install file. The implementation can
+ * rely on the .module file being loaded.
  *
  * @see module_enable()
  * @see hook_install()
@@ -3327,7 +3358,9 @@
 /**
  * Perform necessary actions before module is disabled.
  *
- * The hook is called every time the module is disabled.
+ * The hook is called every time the module is disabled. It should be
+ * implemented in the module's .install file. The implementation can rely
+ * on the .module file being loaded.
  *
  * @see hook_uninstall()
  * @see hook_modules_disabled()
@@ -4418,7 +4451,7 @@
 /**
  * Register information about FileTransfer classes provided by a module.
  *
- * The FileTransfer class allows transfering files over a specific type of
+ * The FileTransfer class allows transferring files over a specific type of
  * connection. Core provides classes for FTP and SSH. Contributed modules are
  * free to extend the FileTransfer base class to add other connection types,
  * and if these classes are registered via hook_filetransfer_info(), those

Modified: branches/upstream/current-7/modules/system/system.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/system/system.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/system/system.info (original)
+++ branches/upstream/current-7/modules/system/system.info Wed Nov  2 17:45:27 2011
@@ -12,8 +12,8 @@
 required = TRUE
 configure = admin/config/system
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/system/system.install
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/system/system.install?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/system/system.install (original)
+++ branches/upstream/current-7/modules/system/system.install Wed Nov  2 17:45:27 2011
@@ -2977,3 +2977,13 @@
  * @} End of "defgroup updates-6.x-to-7.x"
  * The next series of updates should start at 8000.
  */
+
+/**
+ * @defgroup updates-7.x-extra Extra system updates for 7.x
+ * @{
+ */
+
+/**
+ * @} End of "defgroup updates-7.x-extra"
+ * The next series of updates should start at 8000.
+ */

Modified: branches/upstream/current-7/modules/system/system.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/system/system.module?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/system/system.module (original)
+++ branches/upstream/current-7/modules/system/system.module Wed Nov  2 17:45:27 2011
@@ -1359,7 +1359,7 @@
     ),
   );
   $libraries['ui.mouse'] = array(
-    'title' => 'jQuery UI: Droppable',
+    'title' => 'jQuery UI: Mouse',
     'website' => 'http://docs.jquery.com/UI/Mouse',
     'version' => '1.8.7',
     'js' => array(
@@ -2912,7 +2912,7 @@
       ->condition('ml.hidden', 0, '>=')
       ->condition('ml.module', 'system')
       ->condition('m.number_parts', 1, '>')
-      ->condition('m.page_callback', 'system_admin_menu_block_page', '!=');
+      ->condition('m.page_callback', 'system_admin_menu_block_page', '<>');
     foreach ($query->execute() as $link) {
       _menu_link_translate($link);
       if ($link['access']) {

Modified: branches/upstream/current-7/modules/system/system.tar.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/system/system.tar.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/system/system.tar.inc (original)
+++ branches/upstream/current-7/modules/system/system.tar.inc Wed Nov  2 17:45:27 2011
@@ -169,7 +169,7 @@
     // }}}
 
     /**
-    * OS independant PHP extension load. Remember to take care
+    * OS independent PHP extension load. Remember to take care
     * on the correct extension name for case sensitive OSes.
     * The function is the copy of PEAR::loadExtension().
     *

Modified: branches/upstream/current-7/modules/system/system.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/system/system.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/system/system.test (original)
+++ branches/upstream/current-7/modules/system/system.test Wed Nov  2 17:45:27 2011
@@ -1816,7 +1816,7 @@
     $result = token_replace($source, array('node' => $node), array('language' => $language, 'clear' => TRUE));
     $result = $this->assertEqual($target, $result, 'Valid tokens replaced while invalid tokens cleared out.');
 
-    // Test without using the clear parameter (non-existant token untouched).
+    // Test without using the clear parameter (non-existent token untouched).
     $target .= '[user:name]';
     $target .= '[bogus:token]';
     $result = token_replace($source, array('node' => $node), array('language' => $language));

Modified: branches/upstream/current-7/modules/taxonomy/taxonomy.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/taxonomy/taxonomy.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/taxonomy/taxonomy.info (original)
+++ branches/upstream/current-7/modules/taxonomy/taxonomy.info Wed Nov  2 17:45:27 2011
@@ -8,8 +8,8 @@
 files[] = taxonomy.test
 configure = admin/structure/taxonomy
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/taxonomy/taxonomy.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/taxonomy/taxonomy.module?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/taxonomy/taxonomy.module (original)
+++ branches/upstream/current-7/modules/taxonomy/taxonomy.module Wed Nov  2 17:45:27 2011
@@ -441,7 +441,7 @@
 
   unset($vocabulary->original);
   cache_clear_all();
-  entity_get_controller('taxonomy_vocabulary')->resetCache(array($vocabulary->vid));
+  taxonomy_vocabulary_static_reset(array($vocabulary->vid));
 
   return $status;
 }
@@ -473,7 +473,7 @@
     module_invoke_all('entity_delete', $vocabulary, 'taxonomy_vocabulary');
 
     cache_clear_all();
-    entity_get_controller('taxonomy_vocabulary')->resetCache();
+    taxonomy_vocabulary_static_reset();
 
     return SAVED_DELETED;
   }
@@ -806,7 +806,7 @@
 }
 
 /**
- * Clear all static cache variables for terms..
+ * Clear all static cache variables for terms.
  */
 function taxonomy_terms_static_reset() {
   drupal_static_reset('taxonomy_term_count_nodes');
@@ -820,6 +820,17 @@
 }
 
 /**
+ * Clear all static cache variables for vocabularies.
+ *
+ * @param $ids
+ * An array of ids to reset in entity controller cache.
+ */
+function taxonomy_vocabulary_static_reset($ids = NULL) {
+  drupal_static_reset('taxonomy_vocabulary_get_names');
+  entity_get_controller('taxonomy_vocabulary')->resetCache($ids);
+}
+
+/**
  * Return an array of all vocabulary objects.
  *
  * @return
@@ -836,7 +847,12 @@
  *   An array of vocabulary ids, names, machine names, keyed by machine name.
  */
 function taxonomy_vocabulary_get_names() {
-  $names = db_query('SELECT name, machine_name, vid FROM {taxonomy_vocabulary}')->fetchAllAssoc('machine_name');
+  $names = &drupal_static(__FUNCTION__);
+
+  if (!isset($names)) {
+    $names = db_query('SELECT name, machine_name, vid FROM {taxonomy_vocabulary}')->fetchAllAssoc('machine_name');
+  }
+
   return $names;
 }
 
@@ -1049,7 +1065,7 @@
  * Provides a case-insensitive and trimmed mapping, to maximize the
  * likelihood of a successful match.
  *
- * @param name
+ * @param $name
  *   Name of the term to search for.
  *
  * @return

Modified: branches/upstream/current-7/modules/taxonomy/taxonomy.pages.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/taxonomy/taxonomy.pages.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/taxonomy/taxonomy.pages.inc (original)
+++ branches/upstream/current-7/modules/taxonomy/taxonomy.pages.inc Wed Nov  2 17:45:27 2011
@@ -14,6 +14,9 @@
  *   The page content.
  */
 function taxonomy_term_page($term) {
+  // Assign the term name as the page title.
+  drupal_set_title($term->name);
+
   // Build breadcrumb based on the hierarchy of the term.
   $current = (object) array(
     'tid' => $term->tid,

Modified: branches/upstream/current-7/modules/toolbar/toolbar.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/toolbar/toolbar.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/toolbar/toolbar.info (original)
+++ branches/upstream/current-7/modules/toolbar/toolbar.info Wed Nov  2 17:45:27 2011
@@ -4,8 +4,8 @@
 package = Core
 version = VERSION
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/tracker/tracker.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/tracker/tracker.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/tracker/tracker.info (original)
+++ branches/upstream/current-7/modules/tracker/tracker.info Wed Nov  2 17:45:27 2011
@@ -6,8 +6,8 @@
 core = 7.x
 files[] = tracker.test
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/translation/tests/translation_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/translation/tests/translation_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/translation/tests/translation_test.info (original)
+++ branches/upstream/current-7/modules/translation/tests/translation_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 version = VERSION
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/translation/translation.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/translation/translation.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/translation/translation.info (original)
+++ branches/upstream/current-7/modules/translation/translation.info Wed Nov  2 17:45:27 2011
@@ -6,8 +6,8 @@
 core = 7.x
 files[] = translation.test
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/trigger/tests/trigger_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/trigger/tests/trigger_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/trigger/tests/trigger_test.info (original)
+++ branches/upstream/current-7/modules/trigger/tests/trigger_test.info Wed Nov  2 17:45:27 2011
@@ -4,8 +4,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/trigger/trigger.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/trigger/trigger.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/trigger/trigger.info (original)
+++ branches/upstream/current-7/modules/trigger/trigger.info Wed Nov  2 17:45:27 2011
@@ -6,8 +6,8 @@
 files[] = trigger.test
 configure = admin/structure/trigger
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/update/tests/aaa_update_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/update/tests/aaa_update_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/update/tests/aaa_update_test.info (original)
+++ branches/upstream/current-7/modules/update/tests/aaa_update_test.info Wed Nov  2 17:45:27 2011
@@ -4,8 +4,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/update/tests/bbb_update_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/update/tests/bbb_update_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/update/tests/bbb_update_test.info (original)
+++ branches/upstream/current-7/modules/update/tests/bbb_update_test.info Wed Nov  2 17:45:27 2011
@@ -4,8 +4,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/update/tests/ccc_update_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/update/tests/ccc_update_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/update/tests/ccc_update_test.info (original)
+++ branches/upstream/current-7/modules/update/tests/ccc_update_test.info Wed Nov  2 17:45:27 2011
@@ -4,8 +4,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/update/tests/update_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/update/tests/update_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/update/tests/update_test.info (original)
+++ branches/upstream/current-7/modules/update/tests/update_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/update/tests/update_test.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/update/tests/update_test.module?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/update/tests/update_test.module (original)
+++ branches/upstream/current-7/modules/update/tests/update_test.module Wed Nov  2 17:45:27 2011
@@ -9,6 +9,12 @@
   $items['update-test'] = array(
     'title' => t('Update test'),
     'page callback' => 'update_test_mock_page',
+    'access callback' => TRUE,
+    'type' => MENU_CALLBACK,
+  );
+  $items['503-error'] = array(
+    'title' => t('503 Service unavailable'),
+    'page callback' => 'update_callback_service_unavailable',
     'access callback' => TRUE,
     'type' => MENU_CALLBACK,
   );
@@ -148,3 +154,11 @@
     return $form;
   }
 }
+
+/**
+ * Return an Error 503 (Service unavailable) page.
+ */
+function update_callback_service_unavailable() {
+  drupal_add_http_header('Status', '503 Service unavailable');
+  print "503 Service Temporarily Unavailable";
+}

Modified: branches/upstream/current-7/modules/update/update.fetch.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/update/update.fetch.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/update/update.fetch.inc (original)
+++ branches/upstream/current-7/modules/update/update.fetch.inc Wed Nov  2 17:45:27 2011
@@ -143,7 +143,7 @@
 
   if (empty($fail[$fetch_url_base]) || $fail[$fetch_url_base] < $max_fetch_attempts) {
     $xml = drupal_http_request($url);
-    if (isset($xml->data)) {
+    if (!isset($xml->error) && isset($xml->data)) {
       $data = $xml->data;
     }
   }

Modified: branches/upstream/current-7/modules/update/update.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/update/update.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/update/update.info (original)
+++ branches/upstream/current-7/modules/update/update.info Wed Nov  2 17:45:27 2011
@@ -6,8 +6,8 @@
 files[] = update.test
 configure = admin/reports/updates/settings
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/update/update.manager.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/update/update.manager.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/update/update.manager.inc (original)
+++ branches/upstream/current-7/modules/update/update.manager.inc Wed Nov  2 17:45:27 2011
@@ -162,10 +162,16 @@
     $needs_manual = $project['project_type'] == 'core';
 
     if ($needs_manual) {
-      // Since it won't be tableselect, #weight will add an extra column to the
-      // table if it's defined, so just unset it. The order doesn't matter that
-      // much in the manual updates table, anyway.
+      // There are no checkboxes in the 'Manual updates' table so it will be
+      // rendered by theme('table'), not theme('tableselect'). Since the data
+      // formats are incompatible, we convert now to the format expected by
+      // theme('table').
       unset($entry['#weight']);
+      $attributes = $entry['#attributes'];
+      unset($entry['#attributes']);
+      $entry = array(
+        'data' => $entry,
+      ) + $attributes;
     }
     else {
       $form['project_downloads'][$name] = array(

Modified: branches/upstream/current-7/modules/update/update.test
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/update/update.test?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/update/update.test (original)
+++ branches/upstream/current-7/modules/update/update.test Wed Nov  2 17:45:27 2011
@@ -13,7 +13,7 @@
  * dummy .info file data (specified via hook_system_info_alter() in the
  * update_test helper module) describing what's currently installed.  Each
  * test case defines a set of projects to install, their current state (via
- * the 'update_test_system_info' variable) and the desired availabile update
+ * the 'update_test_system_info' variable) and the desired available update
  * data (via the 'update_test_xml_map' variable), and then performs a series
  * of assertions that the report matches our expectations given the specific
  * initial state and availability scenario.
@@ -32,9 +32,9 @@
    *
    * @see update_test_mock_page()
    */
-  protected function refreshUpdateStatus($xml_map) {
+  protected function refreshUpdateStatus($xml_map, $url = 'update-test') {
     // Tell update module to fetch from the URL provided by update_test module.
-    variable_set('update_fetch_url', url('update-test', array('absolute' => TRUE)));
+    variable_set('update_fetch_url', url($url, array('absolute' => TRUE)));
     // Save the map for update_test_mock_page() to use.
     variable_set('update_test_xml_map', $xml_map);
     // Manually check the update status.
@@ -213,6 +213,16 @@
 
     $this->drupalGet('admin/reports/updates/settings');
     $this->assertNoText(t('There is a security update available for your version of Drupal.'));
+  }
+
+  /**
+   * Tests the update module when the update server returns 503 (Service unavailable) errors.
+   */
+  function testServiceUnavailable() {
+    $this->refreshUpdateStatus(array(), '503-error');
+    // Ensure that no "Warning: SimpleXMLElement..." parse errors are found.
+    $this->assertNoText('SimpleXMLElement');
+    $this->assertUniqueText(t('Failed to get available update data for one project.'));
   }
 
   protected function setSystemInfo7_0() {

Modified: branches/upstream/current-7/modules/user/tests/user_form_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/user/tests/user_form_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/user/tests/user_form_test.info (original)
+++ branches/upstream/current-7/modules/user/tests/user_form_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/user/user-profile-category.tpl.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/user/user-profile-category.tpl.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/user/user-profile-category.tpl.php (original)
+++ branches/upstream/current-7/modules/user/user-profile-category.tpl.php Wed Nov  2 17:45:27 2011
@@ -24,7 +24,7 @@
  * @see template_preprocess_user_profile_category()
  */
 ?>
-<?php if ($title) : ?>
+<?php if ($title): ?>
   <h3><?php print $title; ?></h3>
 <?php endif; ?>
 

Modified: branches/upstream/current-7/modules/user/user-profile.tpl.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/user/user-profile.tpl.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/user/user-profile.tpl.php (original)
+++ branches/upstream/current-7/modules/user/user-profile.tpl.php Wed Nov  2 17:45:27 2011
@@ -8,21 +8,21 @@
  * e.g., example.com/user/123. 123 being the users ID.
  *
  * Use render($user_profile) to print all profile items, or print a subset
- * such as render($content['field_example']). Always call render($user_profile)
- * at the end in order to print all remaining items. If the item is a category,
- * it will contain all its profile items. By default, $user_profile['summary']
- * is provided which contains data on the user's history. Other data can be
- * included by modules. $user_profile['user_picture'] is available
- * for showing the account picture.
+ * such as render($user_profile['user_picture']). Always call
+ * render($user_profile) at the end in order to print all remaining items. If
+ * the item is a category, it will contain all its profile items. By default,
+ * $user_profile['summary'] is provided, which contains data on the user's
+ * history. Other data can be included by modules. $user_profile['user_picture']
+ * is available for showing the account picture.
  *
  * Available variables:
  *   - $user_profile: An array of profile items. Use render() to print them.
  *   - Field variables: for each field instance attached to the user a
- *     corresponding variable is defined; e.g., $user->field_example has a
+ *     corresponding variable is defined; e.g., $account->field_example has a
  *     variable $field_example defined. When needing to access a field's raw
  *     values, developers/themers are strongly encouraged to use these
  *     variables. Otherwise they will have to explicitly specify the desired
- *     field language, e.g. $user->field_example['en'], thus overriding any
+ *     field language, e.g. $account->field_example['en'], thus overriding any
  *     language negotiation rule that was previously applied.
  *
  * @see user-profile-category.tpl.php

Modified: branches/upstream/current-7/modules/user/user.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/user/user.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/user/user.info (original)
+++ branches/upstream/current-7/modules/user/user.info Wed Nov  2 17:45:27 2011
@@ -9,8 +9,8 @@
 configure = admin/config/people
 stylesheets[all][] = user.css
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/modules/user/user.install
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/user/user.install?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/user/user.install (original)
+++ branches/upstream/current-7/modules/user/user.install Wed Nov  2 17:45:27 2011
@@ -428,6 +428,13 @@
     $result = db_query_range("SELECT uid, pass FROM {users} WHERE uid > 0 ORDER BY uid", $sandbox['user_from'], $count);
     foreach ($result as $account) {
       $has_rows = TRUE;
+
+      // If the $account->pass value is not a MD5 hash (a 32 character
+      // hexadecimal string) then skip it.
+      if (!preg_match('/^[0-9a-f]{32}$/', $account->pass)) {
+        continue;
+      }
+
       $new_hash = user_hash_password($account->pass, $hash_count_log2);
       if ($new_hash) {
         // Indicate an updated password.

Modified: branches/upstream/current-7/modules/user/user.module
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/user/user.module?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/user/user.module (original)
+++ branches/upstream/current-7/modules/user/user.module Wed Nov  2 17:45:27 2011
@@ -211,19 +211,19 @@
   $return['user']['user'] = array(
     'form' => array(
       'account' => array(
-        'label' => 'User name and password',
-        'description' => t('User module account form elements'),
+        'label' => t('User name and password'),
+        'description' => t('User module account form elements.'),
         'weight' => -10,
       ),
       'timezone' => array(
-        'label' => 'Timezone',
+        'label' => t('Timezone'),
         'description' => t('User module timezone form element.'),
         'weight' => 6,
       ),
     ),
     'display' => array(
       'summary' => array(
-        'label' => 'History',
+        'label' => t('History'),
         'description' => t('User module history view element.'),
         'weight' => 5,
       ),
@@ -1007,6 +1007,7 @@
 
   // Account information.
   $form['account'] = array(
+    '#type'   => 'container',
     '#weight' => -10,
   );
   // Only show name field on registration form or user can change own username.
@@ -1065,6 +1066,7 @@
         '#access' => !empty($protected_values),
         '#description' => $current_pass_description,
         '#weight' => -5,
+        '#attributes' => array('autocomplete' => 'off'),
       );
       $form['#validate'][] = 'user_validate_current_pass';
     }

Modified: branches/upstream/current-7/modules/user/user.pages.inc
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/modules/user/user.pages.inc?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/modules/user/user.pages.inc (original)
+++ branches/upstream/current-7/modules/user/user.pages.inc Wed Nov  2 17:45:27 2011
@@ -76,9 +76,11 @@
 
   $account = $form_state['values']['account'];
   // Mail one time login URL and instructions using current language.
-  _user_mail_notify('password_reset', $account, $language);
-  watchdog('user', 'Password reset instructions mailed to %name at %email.', array('%name' => $account->name, '%email' => $account->mail));
-  drupal_set_message(t('Further instructions have been sent to your e-mail address.'));
+  $mail = _user_mail_notify('password_reset', $account, $language);
+  if (!empty($mail)) {
+    watchdog('user', 'Password reset instructions mailed to %name at %email.', array('%name' => $account->name, '%email' => $account->mail));
+    drupal_set_message(t('Further instructions have been sent to your e-mail address.'));
+  }
 
   $form_state['redirect'] = 'user';
   return;

Modified: branches/upstream/current-7/profiles/minimal/minimal.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/profiles/minimal/minimal.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/profiles/minimal/minimal.info (original)
+++ branches/upstream/current-7/profiles/minimal/minimal.info Wed Nov  2 17:45:27 2011
@@ -6,8 +6,8 @@
 dependencies[] = dblog
 files[] = minimal.profile
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/profiles/standard/standard.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/profiles/standard/standard.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/profiles/standard/standard.info (original)
+++ branches/upstream/current-7/profiles/standard/standard.info Wed Nov  2 17:45:27 2011
@@ -25,8 +25,8 @@
 dependencies[] = rdf
 files[] = standard.profile
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/profiles/testing/modules/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/profiles/testing/modules/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/profiles/testing/modules/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info (original)
+++ branches/upstream/current-7/profiles/testing/modules/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/profiles/testing/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/profiles/testing/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/profiles/testing/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info (original)
+++ branches/upstream/current-7/profiles/testing/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info Wed Nov  2 17:45:27 2011
@@ -8,8 +8,8 @@
 core = 6.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/profiles/testing/testing.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/profiles/testing/testing.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/profiles/testing/testing.info (original)
+++ branches/upstream/current-7/profiles/testing/testing.info Wed Nov  2 17:45:27 2011
@@ -4,8 +4,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/scripts/generate-d6-content.sh
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/scripts/generate-d6-content.sh?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/scripts/generate-d6-content.sh (original)
+++ branches/upstream/current-7/scripts/generate-d6-content.sh Wed Nov  2 17:45:27 2011
@@ -75,7 +75,7 @@
   $vocabulary['weight'] = $i;
   taxonomy_save_vocabulary($vocabulary);
   $parents = array();
-  // Vocabularies without hierarcy get one term, single parent vocabularies get
+  // Vocabularies without hierarchy get one term, single parent vocabularies get
   // one parent and one child term. Multiple parent vocabularies get three
   // terms: t0, t1, t2 where t0 is a parent of both t1 and t2.
   for ($j = 0; $j < $vocabulary['hierarchy'] + 1; $j++) {

Modified: branches/upstream/current-7/scripts/run-tests.sh
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/scripts/run-tests.sh?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/scripts/run-tests.sh (original)
+++ branches/upstream/current-7/scripts/run-tests.sh Wed Nov  2 17:45:27 2011
@@ -67,6 +67,8 @@
   exit;
 }
 
+$test_list = simpletest_script_get_test_list();
+
 // Try to allocate unlimited time to run the tests.
 drupal_set_time_limit(0);
 
@@ -122,7 +124,7 @@
   --clean     Cleans up database tables or directories from previous, failed,
               tests and then exits (no tests are run).
 
-  --url       Immediately preceeds a URL to set the host and path. You will
+  --url       Immediately precedes a URL to set the host and path. You will
               need this parameter if Drupal is in a subdirectory on your
               localhost and you have not set \$base_url in settings.php. Tests
               can be run under SSL by including https:// in the URL.
@@ -485,12 +487,13 @@
     echo "\n";
   }
 
-  echo "Test run started: " . format_date($_SERVER['REQUEST_TIME'], 'long') . "\n";
+  echo "Test run started:\n";
+  echo " " . format_date($_SERVER['REQUEST_TIME'], 'long') . "\n";
   timer_start('run-tests');
   echo "\n";
 
-  echo "Test summary:\n";
-  echo "-------------\n";
+  echo "Test summary\n";
+  echo "------------\n";
   echo "\n";
 }
 
@@ -571,7 +574,7 @@
   echo "\n";
   $end = timer_stop('run-tests');
   echo "Test run duration: " . format_interval($end['time'] / 1000);
-  echo "\n";
+  echo "\n\n";
 }
 
 /**

Modified: branches/upstream/current-7/sites/default/default.settings.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/sites/default/default.settings.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/sites/default/default.settings.php (original)
+++ branches/upstream/current-7/sites/default/default.settings.php Wed Nov  2 17:45:27 2011
@@ -22,19 +22,19 @@
  * http://www.drupal.org/mysite/test/, the 'settings.php'
  * is searched in the following directories:
  *
- *  1. sites/www.drupal.org.mysite.test
- *  2. sites/drupal.org.mysite.test
- *  3. sites/org.mysite.test
- *
- *  4. sites/www.drupal.org.mysite
- *  5. sites/drupal.org.mysite
- *  6. sites/org.mysite
- *
- *  7. sites/www.drupal.org
- *  8. sites/drupal.org
- *  9. sites/org
- *
- * 10. sites/default
+ * - sites/www.drupal.org.mysite.test
+ * - sites/drupal.org.mysite.test
+ * - sites/org.mysite.test
+ *
+ * - sites/www.drupal.org.mysite
+ * - sites/drupal.org.mysite
+ * - sites/org.mysite
+ *
+ * - sites/www.drupal.org
+ * - sites/drupal.org
+ * - sites/org
+ *
+ * - sites/default
  *
  * If you are installing on a non-standard port number, prefix the
  * hostname with that number. For example,
@@ -285,9 +285,10 @@
  * same Drupal site, you can either redirect them all to a single domain (see
  * comment in .htaccess), or uncomment the line below and specify their shared
  * base domain. Doing so assures that users remain logged in as they cross
- * between your various domains.
- */
-# $cookie_domain = 'example.com';
+ * between your various domains. Make sure to always start the $cookie_domain
+ * with a leading dot, as per RFC 2109.
+ */
+# $cookie_domain = '.example.com';
 
 /**
  * Variable overrides:
@@ -321,41 +322,49 @@
 # $conf['maintenance_theme'] = 'bartik';
 
 /**
- * Enable this setting to determine the correct IP address of the remote
- * client by examining information stored in the X-Forwarded-For headers.
- * X-Forwarded-For headers are a standard mechanism for identifying client
- * systems connecting through a reverse proxy server, such as Squid or
- * Pound. Reverse proxy servers are often used to enhance the performance
+ * Reverse Proxy Configuration:
+ *
+ * Reverse proxy servers are often used to enhance the performance
  * of heavily visited sites and may also provide other site caching,
- * security or encryption benefits. If this Drupal installation operates
- * behind a reverse proxy, this setting should be enabled so that correct
- * IP address information is captured in Drupal's session management,
- * logging, statistics and access management systems; if you are unsure
- * about this setting, do not have a reverse proxy, or Drupal operates in
- * a shared hosting environment, this setting should remain commented out.
+ * security, or encryption benefits. In an environment where Drupal
+ * is behind a reverse proxy, the real IP address of the client should
+ * be determined such that the correct client IP address is available
+ * to Drupal's logging, statistics, and access management systems. In
+ * the most simple scenario, the proxy server will add an
+ * X-Forwarded-For header to the request that contains the client IP
+ * address. However, HTTP headers are vulnerable to spoofing, where a
+ * malicious client could bypass restrictions by setting the
+ * X-Forwarded-For header directly. Therefore, Drupal's proxy
+ * configuration requires the IP addresses of all remote proxies to be
+ * specified in $conf['reverse_proxy_addresses'] to work correctly.
+ *
+ * Enable this setting to get Drupal to determine the client IP from
+ * the X-Forwarded-For header (or $conf['reverse_proxy_header'] if set).
+ * If you are unsure about this setting, do not have a reverse proxy,
+ * or Drupal operates in a shared hosting environment, this setting
+ * should remain commented out.
+ *
+ * In order for this setting to be used you must specify every possible
+ * reverse proxy IP address in $conf['reverse_proxy_addresses'].
+ * If a complete list of reverse proxies is not available in your
+ * environment (for example, if you use a CDN) you may set the
+ * $_SERVER['REMOTE_ADDR'] variable directly in settings.php.
+ * Be aware, however, that it is likely that this would allow IP
+ * address spoofing unless more advanced precautions are taken.
  */
 # $conf['reverse_proxy'] = TRUE;
 
 /**
- * Set this value if your proxy server sends the client IP in a header other
- * than X-Forwarded-For.
- *
- * The "X-Forwarded-For" header is a comma+space separated list of IP addresses,
- * only the last one (the left-most) will be used.
+ * Specify every reverse proxy IP address in your environment.
+ * This setting is required if $conf['reverse_proxy'] is TRUE.
+ */
+# $conf['reverse_proxy_addresses'] = array('a.b.c.d', ...);
+
+/**
+ * Set this value if your proxy server sends the client IP in a header
+ * other than X-Forwarded-For.
  */
 # $conf['reverse_proxy_header'] = 'HTTP_X_CLUSTER_CLIENT_IP';
-
-/**
- * reverse_proxy accepts an array of IP addresses.
- *
- * Each element of this array is the IP address of any of your reverse
- * proxies. Filling this array Drupal will trust the information stored
- * in the X-Forwarded-For headers only if Remote IP address is one of
- * these, that is the request reaches the web server from one of your
- * reverse proxies. Otherwise, the client could directly connect to
- * your web server spoofing the X-Forwarded-For headers.
- */
-# $conf['reverse_proxy_addresses'] = array('a.b.c.d', ...);
 
 /**
  * Page caching:
@@ -428,6 +437,42 @@
 # );
 
 /**
+ * Fast 404 pages:
+ *
+ * Drupal can generate fully themed 404 pages. However, some of these responses
+ * are for images or other resource files that are not displayed to the user.
+ * This can waste bandwidth, and also generate server load.
+ *
+ * The options below return a simple, fast 404 page for URLs matching a
+ * specific pattern:
+ * - 404_fast_paths_exclude: A regular expression to match paths to exclude,
+ *   such as images generated by image styles, or dynamically-resized images.
+ *   If you need to add more paths, you can add '|path' to the expression.
+ * - 404_fast_paths: A regular expression to match paths that should return a
+ *   simple 404 page, rather than the fully themed 404 page. If you don't have
+ *   any aliases ending in htm or html you can add '|s?html?' to the expression.
+ * - 404_fast_html: The html to return for simple 404 pages.
+ *
+ * Add leading hash signs if you would like to disable this functionality.
+ */
+$conf['404_fast_paths_exclude'] = '/\/(?:styles)\//';
+$conf['404_fast_paths'] = '/\.(?:txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i';
+$conf['404_fast_html'] = '<html xmlns="http://www.w3.org/1999/xhtml"><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL "@path" was not found on this server.</p></body></html>';
+
+/**
+ * By default, fast 404s are returned as part of the normal page request
+ * process, which will properly serve valid pages that happen to match and will
+ * also log actual 404s to the Drupal log. Alternatively you can choose to
+ * return a 404 now by uncommenting the following line. This will reduce server
+ * load, but will cause even valid pages that happen to match the pattern to
+ * return 404s, rather than the actual page. It will also prevent the Drupal
+ * system log entry. Ensure you understand the effects of this before enabling.
+ *
+ * To enable this functionality, remove the leading hash sign below.
+ */
+# drupal_fast_404();
+
+/**
  * Authorized file system operations:
  *
  * The Update manager module included with Drupal provides a mechanism for

Modified: branches/upstream/current-7/themes/bartik/bartik.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/themes/bartik/bartik.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/themes/bartik/bartik.info (original)
+++ branches/upstream/current-7/themes/bartik/bartik.info Wed Nov  2 17:45:27 2011
@@ -34,8 +34,8 @@
 settings[shortcut_module_link] = 0
 
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/themes/garland/comment.tpl.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/themes/garland/comment.tpl.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/themes/garland/comment.tpl.php (original)
+++ branches/upstream/current-7/themes/garland/comment.tpl.php Wed Nov  2 17:45:27 2011
@@ -6,7 +6,7 @@
 
     <span class="submitted"><?php print $submitted ?></span>
 
-  <?php if ($new) : ?>
+  <?php if ($new): ?>
     <span class="new"><?php print drupal_ucfirst($new) ?></span>
   <?php endif; ?>
 

Modified: branches/upstream/current-7/themes/garland/garland.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/themes/garland/garland.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/themes/garland/garland.info (original)
+++ branches/upstream/current-7/themes/garland/garland.info Wed Nov  2 17:45:27 2011
@@ -7,8 +7,8 @@
 stylesheets[print][] = print.css
 settings[garland_width] = fluid
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/themes/seven/reset.css
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/themes/seven/reset.css?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/themes/seven/reset.css (original)
+++ branches/upstream/current-7/themes/seven/reset.css Wed Nov  2 17:45:27 2011
@@ -110,11 +110,6 @@
 .item-list .pager li,
 .pager-current,
 .tips,
-dl.multiselect dd,
-dl.multiselect dd .form-item,
-dl.multiselect dd select,
-dl.multiselect dt,
-dl.multiselect .form-item,
 ul.primary,
 ul.primary li,
 ul.primary li a,

Modified: branches/upstream/current-7/themes/seven/seven.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/themes/seven/seven.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/themes/seven/seven.info (original)
+++ branches/upstream/current-7/themes/seven/seven.info Wed Nov  2 17:45:27 2011
@@ -13,8 +13,8 @@
 regions[sidebar_first] = First sidebar
 regions_hidden[] = sidebar_first
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/themes/seven/style-rtl.css
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/themes/seven/style-rtl.css?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/themes/seven/style-rtl.css (original)
+++ branches/upstream/current-7/themes/seven/style-rtl.css Wed Nov  2 17:45:27 2011
@@ -8,7 +8,6 @@
 }
 ul,
 .block ul,
-.item-list ul,
 .item-list ul {
   margin: 0.25em 1.5em 0.25em 0;
 }
@@ -177,13 +176,6 @@
   background-position: right center;
 }
 
-/* admin/content and admin/people */
-dl.multiselect,
-dl.multiselect dt,
-dl.multiselect dd {
-  margin: 0 0 0 10px;
-}
-
 /* Update options. */
 div.admin-options label,
 div.admin-options div.form-item {

Modified: branches/upstream/current-7/themes/seven/style.css
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/themes/seven/style.css?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/themes/seven/style.css (original)
+++ branches/upstream/current-7/themes/seven/style.css Wed Nov  2 17:45:27 2011
@@ -100,11 +100,13 @@
 }
 ul,
 .block ul,
-.item-list ul,
 .item-list ul {
   list-style-type: disc;
   list-style-image: none;
   margin: 0.25em 0 0.25em 1.5em; /* LTR */
+}
+.item-list .pager li {
+  padding: 0.5em;
 }
 .item-list ul li,
 li.leaf,
@@ -316,7 +318,7 @@
 }
 ul.secondary li {
   margin: 0 5px;
-  float: right; /* LTR */
+  float: none; /* LTR */
 }
 ul.secondary li a {
   background-color: #ddd;
@@ -599,10 +601,8 @@
   padding: 0;
 }
 .form-item label.option {
+  font-size: 0.923em;
   text-transform: none;
-}
-.form-item label.option {
-  font-size: 0.923em;
 }
 .form-item label.option input {
   vertical-align: middle;
@@ -772,19 +772,6 @@
   margin-top: 0;
 }
 
-/* admin/content and admin/people */
-dl.multiselect,
-dl.multiselect dt,
-dl.multiselect dd {
-  margin: 0 10px 0 0; /* LTR */
-}
-dl.multiselect select,
-dl.multiselect dd select {
-  font-size: 0.923em;
-  background: #fff;
-  border: 1px solid #ccc;
-}
-
 /* Update options. */
 div.admin-options {
   background: #f8f8f8;

Modified: branches/upstream/current-7/themes/stark/stark.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/themes/stark/stark.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/themes/stark/stark.info (original)
+++ branches/upstream/current-7/themes/stark/stark.info Wed Nov  2 17:45:27 2011
@@ -5,8 +5,8 @@
 core = 7.x
 stylesheets[all][] = layout.css
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/themes/tests/test_theme/test_theme.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/themes/tests/test_theme/test_theme.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/themes/tests/test_theme/test_theme.info (original)
+++ branches/upstream/current-7/themes/tests/test_theme/test_theme.info Wed Nov  2 17:45:27 2011
@@ -15,8 +15,8 @@
 ; file within the theme folder.
 stylesheets[all][] = system.base.css
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/themes/tests/update_test_basetheme/update_test_basetheme.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/themes/tests/update_test_basetheme/update_test_basetheme.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/themes/tests/update_test_basetheme/update_test_basetheme.info (original)
+++ branches/upstream/current-7/themes/tests/update_test_basetheme/update_test_basetheme.info Wed Nov  2 17:45:27 2011
@@ -3,8 +3,8 @@
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/themes/tests/update_test_subtheme/update_test_subtheme.info
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/themes/tests/update_test_subtheme/update_test_subtheme.info?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/themes/tests/update_test_subtheme/update_test_subtheme.info (original)
+++ branches/upstream/current-7/themes/tests/update_test_subtheme/update_test_subtheme.info Wed Nov  2 17:45:27 2011
@@ -4,8 +4,8 @@
 base theme = update_test_basetheme
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2011-08-31
-version = "7.8"
+; Information added by drupal.org packaging script on 2011-10-26
+version = "7.9"
 project = "drupal"
-datestamp = "1314817616"
+datestamp = "1319660730"
 

Modified: branches/upstream/current-7/update.php
URL: http://svn.debian.org/wsvn/pkg-drupal/branches/upstream/current-7/update.php?rev=2238&op=diff
==============================================================================
--- branches/upstream/current-7/update.php (original)
+++ branches/upstream/current-7/update.php Wed Nov  2 17:45:27 2011
@@ -456,7 +456,7 @@
   $output = update_access_denied_page();
 }
 if (isset($output) && $output) {
-  // Explictly start a session so that the update.php token will be accepted.
+  // Explicitly start a session so that the update.php token will be accepted.
   drupal_session_start();
   // We defer the display of messages until all updates are done.
   $progress_page = ($batch = batch_get()) && isset($batch['running']);




More information about the Pkg-drupal-commits mailing list