diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index b4beae31ebf665d23168ee933f4e49bb5c02a2aa..94522f5aaed35e2fe3abf500b95fd545fc0d6922 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,4 +1,67 @@
 
+Drupal 7.17, 2012-11-07
+-----------------------
+- Changed the default value of the '404_fast_html' variable to have a DOCTYPE
+  declaration.
+- Made it possible to use associative arrays for the 'items' variable in
+  theme_item_list().
+- Fixed a bug which prevented required form elements without a title from being
+  given an "error" class when the form fails validation.
+- Prevented duplicate HTML IDs from appearing when two forms are displayed on
+  the same page and one of them is submitted with invalid data (minor markup
+  change).
+- Fixed a bug which prevented Drupal 6 to Drupal 7 upgrades on sites which had
+  stale data in the Upload module's database tables.
+- Fixed a bug in the States API which prevented certain types of form elements
+  from being disabled when requested.
+- Allowed aggregator feed items with author names longer than 255 characters to
+  have a truncated version saved to the database (rather than causing a fatal
+  error).
+- Allowed aggregator feed items to have URLs longer than 255 characters
+  (schema change which results in several columns in the Aggregator module's
+  database tables changing from VARCHAR to TEXT fields).
+- Added hook_taxonomy_term_view() and standardized the process for rendering
+  taxonomy terms to invoke hook_entity_view() and otherwise make it consistent
+  with other entities (API change: http://drupal.org/node/1808870).
+- Added hook_entity_view_mode_alter() to allow modules to change entity view
+  modes on display (API addition: http://drupal.org/node/1833086).
+- Fixed a bug which made database queries running a "LIKE" query on blob fields
+  fail on PostgreSQL databases. This caused errors during the Drupal 6 to
+  Drupal 7 upgrade.
+- Changed the hook_menu() entry for Drupal's rss.xml page to prevent extra path
+  components from being accidentally passed to the page callback function (data
+  structure change).
+- Removed a non-standard "name" attribute from Drupal's default Content-Type
+  header for file downloads.
+- Fixed the theme settings form to properly clean up submitted values in
+  $form_state['values'] when the form is submitted (data structure change).
+- Fixed an inconsistency by removing the colon from the end of the label on
+  multi-valued form fields (minor string change).
+- Added support for 'weight' in hook_field_widget_info() to allow modules to
+  control the order in which widgets are displayed in the Field UI.
+- Updated various tables in the OpenID and Book modules to use the default
+  "empty table" text pattern (string change).
+- Added proxy server support to drupal_http_request().
+- Added "lang" attributes to language links, to better support screen readers.
+- Fixed double occurrence of a "ul" HTML tag on secondary local tasks in the
+  Seven theme (markup change).
+- Fixed bugs which caused taxonomy vocabulary and shortcut set titles to be
+  double-escaped. The fix replaces the taxonomy vocabulary overview page and
+  "Edit shortcuts" menu items' title callback entries in hook_menu() with new
+  functions that do not escape HTML characters (data structure change).
+- Modified the Update manager module to allow drupal.org to collect usage
+  statistics for individual modules and themes, rather than only for entire
+  projects.
+- Modified the node listing database query on Drupal's default front page to
+  add table aliases for better query altering (this is a data structure change
+  affecting code which implements hook_query_alter() on this query).
+- Improved the translatability of the "Field type(s) in use" message on the
+  modules page (admin-facing string change).
+- Fixed a regression which caused a "call to undefined function
+  drupal_find_base_themes()" fatal error under rare circumstances.
+- Numerous API documentation improvements.
+- Additional automated test coverage.
+
 Drupal 7.16, 2012-10-17
 -----------------------
 - Fixed security issues (Arbitrary PHP code execution and information
@@ -315,8 +378,8 @@ Drupal 7.0, 2011-01-05
       order can now be customized using the Views module.
     * Removed the 'related terms' feature from taxonomy module since this can
       now be achieved with Field API.
-    * Added additional features to the default install profile, and implemented
-      a "slimmed down" install profile designed for developers.
+    * Added additional features to the default installation profile, and
+      implemented a "slimmed down" profile designed for developers.
     * Added a built-in, automated cron run feature, which is triggered by site
       visitors.
     * Added an administrator role which is assigned all permissions for
@@ -543,7 +606,7 @@ Drupal 6.16, 2010-03-03
   see SA-CORE-2010-001.
 - Better support for updated jQuery versions.
 - Reduced resource usage of update.module.
-- Fixed several issues relating to support of install profiles and
+- Fixed several issues relating to support of installation profiles and
   distributions.
 - Added a locking framework to avoid data corruption on long operations.
 - Fixed a variety of other bugs.
@@ -661,7 +724,7 @@ Drupal 6.0, 2008-02-13
    * Expands the severity levels from 3 (Error, Warning, Notice) to the 8
      levels defined in RFC 3164.
    * The watchdog module is now called dblog, and is optional, but enabled by
-     default in the default install profile.
+     default in the default installation profile.
    * Extended the database log module so log messages can be filtered.
    * Added syslog module: useful for monitoring large Drupal installations.
 - Added optional e-mail notifications when users are approved, blocked, or
@@ -716,7 +779,7 @@ Drupal 6.0, 2008-02-13
     * Themed the installer with the Garland theme.
     * Added form to provide initial site information during installation.
     * Added ability to provide extra installation steps programmatically.
-    * Made it possible to import interface translations at install time.
+    * Made it possible to import interface translations during installation.
 - Added the HTML corrector filter:
     * Fixes faulty and chopped off HTML in postings.
     * Tags are now automatically closed at the end of the teaser.
@@ -895,7 +958,7 @@ Drupal 5.0, 2007-01-15
 - Added web-based installer which can:
     * Check installation and run-time requirements
     * Automatically generate the database configuration file
-    * Install pre-made 'install profiles' or distributions
+    * Install pre-made installation profiles or distributions
     * Import the database structure with automatic table prefixing
     * Be localized
 - Added new default Garland theme
@@ -955,7 +1018,7 @@ Drupal 5.0, 2007-01-15
 - Removed the archive module.
 - Upgrade system:
     * Created space for update branches.
-- Forms API:
+- Form API:
     * Made it possible to programmatically submit forms.
     * Improved api for multistep forms.
 - Theme system:
diff --git a/INSTALL.txt b/INSTALL.txt
index 7b526e33c45aa97047b70cda0fd0e6337823f431..c3a26adfed2990c847ffa639a6cc85644dfa7608 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -89,8 +89,8 @@ INSTALLATION
    - Download a translation file for the correct Drupal version and language
      from the translation server: http://localize.drupal.org/translate/downloads
 
-   - Place the file into your installation profile's translations
-     directory. For instance, if you are using the Standard install profile,
+   - Place the file into your installation profile's translations directory.
+     For instance, if you are using the Standard installation profile,
      move the .po file into the directory:
 
        profiles/standard/translations/
diff --git a/MAINTAINERS.txt b/MAINTAINERS.txt
index aa142153322d0a9f35a17988bfcb2318d9644f16..61715668ea72d72da38ab7c0e5c3637d1fdb03d6 100644
--- a/MAINTAINERS.txt
+++ b/MAINTAINERS.txt
@@ -9,9 +9,9 @@ Branch maintainers
 The Drupal Core branch maintainers oversee the development of Drupal as a whole.
 The branch maintainers for Drupal 7 are:
 
-- Dries Buytaert 'dries' <http://drupal.org/user/1>
-- Angela Byron 'webchick' <http://drupal.org/user/24967>
-- David Rothstein 'David_Rothstein' <http://drupal.org/user/124982>
+- Dries Buytaert 'dries' http://drupal.org/user/1
+- Angela Byron 'webchick' http://drupal.org/user/24967
+- David Rothstein 'David_Rothstein' http://drupal.org/user/124982
 
 
 Component maintainers
@@ -23,134 +23,136 @@ information on their responsibilities, and to find out how to become a component
 maintainer. Current component maintainers for Drupal 7:
 
 Ajax system
-- Alex Bronstein 'effulgentsia' <http://drupal.org/user/78040>
-- Earl Miles 'merlinofchaos' <http://drupal.org/user/26979>
+- Alex Bronstein 'effulgentsia' http://drupal.org/user/78040
+- Earl Miles 'merlinofchaos' http://drupal.org/user/26979
 
 Base system
-- Károly Négyesi 'chx' <http://drupal.org/user/9446>
-- Damien Tournoud 'DamZ' <http://drupal.org/user/22211>
-- Moshe Weitzman 'moshe weitzman' <http://drupal.org/user/23>
+- Károly Négyesi 'chx' http://drupal.org/user/9446
+- Damien Tournoud 'DamZ' http://drupal.org/user/22211
+- Moshe Weitzman 'moshe weitzman' http://drupal.org/user/23
 
 Batch system
-- Yves Chedemois 'yched' <http://drupal.org/user/39567>
+- Yves Chedemois 'yched' http://drupal.org/user/39567
 
 Cache system
-- Damien Tournoud 'DamZ' <http://drupal.org/user/22211>
-- Nathaniel Catchpole 'catch' <http://drupal.org/user/35733>
+- 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>
-- Derek Wright 'dww' <http://drupal.org/user/46549>
+- Károly Négyesi 'chx' http://drupal.org/user/9446
+- Derek Wright 'dww' http://drupal.org/user/46549
 
 Database system
-- Larry Garfield 'Crell' <http://drupal.org/user/26398>
+- Larry Garfield 'Crell' http://drupal.org/user/26398
 
   - MySQL driver
-    - Larry Garfield 'Crell' <http://drupal.org/user/26398>
-    - David Strauss 'David Strauss' <http://drupal.org/user/93254>
+    - Larry Garfield 'Crell' http://drupal.org/user/26398
+    - David Strauss 'David Strauss' http://drupal.org/user/93254
 
   - PostgreSQL driver
-    - Damien Tournoud 'DamZ' <http://drupal.org/user/22211>
-    - Josh Waihi 'fiasco' <http://drupal.org/user/188162>
+    - Damien Tournoud 'DamZ' http://drupal.org/user/22211
+    - Josh Waihi 'fiasco' http://drupal.org/user/188162
 
   - Sqlite driver
-    - Damien Tournoud 'DamZ' <http://drupal.org/user/22211>
-    - Károly Négyesi 'chx' <http://drupal.org/user/9446>
+    - Damien Tournoud 'DamZ' http://drupal.org/user/22211
+    - Károly Négyesi 'chx' http://drupal.org/user/9446
 
 Database update system
-- Károly Négyesi 'chx' <http://drupal.org/user/9446>
-- Ashok Modi 'btmash' <http://drupal.org/user/60422>
+- Károly Négyesi 'chx' http://drupal.org/user/9446
+- Ashok Modi 'BTMash' http://drupal.org/user/60422
 
 Entity system
-- Wolfgang Ziegler 'fago' <http://drupal.org/user/16747>
-- Nathaniel Catchpole 'catch' <http://drupal.org/user/35733>
-- Franz Heinzmann 'Frando' <http://drupal.org/user/21850>
+- Wolfgang Ziegler 'fago' http://drupal.org/user/16747
+- Nathaniel Catchpole 'catch' http://drupal.org/user/35733
+- Franz Heinzmann 'Frando' http://drupal.org/user/21850
 
 File system
-- Andrew Morton 'drewish' <http://drupal.org/user/34869>
-- Aaron Winborn 'aaron' <http://drupal.org/user/33420>
+- Andrew Morton 'drewish' http://drupal.org/user/34869
+- Aaron Winborn 'aaron' http://drupal.org/user/33420
 
 Form system
-- Károly Négyesi 'chx' <http://drupal.org/user/9446>
-- Alex Bronstein 'effulgentsia' <http://drupal.org/user/78040>
-- Wolfgang Ziegler 'fago' <http://drupal.org/user/16747>
-- Daniel F. Kudwien 'sun' <http://drupal.org/user/54136>
-- Franz Heinzmann 'Frando' <http://drupal.org/user/21850>
+- Károly Négyesi 'chx' http://drupal.org/user/9446
+- Alex Bronstein 'effulgentsia' http://drupal.org/user/78040
+- Wolfgang Ziegler 'fago' http://drupal.org/user/16747
+- Daniel F. Kudwien 'sun' http://drupal.org/user/54136
+- Franz Heinzmann 'Frando' http://drupal.org/user/21850
 
 Image system
-- Andrew Morton 'drewish' <http://drupal.org/user/34869>
-- Nathan Haug 'quicksketch' <http://drupal.org/user/35821>
+- Andrew Morton 'drewish' http://drupal.org/user/34869
+- Nathan Haug 'quicksketch' http://drupal.org/user/35821
 
 Install system
-- David Rothstein 'David_Rothstein' <http://drupal.org/user/124982>
+- David Rothstein 'David_Rothstein' http://drupal.org/user/124982
 
 JavaScript
-- Théodore Biadala 'nod_' <http://drupal.org/user/598310>
+- Théodore Biadala 'nod_' http://drupal.org/user/598310
+- Steve De Jonghe 'seutje' http://drupal.org/user/264148
+- Jesse Renée Beach 'jessebeach' http://drupal.org/user/748566
 
 Language system
-- Francesco Placella 'plach' <http://drupal.org/user/183211>
-- Daniel F. Kudwien 'sun' <http://drupal.org/user/54136>
+- Francesco Placella 'plach' http://drupal.org/user/183211
+- Daniel F. Kudwien 'sun' http://drupal.org/user/54136
 
 Lock system
-- Damien Tournoud 'DamZ' <http://drupal.org/user/22211>
+- Damien Tournoud 'DamZ' http://drupal.org/user/22211
 
 Mail system
 - ?
 
 Markup
-- Jacine Luisi 'Jacine' <http://drupal.org/user/88931>
-- Daniel F. Kudwien 'sun' <http://drupal.org/user/54136>
+- Jacine Luisi 'Jacine' http://drupal.org/user/88931
+- Daniel F. Kudwien 'sun' http://drupal.org/user/54136
 
 Menu system
-- Peter Wolanin 'pwolanin' <http://drupal.org/user/49851>
-- Károly Négyesi 'chx' <http://drupal.org/user/9446>
+- Peter Wolanin 'pwolanin' http://drupal.org/user/49851
+- Károly Négyesi 'chx' http://drupal.org/user/9446
 
 Path system
-- Dave Reid 'davereid' <http://drupal.org/user/53892>
-- Nathaniel Catchpole 'catch' <http://drupal.org/user/35733>
+- Dave Reid 'davereid' http://drupal.org/user/53892
+- Nathaniel Catchpole 'catch' http://drupal.org/user/35733
 
 Render system
-- Moshe Weitzman 'moshe weitzman' <http://drupal.org/user/23>
-- Alex Bronstein 'effulgentsia' <http://drupal.org/user/78040>
-- Franz Heinzmann 'Frando' <http://drupal.org/user/21850>
+- Moshe Weitzman 'moshe weitzman' http://drupal.org/user/23
+- Alex Bronstein 'effulgentsia' http://drupal.org/user/78040
+- Franz Heinzmann 'Frando' http://drupal.org/user/21850
 
 Theme system
-- Earl Miles 'merlinofchaos' <http://drupal.org/user/26979>
-- Alex Bronstein 'effulgentsia' <http://drupal.org/user/78040>
-- Joon Park 'dvessel' <http://drupal.org/user/56782>
-- John Albin Wilkins 'JohnAlbin' <http://drupal.org/user/32095>
+- Earl Miles 'merlinofchaos' http://drupal.org/user/26979
+- Alex Bronstein 'effulgentsia' http://drupal.org/user/78040
+- Joon Park 'dvessel' http://drupal.org/user/56782
+- John Albin Wilkins 'JohnAlbin' http://drupal.org/user/32095
 
 Token system
-- Dave Reid 'davereid' <http://drupal.org/user/53892>
+- Dave Reid 'davereid' http://drupal.org/user/53892
 
 XML-RPC system
-- Frederic G. Marand 'fgm' <http://drupal.org/user/27985>
+- Frederic G. Marand 'fgm' http://drupal.org/user/27985
 
 
 Topic coordinators
 ------------------
 
 Accessibility
-- Everett Zufelt 'Everett Zufelt' <http://drupal.org/user/406552>
-- Brandon Bowersox-Johnson 'bowersox' <http://drupal.org/user/186415>
+- Everett Zufelt 'Everett Zufelt' http://drupal.org/user/406552
+- Brandon Bowersox-Johnson 'bowersox' http://drupal.org/user/186415
 
 Documentation
-- Jennifer Hodgdon 'jhodgdon' <http://drupal.org/user/155601>
+- Jennifer Hodgdon 'jhodgdon' http://drupal.org/user/155601
 
 Security
-- Heine Deelstra 'Heine' <http://drupal.org/user/17943>
+- Greg Knaddison 'greggles' http://drupal.org/user/36762
 
 Translations
-- Gerhard Killesreiter 'killes' <http://drupal.org/user/83>
+- Gerhard Killesreiter 'killes' http://drupal.org/user/83
 
 User experience and usability
-- Roy Scholten 'yoroy' <http://drupal.org/user/41502>
-- Bojhan Somers 'Bojhan' <http://drupal.org/user/87969>
+- Roy Scholten 'yoroy' http://drupal.org/user/41502
+- Bojhan Somers 'Bojhan' http://drupal.org/user/87969
 
 Node Access
-- Moshe Weitzman 'moshe weitzman' <http://drupal.org/user/23>
-- Ken Rickard 'agentrickard' <http://drupal.org/user/20975>
-- Jess Myrbo 'xjm' <http://drupal.org/user/65776>
+- Moshe Weitzman 'moshe weitzman' http://drupal.org/user/23
+- Ken Rickard 'agentrickard' http://drupal.org/user/20975
+- Jess Myrbo 'xjm' http://drupal.org/user/65776
 
 Module maintainers
 ------------------
@@ -159,145 +161,143 @@ Aggregator module
 - ?
 
 Block module
-- John Albin Wilkins 'JohnAlbin' <http://drupal.org/user/32095>
+- John Albin Wilkins 'JohnAlbin' http://drupal.org/user/32095
 
 Blog module
 - ?
 
 Book module
-- Peter Wolanin 'pwolanin' <http://drupal.org/user/49851>
+- Peter Wolanin 'pwolanin' http://drupal.org/user/49851
 
 Color module
 - ?
 
 Comment module
-- Nathaniel Catchpole 'catch' <http://drupal.org/user/35733>
+- Nathaniel Catchpole 'catch' http://drupal.org/user/35733
 
 Contact module
-- Dave Reid 'davereid' <http://drupal.org/user/53892>
+- Dave Reid 'davereid' http://drupal.org/user/53892
 
 Contextual module
-- Daniel F. Kudwien 'sun' <http://drupal.org/user/54136>
+- Daniel F. Kudwien 'sun' http://drupal.org/user/54136
 
 Dashboard module
 - ?
 
 Database logging module
-- Khalid Baheyeldin 'kbahey' <http://drupal.org/user/4063>
+- Khalid Baheyeldin 'kbahey' http://drupal.org/user/4063
 
 Field module
-- Yves Chedemois 'yched' <http://drupal.org/user/39567>
-- Barry Jaspan 'bjaspan' <http://drupal.org/user/46413>
+- Yves Chedemois 'yched' http://drupal.org/user/39567
+- Barry Jaspan 'bjaspan' http://drupal.org/user/46413
 
 Field UI module
-- Yves Chedemois 'yched' <http://drupal.org/user/39567>
+- Yves Chedemois 'yched' http://drupal.org/user/39567
 
 File module
-- Aaron Winborn 'aaron' <http://drupal.org/user/33420>
+- Aaron Winborn 'aaron' http://drupal.org/user/33420
 
 Filter module
-- Daniel F. Kudwien 'sun' <http://drupal.org/user/54136>
+- Daniel F. Kudwien 'sun' http://drupal.org/user/54136
 
 Forum module
-- Lee Rowlands 'larowlan' <http://drupal.org/user/395439>
+- Lee Rowlands 'larowlan' http://drupal.org/user/395439
 
 Help module
 - ?
 
 Image module
-- Nathan Haug 'quicksketch' <http://drupal.org/user/35821>
+- Nathan Haug 'quicksketch' http://drupal.org/user/35821
 
 Locale module
-- Gábor Hojtsy 'Gábor Hojtsy' <http://drupal.org/user/4166>
+- Gábor Hojtsy 'Gábor Hojtsy' http://drupal.org/user/4166
 
 Menu module
 - ?
 
 Node module
-- Moshe Weitzman 'moshe weitzman' <http://drupal.org/user/23>
-- David Strauss 'David Strauss' <http://drupal.org/user/93254>
+- Moshe Weitzman 'moshe weitzman' http://drupal.org/user/23
+- David Strauss 'David Strauss' http://drupal.org/user/93254
 
 OpenID module
-- Vojtech Kusy 'wojtha' <http://drupal.org/user/56154>
-- Heine Deelstra 'Heine' <http://drupal.org/user/17943>
-- Christian Schmidt 'c960657' <http://drupal.org/user/216078>
-- Damien Tournoud 'DamZ' <http://drupal.org/user/22211>
+- Vojtech Kusy 'wojtha' http://drupal.org/user/56154
+- Christian Schmidt 'c960657' http://drupal.org/user/216078
+- Damien Tournoud 'DamZ' http://drupal.org/user/22211
 
 Overlay module
-- Katherine Senzee 'ksenzee' <http://drupal.org/user/139855>
+- Katherine Senzee 'ksenzee' http://drupal.org/user/139855
 
 Path module
-- Dave Reid 'davereid' <http://drupal.org/user/53892>
+- Dave Reid 'davereid' http://drupal.org/user/53892
 
 PHP module
 - ?
 
 Poll module
-- Andrei Mateescu 'amateescu' <http://drupal.org/user/729614>
+- Andrei Mateescu 'amateescu' http://drupal.org/user/729614
 
 Profile module
 - ?
 
 RDF module
-- Stéphane Corlosquet 'scor' <http://drupal.org/user/52142>
+- Stéphane Corlosquet 'scor' http://drupal.org/user/52142
 
 Search module
-- Doug Green 'douggreen' <http://drupal.org/user/29191>
+- Doug Green 'douggreen' http://drupal.org/user/29191
 
 Shortcut module
-- David Rothstein 'David_Rothstein' <http://drupal.org/user/124982>
-- Kristof De Jaeger 'swentel' <http://drupal.org/user/107403>
+- David Rothstein 'David_Rothstein' http://drupal.org/user/124982
 
 Simpletest module
-- Jimmy Berry 'boombatower' <http://drupal.org/user/214218>
-- Károly Négyesi 'chx' <http://drupal.org/user/9446>
+- Jimmy Berry 'boombatower' http://drupal.org/user/214218
+- Károly Négyesi 'chx' http://drupal.org/user/9446
 
 Statistics module
-- Tim Millwood 'timmillwood' <http://drupal.org/user/227849>
+- Tim Millwood 'timmillwood' http://drupal.org/user/227849
 
 Syslog module
-- Khalid Baheyeldin 'kbahey' <http://drupal.org/user/4063>
+- Khalid Baheyeldin 'kbahey' http://drupal.org/user/4063
 
 System module
 - ?
 
 Taxonomy module
-- Jess Myrbo 'xjm' <http://drupal.org/user/65776>
-- Nathaniel Catchpole 'catch' <http://drupal.org/user/35733>
-- Benjamin Doherty 'bangpound' <http://drupal.org/user/100456>
+- Jess Myrbo 'xjm' http://drupal.org/user/65776
+- Nathaniel Catchpole 'catch' http://drupal.org/user/35733
+- Benjamin Doherty 'bangpound' http://drupal.org/user/100456
 
 Toolbar module
 - ?
 
 Tracker module
-- David Strauss 'David Strauss' <http://drupal.org/user/93254>
+- David Strauss 'David Strauss' http://drupal.org/user/93254
 
 Translation module
-- Francesco Placella 'plach' <http://drupal.org/user/183211>
+- Francesco Placella 'plach' http://drupal.org/user/183211
 
 Trigger module
 - ?
 
 Update module
-- Derek Wright 'dww' <http://drupal.org/user/46549>
+- Derek Wright 'dww' http://drupal.org/user/46549
 
 User module
-- Moshe Weitzman 'moshe weitzman' <http://drupal.org/user/23>
-- David Strauss 'David Strauss' <http://drupal.org/user/93254>
+- Moshe Weitzman 'moshe weitzman' http://drupal.org/user/23
+- David Strauss 'David Strauss' http://drupal.org/user/93254
 
 
 Theme maintainers
 -----------------
 
 Bartik theme
-- Jen Simmons 'jensimmons' <http://drupal.org/user/140882>
-- Jeff Burns 'Jeff Burnz' <http://drupal.org/user/61393>
+- Jen Simmons 'jensimmons' http://drupal.org/user/140882
+- Jeff Burns 'Jeff Burnz' http://drupal.org/user/61393
 
 Garland theme
-- John Albin Wilkins 'JohnAlbin' <http://drupal.org/user/32095>
+- John Albin Wilkins 'JohnAlbin' http://drupal.org/user/32095
 
 Seven theme
-- Jeff Burns 'Jeff Burnz' <http://drupal.org/user/61393>
+- Jeff Burns 'Jeff Burnz' http://drupal.org/user/61393
 
 Stark theme
-- John Albin Wilkins 'JohnAlbin' <http://drupal.org/user/32095>
+- John Albin Wilkins 'JohnAlbin' http://drupal.org/user/32095
diff --git a/README.md b/README.md
index 3d7980a247db143c812273fc6bf9463d7373106c..ec2a8dbc17fc53ff3293a14c5bf7967e127ed455 100644
--- a/README.md
+++ b/README.md
@@ -123,6 +123,7 @@ CONTENTS OF THIS FILE
 
  * About Drupal
  * Configuration and features
+ * Installation profiles
  * Appearance
  * Developing for Drupal
 
@@ -162,6 +163,40 @@ More about configuration:
    http://drupal.org/project/modules
  * See also: "Developing for Drupal" for writing your own modules, below.
 
+INSTALLATION PROFILES
+---------------------
+
+Installation profiles define additional steps (such as enabling modules,
+defining content types, etc.) that run after the base installation provided
+by core when Drupal is first installed. There are two basic installation
+profiles provided with Drupal core.
+
+Installation profiles from the Drupal community modify the installation process
+to provide a website for a specific use case, such as a CMS for media
+publishers, a web-based project tracking tool, or a full-fledged CRM for
+non-profit organizations raising money and accepting donations. They can be
+distributed as bare installation profiles or as "distributions". Distributions
+include Drupal core, the installation profile, and all other required
+extensions, such as contributed and custom modules, themes, and third-party
+libraries. Bare installation profiles require you to download Drupal Core and
+the required extensions separately; place the downloaded profile in the
+/profiles directory before you start the installation process. Note that the
+contents of this directory may be overwritten during updates of Drupal core;
+it is advised to keep code backups or use a version control system.
+
+Additionally, modules and themes may be placed inside subdirectories in a
+specific installation profile such as profiles/your_site_profile/modules and
+profiles/your_site_profile/themes respectively to restrict their usage to only
+sites that were installed with that specific profile.
+
+More about installation profiles and distributions:
+* Read about the difference between installation profiles and distributions:
+  http://drupal.org/node/1089736
+* Download contributed installation profiles and distributions:
+  http://drupal.org/project/distributions
+* Develop your own installation profile or distribution:
+  http://drupal.org/developing/distributions
+
 APPEARANCE
 ----------
 
diff --git a/includes/ajax.inc b/includes/ajax.inc
index fb07477d6da6aa56395bd7f4333e3405c3a24162..4107029fe19c760cada793c135961176201dfe92 100644
--- a/includes/ajax.inc
+++ b/includes/ajax.inc
@@ -168,7 +168,7 @@
  *   displayed while awaiting a response from the callback, and add an optional
  *   message. Possible keys: 'type', 'message', 'url', 'interval'.
  *   More information is available in the
- *   @link http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html/7 Form API Reference @endlink
+ *   @link forms_api_reference.html Form API Reference @endlink
  *
  * In addition to using Form API for doing in-form modification, Ajax may be
  * enabled by adding classes to buttons and links. By adding the 'use-ajax'
diff --git a/includes/authorize.inc b/includes/authorize.inc
index da6918ca7f37400dab7dca00e0f2deb6a651b8b9..8360e132cefe009a2b5c23338acafbf2463a3444 100644
--- a/includes/authorize.inc
+++ b/includes/authorize.inc
@@ -18,7 +18,7 @@ function authorize_filetransfer_form($form, &$form_state) {
   global $base_url, $is_https;
   $form = array();
 
-  // If possible, we want to post this form securely via https.
+  // If possible, we want to post this form securely via HTTPS.
   $form['#https'] = TRUE;
 
   // CSS we depend on lives in modules/system/maintenance.css, which is loaded
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index a27697baeeb1d6d42bb4926dbcced239ae2288a8..cd41f0bbf6eacb92c565b55be24bd098c34df3bf 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -8,7 +8,7 @@
 /**
  * The current system version.
  */
-define('VERSION', '7.16');
+define('VERSION', '7.17');
 
 /**
  * Core API compatibility.
@@ -25,6 +25,21 @@ define('DRUPAL_MINIMUM_PHP', '5.2.4');
  */
 define('DRUPAL_MINIMUM_PHP_MEMORY_LIMIT', '32M');
 
+/**
+ * Error reporting level: display no errors.
+ */
+define('ERROR_REPORTING_HIDE', 0);
+
+/**
+ * Error reporting level: display errors and warnings.
+ */
+define('ERROR_REPORTING_DISPLAY_SOME', 1);
+
+/**
+ * Error reporting level: display all messages.
+ */
+define('ERROR_REPORTING_DISPLAY_ALL', 2);
+
 /**
  * Indicates that the item should never be removed unless explicitly selected.
  *
@@ -498,56 +513,12 @@ function timer_stop($name) {
 }
 
 /**
- * Finds the appropriate configuration directory.
+ * Returns the appropriate configuration directory.
  *
- * Finds a matching configuration directory by stripping the website's
- * hostname from left to right and pathname from right to left. The first
- * configuration file found will be used and the remaining ones will be ignored.
- * If no configuration file is found, return a default value '$confdir/default'.
- *
- * With a site located at http://www.example.com:8080/mysite/test/, the file,
- * settings.php, is searched for in the following directories:
- *
- * - $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
- * named $sites, which maps domains to directories. It should be in the form
- * of:
- * @code
- * $sites = array(
- *   'The url to alias' => 'A directory within the sites directory'
- * );
- * @endcode
- * For example:
- * @code
- * $sites = array(
- *   'devexample.com' => 'example.com',
- *   'localhost.example' => 'example.com',
- * );
- * @endcode
- * The above array will cause Drupal to look for a directory named
- * "example.com" in the sites directory whenever a request comes from
- * "example.com", "devexample.com", or "localhost/example". That is useful
- * on development servers, where the domain name may not be the same as the
- * domain of the live server. Since Drupal stores file paths into the database
- * (files, system table, etc.) this will ensure the paths are correct while
- * accessed on development servers.
+ * Returns the configuration path based on the site's hostname, port, and
+ * pathname. Uses find_conf_path() to find the current configuration directory.
+ * See default.settings.php for examples on how the URL is converted to a
+ * directory.
  *
  * @param bool $require_settings
  *   Only configuration directories with an existing settings.php file
@@ -560,6 +531,8 @@ function timer_stop($name) {
  *
  * @return
  *   The path of the matching directory.
+ *
+ * @see default.settings.php
  */
 function conf_path($require_settings = TRUE, $reset = FALSE) {
   $conf = &drupal_static(__FUNCTION__, '');
@@ -749,7 +722,7 @@ function drupal_valid_http_host($host) {
 function drupal_settings_initialize() {
   global $base_url, $base_path, $base_root;
 
-  // Export the following settings.php variables to the global namespace
+  // Export these settings.php variables to the global namespace.
   global $databases, $cookie_domain, $conf, $installed_profile, $update_free_access, $db_url, $db_prefix, $drupal_hash_salt, $is_https, $base_secure_url, $base_insecure_url;
   $conf = array();
 
@@ -776,7 +749,7 @@ function drupal_settings_initialize() {
     $base_root = substr($base_url, 0, strlen($base_url) - strlen($parts['path']));
   }
   else {
-    // Create base URL
+    // Create base URL.
     $http_protocol = $is_https ? 'https' : 'http';
     $base_root = $http_protocol . '://' . $_SERVER['HTTP_HOST'];
 
@@ -802,7 +775,7 @@ function drupal_settings_initialize() {
   }
   else {
     // Otherwise use $base_url as session name, without the protocol
-    // to use the same session identifiers across http and https.
+    // to use the same session identifiers across HTTP and HTTPS.
     list( , $session_name) = explode('://', $base_url, 2);
     // HTTP_HOST can be modified by a visitor, but we already sanitized it
     // in drupal_settings_initialize().
@@ -1758,7 +1731,8 @@ function watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NO
       'request_uri' => $base_root . request_uri(),
       'referer'     => isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '',
       'ip'          => ip_address(),
-      'timestamp'   => REQUEST_TIME,
+      // Request time isn't accurate for long processes, use time() instead.
+      'timestamp'   => time(),
     );
 
     // Call the logging hooks to log/process the message
@@ -1824,18 +1798,29 @@ function drupal_set_message($message = NULL, $type = 'status', $repeat = TRUE) {
 }
 
 /**
- * Returns all messages that have been set.
+ * Returns all messages that have been set with drupal_set_message().
  *
- * @param $type
- *   (optional) Only return messages of this type.
- * @param $clear_queue
- *   (optional) Set to FALSE if you do not want to clear the messages queue
+ * @param string $type
+ *   (optional) Limit the messages returned by type. Defaults to NULL, meaning
+ *   all types. These values are supported:
+ *   - NULL
+ *   - 'status'
+ *   - 'warning'
+ *   - 'error'
+ * @param bool $clear_queue
+ *   (optional) If this is TRUE, the queue will be cleared of messages of the
+ *   type specified in the $type parameter. Otherwise the queue will be left
+ *   intact. Defaults to TRUE.
  *
- * @return
- *   An associative array, the key is the message type, the value an array
- *   of messages. If the $type parameter is passed, you get only that type,
- *   or an empty array if there are no such messages. If $type is not passed,
- *   all message types are returned, or an empty array if none exist.
+ * @return array
+ *   A multidimensional array with keys corresponding to the set message types.
+ *   The indexed array values of each contain the set messages for that type.
+ *   The messages returned are limited to the type specified in the $type
+ *   parameter. If there are no messages of the specified type, an empty array
+ *   is returned.
+ *
+ * @see drupal_set_message()
+ * @see theme_status_messages()
  */
 function drupal_get_messages($type = NULL, $clear_queue = TRUE) {
   if ($messages = drupal_set_message()) {
@@ -2141,14 +2126,26 @@ function drupal_anonymous_user() {
 /**
  * Ensures Drupal is bootstrapped to the specified phase.
  *
- * The bootstrap phase is an integer constant identifying a phase of Drupal
- * to load. Each phase adds to the previous one, so invoking a later phase
- * automatically runs the earlier phases as well. To access the Drupal
- * database from a script without loading anything else, include bootstrap.inc
- * and call drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE).
+ * In order to bootstrap Drupal from another PHP script, you can use this code:
+ * @code
+ *   define('DRUPAL_ROOT', '/path/to/drupal');
+ *   require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
+ *   drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
+ * @endcode
  *
  * @param $phase
- *   A constant. Allowed values are the DRUPAL_BOOTSTRAP_* constants.
+ *   A constant telling which phase to bootstrap to. When you bootstrap to a
+ *   particular phase, all earlier phases are run automatically. Possible
+ *   values:
+ *   - DRUPAL_BOOTSTRAP_CONFIGURATION: Initializes configuration.
+ *   - DRUPAL_BOOTSTRAP_PAGE_CACHE: Tries to serve a cached page.
+ *   - DRUPAL_BOOTSTRAP_DATABASE: Initializes the database layer.
+ *   - DRUPAL_BOOTSTRAP_VARIABLES: Initializes the variable system.
+ *   - DRUPAL_BOOTSTRAP_SESSION: Initializes session handling.
+ *   - DRUPAL_BOOTSTRAP_PAGE_HEADER: Sets up the page header.
+ *   - DRUPAL_BOOTSTRAP_LANGUAGE: Finds out the language of the page.
+ *   - DRUPAL_BOOTSTRAP_FULL: Fully loads Drupal. Validates and fixes input
+ *     data.
  * @param $new_phase
  *   A boolean, set to FALSE if calling drupal_bootstrap from inside a
  *   function called from drupal_bootstrap (recursion).
@@ -2547,7 +2544,7 @@ function drupal_fast_404() {
     $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>');
+      $fast_404_html = variable_get('404_fast_html', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"><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;
@@ -2640,6 +2637,9 @@ function drupal_language_types() {
 
 /**
  * Returns TRUE if there is more than one language enabled.
+ *
+ * @return
+ *   TRUE if more than one language is enabled.
  */
 function drupal_multilingual() {
   // The "language_count" variable stores the number of enabled languages to
@@ -2650,6 +2650,10 @@ function drupal_multilingual() {
 
 /**
  * Returns an array of the available language types.
+ *
+ * @return
+ *   An array of all language types where the keys of each are the language type
+ *   name and its value is its configurability (TRUE/FALSE).
  */
 function language_types() {
   return array_keys(variable_get('language_types', drupal_language_types()));
diff --git a/includes/common.inc b/includes/common.inc
index dfa9153a22d94c4b55966d6061de62eb98e0dfc3..8994b3f4a48e9129737cc506acb852df09257aef 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -92,14 +92,20 @@ define('JS_THEME', 100);
 define('HTTP_REQUEST_TIMEOUT', -1);
 
 /**
- * Constants defining cache granularity for blocks and renderable arrays.
- *
- * Modules specify the caching patterns for their blocks using binary
- * combinations of these constants in their hook_block_info():
- *   $block[delta]['cache'] = DRUPAL_CACHE_PER_ROLE | DRUPAL_CACHE_PER_PAGE;
- * DRUPAL_CACHE_PER_ROLE is used as a default when no caching pattern is
- * specified. Use DRUPAL_CACHE_CUSTOM to disable standard block cache and
- * implement
+ * @defgroup block_caching Block Caching
+ * @{
+ * Constants that define each block's caching state.
+ *
+ * Modules specify how their blocks can be cached in their hook_block_info()
+ * implementations. Caching can be turned off (DRUPAL_NO_CACHE), managed by the
+ * module declaring the block (DRUPAL_CACHE_CUSTOM), or managed by the core
+ * Block module. If the Block module is managing the cache, you can specify that
+ * the block is the same for every page and user (DRUPAL_CACHE_GLOBAL), or that
+ * it can change depending on the page (DRUPAL_CACHE_PER_PAGE) or by user
+ * (DRUPAL_CACHE_PER_ROLE or DRUPAL_CACHE_PER_USER). Page and user settings can
+ * be combined with a bitwise-binary or operator; for example,
+ * DRUPAL_CACHE_PER_ROLE | DRUPAL_CACHE_PER_PAGE means that the block can change
+ * depending on the user role or page it is on.
  *
  * The block cache is cleared in cache_clear_all(), and uses the same clearing
  * policy than page cache (node, comment, user, taxonomy added or updated...).
@@ -123,9 +129,8 @@ define('DRUPAL_NO_CACHE', -1);
 /**
  * The block is handling its own caching in its hook_block_view().
  *
- * From the perspective of the block cache system, this is equivalent to
- * DRUPAL_NO_CACHE. Useful when time based expiration is needed or a site uses
- * a node access which invalidates standard block cache.
+ * This setting is useful when time based expiration is needed or a site uses a
+ * node access which invalidates standard block cache.
  */
 define('DRUPAL_CACHE_CUSTOM', -2);
 
@@ -155,6 +160,10 @@ define('DRUPAL_CACHE_PER_PAGE', 0x0004);
  */
 define('DRUPAL_CACHE_GLOBAL', 0x0008);
 
+/**
+ * @} End of "defgroup block_caching".
+ */
+
 /**
  * Adds content to a specified region.
  *
@@ -199,7 +208,7 @@ function drupal_get_region_content($region = NULL, $delimiter = ' ') {
 }
 
 /**
- * Gets the name of the currently active install profile.
+ * Gets the name of the currently active installation profile.
  *
  * When this function is called during Drupal's initial installation process,
  * the name of the profile that's about to be installed is stored in the global
@@ -208,7 +217,7 @@ function drupal_get_region_content($region = NULL, $delimiter = ' ') {
  * variable_get() to determine what one is active.
  *
  * @return $profile
- *   The name of the install profile.
+ *   The name of the installation profile.
  */
 function drupal_get_profile() {
   global $install_state;
@@ -443,7 +452,7 @@ function drupal_get_query_parameters(array $query = NULL, array $exclude = array
  *   The query string to split.
  *
  * @return
- *   An array of url decoded couples $param_name => $value.
+ *   An array of URL decoded couples $param_name => $value.
  */
 function drupal_get_query_array($query) {
   $result = array();
@@ -505,6 +514,12 @@ function drupal_http_build_query(array $query, $parent = '') {
  * previous request, that destination is returned. As such, a destination can
  * persist across multiple pages.
  *
+ * @return
+ *   An associative array containing the key:
+ *   - destination: The path provided via the destination query string or, if
+ *     not available, the current path.
+ *
+ * @see current_path()
  * @see drupal_goto()
  */
 function drupal_get_destination() {
@@ -798,10 +813,51 @@ function drupal_http_request($url, array $options = array()) {
     'timeout' => 30.0,
     'context' => NULL,
   );
+
+  // Merge the default headers.
+  $options['headers'] += array(
+    'User-Agent' => 'Drupal (+http://drupal.org/)',
+  );
+
   // stream_socket_client() requires timeout to be a float.
   $options['timeout'] = (float) $options['timeout'];
 
+  // Use a proxy if one is defined and the host is not on the excluded list.
+  $proxy_server = variable_get('proxy_server', '');
+  if ($proxy_server && _drupal_http_use_proxy($uri['host'])) {
+    // Set the scheme so we open a socket to the proxy server.
+    $uri['scheme'] = 'proxy';
+    // Set the path to be the full URL.
+    $uri['path'] = $url;
+    // Since the URL is passed as the path, we won't use the parsed query.
+    unset($uri['query']);
+
+    // Add in username and password to Proxy-Authorization header if needed.
+    if ($proxy_username = variable_get('proxy_username', '')) {
+      $proxy_password = variable_get('proxy_password', '');
+      $options['headers']['Proxy-Authorization'] = 'Basic ' . base64_encode($proxy_username . (!empty($proxy_password) ? ":" . $proxy_password : ''));
+    }
+    // Some proxies reject requests with any User-Agent headers, while others
+    // require a specific one.
+    $proxy_user_agent = variable_get('proxy_user_agent', '');
+    // The default value matches neither condition.
+    if ($proxy_user_agent === NULL) {
+      unset($options['headers']['User-Agent']);
+    }
+    elseif ($proxy_user_agent) {
+      $options['headers']['User-Agent'] = $proxy_user_agent;
+    }
+  }
+
   switch ($uri['scheme']) {
+    case 'proxy':
+      // Make the socket connection to a proxy server.
+      $socket = 'tcp://' . $proxy_server . ':' . variable_get('proxy_port', 8080);
+      // The Host header still needs to match the real request.
+      $options['headers']['Host'] = $uri['host'];
+      $options['headers']['Host'] .= isset($uri['port']) && $uri['port'] != 80 ? ':' . $uri['port'] : '';
+      break;
+
     case 'http':
     case 'feed':
       $port = isset($uri['port']) ? $uri['port'] : 80;
@@ -811,12 +867,14 @@ function drupal_http_request($url, array $options = array()) {
       // checking the host that do not take into account the port number.
       $options['headers']['Host'] = $uri['host'] . ($port != 80 ? ':' . $port : '');
       break;
+
     case 'https':
       // Note: Only works when PHP is compiled with OpenSSL support.
       $port = isset($uri['port']) ? $uri['port'] : 443;
       $socket = 'ssl://' . $uri['host'] . ':' . $port;
       $options['headers']['Host'] = $uri['host'] . ($port != 443 ? ':' . $port : '');
       break;
+
     default:
       $result->error = 'invalid schema ' . $uri['scheme'];
       $result->code = -1003;
@@ -853,11 +911,6 @@ function drupal_http_request($url, array $options = array()) {
     $path .= '?' . $uri['query'];
   }
 
-  // Merge the default headers.
-  $options['headers'] += array(
-    'User-Agent' => 'Drupal (+http://drupal.org/)',
-  );
-
   // Only add Content-Length if we actually have any content or if it is a POST
   // or PUT request. Some non-standard servers get confused by Content-Length in
   // at least HEAD/GET requests, and Squid always requires Content-Length in
@@ -1028,6 +1081,18 @@ function drupal_http_request($url, array $options = array()) {
 
   return $result;
 }
+
+/**
+ * Helper function for determining hosts excluded from needing a proxy.
+ *
+ * @return
+ *   TRUE if a proxy should be used for this host.
+ */
+function _drupal_http_use_proxy($host) {
+  $proxy_exceptions = variable_get('proxy_exceptions', array('localhost', '127.0.0.1'));
+  return !in_array(strtolower($host), $proxy_exceptions, TRUE);
+}
+
 /**
  * @} End of "HTTP handling".
  */
@@ -1701,7 +1766,7 @@ function format_xml_elements($array) {
  *   $output = format_plural($update_count,
  *     'Changed the content type of 1 post from %old-type to %new-type.',
  *     'Changed the content type of @count posts from %old-type to %new-type.',
- *     array('%old-type' => $info->old_type, '%new-type' => $info->new_type)));
+ *     array('%old-type' => $info->old_type, '%new-type' => $info->new_type));
  * @endcode
  *
  * @param $count
@@ -2079,7 +2144,7 @@ function format_username($account) {
  *     for the URL. If $options['language'] is omitted, the global $language_url
  *     will be used.
  *   - 'https': Whether this URL should point to a secure location. If not
- *     defined, the current scheme is used, so the user stays on http or https
+ *     defined, the current scheme is used, so the user stays on HTTP or HTTPS
  *     respectively. TRUE enforces HTTPS and FALSE enforces HTTP, but HTTPS can
  *     only be enforced when the variable 'https' is set to TRUE.
  *   - 'base_url': Only used internally, to modify the base URL when a language
@@ -2312,21 +2377,22 @@ function drupal_attributes(array $attributes = array()) {
 /**
  * Formats an internal or external URL link as an HTML anchor tag.
  *
- * This function correctly handles aliased paths, and adds an 'active' class
+ * This function correctly handles aliased paths and adds an 'active' class
  * attribute to links that point to the current page (for theming), so all
  * internal links output by modules should be generated by this function if
  * possible.
  *
- * @param $text
- *   The link text for the anchor tag.
- * @param $path
+ * @param string $text
+ *   The translated link text for the anchor tag.
+ * @param string $path
  *   The internal path or external URL being linked to, such as "node/34" or
  *   "http://example.com/foo". After the url() function is called to construct
  *   the URL from $path and $options, the resulting URL is passed through
  *   check_plain() before it is inserted into the HTML anchor tag, to ensure
  *   well-formed HTML. See url() for more information and notes.
  * @param array $options
- *   An associative array of additional options, with the following elements:
+ *   An associative array of additional options. Defaults to an empty array. It
+ *   may contain the following elements.
  *   - 'attributes': An associative array of HTML attributes to apply to the
  *     anchor tag. If element 'class' is included, it must be an array; 'title'
  *     must be a string; other elements are more flexible, as they just need
@@ -2342,8 +2408,10 @@ function drupal_attributes(array $attributes = array()) {
  *     well as the path must match). This element is also used by url().
  *   - Additional $options elements used by the url() function.
  *
- * @return
+ * @return string
  *   An HTML string containing a link to the given path.
+ *
+ * @see url()
  */
 function l($text, $path, array $options = array()) {
   global $language_url;
@@ -3930,7 +3998,8 @@ function drupal_region_class($region) {
  * actually needed.
  *
  * @param $data
- *   (optional) If given, the value depends on the $options parameter:
+ *   (optional) If given, the value depends on the $options parameter, or
+ *   $options['type'] if $options is passed as an associative array:
  *   - 'file': Path to the file relative to base_path().
  *   - 'inline': The JavaScript code that should be placed in the given scope.
  *   - 'external': The absolute path to an external JavaScript file that is not
@@ -5117,6 +5186,7 @@ function drupal_cron_run() {
   @ignore_user_abort(TRUE);
 
   // Prevent session information from being saved while cron is running.
+  $original_session_saving = drupal_save_session();
   drupal_save_session(FALSE);
 
   // Force the current user to anonymous to ensure consistent permissions on
@@ -5179,7 +5249,7 @@ function drupal_cron_run() {
   }
   // Restore the user.
   $GLOBALS['user'] = $original_user;
-  drupal_save_session(TRUE);
+  drupal_save_session($original_session_saving);
 
   return $return;
 }
@@ -5211,7 +5281,7 @@ function drupal_cron_cleanup() {
  * drupal_system_listing("/\.module$/", "modules", 'name', 0);
  * @endcode
  * this function will search the site-wide modules directory (i.e., /modules/),
- * your install profile's directory (i.e.,
+ * your installation profile's directory (i.e.,
  * /profiles/your_site_profile/modules/), the all-sites directory (i.e.,
  * /sites/all/modules/), and your site-specific directory (i.e.,
  * /sites/your_site_dir/modules/), in that order, and return information about
@@ -7452,12 +7522,12 @@ function drupal_check_incompatibility($v, $current_version) {
 /**
  * Get the entity info array of an entity type.
  *
- * @see hook_entity_info()
- * @see hook_entity_info_alter()
- *
  * @param $entity_type
  *   The entity type, e.g. node, for which the info shall be returned, or NULL
  *   to return an array with info about all types.
+ *
+ * @see hook_entity_info()
+ * @see hook_entity_info_alter()
  */
 function entity_get_info($entity_type = NULL) {
   global $language;
@@ -7545,12 +7615,13 @@ function entity_info_cache_clear() {
  *   The entity type; e.g. 'node' or 'user'.
  * @param $entity
  *   The entity from which to extract values.
+ *
  * @return
  *   A numerically indexed array (not a hash table) containing these
  *   elements:
- *   0: primary id of the entity
- *   1: revision id of the entity, or NULL if $entity_type is not versioned
- *   2: bundle name of the entity
+ *   - 0: Primary ID of the entity.
+ *   - 1: Revision ID of the entity, or NULL if $entity_type is not versioned.
+ *   - 2: Bundle name of the entity, or NULL if $entity_type has no bundles.
  */
 function entity_extract_ids($entity_type, $entity) {
   $info = entity_get_info($entity_type);
@@ -7583,13 +7654,12 @@ function entity_extract_ids($entity_type, $entity) {
  * @param $entity_type
  *   The entity type; e.g. 'node' or 'user'.
  * @param $ids
- *   A numerically indexed array, as returned by entity_extract_ids(),
- *   containing these elements:
- *   0: primary id of the entity
- *   1: revision id of the entity, or NULL if $entity_type is not versioned
- *   2: bundle name of the entity, or NULL if $entity_type has no bundles
+ *   A numerically indexed array, as returned by entity_extract_ids().
+ *
  * @return
  *   An entity structure, initialized with the ids provided.
+ *
+ * @see entity_extract_ids()
  */
 function entity_create_stub_entity($entity_type, $ids) {
   $entity = new stdClass();
@@ -7619,11 +7689,6 @@ function entity_create_stub_entity($entity_type, $ids) {
  * DrupalDefaultEntityController class. See node_entity_info() and the
  * NodeController in node.module as an example.
  *
- * @see hook_entity_info()
- * @see DrupalEntityControllerInterface
- * @see DrupalDefaultEntityController
- * @see EntityFieldQuery
- *
  * @param $entity_type
  *   The entity type to load, e.g. node or user.
  * @param $ids
@@ -7641,6 +7706,11 @@ function entity_create_stub_entity($entity_type, $ids) {
  *   found, an empty array is returned.
  *
  * @todo Remove $conditions in Drupal 8.
+ *
+ * @see hook_entity_info()
+ * @see DrupalEntityControllerInterface
+ * @see DrupalDefaultEntityController
+ * @see EntityFieldQuery
  */
 function entity_load($entity_type, $ids = FALSE, $conditions = array(), $reset = FALSE) {
   if ($reset) {
@@ -7660,7 +7730,7 @@ function entity_load($entity_type, $ids = FALSE, $conditions = array(), $reset =
  * @param $entity_type
  *   The entity type to load, e.g. node or user.
  * @param $id
- *   The id of the entity to load.
+ *   The ID of the entity to load.
  *
  * @return
  *   The unchanged entity, or FALSE if the entity cannot be loaded.
@@ -7697,7 +7767,6 @@ function entity_get_controller($entity_type) {
  * recursion. By convention, entity_prepare_view() is called after
  * field_attach_prepare_view() to allow entity level hooks to act on content
  * loaded by field API.
- * @see hook_entity_prepare_view()
  *
  * @param $entity_type
  *   The type of entity, i.e. 'node', 'user'.
@@ -7706,6 +7775,8 @@ function entity_get_controller($entity_type) {
  * @param $langcode
  *   (optional) A language code to be used for rendering. Defaults to the global
  *   content language of the current request.
+ *
+ * @see hook_entity_prepare_view()
  */
 function entity_prepare_view($entity_type, $entities, $langcode = NULL) {
   if (!isset($langcode)) {
@@ -7732,16 +7803,16 @@ function entity_prepare_view($entity_type, $entities, $langcode = NULL) {
 }
 
 /**
- * Returns the uri elements of an entity.
+ * Returns the URI elements of an entity.
  *
  * @param $entity_type
  *   The entity type; e.g. 'node' or 'user'.
  * @param $entity
  *   The entity for which to generate a path.
  * @return
- *   An array containing the 'path' and 'options' keys used to build the uri of
+ *   An array containing the 'path' and 'options' keys used to build the URI of
  *   the entity, and matching the signature of url(). NULL if the entity has no
- *   uri of its own.
+ *   URI of its own.
  */
 function entity_uri($entity_type, $entity) {
   $info = entity_get_info($entity_type);
@@ -7836,7 +7907,7 @@ function entity_language($entity_type, $entity) {
 }
 
 /**
- * Helper function for attaching field API validation to entity forms.
+ * Attaches field API validation to entity forms.
  */
 function entity_form_field_validate($entity_type, $form, &$form_state) {
   // All field attach API functions act on an entity object, but during form
@@ -7849,7 +7920,7 @@ function entity_form_field_validate($entity_type, $form, &$form_state) {
 }
 
 /**
- * Helper function for copying submitted values to entity properties for simple entity forms.
+ * Copies submitted values to entity properties for simple entity forms.
  *
  * During the submission handling of an entity form's "Save", "Preview", and
  * possibly other buttons, the form state's entity needs to be updated with the
diff --git a/includes/database/database.inc b/includes/database/database.inc
index 5bcae67a37f99f88a0df0cf3a22b9c4b003705d1..cae50fb87a71bcd44dfe427d2b92e7054e9ed252 100644
--- a/includes/database/database.inc
+++ b/includes/database/database.inc
@@ -167,7 +167,7 @@
  * }
  * @endcode
  *
- * @link http://drupal.org/developing/api/database
+ * @link http://drupal.org/developing/api/database @endlink
  */
 
 
@@ -2769,7 +2769,7 @@ function _db_create_keys_sql($spec) {
  * Renames a table.
  *
  * @param $table
- *   The table to be renamed.
+ *   The current name of the table to be renamed.
  * @param $new_name
  *   The new name for the table.
  */
diff --git a/includes/database/log.inc b/includes/database/log.inc
index ec27ef8e6332ad6543ce7b489b0048b4aa3a8034..27eae62cd2a7c6dd77b03e97083a35b8d71ffa23 100644
--- a/includes/database/log.inc
+++ b/includes/database/log.inc
@@ -128,9 +128,10 @@ class DatabaseLog {
    * Determine the routine that called this query.
    *
    * We define "the routine that called this query" as the first entry in
-   * the call stack that is not inside includes/database. That makes the
-   * climbing logic very simple, and handles the variable stack depth caused
-   * by the query builders.
+   * the call stack that is not inside includes/database and does have a file
+   * (which excludes call_user_func_array(), anonymous functions and similar).
+   * That makes the climbing logic very simple, and handles the variable stack
+   * depth caused by the query builders.
    *
    * @link http://www.php.net/debug_backtrace
    * @return
@@ -144,7 +145,8 @@ class DatabaseLog {
     $stack = debug_backtrace();
     $stack_count = count($stack);
     for ($i = 0; $i < $stack_count; ++$i) {
-      if (strpos($stack[$i]['file'], 'includes' . DIRECTORY_SEPARATOR . 'database') === FALSE) {
+      if (!empty($stack[$i]['file']) && strpos($stack[$i]['file'], 'includes' . DIRECTORY_SEPARATOR . 'database') === FALSE) {
+        $stack[$i] += array('args' => array());
         return array(
           'file' => $stack[$i]['file'],
           'line' => $stack[$i]['line'],
diff --git a/includes/database/pgsql/database.inc b/includes/database/pgsql/database.inc
index 79c16b21257217d0bf041f2a2bf0c4c6f0b7a188..00ed7990e442e0cb365d78b7de7cfc96e7fdc714 100644
--- a/includes/database/pgsql/database.inc
+++ b/includes/database/pgsql/database.inc
@@ -74,6 +74,17 @@ class DatabaseConnection_pgsql extends DatabaseConnection {
     }
   }
 
+  public function prepareQuery($query) {
+    // mapConditionOperator converts LIKE operations to ILIKE for consistency
+    // with MySQL. However, Postgres does not support ILIKE on bytea (blobs)
+    // fields.
+    // To make the ILIKE operator work, we type-cast bytea fields into text.
+    // @todo This workaround only affects bytea fields, but the involved field
+    //   types involved in the query are unknown, so there is no way to
+    //   conditionally execute this for affected queries only.
+    return parent::prepareQuery(preg_replace('/ ([^ ]+) +(I*LIKE|NOT +I*LIKE) /i', ' ${1}::text ${2} ', $query));
+  }
+
   public function query($query, array $args = array(), $options = array()) {
 
     $options += $this->defaultOptions();
diff --git a/includes/entity.inc b/includes/entity.inc
index 832abe2fd7ef5a6b86e2767144371d9e3cd3d9f5..2fefd59043b9a419f87b45fac8996e160b4f3b69 100644
--- a/includes/entity.inc
+++ b/includes/entity.inc
@@ -296,6 +296,7 @@ class DrupalDefaultEntityController implements DrupalEntityControllerInterface {
 
   /**
    * Attaches data to entities upon loading.
+   *
    * This will attach fields, if the entity is fieldable. It calls
    * hook_entity_load() for modules which need to add data to all entities.
    * It also calls hook_TYPE_load() on the loaded entities. For example
@@ -415,13 +416,14 @@ class EntityFieldQueryException extends Exception {}
  * an EntityFieldQueryException will be raised if an unsupported condition is
  * specified or if the query has field conditions or sorts that are stored in
  * different field storage engines. However, this logic can be overridden in
- * hook_entity_query().
+ * hook_entity_query_alter().
  *
  * Also note that this query does not automatically respect entity access
  * restrictions. Node access control is performed by the SQL storage engine but
  * other storage engines might not do this.
  */
 class EntityFieldQuery {
+
   /**
    * Indicates that both deleted and non-deleted fields should be returned.
    *
@@ -594,9 +596,7 @@ class EntityFieldQuery {
    *
    * 'bundle', 'revision_id' and 'entity_id' have no such restrictions.
    *
-   * Note: The "comment" and "taxonomy_term" entity types don't support bundle
-   * conditions. For "taxonomy_term", propertyCondition('vid') can be used
-   * instead.
+   * Note: The "comment" entity type does not support bundle conditions.
    *
    * @param $name
    *   'entity_type', 'bundle', 'revision_id' or 'entity_id'.
@@ -958,7 +958,7 @@ class EntityFieldQuery {
   }
 
   /**
-   * Enable a pager for the query.
+   * Enables a pager for the query.
    *
    * @param $limit
    *   An integer specifying the number of elements per page.  If passed a false
@@ -986,10 +986,11 @@ class EntityFieldQuery {
   }
 
   /**
-   * Enable sortable tables for this query.
+   * Enables sortable tables for this query.
    *
    * @param $headers
-   *   An EFQ Header array based on which the order clause is added to the query.
+   *   An EFQ Header array based on which the order clause is added to the
+   *   query.
    *
    * @return EntityFieldQuery
    *   The called object.
@@ -1272,7 +1273,7 @@ class EntityFieldQuery {
   }
 
   /**
-   * Get the total number of results and initialize a pager for the query.
+   * Gets the total number of results and initializes a pager for the query.
    *
    * The pager can be disabled by either setting the pager limit to 0, or by
    * setting this query to be a count query.
@@ -1359,6 +1360,6 @@ class EntityFieldQuery {
 }
 
 /**
- * Exception thrown when a malformed entity is passed.
+ * Defines an exception thrown when a malformed entity is passed.
  */
 class EntityMalformedException extends Exception { }
diff --git a/includes/errors.inc b/includes/errors.inc
index 9d0df054424187d24ec4de73ad7a8424fd0602bd..7fd2de2fbae384b319fb01d33753251096de6654 100644
--- a/includes/errors.inc
+++ b/includes/errors.inc
@@ -5,21 +5,6 @@
  * Functions for error handling.
  */
 
-/**
- * Error reporting level: display no errors.
- */
-define('ERROR_REPORTING_HIDE', 0);
-
-/**
- * Error reporting level: display errors and warnings.
- */
-define('ERROR_REPORTING_DISPLAY_SOME', 1);
-
-/**
- * Error reporting level: display all messages.
- */
-define('ERROR_REPORTING_DISPLAY_ALL', 2);
-
 /**
  * Maps PHP error constants to watchdog severity levels.
  *
diff --git a/includes/file.inc b/includes/file.inc
index c5e5cf07d636d2454c3e158eda0e2c0f6f7297fa..1e256c6349d09aace03884234ed07d01582dfb9d 100644
--- a/includes/file.inc
+++ b/includes/file.inc
@@ -398,8 +398,8 @@ function file_create_url($uri) {
     }
   }
   elseif ($scheme == 'http' || $scheme == 'https') {
-    // Check for http so that we don't have to implement getExternalUrl() for
-    // the http wrapper.
+    // Check for HTTP so that we don't have to implement getExternalUrl() for
+    // the HTTP wrapper.
     return $uri;
   }
   else {
@@ -2236,7 +2236,7 @@ function drupal_realpath($uri) {
   if ($wrapper = file_stream_wrapper_get_instance_by_uri($uri)) {
     return $wrapper->realpath();
   }
-  // Check that the uri has a value. There is a bug in PHP 5.2 on *BSD systems
+  // Check that the URI has a value. There is a bug in PHP 5.2 on *BSD systems
   // that makes realpath not return FALSE as expected when passing an empty
   // variable.
   // @todo Remove when Drupal drops support for PHP 5.2.
@@ -2489,7 +2489,7 @@ function file_get_content_headers($file) {
   }
 
   return array(
-    'Content-Type' => $type . '; name="' . $name . '"',
+    'Content-Type' => $type,
     'Content-Length' => $file->filesize,
     'Content-Disposition' => $disposition . '; filename="' . $name . '"',
     'Cache-Control' => 'private',
diff --git a/includes/filetransfer/filetransfer.inc b/includes/filetransfer/filetransfer.inc
index bd2057cddca58b9bef98f094b2c7d986b6bde7a8..023b866e355ef88f23e30ce317bfe087deab703a 100644
--- a/includes/filetransfer/filetransfer.inc
+++ b/includes/filetransfer/filetransfer.inc
@@ -381,7 +381,7 @@ interface FileTransferChmodInterface {
    * @param string $path
    *   Path to change permissions of.
    * @param long $mode
-   *   @see http://php.net/chmod
+   *   The new file permission mode to be passed to chmod().
    * @param boolean $recursive
    *   Pass TRUE to recursively chmod the entire directory specified in $path.
    */
diff --git a/includes/form.inc b/includes/form.inc
index d7350b3e2b5f661570e6132e5bf0002369d38142..aa90eca691ad4a23f76d574641311cb448b5aa5b 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -78,7 +78,7 @@
  * the elements and properties of the form. For information on the array
  * components and format, and more detailed explanations of the Form API
  * workflow, see the
- * @link http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html Form API reference @endlink
+ * @link forms_api_reference.html Form API reference @endlink
  * and the
  * @link http://drupal.org/node/37775 Form API documentation section. @endlink
  * In addition, there is a set of Form API tutorials in
@@ -215,17 +215,15 @@ function drupal_get_form($form_id) {
  *     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.
+ *     their decision making. (Note that #tree determines whether the values are
+ *     a flat array or an array whose structure parallels the $form array. See
+ *     @link forms_api_reference.html Form API reference @endlink for more
+ *     information.) 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
@@ -730,7 +728,7 @@ function drupal_retrieve_form($form_id, &$form_state) {
   // the form builder callbacks can be loaded when the form is being rebuilt
   // from cache on a different path (such as 'system/ajax'). See
   // form_get_cache().
-  // $menu_get_item() is not available at installation time.
+  // $menu_get_item() is not available during installation.
   if (!isset($form_state['build_info']['files']['menu']) && !defined('MAINTENANCE_MODE')) {
     $item = menu_get_item();
     if (!empty($item['include_file'])) {
@@ -852,7 +850,10 @@ function drupal_process_form($form_id, &$form, &$form_state) {
     // cache when a form is processed, so scenarios that result in
     // the form being built behind the scenes and again for the
     // browser don't increment all the element IDs needlessly.
-    drupal_static_reset('drupal_html_id');
+    if (!form_get_errors()) {
+      // In case of errors, do not break HTML IDs of other forms.
+      drupal_static_reset('drupal_html_id');
+    }
 
     if ($form_state['submitted'] && !form_get_errors() && !$form_state['rebuild']) {
       // Execute form submit handlers.
@@ -1177,18 +1178,23 @@ function drupal_validate_form($form_id, &$form, &$form_state) {
 /**
  * Redirects the user to a URL after a form has been processed.
  *
- * After a form was executed, the data in $form_state controls whether the form
- * is redirected. By default, we redirect to a new destination page. The path
- * of the destination page can be set in $form_state['redirect'], as either a
- * string containing the destination or an array of arguments compatible with
- * drupal_goto(). If that is not set, the user is redirected to the current
- * page to display a fresh, unpopulated copy of the form.
+ * After a form is submitted and processed, normally the user should be
+ * redirected to a new destination page. This function figures out what that
+ * destination should be, based on the $form_state array and the 'destination'
+ * query string in the request URL, and redirects the user there.
+ *
+ * Usually (for exceptions, see below) $form_state['redirect'] determines where
+ * to redirect the user. This can be set either to a string (the path to
+ * redirect to), or an array of arguments for drupal_goto(). If
+ * $form_state['redirect'] is missing, the user is usually (again, see below for
+ * exceptions) redirected back to the page they came from, where they should see
+ * a fresh, unpopulated copy of the form.
  *
- * For example, to redirect to 'node':
+ * Here is an example of how to set up a form to redirect to the path 'node':
  * @code
  * $form_state['redirect'] = 'node';
  * @endcode
- * Or to redirect to 'node/123?foo=bar#baz':
+ * And here is an example of how to redirect to 'node/123?foo=bar#baz':
  * @code
  * $form_state['redirect'] = array(
  *   'node/123',
@@ -1201,29 +1207,27 @@ function drupal_validate_form($form_id, &$form, &$form_state) {
  * );
  * @endcode
  *
- * There are several triggers that may prevent a redirection though:
- * - If $form_state['redirect'] is FALSE, a form builder function or form
- *   validation/submit handler does not want a user to be redirected, which
- *   means that drupal_goto() is not invoked. For most forms, the redirection
- *   logic will be the same regardless of whether $form_state['redirect'] is
- *   undefined or FALSE. However, in case it was not defined and the current
- *   request contains a 'destination' query string, drupal_goto() will redirect
- *   to that given destination instead. Only setting $form_state['redirect'] to
- *   FALSE will prevent any redirection.
- * - If $form_state['no_redirect'] is TRUE, then the callback that originally
- *   built the form explicitly disallows any redirection, regardless of the
- *   redirection value in $form_state['redirect']. For example, ajax_get_form()
- *   defines $form_state['no_redirect'] when building a form in an Ajax
- *   callback to prevent any redirection. $form_state['no_redirect'] should NOT
- *   be altered by form builder functions or form validation/submit handlers.
+ * There are several exceptions to the "usual" behavior described above:
  * - If $form_state['programmed'] is TRUE, the form submission was usually
  *   invoked via drupal_form_submit(), so any redirection would break the script
- *   that invoked drupal_form_submit().
- * - If $form_state['rebuild'] is TRUE, the form needs to be rebuilt without
- *   redirection.
+ *   that invoked drupal_form_submit() and no redirection is done.
+ * - If $form_state['rebuild'] is TRUE, the form is being rebuilt, and no
+ *   redirection is done.
+ * - If $form_state['no_redirect'] is TRUE, redirection is disabled. This is
+ *   set, for instance, by ajax_get_form() to prevent redirection in Ajax
+ *   callbacks. $form_state['no_redirect'] should never be set or altered by
+ *   form builder functions or form validation/submit handlers.
+ * - If $form_state['redirect'] is set to FALSE, redirection is disabled.
+ * - If none of the above conditions has prevented redirection, then the
+ *   redirect is accomplished by calling drupal_goto(), passing in the value of
+ *   $form_state['redirect'] if it is set, or the current path if it is
+ *   not. drupal_goto() preferentially uses the value of $_GET['destination']
+ *   (the 'destination' URL query string) if it is present, so this will
+ *   override any values set by $form_state['redirect']. Note that during
+ *   installation, install_goto() is called in place of drupal_goto().
  *
  * @param $form_state
- *   A keyed array containing the current state of the form.
+ *   An associative array containing the current state of the form.
  *
  * @see drupal_process_form()
  * @see drupal_build_form()
@@ -1255,7 +1259,7 @@ function drupal_redirect_form($form_state) {
         $function($form_state['redirect']);
       }
     }
-    drupal_goto($_GET['q']);
+    drupal_goto(current_path(), array('query' => drupal_get_query_parameters()));
   }
 }
 
@@ -3251,21 +3255,6 @@ function theme_container($variables) {
 /**
  * Returns HTML for a table with radio buttons or checkboxes.
  *
- * An example of per-row options:
- * @code
- * $options = array();
- * $options[0]['title'] = "A red row"
- * $options[0]['#attributes'] = array ('class' => array('red-row'));
- * $options[1]['title'] = "A blue row"
- * $options[1]['#attributes'] = array ('class' => array('blue-row'));
- *
- * $form['myselector'] = array (
- * '#type' => 'tableselect',
- * '#title' => 'My Selector'
- * '#options' => $options,
- * );
- * @endcode
- *
  * @param $variables
  *   An associative array containing:
  *   - element: An associative array containing the properties and children of
@@ -3273,7 +3262,35 @@ function theme_container($variables) {
  *     and #js_select. The #options property is an array of selection options;
  *     each array element of #options is an array of properties. These
  *     properties can include #attributes, which is added to the
- *     table row's HTML attributes; see theme_table().
+ *     table row's HTML attributes; see theme_table(). An example of per-row
+ *     options:
+ *     @code
+ *     $options = array(
+ *       array(
+ *         'title' => 'How to Learn Drupal',
+ *         'content_type' => 'Article',
+ *         'status' => 'published',
+ *         '#attributes' => array('class' => array('article-row')),
+ *       ),
+ *       array(
+ *         'title' => 'Privacy Policy',
+ *         'content_type' => 'Page',
+ *         'status' => 'published',
+ *         '#attributes' => array('class' => array('page-row')),
+ *       ),
+ *     );
+ *     $header = array(
+ *       'title' => t('Title'),
+ *       'content_type' => t('Content type'),
+ *       'status' => t('Status'),
+ *     );
+ *     $form['table'] = array(
+ *       '#type' => 'tableselect',
+ *       '#header' => $header,
+ *       '#options' => $options,
+ *       '#empty' => t('No content available.'),
+ *     );
+ *     @endcode
  *
  * @ingroup themeable
  */
@@ -3645,6 +3662,35 @@ function form_pre_render_fieldset($element) {
 /**
  * Creates a group formatted as vertical tabs.
  *
+ * Note that autocomplete callbacks should include special handling as the
+ * user's input may contain forward slashes. If the user-submitted string has a
+ * '/' in the text that is sent in the autocomplete request, the menu system
+ * will split the text and pass it to the callback as multiple arguments.
+ *
+ * Suppose your autocomplete path in the menu system is 'mymodule_autocomplete.'
+ * In your form you have:
+ * @code
+ * '#autocomplete_path' => 'mymodule_autocomplete/' . $some_key . '/' . $some_id,
+ * @endcode
+ * The user types in "keywords" so the full path called is:
+ * 'mymodule_autocomplete/$some_key/$some_id/keywords'
+ *
+ * You should include code similar to the following to handle slashes in the
+ * input:
+ * @code
+ * function mymodule_autocomplete_callback($arg1, $arg2, $keywords) {
+ *   $args = func_get_args();
+ *   // We need to remove $arg1 and $arg2 from the beginning of the array so we
+ *   // are left with the keywords.
+ *   array_shift($args);
+ *   array_shift($args);
+ *   // We store the user's original input in $keywords, including any slashes.
+ *   $keywords = implode('/', $args);
+ *
+ *   // Your code here.
+ * }
+ * @endcode
+ *
  * @param $element
  *   An associative array containing the properties and children of the
  *   fieldset.
@@ -4153,7 +4199,7 @@ function _form_set_class(&$element, $class = array()) {
   if (!empty($element['#required'])) {
     $element['#attributes']['class'][] = 'required';
   }
-  if (isset($element['#parents']) && form_get_error($element)) {
+  if (isset($element['#parents']) && form_get_error($element) !== NULL) {
     $element['#attributes']['class'][] = 'error';
   }
 }
@@ -4363,7 +4409,7 @@ function batch_set($batch_definition) {
     }
 
     // Base and default properties for the batch set.
-    // Use get_t() to allow batches at install time.
+    // Use get_t() to allow batches during installation.
     $t = get_t();
     $init = array(
       'sandbox' => array(),
diff --git a/includes/image.inc b/includes/image.inc
index f6ae7f19b4c4ff5c77144dba7c58d49d7efe9c8b..ee5a086de64b0843e2558b2296d95ebdc08398f6 100644
--- a/includes/image.inc
+++ b/includes/image.inc
@@ -34,7 +34,7 @@
  */
 
 /**
- * Return a list of available toolkits.
+ * Gets a list of available toolkits.
  *
  * @return
  *   An array with the toolkit names as keys and the descriptions as values.
@@ -55,7 +55,7 @@ function image_get_available_toolkits() {
 }
 
 /**
- * Retrieve the name of the currently used toolkit.
+ * Gets the name of the currently used toolkit.
  *
  * @return
  *   String containing the name of the selected toolkit, or FALSE on error.
@@ -101,7 +101,7 @@ function image_toolkit_invoke($method, stdClass $image, array $params = array())
 }
 
 /**
- * Get details about an image.
+ * Gets details about an image.
  *
  * Drupal supports GIF, JPG and PNG file formats when used with the GD
  * toolkit, and may support others, depending on which toolkits are
@@ -261,7 +261,7 @@ function image_scale(stdClass $image, $width = NULL, $height = NULL, $upscale =
 }
 
 /**
- * Resize an image to the given dimensions (ignoring aspect ratio).
+ * Resizes an image to the given dimensions (ignoring aspect ratio).
  *
  * @param $image
  *   An image object returned by image_load().
@@ -284,7 +284,7 @@ function image_resize(stdClass $image, $width, $height) {
 }
 
 /**
- * Rotate an image by the given number of degrees.
+ * Rotates an image by the given number of degrees.
  *
  * @param $image
  *   An image object returned by image_load().
@@ -308,7 +308,7 @@ function image_rotate(stdClass $image, $degrees, $background = NULL) {
 }
 
 /**
- * Crop an image to the rectangle specified by the given rectangle.
+ * Crops an image to a rectangle specified by the given dimensions.
  *
  * @param $image
  *   An image object returned by image_load().
@@ -340,7 +340,7 @@ function image_crop(stdClass $image, $x, $y, $width, $height) {
 }
 
 /**
- * Convert an image to grayscale.
+ * Converts an image to grayscale.
  *
  * @param $image
  *   An image object returned by image_load().
@@ -355,9 +355,8 @@ function image_desaturate(stdClass $image) {
   return image_toolkit_invoke('desaturate', $image);
 }
 
-
 /**
- * Load an image file and return an image object.
+ * Loads an image file and returns an image object.
  *
  * Any changes to the file are not saved until image_save() is called.
  *
@@ -400,7 +399,7 @@ function image_load($file, $toolkit = FALSE) {
 }
 
 /**
- * Close the image and save the changes to a file.
+ * Closes the image and saves the changes to a file.
  *
  * @param $image
  *   An image object returned by image_load(). The object's 'info' property
diff --git a/includes/install.core.inc b/includes/install.core.inc
index 7bcd026ae01ea092bb2170c9dde1954be5e62a2b..9805e1c8862cf198dce1b87925399c54e7e411dd 100644
--- a/includes/install.core.inc
+++ b/includes/install.core.inc
@@ -6,8 +6,7 @@
  */
 
 /**
- * Global flag to indicate that a task should not be run during the current
- * installation request.
+ * Do not run the task during the current installation request.
  *
  * This can be used to skip running an installation task when certain
  * conditions are met, even though the task may still show on the list of
@@ -20,8 +19,7 @@
 define('INSTALL_TASK_SKIP', 1);
 
 /**
- * Global flag to indicate that a task should be run on each installation
- * request that reaches it.
+ * Run the task on each installation request until the database is set up.
  *
  * This is primarily used by the Drupal installer for bootstrap-related tasks.
  */
@@ -200,7 +198,7 @@ function install_state_defaults() {
 }
 
 /**
- * Begin an installation request, modifying the installation state as needed.
+ * Begins an installation request, modifying the installation state as needed.
  *
  * This function performs commands that must run at the beginning of every page
  * request. It throws an exception if the installation should not proceed.
@@ -524,7 +522,7 @@ function install_tasks($install_state) {
   $needs_translations = count($install_state['locales']) > 1 && !empty($install_state['parameters']['locale']) && $install_state['parameters']['locale'] != 'en';
 
   // Start with the core installation tasks that run before handing control
-  // to the install profile.
+  // to the installation profile.
   $tasks = array(
     'install_select_profile' => array(
       'display_name' => st('Choose profile'),
@@ -708,7 +706,7 @@ function install_display_output($output, $install_state) {
 }
 
 /**
- * Installation task; verify the requirements for installing Drupal.
+ * Verifies the requirements for installing Drupal.
  *
  * @param $install_state
  *   An array of information about the current installation state.
@@ -776,7 +774,7 @@ function install_system_module(&$install_state) {
   // variable_set() can be used now that system.module is installed.
   $modules = $install_state['profile_info']['dependencies'];
 
-  // The install profile is also a module, which needs to be installed
+  // The installation profile is also a module, which needs to be installed
   // after all the dependencies have been installed.
   $modules[] = drupal_get_profile();
 
@@ -785,7 +783,7 @@ function install_system_module(&$install_state) {
 }
 
 /**
- * Verify and return the last installation task that was completed.
+ * Verifies and returns the last installation task that was completed.
  *
  * @return
  *   The last completed task, if there is one. An exception is thrown if Drupal
@@ -829,7 +827,7 @@ function install_verify_settings() {
 }
 
 /**
- * Verify PDO library.
+ * Verifies the PDO library.
  */
 function install_verify_pdo() {
   // PDO was moved to PHP core in 5.2.0, but the old extension (targeting 5.0
@@ -841,15 +839,14 @@ function install_verify_pdo() {
 }
 
 /**
- * Installation task; define a form to configure and rewrite settings.php.
+ * Form constructor for a form to configure and rewrite settings.php.
  *
- * @param $form_state
- *   An associative array containing the current state of the form.
  * @param $install_state
  *   An array of information about the current installation state.
  *
- * @return
- *   The form API definition for the database configuration form.
+ * @see install_settings_form_validate()
+ * @see install_settings_form_submit()
+ * @ingroup forms
  */
 function install_settings_form($form, &$form_state, &$install_state) {
   global $databases;
@@ -912,7 +909,9 @@ function install_settings_form($form, &$form_state, &$install_state) {
 }
 
 /**
- * Form API validate for install_settings form.
+ * Form validation handler for install_settings_form().
+ *
+ * @see install_settings_form_submit()
  */
 function install_settings_form_validate($form, &$form_state) {
   $driver = $form_state['values']['driver'];
@@ -969,7 +968,9 @@ function install_database_errors($database, $settings_file) {
 }
 
 /**
- * Form API submit for install_settings form.
+ * Form submission handler for install_settings_form().
+ *
+ * @see install_settings_form_validate()
  */
 function install_settings_form_submit($form, &$form_state) {
   global $install_state;
@@ -1000,7 +1001,7 @@ function install_find_profiles() {
 }
 
 /**
- * Installation task; select which profile to install.
+ * Selects which profile to install.
  *
  * @param $install_state
  *   An array of information about the current installation state. The chosen
@@ -1040,8 +1041,7 @@ function install_select_profile(&$install_state) {
 }
 
 /**
- * Helper function for automatically selecting an installation profile from a
- * list or from a selection passed in via $_POST.
+ * Selects an installation profile from a list or from a $_POST submission.
  */
 function _install_select_profile($profiles) {
   if (sizeof($profiles) == 0) {
@@ -1064,12 +1064,14 @@ function _install_select_profile($profiles) {
 }
 
 /**
- * Form API array definition for the profile selection form.
+ * Form constructor for the profile selection form.
  *
  * @param $form_state
  *   Array of metadata about state of form processing.
  * @param $profile_files
  *   Array of .profile files, as returned from file_scan_directory().
+ *
+ * @ingroup forms
  */
 function install_select_profile_form($form, &$form_state, $profile_files) {
   $profiles = array();
@@ -1246,7 +1248,9 @@ function install_select_locale(&$install_state) {
 }
 
 /**
- * Form API array definition for language selection.
+ * Form constructor for the language selection form.
+ *
+ * @ingroup forms
  */
 function install_select_locale_form($form, &$form_state, $locales, $profilename) {
   include_once DRUPAL_ROOT . '/includes/iso.inc';
@@ -1296,7 +1300,7 @@ function install_already_done_error() {
 }
 
 /**
- * Installation task; load information about the chosen profile.
+ * Loads information about the chosen profile during installation.
  *
  * @param $install_state
  *   An array of information about the current installation state. The loaded
@@ -1315,7 +1319,7 @@ function install_load_profile(&$install_state) {
 }
 
 /**
- * Installation task; perform a full bootstrap of Drupal.
+ * Performs a full bootstrap of Drupal during installation.
  *
  * @param $install_state
  *   An array of information about the current installation state.
@@ -1325,7 +1329,7 @@ function install_bootstrap_full(&$install_state) {
 }
 
 /**
- * Installation task; install required modules via a batch process.
+ * Installs required modules via a batch process.
  *
  * @param $install_state
  *   An array of information about the current installation state.
@@ -1378,7 +1382,7 @@ function install_profile_modules(&$install_state) {
 }
 
 /**
- * Installation task; import languages via a batch process.
+ * Imports languages via a batch process during installation.
  *
  * @param $install_state
  *   An array of information about the current installation state.
@@ -1412,15 +1416,14 @@ function install_import_locales(&$install_state) {
 }
 
 /**
- * Installation task; configure settings for the new site.
+ * Form constructor for a form to configure the new site.
  *
- * @param $form_state
- *   An associative array containing the current state of the form.
  * @param $install_state
  *   An array of information about the current installation state.
  *
- * @return
- *   The form API definition for the site configuration form.
+ * @see install_configure_form_validate()
+ * @see install_configure_form_submit()
+ * @ingroup forms
  */
 function install_configure_form($form, &$form_state, &$install_state) {
   drupal_set_title(st('Configure site'));
@@ -1443,7 +1446,7 @@ function install_configure_form($form, &$form_state, &$install_state) {
   // Add JavaScript time zone detection.
   drupal_add_js('misc/timezone.js');
   // We add these strings as settings because JavaScript translation does not
-  // work on install time.
+  // work during installation.
   drupal_add_js(array('copyFieldValue' => array('edit-site-mail' => array('edit-account-mail'))), 'setting');
   drupal_add_js('jQuery(function () { Drupal.cleanURLsInstallCheck(); });', 'inline');
   // Add JS to show / hide the 'Email administrator about site updates' elements
@@ -1486,7 +1489,7 @@ function install_import_locales_remaining(&$install_state) {
 }
 
 /**
- * Installation task; perform final steps and display a 'finished' page.
+ * Finishes importing files at end of installation.
  *
  * @param $install_state
  *   An array of information about the current installation state.
@@ -1502,13 +1505,13 @@ function install_finished(&$install_state) {
 
   // Flush all caches to ensure that any full bootstraps during the installer
   // do not leave stale cached data, and that any content types or other items
-  // registered by the install profile are registered correctly.
+  // registered by the installation profile are registered correctly.
   drupal_flush_all_caches();
 
   // Remember the profile which was used.
   variable_set('install_profile', drupal_get_profile());
 
-  // Install profiles are always loaded last
+  // Installation profiles are always loaded last
   db_update('system')
     ->fields(array('weight' => 1000))
     ->condition('type', 'module')
@@ -1673,7 +1676,15 @@ function install_check_requirements($install_state) {
 }
 
 /**
- * Forms API array definition for site configuration.
+ * Form constructor for a site configuration form.
+ *
+ * @param $install_state
+ *   An array of information about the current installation state.
+ *
+ * @see install_configure_form()
+ * @see install_configure_form_validate()
+ * @see install_configure_form_submit()
+ * @ingroup forms
  */
 function _install_configure_form($form, &$form_state, &$install_state) {
   include_once DRUPAL_ROOT . '/includes/locale.inc';
@@ -1786,7 +1797,9 @@ function _install_configure_form($form, &$form_state, &$install_state) {
 }
 
 /**
- * Forms API validate for the site configuration form.
+ * Form validation handler for install_configure_form().
+ *
+ * @see install_configure_form_submit()
  */
 function install_configure_form_validate($form, &$form_state) {
   if ($error = user_validate_name($form_state['values']['account']['name'])) {
@@ -1801,7 +1814,9 @@ function install_configure_form_validate($form, &$form_state) {
 }
 
 /**
- * Forms API submit for the site configuration form.
+ * Form submission handler for install_configure_form().
+ *
+ * @see install_configure_form_validate()
  */
 function install_configure_form_submit($form, &$form_state) {
   global $user;
diff --git a/includes/install.inc b/includes/install.inc
index 6411f8f195946eebc640c2b56108a091d612da49..0372483b6decf66ac7b0d56bddae84dd6d5356b6 100644
--- a/includes/install.inc
+++ b/includes/install.inc
@@ -1,5 +1,10 @@
 <?php
 
+/**
+* @file
+* API functions for installing modules and themes.
+*/
+
 /**
  * Indicates that a module has not been installed yet.
  */
@@ -71,7 +76,7 @@ define('FILE_NOT_WRITABLE', 64);
 define('FILE_NOT_EXECUTABLE', 128);
 
 /**
- * Initialize the update system by loading all installed module's .install files.
+ * Loads .install files for installed modules to initialize the update system.
  */
 function drupal_load_updates() {
   foreach (drupal_get_installed_schema_version(NULL, FALSE, TRUE) as $module => $schema_version) {
@@ -180,11 +185,11 @@ function drupal_set_installed_schema_version($module, $version) {
 }
 
 /**
- * Loads the install profile, extracting its defined distribution name.
+ * Loads the installation profile, extracting its defined distribution name.
  *
  * @return
  *   The distribution name defined in the profile's .info file. Defaults to
- *   "Drupal" if none is explicitly provided by the install profile.
+ *   "Drupal" if none is explicitly provided by the installation profile.
  *
  * @see install_profile_info()
  */
@@ -204,11 +209,12 @@ function drupal_install_profile_distribution_name() {
 }
 
 /**
- * Auto detect the base_url with PHP predefined variables.
+ * Detects the base URL using the PHP $_SERVER variables.
  *
  * @param $file
  *   The name of the file calling this function so we can strip it out of
  *   the URI when generating the base_url.
+ *
  * @return
  *   The auto-detected $base_url that should be configured in settings.php
  */
@@ -223,7 +229,7 @@ function drupal_detect_baseurl($file = 'install.php') {
 }
 
 /**
- * Detect all supported databases that are compiled into PHP.
+ * Detects all supported databases that are compiled into PHP.
  *
  * @return
  *  An array of database types compiled into PHP.
@@ -239,7 +245,7 @@ function drupal_detect_database_types() {
 }
 
 /**
- * Return all supported database installer objects that are compiled into PHP.
+ * Returns all supported database installer objects that are compiled into PHP.
  *
  * @return
  *  An array of database installer objects compiled into PHP.
@@ -576,7 +582,7 @@ class DatabaseTaskException extends Exception {
 }
 
 /**
- * Replace values in settings.php with values in the submitted array.
+ * Replaces values in settings.php with values in the submitted array.
  *
  * @param $settings
  *   An array of settings that need to be updated.
@@ -654,10 +660,11 @@ function drupal_rewrite_settings($settings = array(), $prefix = '') {
 }
 
 /**
- * Verify an install profile for installation.
+ * Verifies an installation profile for installation.
  *
  * @param $install_state
  *   An array of information about the current installation state.
+ *
  * @return
  *   The list of modules to install.
  */
@@ -681,8 +688,8 @@ function drupal_verify_profile($install_state) {
     $present_modules[] = $present_module->name;
   }
 
-  // The install profile is also a module, which needs to be installed after all the other dependencies
-  // have been installed.
+  // The installation profile is also a module, which needs to be installed
+  // after all the other dependencies have been installed.
   $present_modules[] = drupal_get_profile();
 
   // Verify that all of the profile's required modules are present.
@@ -706,7 +713,7 @@ function drupal_verify_profile($install_state) {
 }
 
 /**
- * Callback to install the system module.
+ * Installs the system module.
  *
  * Separated from the installation of other modules so core system
  * functions can be made available while other modules are installed.
@@ -800,7 +807,7 @@ function drupal_uninstall_modules($module_list = array(), $uninstall_dependents
 }
 
 /**
- * Verify the state of the specified file.
+ * Verifies the state of the specified file.
  *
  * @param $file
  *   The file to check for.
@@ -808,6 +815,7 @@ function drupal_uninstall_modules($module_list = array(), $uninstall_dependents
  *   An optional bitmask created from various FILE_* constants.
  * @param $type
  *   The type of file. Can be file (default), dir, or link.
+ *
  * @return
  *   TRUE on success or FALSE on failure. A message is set for the latter.
  */
@@ -879,7 +887,7 @@ function drupal_verify_install_file($file, $mask = NULL, $type = 'file') {
 }
 
 /**
- * Create a directory with specified permissions.
+ * Creates a directory with the specified permissions.
  *
  * @param $file
  *  The name of the directory to create;
@@ -887,6 +895,7 @@ function drupal_verify_install_file($file, $mask = NULL, $type = 'file') {
  *  The permissions of the directory to create.
  * @param $message
  *  (optional) Whether to output messages. Defaults to TRUE.
+ *
  * @return
  *  TRUE/FALSE whether or not the directory was successfully created.
  */
@@ -918,7 +927,7 @@ function drupal_install_mkdir($file, $mask, $message = TRUE) {
 }
 
 /**
- * Attempt to fix file permissions.
+ * Attempts to fix file permissions.
  *
  * The general approach here is that, because we do not know the security
  * setup of the webserver, we apply our permission changes to all three
@@ -935,6 +944,7 @@ function drupal_install_mkdir($file, $mask, $message = TRUE) {
  *  The desired permissions for the file.
  * @param $message
  *  (optional) Whether to output messages. Defaults to TRUE.
+ *
  * @return
  *  TRUE/FALSE whether or not we were able to fix the file's permissions.
  */
@@ -1000,7 +1010,7 @@ function drupal_install_fix_file($file, $mask, $message = TRUE) {
 }
 
 /**
- * Send the user to a different installer page.
+ * Sends the user to a different installer page.
  *
  * This issues an on-site HTTP redirect. Messages (and errors) are erased.
  *
@@ -1078,7 +1088,7 @@ function drupal_requirements_url($severity) {
 }
 
 /**
- * Functional equivalent of t(), used when some systems are not available.
+ * Translates a string when some systems are not available.
  *
  * Used during the install process, when database, theme, and localization
  * system is possibly not yet available.
@@ -1138,12 +1148,12 @@ function st($string, array $args = array(), array $options = array()) {
 }
 
 /**
- * Check an install profile's requirements.
+ * Checks an installation profile's requirements.
  *
  * @param $profile
- *   Name of install profile to check.
+ *   Name of installation profile to check.
  * @return
- *   Array of the install profile's requirements.
+ *   Array of the installation profile's requirements.
  */
 function drupal_check_profile($profile) {
   include_once DRUPAL_ROOT . '/includes/file.inc';
@@ -1169,11 +1179,12 @@ function drupal_check_profile($profile) {
 }
 
 /**
- * Extract highest severity from requirements array.
+ * Extracts the highest severity from the requirements array.
  *
  * @param $requirements
  *   An array of requirements, in the same format as is returned by
  *   hook_requirements().
+ *
  * @return
  *   The highest severity in the array.
  */
@@ -1188,12 +1199,13 @@ function drupal_requirements_severity(&$requirements) {
 }
 
 /**
- * Check a module's requirements.
+ * Checks a module's requirements.
  *
  * @param $module
  *   Machine name of module to check.
+ *
  * @return
- *   TRUE/FALSE depending on the requirements are in place.
+ *   TRUE or FALSE, depending on whether the requirements are met.
  */
 function drupal_check_module($module) {
   module_load_install($module);
@@ -1218,13 +1230,14 @@ function drupal_check_module($module) {
 }
 
 /**
- * Retrieve info about an install profile from its .info file.
+ * Retrieves information about an installation profile from its .info file.
  *
  * The information stored in a profile .info file is similar to that stored in
  * a normal Drupal module .info file. For example:
- * - name: The real name of the install profile for display purposes.
+ * - name: The real name of the installation profile for display purposes.
  * - description: A brief description of the profile.
- * - dependencies: An array of shortnames of other modules this install profile requires.
+ * - dependencies: An array of shortnames of other modules that this install
+ *   profile requires.
  *
  * Additional, less commonly-used information that can appear in a profile.info
  * file but not in a normal Drupal module .info file includes:
diff --git a/includes/iso.inc b/includes/iso.inc
index a88de57e98ce8fc76a981d6f0f2f4bfc4c67fc71..6c66c569fee43a6e47ae6403f88244fe51d46a0d 100644
--- a/includes/iso.inc
+++ b/includes/iso.inc
@@ -461,7 +461,7 @@ function _locale_get_predefined_list() {
     'tt' => array('Tatar', 'Tatarça'),
     'tw' => array('Twi'),
     'ty' => array('Tahitian'),
-    'ug' => array('Uighur'),
+    'ug' => array('Uyghur'),
     'uk' => array('Ukrainian', 'Українська'),
     'ur' => array('Urdu', /* Left-to-right marker "‭" */ 'اردو', LANGUAGE_RTL),
     'uz' => array('Uzbek', "o'zbek"),
diff --git a/includes/language.inc b/includes/language.inc
index 20909f5a6f4d6af47fc519d531ca564538c64302..d0ea83113371ea7517548774a6d790d696a64eb1 100644
--- a/includes/language.inc
+++ b/includes/language.inc
@@ -190,6 +190,11 @@ function language_negotiation_get_switch_links($type, $path) {
   $links = FALSE;
   $negotiation = variable_get("language_negotiation_$type", array());
 
+  // Only get the languages if we have more than one.
+  if (count(language_list()) >= 2) {
+    $language = language_initialize($type);
+  }
+
   foreach ($negotiation as $id => $provider) {
     if (isset($provider['callbacks']['switcher'])) {
       if (isset($provider['file'])) {
@@ -199,6 +204,12 @@ function language_negotiation_get_switch_links($type, $path) {
       $callback = $provider['callbacks']['switcher'];
       $result = $callback($type, $path);
 
+      // Add support for WCAG 2.0's Language of Parts to add language identifiers.
+      // http://www.w3.org/TR/UNDERSTANDING-WCAG20/meaning-other-lang-id.html
+      foreach ($result as $langcode => $link) {
+        $result[$langcode]['attributes']['lang'] = $langcode;
+      }
+
       if (!empty($result)) {
         // Allow modules to provide translations for specific links.
         drupal_alter('language_switch_links', $result, $type, $path);
@@ -408,7 +419,7 @@ function language_from_default() {
 }
 
 /**
- * Split the given path into prefix and actual path.
+ * Splits the given path into prefix and actual path.
  *
  * Parse the given path and return the language object identified by the
  * prefix and the actual path.
@@ -440,10 +451,10 @@ function language_url_split_prefix($path, $languages) {
 }
 
 /**
- * Return the possible fallback languages ordered by language weight.
+ * Returns the possible fallback languages ordered by language weight.
  *
  * @param
- *   The language type.
+ *   (optional) The language type. Defaults to LANGUAGE_TYPE_CONTENT.
  *
  * @return
  *   An array of language codes.
diff --git a/includes/mail.inc b/includes/mail.inc
index 13a6f4643907bd080566626041b66184b993caf2..8479d8e9bfb22298a6c164a3ab6f4c3d933bd8c6 100644
--- a/includes/mail.inc
+++ b/includes/mail.inc
@@ -13,7 +13,7 @@
 define('MAIL_LINE_ENDINGS', isset($_SERVER['WINDIR']) || strpos($_SERVER['SERVER_SOFTWARE'], 'Win32') !== FALSE ? "\r\n" : "\n");
 
 /**
- * Compose and optionally send an e-mail message.
+ * Composes and optionally sends an e-mail message.
  *
  * Sending an e-mail works with defining an e-mail template (subject, text
  * and possibly e-mail headers) and the replacement values to use in the
@@ -191,7 +191,7 @@ function drupal_mail($module, $key, $to, $language, $params = array(), $from = N
 }
 
 /**
- * Returns an object that implements the MailSystemInterface.
+ * Returns an object that implements the MailSystemInterface interface.
  *
  * Allows for one or more custom mail backends to format and send mail messages
  * composed using drupal_mail().
@@ -328,7 +328,7 @@ interface MailSystemInterface {
 }
 
 /**
- * Perform format=flowed soft wrapping for mail (RFC 3676).
+ * Performs format=flowed soft wrapping for mail (RFC 3676).
  *
  * We use delsp=yes wrapping, but only break non-spaced languages when
  * absolutely necessary to avoid compatibility issues.
@@ -340,6 +340,9 @@ interface MailSystemInterface {
  * @param $indent (optional)
  *   A string to indent the text with. Only '>' characters are repeated on
  *   subsequent wrapped lines. Others are replaced by spaces.
+ *
+ * @return
+ *   The content of the email as a string with formatting applied.
  */
 function drupal_wrap_mail($text, $indent = '') {
   // Convert CRLF into LF.
@@ -371,8 +374,7 @@ function drupal_wrap_mail($text, $indent = '') {
 }
 
 /**
- * Transform an HTML string into plain text, preserving the structure of the
- * markup. Useful for preparing the body of a node to be sent by e-mail.
+ * Transforms an HTML string into plain text, preserving its structure.
  *
  * The output will be suitable for use as 'format=flowed; delsp=yes' text
  * (RFC 3676) and can be passed directly to drupal_mail() for sending.
@@ -551,9 +553,9 @@ function drupal_html_to_text($string, $allowed_tags = NULL) {
 }
 
 /**
- * Helper function for array_walk in drupal_wrap_mail().
- *
  * Wraps words on a single line.
+ *
+ * Callback for array_walk() winthin drupal_wrap_mail().
  */
 function _drupal_wrap_mail_line(&$line, $key, $values) {
   // Use soft-breaks only for purely quoted or unindented text.
@@ -563,9 +565,9 @@ function _drupal_wrap_mail_line(&$line, $key, $values) {
 }
 
 /**
- * Helper function for drupal_html_to_text().
- *
  * Keeps track of URLs and replaces them with placeholder tokens.
+ *
+ * Callback for preg_replace_callback() within drupal_html_to_text().
  */
 function _drupal_html_to_mail_urls($match = NULL, $reset = FALSE) {
   global $base_url, $base_path;
@@ -590,18 +592,18 @@ function _drupal_html_to_mail_urls($match = NULL, $reset = FALSE) {
 }
 
 /**
- * Helper function for drupal_wrap_mail() and drupal_html_to_text().
+ * Replaces non-quotation markers from a given piece of indentation with spaces.
  *
- * Replace all non-quotation markers from a given piece of indentation with spaces.
+ * Callback for array_map() within drupal_html_to_text().
  */
 function _drupal_html_to_text_clean($indent) {
   return preg_replace('/[^>]/', ' ', $indent);
 }
 
 /**
- * Helper function for drupal_html_to_text().
+ * Pads the last line with the given character.
  *
- * Pad the last line with the given character.
+ * @see drupal_html_to_text()
  */
 function _drupal_html_to_text_pad($text, $pad, $prefix = '') {
   // Remove last line break.
diff --git a/includes/menu.inc b/includes/menu.inc
index b25a374ac7810c730a74fe61b46487910b56dc8f..0cb9d23b89c95c8e313560385e8d2b4859eb1eea 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -417,9 +417,9 @@ function menu_unserialize($data, $map) {
  * @param $path
  *   The path.
  * @param $router_item
- *   The router item. Usually you take a router entry from menu_get_item and
- *   set it back either modified or to a different path. This lets you modify the
- *   navigation block, the page title, the breadcrumb and the page help in one
+ *   The router item. Usually a router entry from menu_get_item() is either
+ *   modified or set to a different path. This allows the navigation block,
+ *   the page title, the breadcrumb, and the page help to be modified in one
  *   call.
  */
 function menu_set_item($path, $router_item) {
@@ -427,7 +427,7 @@ function menu_set_item($path, $router_item) {
 }
 
 /**
- * Get a router item.
+ * Gets a router item.
  *
  * @param $path
  *   The path, for example node/5. The function will find the corresponding
@@ -436,12 +436,13 @@ function menu_set_item($path, $router_item) {
  *   Internal use only.
  *
  * @return
- *   The router item, an associate array corresponding to one row in the
- *   menu_router table. The value of key map holds the loaded objects. The
- *   value of key access is TRUE if the current user can access this page.
- *   The values for key title, page_arguments, access_arguments, and
- *   theme_arguments will be filled in based on the database values and the
- *   objects loaded.
+ *   The router item or, if an error occurs in _menu_translate(), FALSE. A
+ *   router item is an associative array corresponding to one row in the
+ *   menu_router table. The value corresponding to the key 'map' holds the
+ *   loaded objects. The value corresponding to the key 'access' is TRUE if the
+ *   current user can access this page. The values corresponding to the keys
+ *   'title', 'page_arguments', 'access_arguments', and 'theme_arguments' will
+ *   be filled in based on the database values and the objects loaded.
  */
 function menu_get_item($path = NULL, $router_item = NULL) {
   $router_items = &drupal_static(__FUNCTION__);
@@ -606,7 +607,7 @@ function _menu_load_objects(&$item, &$map) {
 }
 
 /**
- * Check access to a menu item using the access callback
+ * Checks access to a menu item using the access callback.
  *
  * @param $item
  *   A menu router or menu link item
@@ -638,7 +639,7 @@ function _menu_check_access(&$item, $map) {
 }
 
 /**
- * Localize the router item title using t() or another callback.
+ * Localizes the router item title using t() or another callback.
  *
  * Translate the title and description to allow storage of English title
  * strings in the database, yet display of them in the language required
@@ -746,7 +747,7 @@ function _menu_item_localize(&$item, $map, $link_translate = FALSE) {
  *   $item['load_functions']. $item['access'] becomes TRUE if the item is
  *   accessible, FALSE otherwise. $item['href'] is set according to the map.
  *   If an error occurs during calling the load_functions (like trying to load
- *   a non existing node) then this function return FALSE.
+ *   a non-existent node) then this function returns FALSE.
  */
 function _menu_translate(&$router_item, $map, $to_arg = FALSE) {
   if ($to_arg && !empty($router_item['to_arg_functions'])) {
@@ -796,14 +797,14 @@ function _menu_translate(&$router_item, $map, $to_arg = FALSE) {
 }
 
 /**
- * This function translates the path elements in the map using any to_arg
- * helper function. These functions take an argument and return an object.
- * See http://drupal.org/node/109153 for more information.
+ * Translates the path elements in the map using any to_arg helper function.
  *
  * @param $map
  *   An array of path arguments (ex: array('node', '5'))
  * @param $to_arg_functions
  *   An array of helper function (ex: array(2 => 'menu_tail_to_arg'))
+ *
+ * @see hook_menu()
  */
 function _menu_link_map_translate(&$map, $to_arg_functions) {
   $to_arg_functions = unserialize($to_arg_functions);
@@ -820,14 +821,14 @@ function _menu_link_map_translate(&$map, $to_arg_functions) {
 }
 
 /**
- * Returns path as one string from the argument we are currently at.
+ * Returns a string containing the path relative to the current index.
  */
 function menu_tail_to_arg($arg, $map, $index) {
   return implode('/', array_slice($map, $index));
 }
 
 /**
- * Loads path as one string from the argument we are currently at.
+ * Loads the path as one string relative to the current index.
  *
  * To use this load function, you must specify the load arguments
  * in the router item as:
@@ -844,8 +845,10 @@ function menu_tail_load($arg, &$map, $index) {
 }
 
 /**
- * This function is similar to _menu_translate() but does link-specific
- * preparation such as always calling to_arg functions
+ * Provides menu link access control, translation, and argument handling.
+ *
+ * This function is similar to _menu_translate(), but it also does
+ * link-specific preparation (such as always calling to_arg() functions).
  *
  * @param $item
  *   A menu link.
@@ -939,7 +942,7 @@ function _menu_link_translate(&$item, $translate = FALSE) {
 }
 
 /**
- * Get a loaded object from a router item.
+ * Gets a loaded object from a router item.
  *
  * menu_get_object() provides access to objects loaded by the current router
  * item. For example, on the page node/%node, the router loads the %node object,
@@ -1079,7 +1082,7 @@ function menu_tree_output($tree) {
 }
 
 /**
- * Get the data structure representing a named menu tree.
+ * Gets the data structure representing a named menu tree.
  *
  * Since this can be the full tree including hidden items, the data returned
  * may be used for generating an an admin interface or a select.
@@ -1147,7 +1150,7 @@ function menu_tree_all_data($menu_name, $link = NULL, $max_depth = NULL) {
 }
 
 /**
- * Set the path for determining the active trail of the specified menu tree.
+ * Sets 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
@@ -1172,7 +1175,7 @@ function menu_tree_set_path($menu_name, $path = NULL) {
 }
 
 /**
- * Get the path for determining the active trail of the specified menu tree.
+ * Gets the path for determining the active trail of the specified menu tree.
  *
  * @param $menu_name
  *   The menu name of the requested tree.
@@ -1186,7 +1189,7 @@ function menu_tree_get_path($menu_name) {
 }
 
 /**
- * Get the data structure representing a named menu tree, based on the current page.
+ * Gets the data structure for a named menu tree, based on the current page.
  *
  * The tree order is maintained by storing each parent in an individual
  * field, see http://drupal.org/node/141866 for more.
@@ -1320,7 +1323,7 @@ function menu_tree_page_data($menu_name, $max_depth = NULL, $only_active_trail =
 }
 
 /**
- * Build a menu tree, translate links, and check access.
+ * Builds a menu tree, translates links, and checks access.
  *
  * @param $menu_name
  *   The name of the menu.
@@ -1335,8 +1338,8 @@ function menu_tree_page_data($menu_name, $max_depth = NULL, $only_active_trail =
  *     trail. This option is ignored, if 'expanded' is non-empty. Internally
  *     used for breadcrumbs.
  *   - min_depth: The minimum depth of menu links in the resulting tree.
- *     Defaults to 1, which is the default to build a whole tree for a menu, i.e.
- *     excluding menu container itself.
+ *     Defaults to 1, which is the default to build a whole tree for a menu
+ *     (excluding menu container itself).
  *   - max_depth: The maximum depth of menu links in the resulting tree.
  *   - conditions: An associative array of custom database select query
  *     condition key/value pairs; see _menu_build_tree() for the actual query.
@@ -1353,7 +1356,7 @@ function menu_build_tree($menu_name, array $parameters = array()) {
 }
 
 /**
- * Build a menu tree.
+ * Builds a menu tree.
  *
  * This function may be used build the data for a menu tree only, for example
  * to further massage the data manually before further processing happens.
@@ -1449,7 +1452,7 @@ function _menu_build_tree($menu_name, array $parameters = array()) {
 }
 
 /**
- * Recursive helper function - collect node links.
+ * Collects node links from a given menu tree recursively.
  *
  * @param $tree
  *   The menu tree you wish to collect node links from.
@@ -1472,7 +1475,7 @@ function menu_tree_collect_node_links(&$tree, &$node_links) {
 }
 
 /**
- * Check access and perform other dynamic operations for each link in the tree.
+ * Checks access and performs dynamic operations for each link in the tree.
  *
  * @param $tree
  *   The menu tree you wish to operate on.
@@ -1499,7 +1502,7 @@ function menu_tree_check_access(&$tree, $node_links = array()) {
 }
 
 /**
- * Recursive helper function for menu_tree_check_access()
+ * Sorts the menu tree and recursively checks access for each item.
  */
 function _menu_tree_check_access(&$tree) {
   $new_tree = array();
@@ -1522,7 +1525,7 @@ function _menu_tree_check_access(&$tree) {
 }
 
 /**
- * Builds the data representing a menu tree.
+ * Sorts and returns the built data representing a menu tree.
  *
  * @param $links
  *   A flat array of menu links that are part of the menu. Each array element
@@ -1554,7 +1557,7 @@ function menu_tree_data(array $links, array $parents = array(), $depth = 1) {
 }
 
 /**
- * Recursive helper function to build the data representing a menu tree.
+ * Builds the data representing a menu tree.
  *
  * The function is a bit complex because the rendering of a link depends on
  * the next menu link.
@@ -1589,7 +1592,7 @@ function _menu_tree_data(&$links, $parents, $depth) {
 }
 
 /**
- * Preprocesses the rendered tree for theme_menu_tree().
+ * Implements template_preprocess_HOOK() for theme_menu_tree().
  */
 function template_preprocess_menu_tree(&$variables) {
   $variables['tree'] = $variables['tree']['#children'];
@@ -1783,7 +1786,7 @@ function menu_get_names() {
 }
 
 /**
- * Return an array containing the names of system-defined (default) menus.
+ * Returns an array containing the names of system-defined (default) menus.
  */
 function menu_list_system_menus() {
   return array(
@@ -1795,14 +1798,14 @@ function menu_list_system_menus() {
 }
 
 /**
- * Return an array of links to be rendered as the Main menu.
+ * Returns an array of links to be rendered as the Main menu.
  */
 function menu_main_menu() {
   return menu_navigation_links(variable_get('menu_main_links_source', 'main-menu'));
 }
 
 /**
- * Return an array of links to be rendered as the Secondary links.
+ * Returns an array of links to be rendered as the Secondary links.
  */
 function menu_secondary_menu() {
 
@@ -1817,7 +1820,7 @@ function menu_secondary_menu() {
 }
 
 /**
- * Return an array of links for a navigation menu.
+ * Returns an array of links for a navigation menu.
  *
  * @param $menu_name
  *   The name of the menu.
@@ -2109,14 +2112,12 @@ function menu_local_tasks($level = 0) {
 }
 
 /**
- * Retrieve contextual links for a system object based on registered local tasks.
+ * Retrieves contextual links for a path based on registered local tasks.
  *
  * This leverages the menu system to retrieve the first layer of registered
  * local tasks for a given system path. All local tasks of the tab type
  * MENU_CONTEXT_INLINE are taken into account.
  *
- * @see hook_menu()
- *
  * For example, when considering the following registered local tasks:
  * - node/%node/view (default local task) with no 'context' defined
  * - node/%node/edit with context: MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE
@@ -2144,6 +2145,7 @@ function menu_local_tasks($level = 0) {
  *   A list of menu router items that are local tasks for the passed-in path.
  *
  * @see contextual_links_preprocess()
+ * @see hook_menu()
  */
 function menu_contextual_links($module, $parent_path, $args) {
   static $path_empty = array();
@@ -2237,7 +2239,7 @@ function menu_local_actions() {
 }
 
 /**
- * Returns the router path, or the path of the parent tab of a default local task.
+ * Returns the router path, or the path for a default local task's parent.
  */
 function menu_tab_root_path() {
   $links = menu_local_tasks();
@@ -2258,7 +2260,13 @@ function menu_local_tabs() {
 /**
  * Returns HTML for primary and secondary local tasks.
  *
+ * @param $variables
+ *   An associative array containing:
+ *     - primary: (optional) An array of local tasks (tabs).
+ *     - secondary: (optional) An array of local tasks (tabs).
+ *
  * @ingroup themeable
+ * @see menu_local_tasks()
  */
 function theme_menu_local_tasks(&$variables) {
   $output = '';
@@ -2280,7 +2288,9 @@ function theme_menu_local_tasks(&$variables) {
 }
 
 /**
- * Set (or get) the active menu for the current page - determines the active trail.
+ * Sets (or gets) the active menu for the current page.
+ *
+ * The active menu for the page determines the active trail.
  *
  * @return
  *   An array of menu machine names, in order of preference. The
@@ -2302,17 +2312,17 @@ function menu_set_active_menu_names($menu_names = NULL) {
 }
 
 /**
- * Get the active menu for the current page - determines the active trail.
+ * Gets the active menu for the current page.
  */
 function menu_get_active_menu_names() {
   return menu_set_active_menu_names();
 }
 
 /**
- * Set the active path, which determines which page is loaded.
+ * Sets the active path, which determines which page is loaded.
  *
  * 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
+ * in the page load, such as during hook_boot(), or unless you call
  * menu_execute_active_handler() to generate your page output.
  *
  * @param $path
@@ -2326,7 +2336,7 @@ function menu_set_active_item($path) {
 }
 
 /**
- * Sets the active trail (path to menu tree root) of the current page.
+ * Sets the active trail (path to the 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
@@ -2416,7 +2426,7 @@ function menu_set_active_trail($new_trail = NULL) {
 }
 
 /**
- * Lookup the preferred menu link for a given system path.
+ * Looks up the preferred menu link for a given system path.
  *
  * @param $path
  *   The path, for example 'node/5'. The function will find the corresponding
@@ -2536,7 +2546,7 @@ function menu_get_active_trail() {
 }
 
 /**
- * Get the breadcrumb for the current page, as determined by the active trail.
+ * Gets the breadcrumb for the current page, as determined by the active trail.
  *
  * @see menu_set_active_trail()
  */
@@ -2587,7 +2597,7 @@ function menu_get_active_breadcrumb() {
 }
 
 /**
- * Get the title of the current page, as determined by the active trail.
+ * Gets the title of the current page, as determined by the active trail.
  */
 function menu_get_active_title() {
   $active_trail = menu_get_active_trail();
@@ -2600,7 +2610,7 @@ function menu_get_active_title() {
 }
 
 /**
- * Get a menu link by its mlid, access checked and link translated for rendering.
+ * Gets a translated, access-checked menu link that is ready for rendering.
  *
  * This function should never be called from within node_load() or any other
  * function used as a menu object load function since an infinite recursion may
@@ -2651,7 +2661,9 @@ function menu_cache_clear($menu_name = 'navigation') {
 }
 
 /**
- * Clears all cached menu data. This should be called any time broad changes
+ * Clears all cached menu data.
+ *
+ * This should be called any time broad changes
  * might have been made to the router items or menu links.
  */
 function menu_cache_clear_all() {
@@ -2672,10 +2684,10 @@ function menu_reset_static_cache() {
 }
 
 /**
- * (Re)populate the database tables used by various menu functions.
+ * Populates the database tables used by various menu functions.
  *
  * This function will clear and populate the {menu_router} table, add entries
- * to {menu_links} for new router items, then remove stale items from
+ * to {menu_links} for new router items, and then remove stale items from
  * {menu_links}. If called from update.php or install.php, it will also
  * schedule a call to itself on the first real page load from
  * menu_execute_active_handler(), because the maintenance page environment
@@ -2721,7 +2733,7 @@ function menu_rebuild() {
 }
 
 /**
- * Collect and alter the menu definitions.
+ * Collects and alters the menu definitions.
  */
 function menu_router_build() {
   // We need to manually call each module so that we can know which module
@@ -2745,7 +2757,7 @@ function menu_router_build() {
 }
 
 /**
- * Helper function to store the menu router if we have it in memory.
+ * Stores the menu router if we have it in memory.
  */
 function _menu_router_cache($new_menu = NULL) {
   $menu = &drupal_static(__FUNCTION__);
@@ -2757,7 +2769,7 @@ function _menu_router_cache($new_menu = NULL) {
 }
 
 /**
- * Get the menu router.
+ * Gets the menu router.
  */
 function menu_get_router() {
   // Check first if we have it in memory already.
@@ -2794,7 +2806,7 @@ function _menu_link_build($item) {
 }
 
 /**
- * Helper function to build menu links for the items in the menu router.
+ * Builds menu links for the items in the menu router.
  */
 function _menu_navigation_links_rebuild($menu) {
   // Add normal and suggested items as links.
@@ -2894,7 +2906,7 @@ function _menu_navigation_links_rebuild($menu) {
 }
 
 /**
- * Clone an array of menu links.
+ * Clones an array of menu links.
  *
  * @param $links
  *   An array of menu links to clone.
@@ -2985,12 +2997,14 @@ function menu_link_delete($mlid, $path = NULL) {
 }
 
 /**
- * Helper function for menu_link_delete; deletes a single menu link.
+ * Deletes a single menu link.
  *
  * @param $item
  *   Item to be deleted.
  * @param $force
  *   Forces deletion. Internal use only, setting to TRUE is discouraged.
+ *
+ * @see menu_link_delete()
  */
 function _menu_delete_item($item, $force = FALSE) {
   $item = is_object($item) ? get_object_vars($item) : $item;
@@ -3202,7 +3216,7 @@ function menu_link_save(&$item, $existing_item = array(), $parent_candidates = a
 }
 
 /**
- * Find a possible parent for a given menu link.
+ * Finds a possible parent for a given menu link.
  *
  * Because the parent of a given link might not exist anymore in the database,
  * we apply a set of heuristics to determine a proper parent:
@@ -3216,6 +3230,7 @@ function menu_link_save(&$item, $existing_item = array(), $parent_candidates = a
  *   A menu link.
  * @param $parent_candidates
  *   An array of menu links keyed by mlid.
+ *
  * @return
  *   A menu link structure of the possible parent or FALSE if no valid parent
  *   has been found.
@@ -3281,7 +3296,7 @@ function _menu_link_find_parent($menu_link, $parent_candidates = array()) {
 }
 
 /**
- * Helper function to clear the page and block caches at most twice per page load.
+ * Clears the page and block caches at most twice per page load.
  */
 function _menu_clear_page_cache() {
   $cache_cleared = &drupal_static(__FUNCTION__, 0);
@@ -3303,7 +3318,7 @@ function _menu_clear_page_cache() {
 }
 
 /**
- * Helper function to update a list of menus with expanded items
+ * Updates a list of menus with expanded items.
  */
 function _menu_set_expanded_menus() {
   $names = db_query("SELECT menu_name FROM {menu_links} WHERE expanded <> 0 GROUP BY menu_name")->fetchCol();
@@ -3311,7 +3326,7 @@ function _menu_set_expanded_menus() {
 }
 
 /**
- * Find the router path which will serve this path.
+ * Finds the router path which will serve this path.
  *
  * @param $link_path
  *  The path for we are looking up its router path.
@@ -3353,7 +3368,7 @@ function _menu_find_router_path($link_path) {
 }
 
 /**
- * Insert, update or delete an uncustomized menu link related to a module.
+ * Inserts, updates, or deletes an uncustomized menu link related to a module.
  *
  * @param $module
  *   The name of the module.
@@ -3393,7 +3408,7 @@ function menu_link_maintain($module, $op, $link_path, $link_title) {
 }
 
 /**
- * Find the depth of an item's children relative to its depth.
+ * Finds the depth of an item's children relative to its depth.
  *
  * For example, if the item has a depth of 2, and the maximum of any child in
  * the menu link tree is 5, the relative depth is 3.
@@ -3425,7 +3440,7 @@ function menu_link_children_relative_depth($item) {
 }
 
 /**
- * Update the children of a menu link that's being moved.
+ * Updates the children of a menu link that is being moved.
  *
  * The menu name, parents (p1 - p6), and depth are updated for all children of
  * the link, and the has_children status of the previous parent is updated.
@@ -3474,7 +3489,7 @@ function _menu_link_move_children($item, $existing_item) {
 }
 
 /**
- * Check and update the has_children status for the parent of a link.
+ * Checks and updates the 'has_children' status for the parent of a link.
  */
 function _menu_update_parental_status($item, $exclude = FALSE) {
   // If plid == 0, there is nothing to update.
@@ -3498,7 +3513,7 @@ function _menu_update_parental_status($item, $exclude = FALSE) {
 }
 
 /**
- * Helper function that sets the p1..p9 values for a menu link being saved.
+ * Sets the p1 through p9 values for a menu link being saved.
  */
 function _menu_link_parents_set(&$item, $parent) {
   $i = 1;
@@ -3516,7 +3531,7 @@ function _menu_link_parents_set(&$item, $parent) {
 }
 
 /**
- * Helper function to build the router table based on the data from hook_menu.
+ * Builds the router table based on the data from hook_menu().
  */
 function _menu_router_build($callbacks) {
   // First pass: separate callbacks from paths, making paths ready for
@@ -3743,7 +3758,7 @@ function _menu_router_build($callbacks) {
 }
 
 /**
- * Helper function to save data from menu_router_build() to the router table.
+ * Saves data from menu_router_build() to the router table.
  */
 function _menu_router_save($menu, $masks) {
   // Delete the existing router since we have some data to replace it.
diff --git a/includes/module.inc b/includes/module.inc
index 28bca235007467b255e3a69611aab6ae0ae8f576..d932f07b96e1d73ba034eea4449be78e43336c66 100644
--- a/includes/module.inc
+++ b/includes/module.inc
@@ -6,7 +6,7 @@
  */
 
 /**
- * Load all the modules that have been enabled in the system table.
+ * Loads all the modules that have been enabled in the system table.
  *
  * @param $bootstrap
  *   Whether to load only the reduced set of modules loaded in "bootstrap mode"
@@ -102,7 +102,7 @@ function module_list($refresh = FALSE, $bootstrap_refresh = FALSE, $sort = FALSE
 }
 
 /**
- * Build a list of bootstrap modules and enabled modules and themes.
+ * Builds a list of bootstrap modules and enabled modules and themes.
  *
  * @param $type
  *   The type of list to return:
@@ -181,6 +181,7 @@ function system_list($type) {
       foreach ($lists['theme'] as $key => $theme) {
         if (!empty($theme->info['base theme'])) {
           // Make a list of the theme's base themes.
+          require_once DRUPAL_ROOT . '/includes/theme.inc';
           $lists['theme'][$key]->base_themes = drupal_find_base_themes($lists['theme'], $key);
           // Don't proceed if there was a problem with the root base theme.
           if (!current($lists['theme'][$key]->base_themes)) {
@@ -218,7 +219,7 @@ function system_list($type) {
 }
 
 /**
- * Reset all system_list() caches.
+ * Resets all system_list() caches.
  */
 function system_list_reset() {
   drupal_static_reset('system_list');
@@ -229,7 +230,7 @@ function system_list_reset() {
 }
 
 /**
- * Find dependencies any level deep and fill in required by information too.
+ * Determines which modules require and are required by each module.
  *
  * @param $files
  *   The array of filesystem objects used to rebuild the cache.
@@ -262,7 +263,7 @@ function _module_build_dependencies($files) {
 }
 
 /**
- * Determine whether a given module exists.
+ * Determines whether a given module exists.
  *
  * @param $module
  *   The name of the module (without the .module extension).
@@ -276,7 +277,7 @@ function module_exists($module) {
 }
 
 /**
- * Load a module's installation hooks.
+ * Loads a module's installation hooks.
  *
  * @param $module
  *   The name of the module (without the .module extension).
@@ -292,7 +293,7 @@ function module_load_install($module) {
 }
 
 /**
- * Load a module include file.
+ * Loads a module include file.
  *
  * Examples:
  * @code
@@ -334,8 +335,7 @@ function module_load_include($type, $module, $name = NULL) {
 }
 
 /**
- * Load an include file for each of the modules that have been enabled in
- * the system table.
+ * Loads an include file for each module enabled in the {system} table.
  */
 function module_load_all_includes($type, $name = NULL) {
   $modules = module_list();
@@ -503,7 +503,7 @@ function module_enable($module_list, $enable_dependencies = TRUE) {
 }
 
 /**
- * Disable a given set of modules.
+ * Disables a given set of modules.
  *
  * @param $module_list
  *   An array of module names.
@@ -614,7 +614,7 @@ function module_disable($module_list, $disable_dependents = TRUE) {
  */
 
 /**
- * Determine whether a module implements a hook.
+ * Determines whether a module implements a hook.
  *
  * @param $module
  *   The name of the module (without the .module extension).
@@ -643,7 +643,7 @@ function module_hook($module, $hook) {
 }
 
 /**
- * Determine which modules are implementing a hook.
+ * Determines which modules are implementing a hook.
  *
  * @param $hook
  *   The name of the hook (e.g. "help" or "menu").
@@ -744,7 +744,14 @@ function module_implements($hook, $sort = FALSE, $reset = FALSE) {
 }
 
 /**
- * Retrieve a list of what hooks are explicitly declared.
+ * Retrieves a list of hooks that are declared through hook_hook_info().
+ *
+ * @return
+ *   An associative array whose keys are hook names and whose values are an
+ *   associative array containing a group name. The structure of the array
+ *   is the same as the return value of hook_hook_info().
+ *
+ * @see hook_hook_info()
  */
 function module_hook_info() {
   // This function is indirectly invoked from bootstrap_invoke_all(), in which
@@ -806,7 +813,7 @@ function module_implements_write_cache() {
 }
 
 /**
- * Invoke a hook in a particular module.
+ * Invokes a hook in a particular module.
  *
  * @param $module
  *   The name of the module (without the .module extension).
@@ -828,7 +835,7 @@ function module_invoke($module, $hook) {
 }
 
 /**
- * Invoke a hook in all enabled modules that implement it.
+ * Invokes a hook in all enabled modules that implement it.
  *
  * @param $hook
  *   The name of the hook to invoke.
@@ -865,13 +872,13 @@ function module_invoke_all($hook) {
  */
 
 /**
- * Array of modules required by core.
+ * Returns an array of modules required by core.
  */
 function drupal_required_modules() {
   $files = drupal_system_listing('/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\.info$/', 'modules', 'name', 0);
   $required = array();
 
-  // An install profile is required and one must always be loaded.
+  // An installation profile is required and one must always be loaded.
   $required[] = drupal_get_profile();
 
   foreach ($files as $name => $file) {
@@ -885,7 +892,7 @@ function drupal_required_modules() {
 }
 
 /**
- * Hands off alterable variables to type-specific *_alter implementations.
+ * Passes alterable variables to specific hook_TYPE_alter() implementations.
  *
  * This dispatch function hands off the passed-in variables to type-specific
  * hook_TYPE_alter() implementations in modules. It ensures a consistent
diff --git a/includes/session.inc b/includes/session.inc
index 95364f8485039031c7794ff5cf0d2daee97b32c7..0a95b8548c11744860316e95da4edc1ea02b2d30 100644
--- a/includes/session.inc
+++ b/includes/session.inc
@@ -353,6 +353,11 @@ function drupal_session_started($set = NULL) {
  */
 function drupal_session_regenerate() {
   global $user, $is_https;
+  // Nothing to do if we are not allowed to change the session.
+  if (!drupal_save_session()) {
+    return;
+  }
+
   if ($is_https && variable_get('https', FALSE)) {
     $insecure_session_name = substr(session_name(), 1);
     if (!isset($GLOBALS['lazy_session']) && isset($_COOKIE[$insecure_session_name])) {
@@ -422,6 +427,11 @@ function drupal_session_regenerate() {
 function _drupal_session_destroy($sid) {
   global $user, $is_https;
 
+  // Nothing to do if we are not allowed to change the session.
+  if (!drupal_save_session()) {
+    return;
+  }
+
   // Delete session data.
   db_delete('sessions')
     ->condition($is_https ? 'ssid' : 'sid', $sid)
@@ -469,6 +479,11 @@ function _drupal_session_delete_cookie($name, $secure = NULL) {
  *   User ID.
  */
 function drupal_session_destroy_uid($uid) {
+  // Nothing to do if we are not allowed to change the session.
+  if (!drupal_save_session()) {
+    return;
+  }
+
   db_delete('sessions')
     ->condition('uid', $uid)
     ->execute();
@@ -511,7 +526,10 @@ function _drupal_session_garbage_collection($lifetime) {
  *   FALSE if writing session data has been disabled. Otherwise, TRUE.
  */
 function drupal_save_session($status = NULL) {
-  $save_session = &drupal_static(__FUNCTION__, TRUE);
+  // PHP session ID, session, and cookie handling happens in the global scope.
+  // This value has to persist across calls to drupal_static_reset(), since a
+  // potentially wrong or disallowed session would be written otherwise.
+  static $save_session = TRUE;
   if (isset($status)) {
     $save_session = $status;
   }
diff --git a/includes/stream_wrappers.inc b/includes/stream_wrappers.inc
index 2af8c9e91287305e02d5595f604ed06fb8e1785f..fa401c6b7be2eaf9e33e177ce2dfcfe2e348cd82 100644
--- a/includes/stream_wrappers.inc
+++ b/includes/stream_wrappers.inc
@@ -553,7 +553,7 @@ abstract class DrupalLocalStreamWrapper implements DrupalStreamWrapperInterface
    * Support for unlink().
    *
    * @param $uri
-   *   A string containing the uri to the resource to delete.
+   *   A string containing the URI to the resource to delete.
    *
    * @return
    *   TRUE if resource was successfully deleted.
@@ -569,9 +569,9 @@ abstract class DrupalLocalStreamWrapper implements DrupalStreamWrapperInterface
    * Support for rename().
    *
    * @param $from_uri,
-   *   The uri to the file to rename.
+   *   The URI to the file to rename.
    * @param $to_uri
-   *   The new uri for file.
+   *   The new URI for file.
    *
    * @return
    *   TRUE if file was successfully renamed.
diff --git a/includes/theme.inc b/includes/theme.inc
index c4b712271ffccf9252852f4bd2e547e960cc812e..777922f05f7c0744ab264952dc186680eea981d0 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -2069,10 +2069,12 @@ function theme_item_list($variables) {
   if (!empty($items)) {
     $output .= "<$type" . drupal_attributes($attributes) . '>';
     $num_items = count($items);
-    foreach ($items as $i => $item) {
+    $i = 0;
+    foreach ($items as $item) {
       $attributes = array();
       $children = array();
       $data = '';
+      $i++;
       if (is_array($item)) {
         foreach ($item as $key => $value) {
           if ($key == 'data') {
@@ -2093,10 +2095,10 @@ function theme_item_list($variables) {
         // Render nested list.
         $data .= theme_item_list(array('items' => $children, 'title' => NULL, 'type' => $type, 'attributes' => $attributes));
       }
-      if ($i == 0) {
+      if ($i == 1) {
         $attributes['class'][] = 'first';
       }
-      if ($i == $num_items - 1) {
+      if ($i == $num_items) {
         $attributes['class'][] = 'last';
       }
       $output .= '<li' . drupal_attributes($attributes) . '>' . $data . "</li>\n";
@@ -2112,7 +2114,7 @@ function theme_item_list($variables) {
  *
  * @param $variables
  *   An associative array containing:
- *   - url: The url for the link.
+ *   - url: The URL for the link.
  */
 function theme_more_help_link($variables) {
   return '<div class="more-help-link">' . l(t('More help'), $variables['url']) . '</div>';
@@ -2128,7 +2130,7 @@ function theme_more_help_link($variables) {
  *   - title: A descriptive title of the feed.
  */
 function theme_feed_icon($variables) {
-  $text = t('Subscribe to @feed-title', array('@feed-title' => $variables['title']));
+  $text = t('Subscribe to !feed-title', array('!feed-title' => $variables['title']));
   if ($image = theme('image', array('path' => 'misc/feed.png', 'width' => 16, 'height' => 16, 'alt' => $text))) {
     return l($image, $variables['url'], array('html' => TRUE, 'attributes' => array('class' => array('feed-icon'), 'title' => $text)));
   }
@@ -2177,7 +2179,7 @@ function theme_html_tag($variables) {
  *
  * @param $variables
  *   An associative array containing:
- *   - url: The url of the main page.
+ *   - url: The URL of the main page.
  *   - title: A descriptive verb for the link, like 'Read more'.
  */
 function theme_more_link($variables) {
diff --git a/includes/unicode.inc b/includes/unicode.inc
index cd9cd9bf0d4f6f2b13d285582ca69b944ca1f251..81a0a4dfe2dcdc1d6af0eeb5ba65b37af96c64ea 100644
--- a/includes/unicode.inc
+++ b/includes/unicode.inc
@@ -96,7 +96,7 @@ function unicode_check() {
  *   Whether to report any fatal errors with form_set_error().
  */
 function _unicode_check() {
-  // Ensure translations don't break at install time
+  // Ensure translations don't break during installation.
   $t = get_t();
 
   // Check for mbstring extension
@@ -128,7 +128,7 @@ function _unicode_check() {
  * Return Unicode library status and errors.
  */
 function unicode_requirements() {
-  // Ensure translations don't break at install time
+  // Ensure translations don't break during installation.
   $t = get_t();
 
   $libraries = array(
diff --git a/includes/update.inc b/includes/update.inc
index d8fec64dfe569a00acf8f5e225f135b9c3cab2f7..559a0a7118a26fcfcc813d720980d64e755952ca 100644
--- a/includes/update.inc
+++ b/includes/update.inc
@@ -787,12 +787,12 @@ function update_fix_d7_requirements() {
 /**
  * Register the currently installed profile in the system table.
  *
- * Install profiles are now treated as modules by Drupal, and have an upgrade
- * path based on their schema version in the system table.
+ * Installation profiles are now treated as modules by Drupal, and have an
+ * upgrade path based on their schema version in the system table.
  *
- * The install profile will be set to schema_version 0, as it has already been
- * installed. Any other hook_update_N functions provided by the install profile
- * will be run by update.php.
+ * The installation profile will be set to schema_version 0, as it has already
+ * been installed. Any other hook_update_N functions provided by the
+ * installation profile will be run by update.php.
  */
 function update_fix_d7_install_profile() {
   $profile = drupal_get_profile();
@@ -830,10 +830,10 @@ function update_fix_d7_install_profile() {
       'owner' => '',
     );
 
-    // Install profile hooks are always executed last by the module system
+    // Installation profile hooks are always executed last by the module system
     $values['weight'] = 1000;
 
-    // Initializing the system table entry for the install profile
+    // Initializing the system table entry for the installation profile
     db_insert('system')
       ->fields(array_keys($values))
       ->values($values)
@@ -842,7 +842,8 @@ function update_fix_d7_install_profile() {
     // Reset the cached schema version.
     drupal_get_installed_schema_version($profile, TRUE);
 
-    // Load the updates again to make sure the install profile updates are loaded
+    // Load the updates again to make sure the installation profile updates
+    // are loaded.
     drupal_load_updates();
   }
 }
@@ -897,7 +898,7 @@ function update_get_d6_session_name() {
   }
   else {
     // Otherwise use $base_url as session name, without the protocol
-    // to use the same session identifiers across http and https.
+    // to use the same session identifiers across HTTP and HTTPS.
     list( , $session_name) = explode('://', $base_url, 2);
   }
 
@@ -1476,17 +1477,3 @@ function update_retrieve_dependencies() {
 
   return $return;
 }
-
-/**
- * @defgroup update-api-6.x-to-7.x Update versions of API functions
- * @{
- * Functions similar to normal API function but not firing hooks.
- *
- * During update, it is impossible to judge the consequences of firing a hook
- * as it might hit a module not yet updated. So simplified versions of some
- * core APIs are provided.
- */
-
-/**
- * @} End of "defgroup update-api-6.x-to-7.x".
- */
diff --git a/misc/collapse.js b/misc/collapse.js
index 1a98dc0e04cd291d73a4b18ec4f227e9958c01b1..bd51ce5326e74d354e78a0cfb3109a07b2f8c825 100644
--- a/misc/collapse.js
+++ b/misc/collapse.js
@@ -58,7 +58,7 @@ Drupal.behaviors.collapse = {
     $('fieldset.collapsible', context).once('collapse', function () {
       var $fieldset = $(this);
       // Expand fieldset if there are errors inside, or if it contains an
-      // element that is targeted by the uri fragment identifier. 
+      // element that is targeted by the URI fragment identifier. 
       var anchor = location.hash && location.hash != '#' ? ', ' + location.hash : '';
       if ($('.error' + anchor, $fieldset).length) {
         $fieldset.removeClass('collapsed');
diff --git a/misc/states.js b/misc/states.js
index 594f8187b7fd7ab5985ee72d37343e0bedb51840..4b4f1d5183f04a5645955a6b421e97f21b30a5e6 100644
--- a/misc/states.js
+++ b/misc/states.js
@@ -482,8 +482,8 @@ $(document).bind('state:disabled', function(e) {
   if (e.trigger) {
     $(e.target)
       .attr('disabled', e.value)
-      .filter('.form-element')
-        .closest('.form-item, .form-submit, .form-wrapper').toggleClass('form-disabled', e.value);
+        .closest('.form-item, .form-submit, .form-wrapper').toggleClass('form-disabled', e.value)
+        .find('select, input, textarea').attr('disabled', e.value);
 
     // Note: WebKit nightlies don't reflect that change correctly.
     // See https://bugs.webkit.org/show_bug.cgi?id=23789
diff --git a/modules/aggregator/aggregator.admin.inc b/modules/aggregator/aggregator.admin.inc
index 9f92a67052a7970fa4a975ea48406da19e93fd6b..8b817c0fafc4fdce57952e609c678f4b469fd121 100644
--- a/modules/aggregator/aggregator.admin.inc
+++ b/modules/aggregator/aggregator.admin.inc
@@ -77,7 +77,7 @@ function aggregator_form_feed($form, &$form_state, stdClass $feed = NULL) {
   $form['url'] = array('#type' => 'textfield',
     '#title' => t('URL'),
     '#default_value' => isset($feed->url) ? $feed->url : '',
-    '#maxlength' => 255,
+    '#maxlength' => NULL,
     '#description' => t('The fully-qualified URL of the feed.'),
     '#required' => TRUE,
   );
diff --git a/modules/aggregator/aggregator.api.php b/modules/aggregator/aggregator.api.php
index 0f708eb85ef3423825763aafcd1c4f6622b4063d..cd5e47b1466f882f2aad99199925c3e788c559b6 100644
--- a/modules/aggregator/aggregator.api.php
+++ b/modules/aggregator/aggregator.api.php
@@ -19,8 +19,8 @@
  * parser; and finally, it is passed to all active processors, which manipulate
  * or store the data.
  *
- * Modules that define this hook can be set as active fetcher on
- * admin/config/services/aggregator. Only one fetcher can be active at a time.
+ * Modules that define this hook can be set as the active fetcher within the
+ * configuration page. Only one fetcher can be active at a time.
  *
  * @param $feed
  *   A feed object representing the resource to be downloaded. $feed->url
@@ -43,10 +43,9 @@ function hook_aggregator_fetch($feed) {
 /**
  * Specify the title and short description of your fetcher.
  *
- * The title and the description provided are shown on
- * admin/config/services/aggregator among other places. Use as title the human
- * readable name of the fetcher and as description a brief (40 to 80 characters)
- * explanation of the fetcher's functionality.
+ * The title and the description provided are shown within the configuration
+ * page. Use as title the human readable name of the fetcher and as description
+ * a brief (40 to 80 characters) explanation of the fetcher's functionality.
  *
  * This hook is only called if your module implements hook_aggregator_fetch().
  * If this hook is not implemented aggregator will use your module's file name
@@ -75,8 +74,8 @@ function hook_aggregator_fetch_info() {
  * active parser; and finally, it is passed to all active processors which
  * manipulate or store the data.
  *
- * Modules that define this hook can be set as the active parser on
- * admin/config/services/aggregator. Only one parser can be active at a time.
+ * Modules that define this hook can be set as the active parser within the
+ * configuration page. Only one parser can be active at a time.
  *
  * @param $feed
  *   An object describing the resource to be parsed. $feed->source_string
@@ -119,10 +118,9 @@ function hook_aggregator_parse($feed) {
 /**
  * Specify the title and short description of your parser.
  *
- * The title and the description provided are shown on
- * admin/config/services/aggregator among other places. Use as title the human
- * readable name of the parser and as description a brief (40 to 80 characters)
- * explanation of the parser's functionality.
+ * The title and the description provided are shown within the configuration
+ * page. Use as title the human readable name of the parser and as description
+ * a brief (40 to 80 characters) explanation of the parser's functionality.
  *
  * This hook is only called if your module implements hook_aggregator_parse().
  * If this hook is not implemented aggregator will use your module's file name
@@ -151,8 +149,8 @@ function hook_aggregator_parse_info() {
  * parser; and finally, it is passed to all active processors that manipulate or
  * store the data.
  *
- * Modules that define this hook can be activated as processor on
- * admin/config/services/aggregator.
+ * Modules that define this hook can be activated as a processor within the
+ * configuration page.
  *
  * @param $feed
  *   A feed object representing the resource to be processed. $feed->items
@@ -176,10 +174,9 @@ function hook_aggregator_process($feed) {
 /**
  * Specify the title and short description of your processor.
  *
- * The title and the description provided are shown most importantly on
- * admin/config/services/aggregator. Use as title the natural name of the
- * processor and as description a brief (40 to 80 characters) explanation of the
- * functionality.
+ * The title and the description provided are shown within the configuration
+ * page. Use as title the natural name of the processor and as description a
+ * brief (40 to 80 characters) explanation of the functionality.
  *
  * This hook is only called if your module implements hook_aggregator_process().
  * If this hook is not implemented aggregator will use your module's file name
diff --git a/modules/aggregator/aggregator.info b/modules/aggregator/aggregator.info
index 65e402b3e7be7a79ee03487672437c157f7ca502..2f1d05357fbb80831cb2a48f03ef5af7f4e16974 100644
--- a/modules/aggregator/aggregator.info
+++ b/modules/aggregator/aggregator.info
@@ -7,8 +7,8 @@ files[] = aggregator.test
 configure = admin/config/services/aggregator/settings
 stylesheets[all][] = aggregator.css
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/aggregator/aggregator.install b/modules/aggregator/aggregator.install
index f19d7de9b4fdc280cfdd865a78abdf11a62bf1c6..b84556a9d4debb86e3bba02f126779b6301dd1b0 100644
--- a/modules/aggregator/aggregator.install
+++ b/modules/aggregator/aggregator.install
@@ -130,10 +130,8 @@ function aggregator_schema() {
         'description' => 'Title of the feed.',
       ),
       'url' => array(
-        'type' => 'varchar',
-        'length' => 255,
+        'type' => 'text',
         'not null' => TRUE,
-        'default' => '',
         'description' => 'URL to the feed.',
       ),
       'refresh' => array(
@@ -155,10 +153,8 @@ function aggregator_schema() {
         'description' => 'Time when this feed was queued for refresh, 0 if not queued.',
       ),
       'link' => array(
-        'type' => 'varchar',
-        'length' => 255,
+        'type' => 'text',
         'not null' => TRUE,
-        'default' => '',
         'description' => 'The parent website of the feed; comes from the <link> element in the feed.',
       ),
       'description' => array(
@@ -202,13 +198,13 @@ function aggregator_schema() {
       )
     ),
     'primary key' => array('fid'),
-    'unique keys' => array(
-      'url'  => array('url'),
-      'title' => array('title'),
-    ),
     'indexes' => array(
+      'url'  => array(array('url', 255)),
       'queued' => array('queued'),
     ),
+    'unique keys' => array(
+      'title' => array('title'),
+    ),
   );
 
   $schema['aggregator_item'] = array(
@@ -233,10 +229,8 @@ function aggregator_schema() {
         'description' => 'Title of the feed item.',
       ),
       'link' => array(
-        'type' => 'varchar',
-        'length' => 255,
+        'type' => 'text',
         'not null' => TRUE,
-        'default' => '',
         'description' => 'Link to the feed item.',
       ),
       'author' => array(
@@ -258,9 +252,8 @@ function aggregator_schema() {
         'description' => 'Posted date of the feed item, as a Unix timestamp.',
       ),
       'guid' => array(
-        'type' => 'varchar',
-        'length' => 255,
-        'not null' => FALSE,
+        'type' => 'text',
+        'not null' => TRUE,
         'description' => 'Unique identifier for the feed item.',
       )
     ),
@@ -279,6 +272,11 @@ function aggregator_schema() {
   return $schema;
 }
 
+/**
+ * @addtogroup updates-6.x-to-7.x
+ * @{
+ */
+
 /**
  * Add hash column to aggregator_feed table.
  */
@@ -306,3 +304,27 @@ function aggregator_update_7002() {
   db_add_index('aggregator_feed', 'queued', array('queued'));
 }
 
+/**
+ * @} End of "addtogroup updates-6.x-to-7.x"
+ */
+
+/**
+ * @addtogroup updates-7.x-extra
+ * @{
+ */
+
+/**
+ * Increase the length of {aggregator_feed}.url.
+ */
+function aggregator_update_7003() {
+  db_drop_unique_key('aggregator_feed', 'url');
+  db_change_field('aggregator_feed', 'url', 'url', array('type' => 'text', 'not null' => TRUE, 'description' => 'URL to the feed.'));
+  db_change_field('aggregator_feed', 'link', 'link', array('type' => 'text', 'not null' => TRUE, 'description' => 'The parent website of the feed; comes from the <link> element in the feed.'));
+  db_change_field('aggregator_item', 'link', 'link', array('type' => 'text', 'not null' => TRUE, 'description' => 'Link to the feed item.'));
+  db_change_field('aggregator_item', 'guid', 'guid', array('type' => 'text', 'not null' => TRUE, 'description' => 'Unique identifier for the feed item.'));
+  db_add_index('aggregator_feed', 'url', array(array('url', 255)));
+}
+
+/**
+ * @} End of "addtogroup updates-7.x-extra"
+ */
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module
index 686f4248a50af1aa8d7df6ab18115518d50790b1..93457c68de0adf91d0c2fba6555ae6a3ee065b1e 100644
--- a/modules/aggregator/aggregator.module
+++ b/modules/aggregator/aggregator.module
@@ -534,6 +534,7 @@ function aggregator_save_feed($edit) {
         'url' => $edit['url'],
         'refresh' => $edit['refresh'],
         'block' => $edit['block'],
+        'link' => '',
         'description' => '',
         'image' => '',
       ))
@@ -568,15 +569,13 @@ function aggregator_remove($feed) {
   // Call hook_aggregator_remove() on all modules.
   module_invoke_all('aggregator_remove', $feed);
   // Reset feed.
-  db_merge('aggregator_feed')
-    ->key(array('fid' => $feed->fid))
+  db_update('aggregator_feed')
+    ->condition('fid', $feed->fid)
     ->fields(array(
       'checked' => 0,
       'hash' => '',
       'etag' => '',
       'modified' => 0,
-      'description' => $feed->description,
-      'image' => $feed->image,
     ))
     ->execute();
 }
diff --git a/modules/aggregator/aggregator.processor.inc b/modules/aggregator/aggregator.processor.inc
index 7fa86a9ad83ee239b9dabfb32822cc0d1c102ceb..3f1319c8c118de093cbd48206a4474564df14d11 100644
--- a/modules/aggregator/aggregator.processor.inc
+++ b/modules/aggregator/aggregator.processor.inc
@@ -38,8 +38,9 @@ function aggregator_aggregator_process($feed) {
           $item['timestamp'] = isset($entry->timestamp) ? $entry->timestamp : REQUEST_TIME;
         }
 
-        // Make sure the item title fits in 255 varchar column.
+        // Make sure the item title and author fit in the 255 varchar column.
         $item['title'] = truncate_utf8($item['title'], 255, TRUE, TRUE);
+        $item['author'] = truncate_utf8($item['author'], 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']));
       }
     }
diff --git a/modules/aggregator/aggregator.test b/modules/aggregator/aggregator.test
index 77b60cb939a8689d5473a3048d70f57ee055c32b..eff31020f104f7b879974de4ded83ff59db49b50 100644
--- a/modules/aggregator/aggregator.test
+++ b/modules/aggregator/aggregator.test
@@ -25,10 +25,10 @@ class AggregatorTestCase extends DrupalWebTestCase {
   function createFeed($feed_url = NULL) {
     $edit = $this->getFeedEditArray($feed_url);
     $this->drupalPost('admin/config/services/aggregator/add/feed', $edit, t('Save'));
-    $this->assertRaw(t('The feed %name has been added.', array('%name' => $edit['title'])), t('The feed !name has been added.', array('!name' => $edit['title'])));
+    $this->assertRaw(t('The feed %name has been added.', array('%name' => $edit['title'])), format_string('The feed !name has been added.', array('!name' => $edit['title'])));
 
     $feed = db_query("SELECT *  FROM {aggregator_feed} WHERE title = :title AND url = :url", array(':title' => $edit['title'], ':url' => $edit['url']))->fetch();
-    $this->assertTrue(!empty($feed), t('The feed found in database.'));
+    $this->assertTrue(!empty($feed), 'The feed found in database.');
     return $feed;
   }
 
@@ -40,7 +40,7 @@ class AggregatorTestCase extends DrupalWebTestCase {
    */
   function deleteFeed($feed) {
     $this->drupalPost('admin/config/services/aggregator/edit/feed/' . $feed->fid, array(), t('Delete'));
-    $this->assertRaw(t('The feed %title has been deleted.', array('%title' => $feed->title)), t('Feed deleted successfully.'));
+    $this->assertRaw(t('The feed %title has been deleted.', array('%title' => $feed->title)), 'Feed deleted successfully.');
   }
 
   /**
@@ -90,7 +90,7 @@ class AggregatorTestCase extends DrupalWebTestCase {
   function updateFeedItems(&$feed, $expected_count) {
     // First, let's ensure we can get to the rss xml.
     $this->drupalGet($feed->url);
-    $this->assertResponse(200, t('!url is reachable.', array('!url' => $feed->url)));
+    $this->assertResponse(200, format_string('!url is reachable.', array('!url' => $feed->url)));
 
     // Attempt to access the update link directly without an access token.
     $this->drupalGet('admin/config/services/aggregator/update/' . $feed->fid);
@@ -108,7 +108,7 @@ class AggregatorTestCase extends DrupalWebTestCase {
       $feed->items[] = $item->iid;
     }
     $feed->item_count = count($feed->items);
-    $this->assertEqual($expected_count, $feed->item_count, t('Total items in feed equal to the total items in database (!val1 != !val2)', array('!val1' => $expected_count, '!val2' => $feed->item_count)));
+    $this->assertEqual($expected_count, $feed->item_count, format_string('Total items in feed equal to the total items in database (!val1 != !val2)', array('!val1' => $expected_count, '!val2' => $feed->item_count)));
   }
 
   /**
@@ -119,7 +119,7 @@ class AggregatorTestCase extends DrupalWebTestCase {
    */
   function removeFeedItems($feed) {
     $this->drupalPost('admin/config/services/aggregator/remove/' . $feed->fid, array(), t('Remove items'));
-    $this->assertRaw(t('The news items from %title have been removed.', array('%title' => $feed->title)), t('Feed items removed.'));
+    $this->assertRaw(t('The news items from %title have been removed.', array('%title' => $feed->title)), 'Feed items removed.');
   }
 
   /**
@@ -167,12 +167,12 @@ class AggregatorTestCase extends DrupalWebTestCase {
 
 
   /**
-   * Check if the feed name and url is unique.
+   * Check if the feed name and URL is unique.
    *
    * @param $feed_name
    *   String containing the feed name to check.
    * @param $feed_url
-   *   String containing the feed url to check.
+   *   String containing the feed URL to check.
    * @return
    *   TRUE if feed is unique.
    */
@@ -316,7 +316,7 @@ class AggregatorConfigurationTestCase extends AggregatorTestCase {
     $this->assertText(t('The configuration options have been saved.'));
 
     foreach ($edit as $name => $value) {
-      $this->assertFieldByName($name, $value, t('"@name" has correct default value.', array('@name' => $name)));
+      $this->assertFieldByName($name, $value, format_string('"@name" has correct default value.', array('@name' => $name)));
     }
   }
 }
@@ -337,19 +337,48 @@ class AddFeedTestCase extends AggregatorTestCase {
     $feed = $this->createFeed();
 
     // Check feed data.
-    $this->assertEqual($this->getUrl(), url('admin/config/services/aggregator/add/feed', array('absolute' => TRUE)), t('Directed to correct url.'));
-    $this->assertTrue($this->uniqueFeed($feed->title, $feed->url), t('The feed is unique.'));
+    $this->assertEqual($this->getUrl(), url('admin/config/services/aggregator/add/feed', array('absolute' => TRUE)), 'Directed to correct url.');
+    $this->assertTrue($this->uniqueFeed($feed->title, $feed->url), 'The feed is unique.');
 
     // Check feed source.
     $this->drupalGet('aggregator/sources/' . $feed->fid);
-    $this->assertResponse(200, t('Feed source exists.'));
-    $this->assertText($feed->title, t('Page title'));
+    $this->assertResponse(200, 'Feed source exists.');
+    $this->assertText($feed->title, 'Page title');
     $this->drupalGet('aggregator/sources/' . $feed->fid . '/categorize');
-    $this->assertResponse(200, t('Feed categorization page exists.'));
+    $this->assertResponse(200, 'Feed categorization page exists.');
 
     // Delete feed.
     $this->deleteFeed($feed);
   }
+
+  /**
+   * Tests feeds with very long URLs.
+   */
+  function testAddLongFeed() {
+    // Create a feed with a URL of > 255 characters.
+    $long_url = "https://www.google.com/search?ix=heb&sourceid=chrome&ie=UTF-8&q=angie+byron#sclient=psy-ab&hl=en&safe=off&source=hp&q=angie+byron&pbx=1&oq=angie+byron&aq=f&aqi=&aql=&gs_sm=3&gs_upl=0l0l0l10534l0l0l0l0l0l0l0l0ll0l0&bav=on.2,or.r_gc.r_pw.r_cp.,cf.osb&fp=a70b6b1f0abe28d8&biw=1629&bih=889&ix=heb";
+    $feed = $this->createFeed($long_url);
+
+    // Create a second feed of > 255 characters, where the only difference is
+    // after the 255th character.
+    $long_url_2 = "https://www.google.com/search?ix=heb&sourceid=chrome&ie=UTF-8&q=angie+byron#sclient=psy-ab&hl=en&safe=off&source=hp&q=angie+byron&pbx=1&oq=angie+byron&aq=f&aqi=&aql=&gs_sm=3&gs_upl=0l0l0l10534l0l0l0l0l0l0l0l0ll0l0&bav=on.2,or.r_gc.r_pw.r_cp.,cf.osb&fp=a70b6b1f0abe28d8&biw=1629&bih=889";
+    $feed_2 = $this->createFeed($long_url_2);
+
+    // Check feed data.
+    $this->assertTrue($this->uniqueFeed($feed->title, $feed->url), 'The first long URL feed is unique.');
+    $this->assertTrue($this->uniqueFeed($feed_2->title, $feed_2->url), 'The second long URL feed is unique.');
+
+    // Check feed source.
+    $this->drupalGet('aggregator/sources/' . $feed->fid);
+    $this->assertResponse(200, 'Long URL feed source exists.');
+    $this->assertText($feed->title, 'Page title');
+    $this->drupalGet('aggregator/sources/' . $feed->fid . '/categorize');
+    $this->assertResponse(200, 'Long URL feed categorization page exists.');
+
+    // Delete feeds.
+    $this->deleteFeed($feed);
+    $this->deleteFeed($feed_2);
+  }
 }
 
 class CategorizeFeedTestCase extends AggregatorTestCase {
@@ -369,11 +398,11 @@ class CategorizeFeedTestCase extends AggregatorTestCase {
     // Create 2 categories.
     $category_1 = array('title' => $this->randomName(10), 'description' => '');
     $this->drupalPost('admin/config/services/aggregator/add/category', $category_1, t('Save'));
-    $this->assertRaw(t('The category %title has been added.', array('%title' => $category_1['title'])), t('The category %title has been added.', array('%title' => $category_1['title'])));
+    $this->assertRaw(t('The category %title has been added.', array('%title' => $category_1['title'])), format_string('The category %title has been added.', array('%title' => $category_1['title'])));
 
     $category_2 = array('title' => $this->randomName(10), 'description' => '');
     $this->drupalPost('admin/config/services/aggregator/add/category', $category_2, t('Save'));
-    $this->assertRaw(t('The category %title has been added.', array('%title' => $category_2['title'])), t('The category %title has been added.', array('%title' => $category_2['title'])));
+    $this->assertRaw(t('The category %title has been added.', array('%title' => $category_2['title'])), format_string('The category %title has been added.', array('%title' => $category_2['title'])));
 
     // Get categories from database.
     $categories = $this->getCategories();
@@ -391,7 +420,7 @@ class CategorizeFeedTestCase extends AggregatorTestCase {
 
     // Assert the feed has two categories.
     $this->getFeedCategories($db_feed);
-    $this->assertEqual(count($db_feed->categories), 2, t('Feed has 2 categories'));
+    $this->assertEqual(count($db_feed->categories), 2, 'Feed has 2 categories');
   }
 }
 
@@ -419,16 +448,16 @@ class UpdateFeedTestCase extends AggregatorTestCase {
         $edit[$same_field] = $feed->{$same_field};
       }
       $this->drupalPost('admin/config/services/aggregator/edit/feed/' . $feed->fid, $edit, t('Save'));
-      $this->assertRaw(t('The feed %name has been updated.', array('%name' => $edit['title'])), t('The feed %name has been updated.', array('%name' => $edit['title'])));
+      $this->assertRaw(t('The feed %name has been updated.', array('%name' => $edit['title'])), format_string('The feed %name has been updated.', array('%name' => $edit['title'])));
 
       // Check feed data.
       $this->assertEqual($this->getUrl(), url('admin/config/services/aggregator/', array('absolute' => TRUE)));
-      $this->assertTrue($this->uniqueFeed($edit['title'], $edit['url']), t('The feed is unique.'));
+      $this->assertTrue($this->uniqueFeed($edit['title'], $edit['url']), 'The feed is unique.');
 
       // Check feed source.
       $this->drupalGet('aggregator/sources/' . $feed->fid);
-      $this->assertResponse(200, t('Feed source exists.'));
-      $this->assertText($edit['title'], t('Page title'));
+      $this->assertResponse(200, 'Feed source exists.');
+      $this->assertText($edit['title'], 'Page title');
 
       // Delete feed.
       $feed->title = $edit['title']; // Set correct title so deleteFeed() will work.
@@ -457,11 +486,11 @@ class RemoveFeedTestCase extends AggregatorTestCase {
 
     // Check feed source.
     $this->drupalGet('aggregator/sources/' . $feed->fid);
-    $this->assertResponse(404, t('Deleted feed source does not exists.'));
+    $this->assertResponse(404, 'Deleted feed source does not exists.');
 
     // Check database for feed.
     $result = db_query("SELECT COUNT(*) FROM {aggregator_feed} WHERE title = :title AND url = :url", array(':title' => $feed->title, ':url' => $feed->url))->fetchField();
-    $this->assertFalse($result, t('Feed not found in database'));
+    $this->assertFalse($result, 'Feed not found in database');
   }
 }
 
@@ -497,10 +526,10 @@ class UpdateFeedItemTestCase extends AggregatorTestCase {
     );
 
     $this->drupalGet($edit['url']);
-    $this->assertResponse(array(200), t('URL !url is accessible', array('!url' => $edit['url'])));
+    $this->assertResponse(array(200), format_string('URL !url is accessible', array('!url' => $edit['url'])));
 
     $this->drupalPost('admin/config/services/aggregator/add/feed', $edit, t('Save'));
-    $this->assertRaw(t('The feed %name has been added.', array('%name' => $edit['title'])), t('The feed !name has been added.', array('!name' => $edit['title'])));
+    $this->assertRaw(t('The feed %name has been added.', array('%name' => $edit['title'])), format_string('The feed !name has been added.', array('!name' => $edit['title'])));
 
     $feed = db_query("SELECT * FROM {aggregator_feed} WHERE url = :url", array(':url' => $edit['url']))->fetchObject();
 
@@ -521,7 +550,7 @@ class UpdateFeedItemTestCase extends AggregatorTestCase {
     aggregator_refresh($feed);
 
     $after = db_query('SELECT timestamp FROM {aggregator_item} WHERE fid = :fid', array(':fid' => $feed->fid))->fetchField();
-    $this->assertTrue($before === $after, t('Publish timestamp of feed item was not updated (!before === !after)', array('!before' => $before, '!after' => $after)));
+    $this->assertTrue($before === $after, format_string('Publish timestamp of feed item was not updated (!before === !after)', array('!before' => $before, '!after' => $after)));
   }
 }
 
@@ -554,9 +583,9 @@ class RemoveFeedItemTestCase extends AggregatorTestCase {
       // Update and remove items two times in a row to make sure that removal
       // resets all 'modified' information (modified, etag, hash) and allows for
       // immediate update.
-      $this->updateAndRemove($feed, 2);
-      $this->updateAndRemove($feed, 2);
-      $this->updateAndRemove($feed, 2);
+      $this->updateAndRemove($feed, 4);
+      $this->updateAndRemove($feed, 4);
+      $this->updateAndRemove($feed, 4);
       // Delete feed.
       $this->deleteFeed($feed);
     }
@@ -582,14 +611,14 @@ class CategorizeFeedItemTestCase extends AggregatorTestCase {
     // Simulate form submission on "admin/config/services/aggregator/add/category".
     $edit = array('title' => $this->randomName(10), 'description' => '');
     $this->drupalPost('admin/config/services/aggregator/add/category', $edit, t('Save'));
-    $this->assertRaw(t('The category %title has been added.', array('%title' => $edit['title'])), t('The category %title has been added.', array('%title' => $edit['title'])));
+    $this->assertRaw(t('The category %title has been added.', array('%title' => $edit['title'])), format_string('The category %title has been added.', array('%title' => $edit['title'])));
 
     $category = db_query("SELECT * FROM {aggregator_category} WHERE title = :title", array(':title' => $edit['title']))->fetch();
-    $this->assertTrue(!empty($category), t('The category found in database.'));
+    $this->assertTrue(!empty($category), 'The category found in database.');
 
     $link_path = 'aggregator/categories/' . $category->cid;
     $menu_link = db_query("SELECT * FROM {menu_links} WHERE link_path = :link_path", array(':link_path' => $link_path))->fetch();
-    $this->assertTrue(!empty($menu_link), t('The menu link associated with the category found in database.'));
+    $this->assertTrue(!empty($menu_link), 'The menu link associated with the category found in database.');
 
     $feed = $this->createFeed();
     db_insert('aggregator_category_feed')
@@ -600,7 +629,7 @@ class CategorizeFeedItemTestCase extends AggregatorTestCase {
       ->execute();
     $this->updateFeedItems($feed, $this->getDefaultFeedItemCount());
     $this->getFeedCategories($feed);
-    $this->assertTrue(!empty($feed->categories), t('The category found in the feed.'));
+    $this->assertTrue(!empty($feed->categories), 'The category found in the feed.');
 
     // For each category of a feed, ensure feed items have that category, too.
     if (!empty($feed->categories) && !empty($feed->items)) {
@@ -611,7 +640,7 @@ class CategorizeFeedItemTestCase extends AggregatorTestCase {
           ->execute()
           ->fetchField();
 
-        $this->assertEqual($feed->item_count, $categorized_count, t('Total items in feed equal to the total categorized feed items in database'));
+        $this->assertEqual($feed->item_count, $categorized_count, 'Total items in feed equal to the total categorized feed items in database');
       }
     }
 
@@ -644,11 +673,11 @@ class ImportOPMLTestCase extends AggregatorTestCase {
       ->execute();
 
     $this->drupalGet('admin/config/services/aggregator/add/opml');
-    $this->assertText('A single OPML document may contain a collection of many feeds.', t('Found OPML help text.'));
-    $this->assertField('files[upload]', t('Found file upload field.'));
-    $this->assertField('remote', t('Found Remote URL field.'));
-    $this->assertField('refresh', '', t('Found Refresh field.'));
-    $this->assertFieldByName("category[$cid]", $cid, t('Found category field.'));
+    $this->assertText('A single OPML document may contain a collection of many feeds.', 'Found OPML help text.');
+    $this->assertField('files[upload]', 'Found file upload field.');
+    $this->assertField('remote', 'Found Remote URL field.');
+    $this->assertField('refresh', 'Found Refresh field.');
+    $this->assertFieldByName("category[$cid]", $cid, 'Found category field.');
   }
 
   /**
@@ -659,7 +688,7 @@ class ImportOPMLTestCase extends AggregatorTestCase {
 
     $edit = array();
     $this->drupalPost('admin/config/services/aggregator/add/opml', $edit, t('Import'));
-    $this->assertRaw(t('You must <em>either</em> upload a file or enter a URL.'), t('Error if no fields are filled.'));
+    $this->assertRaw(t('You must <em>either</em> upload a file or enter a URL.'), 'Error if no fields are filled.');
 
     $path = $this->getEmptyOpml();
     $edit = array(
@@ -667,14 +696,14 @@ class ImportOPMLTestCase extends AggregatorTestCase {
       'remote' => file_create_url($path),
     );
     $this->drupalPost('admin/config/services/aggregator/add/opml', $edit, t('Import'));
-    $this->assertRaw(t('You must <em>either</em> upload a file or enter a URL.'), t('Error if both fields are filled.'));
+    $this->assertRaw(t('You must <em>either</em> upload a file or enter a URL.'), 'Error if both fields are filled.');
 
     $edit = array('remote' => 'invalidUrl://empty');
     $this->drupalPost('admin/config/services/aggregator/add/opml', $edit, t('Import'));
-    $this->assertText(t('This URL is not valid.'), t('Error if the URL is invalid.'));
+    $this->assertText(t('This URL is not valid.'), 'Error if the URL is invalid.');
 
     $after = db_query('SELECT COUNT(*) FROM {aggregator_feed}')->fetchField();
-    $this->assertEqual($before, $after, t('No feeds were added during the three last form submissions.'));
+    $this->assertEqual($before, $after, 'No feeds were added during the three last form submissions.');
   }
 
   /**
@@ -685,14 +714,14 @@ class ImportOPMLTestCase extends AggregatorTestCase {
 
     $form['files[upload]'] = $this->getInvalidOpml();
     $this->drupalPost('admin/config/services/aggregator/add/opml', $form, t('Import'));
-    $this->assertText(t('No new feed has been added.'), t('Attempting to upload invalid XML.'));
+    $this->assertText(t('No new feed has been added.'), 'Attempting to upload invalid XML.');
 
     $edit = array('remote' => file_create_url($this->getEmptyOpml()));
     $this->drupalPost('admin/config/services/aggregator/add/opml', $edit, t('Import'));
-    $this->assertText(t('No new feed has been added.'), t('Attempting to load empty OPML from remote URL.'));
+    $this->assertText(t('No new feed has been added.'), 'Attempting to load empty OPML from remote URL.');
 
     $after = db_query('SELECT COUNT(*) FROM {aggregator_feed}')->fetchField();
-    $this->assertEqual($before, $after, t('No feeds were added during the two last form submissions.'));
+    $this->assertEqual($before, $after, 'No feeds were added during the two last form submissions.');
 
     db_delete('aggregator_feed')->execute();
     db_delete('aggregator_category')->execute();
@@ -716,11 +745,11 @@ class ImportOPMLTestCase extends AggregatorTestCase {
       'category[1]'   => $category,
     );
     $this->drupalPost('admin/config/services/aggregator/add/opml', $edit, t('Import'));
-    $this->assertRaw(t('A feed with the URL %url already exists.', array('%url' => $feeds[0]['url'])), t('Verifying that a duplicate URL was identified'));
-    $this->assertRaw(t('A feed named %title already exists.', array('%title' => $feeds[1]['title'])), t('Verifying that a duplicate title was identified'));
+    $this->assertRaw(t('A feed with the URL %url already exists.', array('%url' => $feeds[0]['url'])), 'Verifying that a duplicate URL was identified');
+    $this->assertRaw(t('A feed named %title already exists.', array('%title' => $feeds[1]['title'])), 'Verifying that a duplicate title was identified');
 
     $after = db_query('SELECT COUNT(*) FROM {aggregator_feed}')->fetchField();
-    $this->assertEqual($after, 2, t('Verifying that two distinct feeds were added.'));
+    $this->assertEqual($after, 2, 'Verifying that two distinct feeds were added.');
 
     $feeds_from_db = db_query("SELECT f.title, f.url, f.refresh, cf.cid FROM {aggregator_feed} f LEFT JOIN {aggregator_category_feed} cf ON f.fid = cf.fid");
     $refresh = $category = TRUE;
@@ -731,10 +760,10 @@ class ImportOPMLTestCase extends AggregatorTestCase {
       $refresh = $refresh && $feed->refresh == 900;
     }
 
-    $this->assertEqual($title[$feeds[0]['url']], $feeds[0]['title'], t('First feed was added correctly.'));
-    $this->assertEqual($url[$feeds[1]['title']], $feeds[1]['url'], t('Second feed was added correctly.'));
-    $this->assertTrue($refresh, t('Refresh times are correct.'));
-    $this->assertTrue($category, t('Categories are correct.'));
+    $this->assertEqual($title[$feeds[0]['url']], $feeds[0]['title'], 'First feed was added correctly.');
+    $this->assertEqual($url[$feeds[1]['title']], $feeds[1]['url'], 'Second feed was added correctly.');
+    $this->assertTrue($refresh, 'Refresh times are correct.');
+    $this->assertTrue($category, 'Categories are correct.');
   }
 
   function testOPMLImport() {
@@ -834,20 +863,20 @@ class AggregatorRenderingTestCase extends AggregatorTestCase {
     $this->assertFieldByName('blocks[' . $block['module'] . '_' . $block['delta'] . '][region]', '', 'Aggregator feed block is available for positioning.');
     // Position it.
     $this->drupalPost('admin/structure/block', $edit, t('Save blocks'));
-    $this->assertText(t('The block settings have been updated.'), t('Block successfully moved to %region_name region.', array( '%region_name' => $region)));
+    $this->assertText(t('The block settings have been updated.'), format_string('Block successfully moved to %region_name region.', array( '%region_name' => $region)));
     // Confirm that the block is now being displayed on pages.
     $this->drupalGet('node');
-    $this->assertText(t($block['title']), t('Feed block is displayed on the page.'));
+    $this->assertText(t($block['title']), 'Feed block is displayed on the page.');
 
     // Find the expected read_more link.
     $href = 'aggregator/sources/' . $feed->fid;
     $links = $this->xpath('//a[@href = :href]', array(':href' => url($href)));
-    $this->assert(isset($links[0]), t('Link to href %href found.', array('%href' => $href)));
+    $this->assert(isset($links[0]), format_string('Link to href %href found.', array('%href' => $href)));
 
     // Visit that page.
     $this->drupalGet($href);
     $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.'));
+    $this->assertFalse(empty($correct_titles), 'Aggregator feed page is available and has the correct title.');
 
     // Set the number of news items to 0 to test that the block does not show
     // up.
@@ -876,7 +905,7 @@ class AggregatorRenderingTestCase extends AggregatorTestCase {
     // 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.'));
+    $this->assertTrue(!empty($elements), 'Individual source page contains a pager.');
 
     // Reset the number of items in rss.xml to the default value.
     variable_set('feed_default_items', 10);
@@ -910,10 +939,19 @@ class FeedParserTestCase extends AggregatorTestCase {
     $feed = $this->createFeed($this->getRSS091Sample());
     aggregator_refresh($feed);
     $this->drupalGet('aggregator/sources/' . $feed->fid);
-    $this->assertResponse(200, t('Feed %name exists.', array('%name' => $feed->title)));
+    $this->assertResponse(200, format_string('Feed %name exists.', array('%name' => $feed->title)));
     $this->assertText('First example feed item title');
     $this->assertLinkByHref('http://example.com/example-turns-one');
     $this->assertText('First example feed item description.');
+
+    // Several additional items that include elements over 255 characters.
+    $this->assertRaw("Second example feed item title.");
+    $this->assertText('Long link feed item title');
+    $this->assertText('Long link feed item description');
+    $this->assertLinkByHref('http://example.com/tomorrow/and/tomorrow/and/tomorrow/creeps/in/this/petty/pace/from/day/to/day/to/the/last/syllable/of/recorded/time/and/all/our/yesterdays/have/lighted/fools/the/way/to/dusty/death/out/out/brief/candle/life/is/but/a/walking/shadow/a/poor/player/that/struts/and/frets/his/hour/upon/the/stage/and/is/heard/no/more/it/is/a/tale/told/by/an/idiot/full/of/sound/and/fury/signifying/nothing');
+    $this->assertText('Long author feed item title');
+    $this->assertText('Long author feed item description');
+    $this->assertLinkByHref('http://example.com/long/author');
   }
 
   /**
@@ -923,7 +961,7 @@ class FeedParserTestCase extends AggregatorTestCase {
     $feed = $this->createFeed($this->getAtomSample());
     aggregator_refresh($feed);
     $this->drupalGet('aggregator/sources/' . $feed->fid);
-    $this->assertResponse(200, t('Feed %name exists.', array('%name' => $feed->title)));
+    $this->assertResponse(200, format_string('Feed %name exists.', array('%name' => $feed->title)));
     $this->assertText('Atom-Powered Robots Run Amok');
     $this->assertLinkByHref('http://example.org/2003/12/13/atom03');
     $this->assertText('Some text.');
diff --git a/modules/aggregator/tests/aggregator_test.info b/modules/aggregator/tests/aggregator_test.info
index fe8ccd107e0846ded2d9bdb43198682b5db72e79..204d2edf20d496cf43fef9322b6023ac7a0a3834 100644
--- a/modules/aggregator/tests/aggregator_test.info
+++ b/modules/aggregator/tests/aggregator_test.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/aggregator/tests/aggregator_test_rss091.xml b/modules/aggregator/tests/aggregator_test_rss091.xml
index f39a2732c03459b79be2b51ca4f6b1f4dc117be7..29440227fcf22fda378b9fa1c5c85065cabd7448 100644
--- a/modules/aggregator/tests/aggregator_test_rss091.xml
+++ b/modules/aggregator/tests/aggregator_test_rss091.xml
@@ -26,5 +26,16 @@
       <link>http://example.com/example-turns-two</link>
       <description>Second example feed item description.</description>
     </item>
+    <item>
+      <title>Long link feed item title.</title>
+      <link>http://example.com/tomorrow/and/tomorrow/and/tomorrow/creeps/in/this/petty/pace/from/day/to/day/to/the/last/syllable/of/recorded/time/and/all/our/yesterdays/have/lighted/fools/the/way/to/dusty/death/out/out/brief/candle/life/is/but/a/walking/shadow/a/poor/player/that/struts/and/frets/his/hour/upon/the/stage/and/is/heard/no/more/it/is/a/tale/told/by/an/idiot/full/of/sound/and/fury/signifying/nothing</link>
+      <description>Long link feed item description.</description>
+    </item>
+    <item>
+      <title>Long author feed item title.</title>
+      <link>http://example.com/long/author</link>
+      <author>I wanted to get out and walk eastward toward the park through the soft twilight, but each time I tried to go I became entangled in some wild, strident argument which pulled me back, as if with ropes, into my chair. Yet high over the city our line of yellow windows must have contributed their share of human secrecy to the casual watcher in the darkening streets, and I was him too, looking up and wondering. I was within and without, simultaneously enchanted and repelled by the inexhaustible variety of life.</author>
+      <description>Long author feed item description.</description>
+    </item>
   </channel>
 </rss>
diff --git a/modules/block/block.api.php b/modules/block/block.api.php
index 3cd52f8b75321f549fda08bc80b26e6a38c65d6a..312eb11f2f6de50d55610c0fd387313ae9ae4648 100644
--- a/modules/block/block.api.php
+++ b/modules/block/block.api.php
@@ -55,6 +55,7 @@
  *       viewed.
  *     - DRUPAL_CACHE_GLOBAL: The block is the same for every user on every page
  *       where it is visible.
+ *     - DRUPAL_CACHE_CUSTOM: The module implements its own caching system.
  *     - DRUPAL_NO_CACHE: The block should not get cached.
  *   - properties: (optional) Array of additional metadata to add to the block.
  *     Common properties include:
diff --git a/modules/block/block.info b/modules/block/block.info
index ef2f999273c09c55b27a80ac97110bb13cdbb21f..cd9bf089ca655918214908c1e275f9a146fc6565 100644
--- a/modules/block/block.info
+++ b/modules/block/block.info
@@ -6,8 +6,8 @@ core = 7.x
 files[] = block.test
 configure = admin/structure/block
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/block/block.test b/modules/block/block.test
index 8e6e47042d40fd3f32d3c50ed80229c29028c959..11d070993c61a4850e053b3a30da0ba50538aa8e 100644
--- a/modules/block/block.test
+++ b/modules/block/block.test
@@ -45,9 +45,9 @@ class BlockTestCase extends DrupalWebTestCase {
   function testCustomBlock() {
     // Confirm that the add block link appears on block overview pages.
     $this->drupalGet('admin/structure/block');
-    $this->assertRaw(l('Add block', 'admin/structure/block/add'), t('Add block link is present on block overview page for default theme.'));
+    $this->assertRaw(l('Add block', 'admin/structure/block/add'), 'Add block link is present on block overview page for default theme.');
     $this->drupalGet('admin/structure/block/list/seven');
-    $this->assertRaw(l('Add block', 'admin/structure/block/list/seven/add'), t('Add block link is present on block overview page for non-default theme.'));
+    $this->assertRaw(l('Add block', 'admin/structure/block/list/seven/add'), 'Add block link is present on block overview page for non-default theme.');
 
     // Confirm that hidden regions are not shown as options for block placement
     // when adding a new block.
@@ -58,7 +58,7 @@ class BlockTestCase extends DrupalWebTestCase {
       if ($theme->status) {
         foreach ($theme->info['regions_hidden'] as $hidden_region) {
           $elements = $this->xpath('//select[@id=:id]//option[@value=:value]', array(':id' => 'edit-regions-' . $key, ':value' => $hidden_region));
-          $this->assertFalse(isset($elements[0]), t('The hidden region @region is not available for @theme.', array('@region' => $hidden_region, '@theme' => $key)));
+          $this->assertFalse(isset($elements[0]), format_string('The hidden region @region is not available for @theme.', array('@region' => $hidden_region, '@theme' => $key)));
         }
       }
     }
@@ -71,17 +71,17 @@ class BlockTestCase extends DrupalWebTestCase {
     $this->drupalPost('admin/structure/block/add', $custom_block, t('Save block'));
 
     // Confirm that the custom block has been created, and then query the created bid.
-    $this->assertText(t('The block has been created.'), t('Custom block successfully created.'));
+    $this->assertText(t('The block has been created.'), 'Custom block successfully created.');
     $bid = db_query("SELECT bid FROM {block_custom} WHERE info = :info", array(':info' => $custom_block['info']))->fetchField();
 
     // Check to see if the custom block was created by checking that it's in the database.
-    $this->assertNotNull($bid, t('Custom block found in database'));
+    $this->assertNotNull($bid, 'Custom block found in database');
 
     // Check that block_block_view() returns the correct title and content.
     $data = block_block_view($bid);
     $format = db_query("SELECT format FROM {block_custom} WHERE bid = :bid", array(':bid' => $bid))->fetchField();
-    $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.'));
+    $this->assertTrue(array_key_exists('subject', $data) && empty($data['subject']), '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'], 'block_block_view() provides correct block content.');
 
     // Check whether the block can be moved to all available regions.
     $custom_block['module'] = 'block';
@@ -92,8 +92,8 @@ class BlockTestCase extends DrupalWebTestCase {
 
     // Verify presence of configure and delete links for custom block.
     $this->drupalGet('admin/structure/block');
-    $this->assertLinkByHref('admin/structure/block/manage/block/' . $bid . '/configure', 0, t('Custom block configure link found.'));
-    $this->assertLinkByHref('admin/structure/block/manage/block/' . $bid . '/delete', 0, t('Custom block delete link found.'));
+    $this->assertLinkByHref('admin/structure/block/manage/block/' . $bid . '/configure', 0, 'Custom block configure link found.');
+    $this->assertLinkByHref('admin/structure/block/manage/block/' . $bid . '/delete', 0, 'Custom block delete link found.');
 
     // Set visibility only for authenticated users, to verify delete functionality.
     $edit = array();
@@ -103,10 +103,10 @@ class BlockTestCase extends DrupalWebTestCase {
     // Delete the created custom block & verify that it's been deleted and no longer appearing on the page.
     $this->clickLink(t('delete'));
     $this->drupalPost('admin/structure/block/manage/block/' . $bid . '/delete', array(), t('Delete'));
-    $this->assertRaw(t('The block %title has been removed.', array('%title' => $custom_block['info'])), t('Custom block successfully deleted.'));
-    $this->assertNoText(t($custom_block['title']), t('Custom block no longer appears on page.'));
+    $this->assertRaw(t('The block %title has been removed.', array('%title' => $custom_block['info'])), 'Custom block successfully deleted.');
+    $this->assertNoText(t($custom_block['title']), 'Custom block no longer appears on page.');
     $count = db_query("SELECT 1 FROM {block_role} WHERE module = :module AND delta = :delta", array(':module' => $custom_block['module'], ':delta' => $custom_block['delta']))->fetchField();
-    $this->assertFalse($count, t('Table block_role being cleaned.'));
+    $this->assertFalse($count, 'Table block_role being cleaned.');
   }
 
   /**
@@ -130,20 +130,20 @@ class BlockTestCase extends DrupalWebTestCase {
 
     // Confirm that the custom block is being displayed using configured text format.
     $this->drupalGet('node');
-    $this->assertRaw('<h1>Full HTML</h1>', t('Custom block successfully being displayed using Full HTML.'));
+    $this->assertRaw('<h1>Full HTML</h1>', 'Custom block successfully being displayed using Full HTML.');
 
     // Confirm that a user without access to Full HTML can not see the body field,
     // but can still submit the form without errors.
     $block_admin = $this->drupalCreateUser(array('administer blocks'));
     $this->drupalLogin($block_admin);
     $this->drupalGet('admin/structure/block/manage/block/' . $bid . '/configure');
-    $this->assertFieldByXPath("//textarea[@name='body[value]' and @disabled='disabled']", t('This field has been disabled because you do not have sufficient permissions to edit it.'), t('Body field contains denied message'));
+    $this->assertFieldByXPath("//textarea[@name='body[value]' and @disabled='disabled']", t('This field has been disabled because you do not have sufficient permissions to edit it.'), 'Body field contains denied message');
     $this->drupalPost('admin/structure/block/manage/block/' . $bid . '/configure', array(), t('Save block'));
     $this->assertNoText(t('Ensure that each block description is unique.'));
 
     // Confirm that the custom block is still being displayed using configured text format.
     $this->drupalGet('node');
-    $this->assertRaw('<h1>Full HTML</h1>', t('Custom block successfully being displayed using Full HTML.'));
+    $this->assertRaw('<h1>Full HTML</h1>', 'Custom block successfully being displayed using Full HTML.');
   }
 
   /**
@@ -178,18 +178,18 @@ class BlockTestCase extends DrupalWebTestCase {
     $this->moveBlockToRegion($block, $this->regions[1]);
 
     $this->drupalGet('');
-    $this->assertText($title, t('Block was displayed on the front page.'));
+    $this->assertText($title, 'Block was displayed on the front page.');
 
     $this->drupalGet('user');
-    $this->assertNoText($title, t('Block was not displayed according to block visibility rules.'));
+    $this->assertNoText($title, 'Block was not displayed according to block visibility rules.');
 
     $this->drupalGet('USER/' . $this->admin_user->uid);
-    $this->assertNoText($title, t('Block was not displayed according to block visibility rules regardless of path case.'));
+    $this->assertNoText($title, 'Block was not displayed according to block visibility rules regardless of path case.');
 
     // Confirm that the block is not displayed to anonymous users.
     $this->drupalLogout();
     $this->drupalGet('');
-    $this->assertNoText($title, t('Block was not displayed to anonymous users.'));
+    $this->assertNoText($title, 'Block was not displayed to anonymous users.');
   }
 
   /**
@@ -224,15 +224,15 @@ class BlockTestCase extends DrupalWebTestCase {
     $this->drupalPost('admin/structure/block/manage/' . $block['module'] . '/' . $block['delta'] . '/configure', $edit, t('Save block'));
 
     $this->drupalGet('');
-    $this->assertNoText($title, t('Block was not displayed according to block visibility rules.'));
+    $this->assertNoText($title, 'Block was not displayed according to block visibility rules.');
 
     $this->drupalGet('user');
-    $this->assertNoText($title, t('Block was not displayed according to block visibility rules regardless of path case.'));
+    $this->assertNoText($title, 'Block was not displayed according to block visibility rules regardless of path case.');
 
     // Confirm that the block is not displayed to anonymous users.
     $this->drupalLogout();
     $this->drupalGet('');
-    $this->assertNoText($title, t('Block was not displayed to anonymous users.'));
+    $this->assertNoText($title, 'Block was not displayed to anonymous users.');
   }
 
   /**
@@ -270,7 +270,7 @@ class BlockTestCase extends DrupalWebTestCase {
     $this->drupalPost('user/' . $this->admin_user->uid . '/edit', $edit, t('Save'));
 
     $this->drupalGet('');
-    $this->assertNoText($block['title'], t('Block was not displayed according to per user block visibility setting.'));
+    $this->assertNoText($block['title'], 'Block was not displayed according to per user block visibility setting.');
 
     // Set the block to be customizable per user, hidden by default.
     $edit = array();
@@ -283,7 +283,7 @@ class BlockTestCase extends DrupalWebTestCase {
     $this->drupalPost('user/' . $this->admin_user->uid . '/edit', $edit, t('Save'));
 
     $this->drupalGet('');
-    $this->assertText($block['title'], t('Block was displayed according to per user block visibility setting.'));
+    $this->assertText($block['title'], 'Block was displayed according to per user block visibility setting.');
   }
 
   /**
@@ -298,14 +298,14 @@ class BlockTestCase extends DrupalWebTestCase {
 
     // Set block title to confirm that interface works and override any custom titles.
     $this->drupalPost('admin/structure/block/manage/' . $block['module'] . '/' . $block['delta'] . '/configure', array('title' => $block['title']), t('Save block'));
-    $this->assertText(t('The block configuration has been saved.'), t('Block title set.'));
+    $this->assertText(t('The block configuration has been saved.'), 'Block title set.');
     $bid = db_query("SELECT bid FROM {block} WHERE module = :module AND delta = :delta", array(
       ':module' => $block['module'],
       ':delta' => $block['delta'],
     ))->fetchField();
 
     // Check to see if the block was created by checking that it's in the database.
-    $this->assertNotNull($bid, t('Block found in database'));
+    $this->assertNotNull($bid, 'Block found in database');
 
     // Check whether the block can be moved to all available regions.
     foreach ($this->regions as $region) {
@@ -318,21 +318,21 @@ class BlockTestCase extends DrupalWebTestCase {
     $this->drupalPost('admin/structure/block', $edit, t('Save blocks'));
 
     // Confirm that the block was moved to the proper region.
-    $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.'));
+    $this->assertText(t('The block settings have been updated.'), 'Block successfully move to disabled region.');
+    $this->assertNoText(t($block['title']), 'Block no longer appears on page.');
 
     // 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.'));
+    $this->assertNoFieldByXPath($xpath, FALSE, 'Custom block found in no regions.');
 
     // For convenience of developers, put the navigation block back.
     $edit = array();
     $edit['blocks[' . $block['module'] . '_' . $block['delta'] . '][region]'] = $this->regions[1];
     $this->drupalPost('admin/structure/block', $edit, t('Save blocks'));
-    $this->assertText(t('The block settings have been updated.'), t('Block successfully move to first sidebar region.'));
+    $this->assertText(t('The block settings have been updated.'), 'Block successfully move to first sidebar region.');
 
     $this->drupalPost('admin/structure/block/manage/' . $block['module'] . '/' . $block['delta'] . '/configure', array('title' => 'Navigation'), t('Save block'));
-    $this->assertText(t('The block configuration has been saved.'), t('Block title set.'));
+    $this->assertText(t('The block configuration has been saved.'), 'Block title set.');
   }
 
   function moveBlockToRegion($block, $region) {
@@ -342,18 +342,18 @@ class BlockTestCase extends DrupalWebTestCase {
     $this->drupalPost('admin/structure/block', $edit, t('Save blocks'));
 
     // Confirm that the block was moved to the proper region.
-    $this->assertText(t('The block settings have been updated.'), t('Block successfully moved to %region_name region.', array( '%region_name' => $region)));
+    $this->assertText(t('The block settings have been updated.'), format_string('Block successfully moved to %region_name region.', array( '%region_name' => $region)));
 
     // Confirm that the block is being displayed.
     $this->drupalGet('node');
-    $this->assertText(t($block['title']), t('Block successfully being displayed on the page.'));
+    $this->assertText(t($block['title']), 'Block successfully being displayed on the page.');
 
     // Confirm that the custom block was found at the proper region.
     $xpath = $this->buildXPathQuery('//div[@class=:region-class]//div[@id=:block-id]/*', array(
       ':region-class' => 'region region-' . str_replace('_', '-', $region),
       ':block-id' => 'block-' . $block['module'] . '-' . $block['delta'],
     ));
-    $this->assertFieldByXPath($xpath, NULL, t('Custom block found in %region_name region.', array('%region_name' => $region)));
+    $this->assertFieldByXPath($xpath, NULL, format_string('Custom block found in %region_name region.', array('%region_name' => $region)));
   }
 
   /**
@@ -361,14 +361,14 @@ class BlockTestCase extends DrupalWebTestCase {
    */
   function testBlockRehash() {
     module_enable(array('block_test'));
-    $this->assertTrue(module_exists('block_test'), t('Test block module enabled.'));
+    $this->assertTrue(module_exists('block_test'), 'Test block module enabled.');
 
     // Our new block should be inserted in the database when we visit the
     // block management page.
     $this->drupalGet('admin/structure/block');
     // Our test block's caching should default to DRUPAL_CACHE_PER_ROLE.
     $current_caching = db_query("SELECT cache FROM {block} WHERE module = 'block_test' AND delta = 'test_cache'")->fetchField();
-    $this->assertEqual($current_caching, DRUPAL_CACHE_PER_ROLE, t('Test block cache mode defaults to DRUPAL_CACHE_PER_ROLE.'));
+    $this->assertEqual($current_caching, DRUPAL_CACHE_PER_ROLE, 'Test block cache mode defaults to DRUPAL_CACHE_PER_ROLE.');
 
     // Disable caching for this block.
     variable_set('block_test_caching', DRUPAL_NO_CACHE);
@@ -376,7 +376,7 @@ class BlockTestCase extends DrupalWebTestCase {
     drupal_flush_all_caches();
     // Verify that the database is updated with the new caching mode.
     $current_caching = db_query("SELECT cache FROM {block} WHERE module = 'block_test' AND delta = 'test_cache'")->fetchField();
-    $this->assertEqual($current_caching, DRUPAL_NO_CACHE, t("Test block's database entry updated to DRUPAL_NO_CACHE."));
+    $this->assertEqual($current_caching, DRUPAL_NO_CACHE, "Test block's database entry updated to DRUPAL_NO_CACHE.");
   }
 }
 
@@ -427,7 +427,7 @@ class NewDefaultThemeBlocks extends DrupalWebTestCase {
       $themes['admin'] = $admin_theme;
     }
     $count = db_query_range('SELECT 1 FROM {block} WHERE theme NOT IN (:themes)', 0, 1, array(':themes' => $themes))->fetchField();
-    $this->assertFalse($count, t('Only the default theme and the admin theme have blocks.'));
+    $this->assertFalse($count, 'Only the default theme and the admin theme have blocks.');
 
     // Populate list of all blocks for matching against new theme.
     $blocks = array();
@@ -445,7 +445,7 @@ class NewDefaultThemeBlocks extends DrupalWebTestCase {
     $result = db_query('SELECT * FROM {block} WHERE theme = :theme', array(':theme' => 'stark'));
     foreach ($result as $block) {
       unset($block->theme, $block->bid);
-      $this->assertEqual($blocks[$block->module][$block->delta], $block, t('Block %name matched', array('%name' => $block->module . '-' . $block->delta)));
+      $this->assertEqual($blocks[$block->module][$block->delta], $block, format_string('Block %name matched', array('%name' => $block->module . '-' . $block->delta)));
     }
   }
 }
@@ -472,13 +472,13 @@ class BlockAdminThemeTestCase extends DrupalWebTestCase {
 
     // Ensure that access to block admin page is denied when theme is disabled.
     $this->drupalGet('admin/structure/block/list/stark');
-    $this->assertResponse(403, t('The block admin page for a disabled theme can not be accessed'));
+    $this->assertResponse(403, 'The block admin page for a disabled theme can not be accessed');
 
     // Enable admin theme and confirm that tab is accessible.
     $edit['admin_theme'] = 'stark';
     $this->drupalPost('admin/appearance', $edit, t('Save configuration'));
     $this->drupalGet('admin/structure/block/list/stark');
-    $this->assertResponse(200, t('The block admin page for the admin theme can be accessed'));
+    $this->assertResponse(200, 'The block admin page for the admin theme can be accessed');
   }
 }
 
@@ -532,20 +532,20 @@ class BlockCacheTestCase extends DrupalWebTestCase {
     variable_set('block_test_content', $current_content);
     $this->drupalLogin($this->normal_user);
     $this->drupalGet('');
-    $this->assertText($current_content, t('Block content displays.'));
+    $this->assertText($current_content, 'Block content displays.');
 
     // Change the content, but the cached copy should still be served.
     $old_content = $current_content;
     $current_content = $this->randomName();
     variable_set('block_test_content', $current_content);
     $this->drupalGet('');
-    $this->assertText($old_content, t('Block is served from the cache.'));
+    $this->assertText($old_content, 'Block is served from the cache.');
 
     // Clear the cache and verify that the stale data is no longer there.
     cache_clear_all();
     $this->drupalGet('');
-    $this->assertNoText($old_content, t('Block cache clear removes stale cache data.'));
-    $this->assertText($current_content, t('Fresh block content is displayed after clearing the cache.'));
+    $this->assertNoText($old_content, 'Block cache clear removes stale cache data.');
+    $this->assertText($current_content, 'Fresh block content is displayed after clearing the cache.');
 
     // Test whether the cached data is served for the correct users.
     $old_content = $current_content;
@@ -553,19 +553,19 @@ class BlockCacheTestCase extends DrupalWebTestCase {
     variable_set('block_test_content', $current_content);
     $this->drupalLogout();
     $this->drupalGet('');
-    $this->assertNoText($old_content, t('Anonymous user does not see content cached per-role for normal user.'));
+    $this->assertNoText($old_content, 'Anonymous user does not see content cached per-role for normal user.');
 
     $this->drupalLogin($this->normal_user_alt);
     $this->drupalGet('');
-    $this->assertText($old_content, t('User with the same roles sees per-role cached content.'));
+    $this->assertText($old_content, 'User with the same roles sees per-role cached content.');
 
     $this->drupalLogin($this->admin_user);
     $this->drupalGet('');
-    $this->assertNoText($old_content, t('Admin user does not see content cached per-role for normal user.'));
+    $this->assertNoText($old_content, 'Admin user does not see content cached per-role for normal user.');
 
     $this->drupalLogin($this->normal_user);
     $this->drupalGet('');
-    $this->assertText($old_content, t('Block is served from the per-role cache.'));
+    $this->assertText($old_content, 'Block is served from the per-role cache.');
   }
 
   /**
@@ -577,7 +577,7 @@ class BlockCacheTestCase extends DrupalWebTestCase {
     variable_set('block_test_content', $current_content);
 
     $this->drupalGet('');
-    $this->assertText($current_content, t('Block content displays.'));
+    $this->assertText($current_content, 'Block content displays.');
 
     $old_content = $current_content;
     $current_content = $this->randomName();
@@ -585,7 +585,7 @@ class BlockCacheTestCase extends DrupalWebTestCase {
 
     $this->drupalLogout();
     $this->drupalGet('user');
-    $this->assertText($old_content, t('Block content served from global cache.'));
+    $this->assertText($old_content, 'Block content served from global cache.');
   }
 
   /**
@@ -598,13 +598,13 @@ class BlockCacheTestCase extends DrupalWebTestCase {
 
     // If DRUPAL_NO_CACHE has no effect, the next request would be cached.
     $this->drupalGet('');
-    $this->assertText($current_content, t('Block content displays.'));
+    $this->assertText($current_content, 'Block content displays.');
 
     // A cached copy should not be served.
     $current_content = $this->randomName();
     variable_set('block_test_content', $current_content);
     $this->drupalGet('');
-    $this->assertText($current_content, t('DRUPAL_NO_CACHE prevents blocks from being cached.'));
+    $this->assertText($current_content, 'DRUPAL_NO_CACHE prevents blocks from being cached.');
   }
 
   /**
@@ -617,22 +617,22 @@ class BlockCacheTestCase extends DrupalWebTestCase {
     $this->drupalLogin($this->normal_user);
 
     $this->drupalGet('');
-    $this->assertText($current_content, t('Block content displays.'));
+    $this->assertText($current_content, 'Block content displays.');
 
     $old_content = $current_content;
     $current_content = $this->randomName();
     variable_set('block_test_content', $current_content);
 
     $this->drupalGet('');
-    $this->assertText($old_content, t('Block is served from per-user cache.'));
+    $this->assertText($old_content, 'Block is served from per-user cache.');
 
     $this->drupalLogin($this->normal_user_alt);
     $this->drupalGet('');
-    $this->assertText($current_content, t('Per-user block cache is not served for other users.'));
+    $this->assertText($current_content, 'Per-user block cache is not served for other users.');
 
     $this->drupalLogin($this->normal_user);
     $this->drupalGet('');
-    $this->assertText($old_content, t('Per-user block cache is persistent.'));
+    $this->assertText($old_content, 'Per-user block cache is persistent.');
   }
 
   /**
@@ -644,16 +644,16 @@ class BlockCacheTestCase extends DrupalWebTestCase {
     variable_set('block_test_content', $current_content);
 
     $this->drupalGet('node');
-    $this->assertText($current_content, t('Block content displays on the node page.'));
+    $this->assertText($current_content, 'Block content displays on the node page.');
 
     $old_content = $current_content;
     $current_content = $this->randomName();
     variable_set('block_test_content', $current_content);
 
     $this->drupalGet('user');
-    $this->assertNoText($old_content, t('Block content cached for the node page does not show up for the user page.'));
+    $this->assertNoText($old_content, 'Block content cached for the node page does not show up for the user page.');
     $this->drupalGet('node');
-    $this->assertText($old_content, t('Block content cached for the node page.'));
+    $this->assertText($old_content, 'Block content cached for the node page.');
   }
 
   /**
@@ -706,7 +706,7 @@ class BlockHTMLIdTestCase extends DrupalWebTestCase {
    */
   function testHTMLId() {
     $this->drupalGet('');
-    $this->assertRaw('block-block-test-test-html-id', t('HTML id for test block is valid.'));
+    $this->assertRaw('block-block-test-test-html-id', 'HTML id for test block is valid.');
   }
 }
 
@@ -736,7 +736,7 @@ class BlockTemplateSuggestionsUnitTest extends DrupalUnitTestCase {
     $variables1['elements']['#block'] = $block1;
     $variables1['elements']['#children'] = '';
     template_preprocess_block($variables1);
-    $this->assertEqual($variables1['theme_hook_suggestions'], array('block__footer', 'block__block', 'block__block__underscore_test'), t('Found expected block suggestions for delta with underscore'));
+    $this->assertEqual($variables1['theme_hook_suggestions'], array('block__footer', 'block__block', 'block__block__underscore_test'), 'Found expected block suggestions for delta with underscore');
 
     // Define block delta with hyphens to be preprocessed. Hyphens should be
     // replaced with underscores.
@@ -748,7 +748,7 @@ class BlockTemplateSuggestionsUnitTest extends DrupalUnitTestCase {
     $variables2['elements']['#block'] = $block2;
     $variables2['elements']['#children'] = '';
     template_preprocess_block($variables2);
-    $this->assertEqual($variables2['theme_hook_suggestions'], array('block__footer', 'block__block', 'block__block__hyphen_test'), t('Hyphens (-) in block delta were replaced by underscore (_)'));
+    $this->assertEqual($variables2['theme_hook_suggestions'], array('block__footer', 'block__block', 'block__block__hyphen_test'), 'Hyphens (-) in block delta were replaced by underscore (_)');
   }
 }
 
@@ -784,11 +784,11 @@ class BlockHiddenRegionTestCase extends DrupalWebTestCase {
 
     // Ensure that "block_test_theme" is set as the default theme.
     $this->drupalGet('admin/structure/block');
-    $this->assertText('Block test theme(' . t('active tab') . ')', t('Default local task on blocks admin page is the block test theme.'));
+    $this->assertText('Block test theme(' . t('active tab') . ')', 'Default local task on blocks admin page is the block test theme.');
 
     // Ensure that the search form block is displayed.
     $this->drupalGet('');
-    $this->assertText('Search form', t('Block was displayed on the front page.'));
+    $this->assertText('Search form', 'Block was displayed on the front page.');
   }
 }
 
diff --git a/modules/block/tests/block_test.info b/modules/block/tests/block_test.info
index 5429490439bf713fde6781a076201c605e4e9fea..077515208f48cfff6f0ca6bc80c6f2a5d2795d74 100644
--- a/modules/block/tests/block_test.info
+++ b/modules/block/tests/block_test.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/block/tests/themes/block_test_theme/block_test_theme.info b/modules/block/tests/themes/block_test_theme/block_test_theme.info
index bc74f0fba2fd98a938ff2c8e4922c3bd8c93aaba..4b585c5c9974b189f10b99fe35adc9fde3674810 100644
--- a/modules/block/tests/themes/block_test_theme/block_test_theme.info
+++ b/modules/block/tests/themes/block_test_theme/block_test_theme.info
@@ -13,8 +13,8 @@ regions[footer] = Footer
 regions[highlighted] = Highlighted
 regions[help] = Help
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/blog/blog.info b/modules/blog/blog.info
index 9dd7d37a87112647ac4f6d9c9f1444e8f465d6c1..bdfc3c03d2a5b5cfef3c20aecf9ed78f4d64c054 100644
--- a/modules/blog/blog.info
+++ b/modules/blog/blog.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 files[] = blog.test
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/book/book.admin.inc b/modules/book/book.admin.inc
index 2f60610c8357c917944250855262822169989260..62c6e841a3f315839f89c3111c48d3c307b44164 100644
--- a/modules/book/book.admin.inc
+++ b/modules/book/book.admin.inc
@@ -278,5 +278,5 @@ function theme_book_admin_table($variables) {
     $rows[] = $row;
   }
 
-  return theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'book-outline')));
+  return theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'book-outline'), 'empty' => t('No book content available.')));
 }
diff --git a/modules/book/book.info b/modules/book/book.info
index f92a1744e92186c1c85507da0ad718e4892b8e16..d3e42dd443fc5854aa89e71a71c75ee6c5a7b224 100644
--- a/modules/book/book.info
+++ b/modules/book/book.info
@@ -7,8 +7,8 @@ files[] = book.test
 configure = admin/content/book/settings
 stylesheets[all][] = book.css
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/book/book.js b/modules/book/book.js
index 075f33b93cb2b6cfb8621319af8af1d83bff7005..0853e8ecbeaa030dab5d726ffd1efa82a4234393 100644
--- a/modules/book/book.js
+++ b/modules/book/book.js
@@ -1,3 +1,9 @@
+/**
+ * @file
+ * Javascript behaviors for the Book module.
+ */
+
+
 (function ($) {
 
 Drupal.behaviors.bookFieldsetSummaries = {
diff --git a/modules/color/color.info b/modules/color/color.info
index 3bf42fe5c37a32ede700f416269ed586e9a542d5..a12fcdd54f1d70d3a22a56c5cbbe69918bb6c82f 100644
--- a/modules/color/color.info
+++ b/modules/color/color.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 files[] = color.test
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/comment/comment-wrapper.tpl.php b/modules/comment/comment-wrapper.tpl.php
index 3293e88aec01167748018f1fd8db9115ea93fc75..c6914592937ac9d66ebd715c004f5083003936e0 100644
--- a/modules/comment/comment-wrapper.tpl.php
+++ b/modules/comment/comment-wrapper.tpl.php
@@ -32,7 +32,8 @@
  *   into a string within the variable $classes.
  *
  * @see template_preprocess_comment_wrapper()
- * @see theme_comment_wrapper()
+ *
+ * @ingroup themeable
  */
 ?>
 <div id="comments" class="<?php print $classes; ?>"<?php print $attributes; ?>>
diff --git a/modules/comment/comment.info b/modules/comment/comment.info
index 89be17cc5b68ad36f85e716fc8773b0603b0615a..c42f7afbad5194af6c15f17f633ffafa653e97c7 100644
--- a/modules/comment/comment.info
+++ b/modules/comment/comment.info
@@ -9,8 +9,8 @@ files[] = comment.test
 configure = admin/content/comment
 stylesheets[all][] = comment.css
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 429c3b01bb1d5594c046be5237017ffaf747cb2e..4241538a0353b248f5aef3b0c9c3f6141c847599 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -152,7 +152,7 @@ function comment_node_type_load($name) {
 }
 
 /**
- * Entity uri callback.
+ * Entity URI callback.
  */
 function comment_uri($comment) {
   return array(
@@ -992,6 +992,14 @@ function comment_build_content($comment, $node, $view_mode = 'full', $langcode =
   // Remove previously built content, if exists.
   $comment->content = array();
 
+  // Allow modules to change the view mode.
+  $context = array(
+    'entity_type' => 'comment',
+    'entity' => $comment,
+    'langcode' => $langcode,
+  );
+  drupal_alter('entity_view_mode', $view_mode, $context);
+
   // Build fields content.
   field_attach_prepare_view('comment', array($comment->cid => $comment), $view_mode, $langcode);
   entity_prepare_view('comment', array($comment->cid => $comment), $langcode);
@@ -1013,6 +1021,10 @@ function comment_build_content($comment, $node, $view_mode = 'full', $langcode =
   // Allow modules to make their own additions to the comment.
   module_invoke_all('comment_view', $comment, $view_mode, $langcode);
   module_invoke_all('entity_view', $comment, 'comment', $view_mode, $langcode);
+
+  // Make sure the current view mode is stored if no module has already
+  // populated the related key.
+  $comment->content += array('#view_mode' => $view_mode);
 }
 
 /**
@@ -2375,7 +2387,6 @@ function theme_comment_post_forbidden($variables) {
  * Process variables for comment-wrapper.tpl.php.
  *
  * @see comment-wrapper.tpl.php
- * @see theme_comment_wrapper()
  */
 function template_preprocess_comment_wrapper(&$variables) {
   // Provide contextual information.
diff --git a/modules/comment/comment.test b/modules/comment/comment.test
index e787d25d147fa8d4728533b6db7c33f6b44b0666..30bff71406f0fb36255b0592dfd13eebed992949 100644
--- a/modules/comment/comment.test
+++ b/modules/comment/comment.test
@@ -1,7 +1,7 @@
 <?php
 
 /**
- * @file 
+ * @file
  * Tests for comment.module.
  */
 
@@ -48,7 +48,7 @@ class CommentHelperCase extends DrupalWebTestCase {
       $edit['subject'] = $subject;
     }
     else {
-      $this->assertNoFieldByName('subject', '', t('Subject field not found.'));
+      $this->assertNoFieldByName('subject', '', 'Subject field not found.');
     }
 
     if ($contact !== NULL && is_array($contact)) {
@@ -57,19 +57,19 @@ class CommentHelperCase extends DrupalWebTestCase {
     switch ($preview_mode) {
       case DRUPAL_REQUIRED:
         // Preview required so no save button should be found.
-        $this->assertNoFieldByName('op', t('Save'), t('Save button not found.'));
+        $this->assertNoFieldByName('op', t('Save'), 'Save button not found.');
         $this->drupalPost(NULL, $edit, t('Preview'));
         // Don't break here so that we can test post-preview field presence and
         // function below.
       case DRUPAL_OPTIONAL:
-        $this->assertFieldByName('op', t('Preview'), t('Preview button found.'));
-        $this->assertFieldByName('op', t('Save'), t('Save button found.'));
+        $this->assertFieldByName('op', t('Preview'), 'Preview button found.');
+        $this->assertFieldByName('op', t('Save'), 'Save button found.');
         $this->drupalPost(NULL, $edit, t('Save'));
         break;
 
       case DRUPAL_DISABLED:
-        $this->assertNoFieldByName('op', t('Preview'), t('Preview button not found.'));
-        $this->assertFieldByName('op', t('Save'), t('Save button found.'));
+        $this->assertNoFieldByName('op', t('Preview'), 'Preview button not found.');
+        $this->assertFieldByName('op', t('Save'), 'Save button found.');
         $this->drupalPost(NULL, $edit, t('Save'));
         break;
     }
@@ -83,7 +83,7 @@ class CommentHelperCase extends DrupalWebTestCase {
         $this->assertText($subject, 'Comment subject posted.');
       }
       $this->assertText($comment, 'Comment body posted.');
-      $this->assertTrue((!empty($match) && !empty($match[1])), t('Comment id found.'));
+      $this->assertTrue((!empty($match) && !empty($match[1])), 'Comment id found.');
     }
 
     if (isset($match[1])) {
@@ -122,7 +122,7 @@ class CommentHelperCase extends DrupalWebTestCase {
    */
   function deleteComment($comment) {
     $this->drupalPost('comment/' . $comment->id . '/delete', array(), t('Delete'));
-    $this->assertText(t('The comment and all its replies have been deleted.'), t('Comment deleted.'));
+    $this->assertText(t('The comment and all its replies have been deleted.'), 'Comment deleted.');
   }
 
   /**
@@ -200,7 +200,8 @@ class CommentHelperCase extends DrupalWebTestCase {
    */
   function setCommentSettings($name, $value, $message) {
     variable_set($name . '_article', $value);
-    $this->assertTrue(TRUE, t($message)); // Display status message.
+    // Display status message.
+    $this->assertTrue(TRUE, $message);
   }
 
   /**
@@ -230,10 +231,10 @@ class CommentHelperCase extends DrupalWebTestCase {
 
     if ($operation == 'delete') {
       $this->drupalPost(NULL, array(), t('Delete comments'));
-      $this->assertRaw(format_plural(1, 'Deleted 1 comment.', 'Deleted @count comments.'), t('Operation "' . $operation . '" was performed on comment.'));
+      $this->assertRaw(format_plural(1, 'Deleted 1 comment.', 'Deleted @count comments.'), format_string('Operation @operation was performed on comment.', array('@operation' => $operation)));
     }
     else {
-      $this->assertText(t('The update has been performed.'), t('Operation "' . $operation . '" was performed on comment.'));
+      $this->assertText(t('The update has been performed.'), format_string('Operation @operation was performed on comment.', array('@operation' => $operation)));
     }
   }
 
@@ -280,7 +281,7 @@ class CommentInterfaceTest extends CommentHelperCase {
     $comment_text = $this->randomName();
     $comment = $this->postComment($this->node, $comment_text);
     $comment_loaded = comment_load($comment->id);
-    $this->assertTrue($this->commentExists($comment), t('Comment found.'));
+    $this->assertTrue($this->commentExists($comment), 'Comment found.');
 
     // Set comments to have subject and preview to required.
     $this->drupalLogout();
@@ -295,12 +296,12 @@ class CommentInterfaceTest extends CommentHelperCase {
     $comment_text = $this->randomName();
     $comment = $this->postComment($this->node, $comment_text, $subject_text, TRUE);
     $comment_loaded = comment_load($comment->id);
-    $this->assertTrue($this->commentExists($comment), t('Comment found.'));
+    $this->assertTrue($this->commentExists($comment), 'Comment found.');
 
     // Check comment display.
     $this->drupalGet('node/' . $this->node->nid . '/' . $comment->id);
-    $this->assertText($subject_text, t('Individual comment subject found.'));
-    $this->assertText($comment_text, t('Individual comment body found.'));
+    $this->assertText($subject_text, 'Individual comment subject found.');
+    $this->assertText($comment_text, 'Individual comment body found.');
 
     // Set comments to have subject and preview to optional.
     $this->drupalLogout();
@@ -312,20 +313,20 @@ class CommentInterfaceTest extends CommentHelperCase {
     $this->drupalGet('comment/' . $comment->id . '/edit');
     $comment = $this->postComment(NULL, $comment->comment, $comment->subject, array('name' => ''));
     $comment_loaded = comment_load($comment->id);
-    $this->assertTrue(empty($comment_loaded->name) && $comment_loaded->uid == 0, t('Comment author successfully changed to anonymous.'));
+    $this->assertTrue(empty($comment_loaded->name) && $comment_loaded->uid == 0, 'Comment author successfully changed to anonymous.');
 
     // Test changing the comment author to an unverified user.
     $random_name = $this->randomName();
     $this->drupalGet('comment/' . $comment->id . '/edit');
     $comment = $this->postComment(NULL, $comment->comment, $comment->subject, array('name' => $random_name));
     $this->drupalGet('node/' . $this->node->nid);
-    $this->assertText($random_name . ' (' . t('not verified') . ')', t('Comment author successfully changed to an unverified user.'));
+    $this->assertText($random_name . ' (' . t('not verified') . ')', 'Comment author successfully changed to an unverified user.');
 
     // Test changing the comment author to a verified user.
     $this->drupalGet('comment/' . $comment->id . '/edit');
     $comment = $this->postComment(NULL, $comment->comment, $comment->subject, array('name' => $this->web_user->name));
     $comment_loaded = comment_load($comment->id);
-    $this->assertTrue($comment_loaded->name == $this->web_user->name && $comment_loaded->uid == $this->web_user->uid, t('Comment author successfully changed to a registered user.'));
+    $this->assertTrue($comment_loaded->name == $this->web_user->name && $comment_loaded->uid == $this->web_user->uid, 'Comment author successfully changed to a registered user.');
 
     $this->drupalLogout();
 
@@ -333,60 +334,60 @@ class CommentInterfaceTest extends CommentHelperCase {
     // subject though field enabled.
     $this->drupalLogin($this->web_user);
     $this->drupalGet('comment/reply/' . $this->node->nid . '/' . $comment->id);
-    $this->assertText($subject_text, t('Individual comment-reply subject found.'));
-    $this->assertText($comment_text, t('Individual comment-reply body found.'));
+    $this->assertText($subject_text, 'Individual comment-reply subject found.');
+    $this->assertText($comment_text, 'Individual comment-reply body found.');
     $reply = $this->postComment(NULL, $this->randomName(), '', TRUE);
     $reply_loaded = comment_load($reply->id);
-    $this->assertTrue($this->commentExists($reply, TRUE), t('Reply found.'));
-    $this->assertEqual($comment->id, $reply_loaded->pid, t('Pid of a reply to a comment is set correctly.'));
-    $this->assertEqual(rtrim($comment_loaded->thread, '/') . '.00/', $reply_loaded->thread, t('Thread of reply grows correctly.'));
+    $this->assertTrue($this->commentExists($reply, TRUE), 'Reply found.');
+    $this->assertEqual($comment->id, $reply_loaded->pid, 'Pid of a reply to a comment is set correctly.');
+    $this->assertEqual(rtrim($comment_loaded->thread, '/') . '.00/', $reply_loaded->thread, 'Thread of reply grows correctly.');
 
     // Second reply to comment #3 creating comment #4.
     $this->drupalGet('comment/reply/' . $this->node->nid . '/' . $comment->id);
-    $this->assertText($subject_text, t('Individual comment-reply subject found.'));
-    $this->assertText($comment_text, t('Individual comment-reply body found.'));
+    $this->assertText($subject_text, 'Individual comment-reply subject found.');
+    $this->assertText($comment_text, 'Individual comment-reply body found.');
     $reply = $this->postComment(NULL, $this->randomName(), $this->randomName(), TRUE);
     $reply_loaded = comment_load($reply->id);
-    $this->assertTrue($this->commentExists($reply, TRUE), t('Second reply found.'));
-    $this->assertEqual(rtrim($comment_loaded->thread, '/') . '.01/', $reply_loaded->thread, t('Thread of second reply grows correctly.'));
+    $this->assertTrue($this->commentExists($reply, TRUE), 'Second reply found.');
+    $this->assertEqual(rtrim($comment_loaded->thread, '/') . '.01/', $reply_loaded->thread, 'Thread of second reply grows correctly.');
 
     // Edit reply.
     $this->drupalGet('comment/' . $reply->id . '/edit');
     $reply = $this->postComment(NULL, $this->randomName(), $this->randomName(), TRUE);
-    $this->assertTrue($this->commentExists($reply, TRUE), t('Modified reply found.'));
+    $this->assertTrue($this->commentExists($reply, TRUE), 'Modified reply found.');
 
     // Correct link count
     $this->drupalGet('node');
-    $this->assertRaw('4 comments', t('Link to the 4 comments exist.'));
+    $this->assertRaw('4 comments', 'Link to the 4 comments exist.');
 
     // Confirm a new comment is posted to the correct page.
     $this->setCommentsPerPage(2);
     $comment_new_page = $this->postComment($this->node, $this->randomName(), $this->randomName(), TRUE);
-    $this->assertTrue($this->commentExists($comment_new_page), t('Page one exists. %s'));
+    $this->assertTrue($this->commentExists($comment_new_page), 'Page one exists. %s');
     $this->drupalGet('node/' . $this->node->nid, array('query' => array('page' => 1)));
-    $this->assertTrue($this->commentExists($reply, TRUE), t('Page two exists. %s'));
+    $this->assertTrue($this->commentExists($reply, TRUE), 'Page two exists. %s');
     $this->setCommentsPerPage(50);
 
     // Attempt to post to node with comments disabled.
     $this->node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'comment' => COMMENT_NODE_HIDDEN));
-    $this->assertTrue($this->node, t('Article node created.'));
+    $this->assertTrue($this->node, 'Article node created.');
     $this->drupalGet('comment/reply/' . $this->node->nid);
-    $this->assertText('This discussion is closed', t('Posting to node with comments disabled'));
-    $this->assertNoField('edit-comment', t('Comment body field found.'));
+    $this->assertText('This discussion is closed', 'Posting to node with comments disabled');
+    $this->assertNoField('edit-comment', 'Comment body field found.');
 
     // Attempt to post to node with read-only comments.
     $this->node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'comment' => COMMENT_NODE_CLOSED));
-    $this->assertTrue($this->node, t('Article node created.'));
+    $this->assertTrue($this->node, 'Article node created.');
     $this->drupalGet('comment/reply/' . $this->node->nid);
-    $this->assertText('This discussion is closed', t('Posting to node with comments read-only'));
-    $this->assertNoField('edit-comment', t('Comment body field found.'));
+    $this->assertText('This discussion is closed', 'Posting to node with comments read-only');
+    $this->assertNoField('edit-comment', 'Comment body field found.');
 
     // Attempt to post to node with comments enabled (check field names etc).
     $this->node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'comment' => COMMENT_NODE_OPEN));
-    $this->assertTrue($this->node, t('Article node created.'));
+    $this->assertTrue($this->node, 'Article node created.');
     $this->drupalGet('comment/reply/' . $this->node->nid);
-    $this->assertNoText('This discussion is closed', t('Posting to node with comments enabled'));
-    $this->assertField('edit-comment-body-' . $langcode . '-0-value', t('Comment body field found.'));
+    $this->assertNoText('This discussion is closed', 'Posting to node with comments enabled');
+    $this->assertField('edit-comment-body-' . $langcode . '-0-value', 'Comment body field found.');
 
     // Delete comment and make sure that reply is also removed.
     $this->drupalLogout();
@@ -395,8 +396,8 @@ class CommentInterfaceTest extends CommentHelperCase {
     $this->deleteComment($comment_new_page);
 
     $this->drupalGet('node/' . $this->node->nid);
-    $this->assertFalse($this->commentExists($comment), t('Comment not found.'));
-    $this->assertFalse($this->commentExists($reply, TRUE), t('Reply not found.'));
+    $this->assertFalse($this->commentExists($comment), 'Comment not found.');
+    $this->assertFalse($this->commentExists($reply, TRUE), 'Reply not found.');
 
     // Enabled comment form on node page.
     $this->drupalLogin($this->admin_user);
@@ -407,7 +408,7 @@ class CommentInterfaceTest extends CommentHelperCase {
     $this->drupalLogin($this->web_user);
     $this->drupalGet('node/' . $this->node->nid);
     $form_comment = $this->postComment(NULL, $this->randomName(), $this->randomName(), TRUE);
-    $this->assertTrue($this->commentExists($form_comment), t('Form comment found.'));
+    $this->assertTrue($this->commentExists($form_comment), 'Form comment found.');
 
     // Disable comment form on node page.
     $this->drupalLogout();
@@ -428,7 +429,7 @@ class CommentInterfaceTest extends CommentHelperCase {
     $this->assertNoLink(t('@count new comments', array('@count' => 0)));
     $this->assertLink(t('Read more'));
     $count = $this->xpath('//div[@id=:id]/div[@class=:class]/ul/li', array(':id' => 'node-' . $this->node->nid, ':class' => 'link-wrapper'));
-    $this->assertTrue(count($count) == 1, t('One child found'));
+    $this->assertTrue(count($count) == 1, 'One child found');
 
     // Create a new comment. This helper function may be run with different
     // comment settings so use comment_save() to avoid complex setup.
@@ -452,8 +453,8 @@ class CommentInterfaceTest extends CommentHelperCase {
     $this->drupalGet('node');
     $this->assertLink(t('1 new comment'));
     $this->clickLink(t('1 new comment'));
-    $this->assertRaw('<a id="new"></a>', t('Found "new" marker.'));
-    $this->assertTrue($this->xpath('//a[@id=:new]/following-sibling::a[1][@id=:comment_id]', array(':new' => 'new', ':comment_id' => 'comment-1')), t('The "new" anchor is positioned at the right comment.'));
+    $this->assertRaw('<a id="new"></a>', 'Found "new" marker.');
+    $this->assertTrue($this->xpath('//a[@id=:new]/following-sibling::a[1][@id=:comment_id]', array(':new' => 'new', ':comment_id' => 'comment-1')), 'The "new" anchor is positioned at the right comment.');
 
     // Test if "new comment" link is correctly removed.
     $this->drupalGet('node');
@@ -590,10 +591,10 @@ class CommentInterfaceTest extends CommentHelperCase {
 
     // Checks the initial values of node comment statistics with no comment.
     $node = node_load($this->node->nid);
-    $this->assertEqual($node->last_comment_timestamp, $this->node->created, t('The initial value of node last_comment_timestamp is the node created date.'));
-    $this->assertEqual($node->last_comment_name, NULL, t('The initial value of node last_comment_name is NULL.'));
-    $this->assertEqual($node->last_comment_uid, $this->web_user->uid, t('The initial value of node last_comment_uid is the node uid.'));
-    $this->assertEqual($node->comment_count, 0, t('The initial value of node comment_count is zero.'));
+    $this->assertEqual($node->last_comment_timestamp, $this->node->created, 'The initial value of node last_comment_timestamp is the node created date.');
+    $this->assertEqual($node->last_comment_name, NULL, 'The initial value of node last_comment_name is NULL.');
+    $this->assertEqual($node->last_comment_uid, $this->web_user->uid, 'The initial value of node last_comment_uid is the node uid.');
+    $this->assertEqual($node->comment_count, 0, 'The initial value of node comment_count is zero.');
 
     // Post comment #1 as web_user2.
     $this->drupalLogin($this->web_user2);
@@ -604,9 +605,9 @@ class CommentInterfaceTest extends CommentHelperCase {
     // Checks the new values of node comment statistics with comment #1.
     // The node needs to be reloaded with a node_load_multiple cache reset.
     $node = node_load($this->node->nid, NULL, TRUE);
-    $this->assertEqual($node->last_comment_name, NULL, t('The value of node last_comment_name is NULL.'));
-    $this->assertEqual($node->last_comment_uid, $this->web_user2->uid, t('The value of node last_comment_uid is the comment #1 uid.'));
-    $this->assertEqual($node->comment_count, 1, t('The value of node comment_count is 1.'));
+    $this->assertEqual($node->last_comment_name, NULL, 'The value of node last_comment_name is NULL.');
+    $this->assertEqual($node->last_comment_uid, $this->web_user2->uid, 'The value of node last_comment_uid is the comment #1 uid.');
+    $this->assertEqual($node->comment_count, 1, 'The value of node comment_count is 1.');
 
     // Prepare for anonymous comment submission (comment approval enabled).
     variable_set('user_register', USER_REGISTER_VISITORS);
@@ -629,9 +630,9 @@ class CommentInterfaceTest extends CommentHelperCase {
     // ensure they haven't changed since the comment has not been moderated.
     // The node needs to be reloaded with a node_load_multiple cache reset.
     $node = node_load($this->node->nid, NULL, TRUE);
-    $this->assertEqual($node->last_comment_name, NULL, t('The value of node last_comment_name is still NULL.'));
-    $this->assertEqual($node->last_comment_uid, $this->web_user2->uid, t('The value of node last_comment_uid is still the comment #1 uid.'));
-    $this->assertEqual($node->comment_count, 1, t('The value of node comment_count is still 1.'));
+    $this->assertEqual($node->last_comment_name, NULL, 'The value of node last_comment_name is still NULL.');
+    $this->assertEqual($node->last_comment_uid, $this->web_user2->uid, 'The value of node last_comment_uid is still the comment #1 uid.');
+    $this->assertEqual($node->comment_count, 1, 'The value of node comment_count is still 1.');
 
     // Prepare for anonymous comment submission (no approval required).
     $this->drupalLogin($this->admin_user);
@@ -650,9 +651,9 @@ class CommentInterfaceTest extends CommentHelperCase {
     // Checks the new values of node comment statistics with comment #3.
     // The node needs to be reloaded with a node_load_multiple cache reset.
     $node = node_load($this->node->nid, NULL, TRUE);
-    $this->assertEqual($node->last_comment_name, $comment_loaded->name, t('The value of node last_comment_name is the name of the anonymous user.'));
-    $this->assertEqual($node->last_comment_uid, 0, t('The value of node last_comment_uid is zero.'));
-    $this->assertEqual($node->comment_count, 2, t('The value of node comment_count is 2.'));
+    $this->assertEqual($node->last_comment_name, $comment_loaded->name, 'The value of node last_comment_name is the name of the anonymous user.');
+    $this->assertEqual($node->last_comment_uid, 0, 'The value of node last_comment_uid is zero.');
+    $this->assertEqual($node->comment_count, 2, 'The value of node comment_count is 2.');
   }
 
   /**
@@ -919,10 +920,10 @@ class CommentInterfaceTest extends CommentHelperCase {
         if ($path == "node/$nid") {
           $elements = $this->xpath('//form[@id=:id]', array(':id' => 'comment-form'));
           if ($info['form'] == COMMENT_FORM_BELOW) {
-            $this->assertTrue(count($elements), t('Comment form found below.'));
+            $this->assertTrue(count($elements), 'Comment form found below.');
           }
           else {
-            $this->assertFalse(count($elements), t('Comment form not found below.'));
+            $this->assertFalse(count($elements), 'Comment form not found below.');
           }
         }
       }
@@ -974,13 +975,13 @@ class CommentPreviewTest extends CommentHelperCase {
     $this->drupalPost('node/' . $this->node->nid, $edit, t('Preview'));
 
     // Check that the preview is displaying the title and body.
-    $this->assertTitle(t('Preview comment | Drupal'), t('Page title is "Preview comment".'));
-    $this->assertText($edit['subject'], t('Subject displayed.'));
-    $this->assertText($edit['comment_body[' . $langcode . '][0][value]'], t('Comment displayed.'));
+    $this->assertTitle(t('Preview comment | Drupal'), 'Page title is "Preview comment".');
+    $this->assertText($edit['subject'], 'Subject displayed.');
+    $this->assertText($edit['comment_body[' . $langcode . '][0][value]'], 'Comment displayed.');
 
     // Check that the title and body fields are displayed with the correct values.
-    $this->assertFieldByName('subject', $edit['subject'], t('Subject field displayed.'));
-    $this->assertFieldByName('comment_body[' . $langcode . '][0][value]', $edit['comment_body[' . $langcode . '][0][value]'], t('Comment field displayed.'));
+    $this->assertFieldByName('subject', $edit['subject'], 'Subject field displayed.');
+    $this->assertFieldByName('comment_body[' . $langcode . '][0][value]', $edit['comment_body[' . $langcode . '][0][value]'], 'Comment field displayed.');
 
     // Check that the signature is displaying with the correct text format.
     $this->assertLink($test_signature);
@@ -1013,28 +1014,28 @@ class CommentPreviewTest extends CommentHelperCase {
     $this->drupalPost('comment/' . $comment->id . '/edit', $edit, t('Preview'));
 
     // Check that the preview is displaying the subject, comment, author and date correctly.
-    $this->assertTitle(t('Preview comment | Drupal'), t('Page title is "Preview comment".'));
-    $this->assertText($edit['subject'], t('Subject displayed.'));
-    $this->assertText($edit['comment_body[' . $langcode . '][0][value]'], t('Comment displayed.'));
-    $this->assertText($edit['name'], t('Author displayed.'));
-    $this->assertText($expected_text_date, t('Date displayed.'));
+    $this->assertTitle(t('Preview comment | Drupal'), 'Page title is "Preview comment".');
+    $this->assertText($edit['subject'], 'Subject displayed.');
+    $this->assertText($edit['comment_body[' . $langcode . '][0][value]'], 'Comment displayed.');
+    $this->assertText($edit['name'], 'Author displayed.');
+    $this->assertText($expected_text_date, 'Date displayed.');
 
     // Check that the subject, comment, author and date fields are displayed with the correct values.
-    $this->assertFieldByName('subject', $edit['subject'], t('Subject field displayed.'));
-    $this->assertFieldByName('comment_body[' . $langcode . '][0][value]', $edit['comment_body[' . $langcode . '][0][value]'], t('Comment field displayed.'));
-    $this->assertFieldByName('name', $edit['name'], t('Author field displayed.'));
-    $this->assertFieldByName('date', $edit['date'], t('Date field displayed.'));
+    $this->assertFieldByName('subject', $edit['subject'], 'Subject field displayed.');
+    $this->assertFieldByName('comment_body[' . $langcode . '][0][value]', $edit['comment_body[' . $langcode . '][0][value]'], 'Comment field displayed.');
+    $this->assertFieldByName('name', $edit['name'], 'Author field displayed.');
+    $this->assertFieldByName('date', $edit['date'], 'Date field displayed.');
 
     // Check that saving a comment produces a success message.
     $this->drupalPost('comment/' . $comment->id . '/edit', $edit, t('Save'));
-    $this->assertText(t('Your comment has been posted.'), t('Comment posted.'));
+    $this->assertText(t('Your comment has been posted.'), 'Comment posted.');
 
     // Check that the comment fields are correct after loading the saved comment.
     $this->drupalGet('comment/' . $comment->id . '/edit');
-    $this->assertFieldByName('subject', $edit['subject'], t('Subject field displayed.'));
-    $this->assertFieldByName('comment_body[' . $langcode . '][0][value]', $edit['comment_body[' . $langcode . '][0][value]'], t('Comment field displayed.'));
-    $this->assertFieldByName('name', $edit['name'], t('Author field displayed.'));
-    $this->assertFieldByName('date', $expected_form_date, t('Date field displayed.'));
+    $this->assertFieldByName('subject', $edit['subject'], 'Subject field displayed.');
+    $this->assertFieldByName('comment_body[' . $langcode . '][0][value]', $edit['comment_body[' . $langcode . '][0][value]'], 'Comment field displayed.');
+    $this->assertFieldByName('name', $edit['name'], 'Author field displayed.');
+    $this->assertFieldByName('date', $expected_form_date, 'Date field displayed.');
 
     // Submit the form using the displayed values.
     $displayed = array();
@@ -1046,10 +1047,10 @@ class CommentPreviewTest extends CommentHelperCase {
 
     // Check that the saved comment is still correct.
     $comment_loaded = comment_load($comment->id);
-    $this->assertEqual($comment_loaded->subject, $edit['subject'], t('Subject loaded.'));
-    $this->assertEqual($comment_loaded->comment_body[$langcode][0]['value'], $edit['comment_body[' . $langcode . '][0][value]'], t('Comment body loaded.'));
-    $this->assertEqual($comment_loaded->name, $edit['name'], t('Name loaded.'));
-    $this->assertEqual($comment_loaded->created, $raw_date, t('Date loaded.'));
+    $this->assertEqual($comment_loaded->subject, $edit['subject'], 'Subject loaded.');
+    $this->assertEqual($comment_loaded->comment_body[$langcode][0]['value'], $edit['comment_body[' . $langcode . '][0][value]'], 'Comment body loaded.');
+    $this->assertEqual($comment_loaded->name, $edit['name'], 'Name loaded.');
+    $this->assertEqual($comment_loaded->created, $raw_date, 'Date loaded.');
 
   }
 
@@ -1085,7 +1086,7 @@ class CommentAnonymous extends CommentHelperCase {
 
     // 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.'));
+    $this->assertTrue($this->commentExists($anonymous_comment1), 'Anonymous comment without contact info found.');
 
     // Allow contact info.
     $this->drupalLogin($this->admin_user);
@@ -1094,15 +1095,15 @@ class CommentAnonymous extends CommentHelperCase {
     // Attempt to edit anonymous comment.
     $this->drupalGet('comment/' . $anonymous_comment1->id . '/edit');
     $edited_comment = $this->postComment(NULL, $this->randomName(), $this->randomName());
-    $this->assertTrue($this->commentExists($edited_comment, FALSE), t('Modified reply found.'));
+    $this->assertTrue($this->commentExists($edited_comment, FALSE), 'Modified reply found.');
     $this->drupalLogout();
 
     // Post anonymous comment with contact info (optional).
     $this->drupalGet('comment/reply/' . $this->node->nid);
-    $this->assertTrue($this->commentContactInfoAvailable(), t('Contact information available.'));
+    $this->assertTrue($this->commentContactInfoAvailable(), 'Contact information available.');
 
     $anonymous_comment2 = $this->postComment($this->node, $this->randomName(), $this->randomName());
-    $this->assertTrue($this->commentExists($anonymous_comment2), t('Anonymous comment with contact info (optional) found.'));
+    $this->assertTrue($this->commentExists($anonymous_comment2), 'Anonymous comment with contact info (optional) found.');
 
     // Ensure anonymous users cannot post in the name of registered users.
     $langcode = LANGUAGE_NONE;
@@ -1122,41 +1123,42 @@ class CommentAnonymous extends CommentHelperCase {
 
     // Try to post comment with contact info (required).
     $this->drupalGet('comment/reply/' . $this->node->nid);
-    $this->assertTrue($this->commentContactInfoAvailable(), t('Contact information available.'));
+    $this->assertTrue($this->commentContactInfoAvailable(), 'Contact information available.');
 
     $anonymous_comment3 = $this->postComment($this->node, $this->randomName(), $this->randomName(), TRUE);
-    $this->assertText(t('E-mail field is required.'), t('E-mail required.')); // Name should have 'Anonymous' for value by default.
-    $this->assertFalse($this->commentExists($anonymous_comment3), t('Anonymous comment with contact info (required) not found.'));
+    // Name should have 'Anonymous' for value by default.
+    $this->assertText(t('E-mail field is required.'), 'E-mail required.');
+    $this->assertFalse($this->commentExists($anonymous_comment3), 'Anonymous comment with contact info (required) not found.');
 
     // Post comment with contact info (required).
     $author_name = $this->randomName();
     $author_mail = $this->randomName() . '@example.com';
     $anonymous_comment3 = $this->postComment($this->node, $this->randomName(), $this->randomName(), array('name' => $author_name, 'mail' => $author_mail));
-    $this->assertTrue($this->commentExists($anonymous_comment3), t('Anonymous comment with contact info (required) found.'));
+    $this->assertTrue($this->commentExists($anonymous_comment3), 'Anonymous comment with contact info (required) found.');
 
     // Make sure the user data appears correctly when editing the comment.
     $this->drupalLogin($this->admin_user);
     $this->drupalGet('comment/' . $anonymous_comment3->id . '/edit');
-    $this->assertRaw($author_name, t("The anonymous user's name is correct when editing the comment."));
-    $this->assertRaw($author_mail, t("The anonymous user's e-mail address is correct when editing the comment."));
+    $this->assertRaw($author_name, "The anonymous user's name is correct when editing the comment.");
+    $this->assertRaw($author_mail, "The anonymous user's e-mail address is correct when editing the comment.");
 
     // Unpublish comment.
     $this->performCommentOperation($anonymous_comment3, 'unpublish');
 
     $this->drupalGet('admin/content/comment/approval');
-    $this->assertRaw('comments[' . $anonymous_comment3->id . ']', t('Comment was unpublished.'));
+    $this->assertRaw('comments[' . $anonymous_comment3->id . ']', 'Comment was unpublished.');
 
     // Publish comment.
     $this->performCommentOperation($anonymous_comment3, 'publish', TRUE);
 
     $this->drupalGet('admin/content/comment');
-    $this->assertRaw('comments[' . $anonymous_comment3->id . ']', t('Comment was published.'));
+    $this->assertRaw('comments[' . $anonymous_comment3->id . ']', 'Comment was published.');
 
     // Delete comment.
     $this->performCommentOperation($anonymous_comment3, 'delete');
 
     $this->drupalGet('admin/content/comment');
-    $this->assertNoRaw('comments[' . $anonymous_comment3->id . ']', t('Comment was deleted.'));
+    $this->assertNoRaw('comments[' . $anonymous_comment3->id . ']', 'Comment was deleted.');
     $this->drupalLogout();
 
     // Reset.
@@ -1170,14 +1172,14 @@ class CommentAnonymous extends CommentHelperCase {
     // NOTE: if authenticated user has permission to post comments, then a
     // "Login or register to post comments" type link may be shown.
     $this->drupalGet('node/' . $this->node->nid);
-    $this->assertNoPattern('@<h2[^>]*>Comments</h2>@', t('Comments were not displayed.'));
-    $this->assertNoLink('Add new comment', t('Link to add comment was found.'));
+    $this->assertNoPattern('@<h2[^>]*>Comments</h2>@', 'Comments were not displayed.');
+    $this->assertNoLink('Add new comment', 'Link to add comment was found.');
 
     // Attempt to view node-comment form while disallowed.
     $this->drupalGet('comment/reply/' . $this->node->nid);
-    $this->assertText('You are not authorized to post comments', t('Error attempting to post comment.'));
-    $this->assertNoFieldByName('subject', '', t('Subject field not found.'));
-    $this->assertNoFieldByName("comment_body[$langcode][0][value]", '', t('Comment field not found.'));
+    $this->assertText('You are not authorized to post comments', 'Error attempting to post comment.');
+    $this->assertNoFieldByName('subject', '', 'Subject field not found.');
+    $this->assertNoFieldByName("comment_body[$langcode][0][value]", '', 'Comment field not found.');
 
     user_role_change_permissions(DRUPAL_ANONYMOUS_RID, array(
       'access comments' => TRUE,
@@ -1185,9 +1187,9 @@ class CommentAnonymous extends CommentHelperCase {
       'skip comment approval' => FALSE,
     ));
     $this->drupalGet('node/' . $this->node->nid);
-    $this->assertPattern('@<h2[^>]*>Comments</h2>@', t('Comments were displayed.'));
-    $this->assertLink('Log in', 1, t('Link to log in was found.'));
-    $this->assertLink('register', 1, t('Link to register was found.'));
+    $this->assertPattern('@<h2[^>]*>Comments</h2>@', 'Comments were displayed.');
+    $this->assertLink('Log in', 1, 'Link to log in was found.');
+    $this->assertLink('register', 1, 'Link to register was found.');
 
     user_role_change_permissions(DRUPAL_ANONYMOUS_RID, array(
       'access comments' => FALSE,
@@ -1195,13 +1197,13 @@ class CommentAnonymous extends CommentHelperCase {
       'skip comment approval' => TRUE,
     ));
     $this->drupalGet('node/' . $this->node->nid);
-    $this->assertNoPattern('@<h2[^>]*>Comments</h2>@', t('Comments were not displayed.'));
-    $this->assertFieldByName('subject', '', t('Subject field found.'));
-    $this->assertFieldByName("comment_body[$langcode][0][value]", '', t('Comment field found.'));
+    $this->assertNoPattern('@<h2[^>]*>Comments</h2>@', 'Comments were not displayed.');
+    $this->assertFieldByName('subject', '', 'Subject field found.');
+    $this->assertFieldByName("comment_body[$langcode][0][value]", '', 'Comment field found.');
 
     $this->drupalGet('comment/reply/' . $this->node->nid . '/' . $anonymous_comment3->id);
-    $this->assertText('You are not authorized to view comments', t('Error attempting to post reply.'));
-    $this->assertNoText($author_name, t('Comment not displayed.'));
+    $this->assertText('You are not authorized to view comments', 'Error attempting to post reply.');
+    $this->assertNoText($author_name, 'Comment not displayed.');
   }
 }
 
@@ -1245,22 +1247,22 @@ class CommentPagerTest extends CommentHelperCase {
     // Check the first page of the node, and confirm the correct comments are
     // shown.
     $this->drupalGet('node/' . $node->nid);
-    $this->assertRaw(t('next'), t('Paging links found.'));
-    $this->assertTrue($this->commentExists($comments[0]), t('Comment 1 appears on page 1.'));
-    $this->assertFalse($this->commentExists($comments[1]), t('Comment 2 does not appear on page 1.'));
-    $this->assertFalse($this->commentExists($comments[2]), t('Comment 3 does not appear on page 1.'));
+    $this->assertRaw(t('next'), 'Paging links found.');
+    $this->assertTrue($this->commentExists($comments[0]), 'Comment 1 appears on page 1.');
+    $this->assertFalse($this->commentExists($comments[1]), 'Comment 2 does not appear on page 1.');
+    $this->assertFalse($this->commentExists($comments[2]), 'Comment 3 does not appear on page 1.');
 
     // Check the second page.
     $this->drupalGet('node/' . $node->nid, array('query' => array('page' => 1)));
-    $this->assertTrue($this->commentExists($comments[1]), t('Comment 2 appears on page 2.'));
-    $this->assertFalse($this->commentExists($comments[0]), t('Comment 1 does not appear on page 2.'));
-    $this->assertFalse($this->commentExists($comments[2]), t('Comment 3 does not appear on page 2.'));
+    $this->assertTrue($this->commentExists($comments[1]), 'Comment 2 appears on page 2.');
+    $this->assertFalse($this->commentExists($comments[0]), 'Comment 1 does not appear on page 2.');
+    $this->assertFalse($this->commentExists($comments[2]), 'Comment 3 does not appear on page 2.');
 
     // Check the third page.
     $this->drupalGet('node/' . $node->nid, array('query' => array('page' => 2)));
-    $this->assertTrue($this->commentExists($comments[2]), t('Comment 3 appears on page 3.'));
-    $this->assertFalse($this->commentExists($comments[0]), t('Comment 1 does not appear on page 3.'));
-    $this->assertFalse($this->commentExists($comments[1]), t('Comment 2 does not appear on page 3.'));
+    $this->assertTrue($this->commentExists($comments[2]), 'Comment 3 appears on page 3.');
+    $this->assertFalse($this->commentExists($comments[0]), 'Comment 1 does not appear on page 3.');
+    $this->assertFalse($this->commentExists($comments[1]), 'Comment 2 does not appear on page 3.');
 
     // Post a reply to the oldest comment and test again.
     $replies = array();
@@ -1272,21 +1274,21 @@ class CommentPagerTest extends CommentHelperCase {
     // We are still in flat view - the replies should not be on the first page,
     // even though they are replies to the oldest comment.
     $this->drupalGet('node/' . $node->nid, array('query' => array('page' => 0)));
-    $this->assertFalse($this->commentExists($reply, TRUE), t('In flat mode, reply does not appear on page 1.'));
+    $this->assertFalse($this->commentExists($reply, TRUE), 'In flat mode, reply does not appear on page 1.');
 
     // If we switch to threaded mode, the replies on the oldest comment
     // should be bumped to the first page and comment 6 should be bumped
     // to the second page.
     $this->setCommentSettings('comment_default_mode', COMMENT_MODE_THREADED, t('Switched to threaded mode.'));
     $this->drupalGet('node/' . $node->nid, array('query' => array('page' => 0)));
-    $this->assertTrue($this->commentExists($reply, TRUE), t('In threaded mode, reply appears on page 1.'));
-    $this->assertFalse($this->commentExists($comments[1]), t('In threaded mode, comment 2 has been bumped off of page 1.'));
+    $this->assertTrue($this->commentExists($reply, TRUE), 'In threaded mode, reply appears on page 1.');
+    $this->assertFalse($this->commentExists($comments[1]), 'In threaded mode, comment 2 has been bumped off of page 1.');
 
     // If (# replies > # comments per page) in threaded expanded view,
     // the overage should be bumped.
     $reply2 = $this->postComment(NULL, $this->randomName(), $this->randomName(), TRUE);
     $this->drupalGet('node/' . $node->nid, array('query' => array('page' => 0)));
-    $this->assertFalse($this->commentExists($reply2, TRUE), t('In threaded mode where # replies > # comments per page, the newest reply does not appear on page 1.'));
+    $this->assertFalse($this->commentExists($reply2, TRUE), 'In threaded mode where # replies > # comments per page, the newest reply does not appear on page 1.');
 
     $this->drupalLogout();
   }
@@ -1388,7 +1390,7 @@ class CommentPagerTest extends CommentHelperCase {
       $result_order[] = substr($anchor['id'], 8);
     }
 
-    return $this->assertIdentical($expected_cids, $result_order, t('Comment order: expected @expected, returned @returned.', array('@expected' => implode(',', $expected_cids), '@returned' => implode(',', $result_order))));
+    return $this->assertIdentical($expected_cids, $result_order, format_string('Comment order: expected @expected, returned @returned.', array('@expected' => implode(',', $expected_cids), '@returned' => implode(',', $result_order))));
   }
 
   /**
@@ -1448,7 +1450,7 @@ class CommentPagerTest extends CommentHelperCase {
     foreach ($expected_pages as $new_replies => $expected_page) {
       $returned = comment_new_page_count($node->comment_count, $new_replies, $node);
       $returned_page = is_array($returned) ? $returned['page'] : 0;
-      $this->assertIdentical($expected_page, $returned_page, t('Flat mode, @new replies: expected page @expected, returned page @returned.', array('@new' => $new_replies, '@expected' => $expected_page, '@returned' => $returned_page)));
+      $this->assertIdentical($expected_page, $returned_page, format_string('Flat mode, @new replies: expected page @expected, returned page @returned.', array('@new' => $new_replies, '@expected' => $expected_page, '@returned' => $returned_page)));
     }
 
     $this->setCommentSettings('comment_default_mode', COMMENT_MODE_THREADED, t('Switched to threaded mode.'));
@@ -1466,7 +1468,7 @@ class CommentPagerTest extends CommentHelperCase {
     foreach ($expected_pages as $new_replies => $expected_page) {
       $returned = comment_new_page_count($node->comment_count, $new_replies, $node);
       $returned_page = is_array($returned) ? $returned['page'] : 0;
-      $this->assertEqual($expected_page, $returned_page, t('Threaded mode, @new replies: expected page @expected, returned page @returned.', array('@new' => $new_replies, '@expected' => $expected_page, '@returned' => $returned_page)));
+      $this->assertEqual($expected_page, $returned_page, format_string('Threaded mode, @new replies: expected page @expected, returned page @returned.', array('@new' => $new_replies, '@expected' => $expected_page, '@returned' => $returned_page)));
     }
   }
 }
@@ -1516,12 +1518,12 @@ class CommentNodeAccessTest extends CommentHelperCase {
     $comment_subject = $this->randomName();
     $comment = $this->postComment($this->node, $comment_text, $comment_subject);
     $comment_loaded = comment_load($comment->id);
-    $this->assertTrue($this->commentExists($comment), t('Comment found.'));
+    $this->assertTrue($this->commentExists($comment), 'Comment found.');
 
     // Check comment display.
     $this->drupalGet('node/' . $this->node->nid . '/' . $comment->id);
-    $this->assertText($comment_subject, t('Individual comment subject found.'));
-    $this->assertText($comment_text, t('Individual comment body found.'));
+    $this->assertText($comment_subject, 'Individual comment subject found.');
+    $this->assertText($comment_text, 'Individual comment body found.');
 
     // Reply to comment, creating second comment.
     $this->drupalGet('comment/reply/' . $this->node->nid . '/' . $comment->id);
@@ -1529,7 +1531,7 @@ class CommentNodeAccessTest extends CommentHelperCase {
     $reply_subject = $this->randomName();
     $reply = $this->postComment(NULL, $reply_text, $reply_subject, TRUE);
     $reply_loaded = comment_load($reply->id);
-    $this->assertTrue($this->commentExists($reply, TRUE), t('Reply found.'));
+    $this->assertTrue($this->commentExists($reply, TRUE), 'Reply found.');
 
     // Go to the node page and verify comment and reply are visible.
     $this->drupalGet('node/' . $this->node->nid);
@@ -1572,7 +1574,7 @@ class CommentApprovalTest extends CommentHelperCase {
     $subject = $this->randomName();
     $body = $this->randomName();
     $this->postComment($this->node, $body, $subject, TRUE); // Set $contact to true so that it won't check for id and message.
-    $this->assertText(t('Your comment has been queued for review by site administrators and will be published after approval.'), t('Comment requires approval.'));
+    $this->assertText(t('Your comment has been queued for review by site administrators and will be published after approval.'), 'Comment requires approval.');
 
     // Get unapproved comment id.
     $this->drupalLogin($this->admin_user);
@@ -1580,7 +1582,7 @@ class CommentApprovalTest extends CommentHelperCase {
     $anonymous_comment4 = (object) array('id' => $anonymous_comment4, 'subject' => $subject, 'comment' => $body);
     $this->drupalLogout();
 
-    $this->assertFalse($this->commentExists($anonymous_comment4), t('Anonymous comment was not published.'));
+    $this->assertFalse($this->commentExists($anonymous_comment4), 'Anonymous comment was not published.');
 
     // Approve comment.
     $this->drupalLogin($this->admin_user);
@@ -1588,7 +1590,7 @@ class CommentApprovalTest extends CommentHelperCase {
     $this->drupalLogout();
 
     $this->drupalGet('node/' . $this->node->nid);
-    $this->assertTrue($this->commentExists($anonymous_comment4), t('Anonymous comment visible.'));
+    $this->assertTrue($this->commentExists($anonymous_comment4), 'Anonymous comment visible.');
 
     // Post 2 anonymous comments without contact info.
     $comments[] = $this->postComment($this->node, $this->randomName(), $this->randomName(), TRUE);
@@ -1597,13 +1599,13 @@ class CommentApprovalTest extends CommentHelperCase {
     // Publish multiple comments in one operation.
     $this->drupalLogin($this->admin_user);
     $this->drupalGet('admin/content/comment/approval');
-    $this->assertText(t('Unapproved comments (@count)', array('@count' => 2)), t('Two unapproved comments waiting for approval.'));
+    $this->assertText(t('Unapproved comments (@count)', array('@count' => 2)), 'Two unapproved comments waiting for approval.');
     $edit = array(
       "comments[{$comments[0]->id}]" => 1,
       "comments[{$comments[1]->id}]" => 1,
     );
     $this->drupalPost(NULL, $edit, t('Update'));
-    $this->assertText(t('Unapproved comments (@count)', array('@count' => 0)), t('All comments were approved.'));
+    $this->assertText(t('Unapproved comments (@count)', array('@count' => 0)), 'All comments were approved.');
 
     // Delete multiple comments in one operation.
     $edit = array(
@@ -1613,9 +1615,9 @@ class CommentApprovalTest extends CommentHelperCase {
       "comments[{$anonymous_comment4->id}]" => 1,
     );
     $this->drupalPost(NULL, $edit, t('Update'));
-    $this->assertText(t('Are you sure you want to delete these comments and all their children?'), t('Confirmation required.'));
+    $this->assertText(t('Are you sure you want to delete these comments and all their children?'), 'Confirmation required.');
     $this->drupalPost(NULL, $edit, t('Delete comments'));
-    $this->assertText(t('No comments available.'), t('All comments were deleted.'));
+    $this->assertText(t('No comments available.'), 'All comments were deleted.');
   }
 
   /**
@@ -1636,7 +1638,7 @@ class CommentApprovalTest extends CommentHelperCase {
     $subject = $this->randomName();
     $body = $this->randomName();
     $this->postComment($this->node, $body, $subject, TRUE); // Set $contact to true so that it won't check for id and message.
-    $this->assertText(t('Your comment has been queued for review by site administrators and will be published after approval.'), t('Comment requires approval.'));
+    $this->assertText(t('Your comment has been queued for review by site administrators and will be published after approval.'), 'Comment requires approval.');
 
     // Get unapproved comment id.
     $this->drupalLogin($this->admin_user);
@@ -1644,20 +1646,20 @@ class CommentApprovalTest extends CommentHelperCase {
     $anonymous_comment4 = (object) array('id' => $anonymous_comment4, 'subject' => $subject, 'comment' => $body);
     $this->drupalLogout();
 
-    $this->assertFalse($this->commentExists($anonymous_comment4), t('Anonymous comment was not published.'));
+    $this->assertFalse($this->commentExists($anonymous_comment4), 'Anonymous comment was not published.');
 
     // Approve comment.
     $this->drupalLogin($this->admin_user);
     $this->drupalGet('comment/1/approve');
-    $this->assertResponse(403, t('Forged comment approval was denied.'));
+    $this->assertResponse(403, 'Forged comment approval was denied.');
     $this->drupalGet('comment/1/approve', array('query' => array('token' => 'forged')));
-    $this->assertResponse(403, t('Forged comment approval was denied.'));
+    $this->assertResponse(403, 'Forged comment approval was denied.');
     $this->drupalGet('node/' . $this->node->nid);
     $this->clickLink(t('approve'));
     $this->drupalLogout();
 
     $this->drupalGet('node/' . $this->node->nid);
-    $this->assertTrue($this->commentExists($anonymous_comment4), t('Anonymous comment visible.'));
+    $this->assertTrue($this->commentExists($anonymous_comment4), 'Anonymous comment visible.');
   }
 }
 
@@ -1684,7 +1686,7 @@ class CommentBlockFunctionalTest extends CommentHelperCase {
       'blocks[comment_recent][region]' => 'sidebar_first',
     );
     $this->drupalPost('admin/structure/block', $edit, t('Save blocks'));
-    $this->assertText(t('The block settings have been updated.'), t('Block saved to first sidebar region.'));
+    $this->assertText(t('The block settings have been updated.'), 'Block saved to first sidebar region.');
 
     // Set block title and variables.
     $block = array(
@@ -1692,7 +1694,7 @@ class CommentBlockFunctionalTest extends CommentHelperCase {
       'comment_block_count' => 2,
     );
     $this->drupalPost('admin/structure/block/manage/comment/recent/configure', $block, t('Save block'));
-    $this->assertText(t('The block configuration has been saved.'), t('Block saved.'));
+    $this->assertText(t('The block configuration has been saved.'), 'Block saved.');
 
     // Add some test comments, one without a subject.
     $comment1 = $this->postComment($this->node, $this->randomName(), $this->randomName());
@@ -1704,20 +1706,20 @@ class CommentBlockFunctionalTest extends CommentHelperCase {
     $this->drupalLogout();
     user_role_revoke_permissions(DRUPAL_ANONYMOUS_RID, array('access comments'));
     $this->drupalGet('');
-    $this->assertNoText($block['title'], t('Block was not found.'));
+    $this->assertNoText($block['title'], 'Block was not found.');
     user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access comments'));
 
     // Test that a user with the 'access comments' permission can see the
     // block.
     $this->drupalLogin($this->web_user);
     $this->drupalGet('');
-    $this->assertText($block['title'], t('Block was found.'));
+    $this->assertText($block['title'], 'Block was found.');
 
     // Test the only the 2 latest comments are shown and in the proper order.
-    $this->assertNoText($comment1->subject, t('Comment not found in block.'));
-    $this->assertText($comment2->subject, t('Comment found in block.'));
-    $this->assertText($comment3->comment, t('Comment found in block.'));
-    $this->assertTrue(strpos($this->drupalGetContent(), $comment3->comment) < strpos($this->drupalGetContent(), $comment2->subject), t('Comments were ordered correctly in block.'));
+    $this->assertNoText($comment1->subject, 'Comment not found in block.');
+    $this->assertText($comment2->subject, 'Comment found in block.');
+    $this->assertText($comment3->comment, 'Comment found in block.');
+    $this->assertTrue(strpos($this->drupalGetContent(), $comment3->comment) < strpos($this->drupalGetContent(), $comment2->subject), 'Comments were ordered correctly in block.');
 
     // Set the number of recent comments to show to 10.
     $this->drupalLogout();
@@ -1726,30 +1728,30 @@ class CommentBlockFunctionalTest extends CommentHelperCase {
       'comment_block_count' => 10,
     );
     $this->drupalPost('admin/structure/block/manage/comment/recent/configure', $block, t('Save block'));
-    $this->assertText(t('The block configuration has been saved.'), t('Block saved.'));
+    $this->assertText(t('The block configuration has been saved.'), 'Block saved.');
 
     // Post an additional comment.
     $comment4 = $this->postComment($this->node, $this->randomName(), $this->randomName());
 
     // Test that all four comments are shown.
-    $this->assertText($comment1->subject, t('Comment found in block.'));
-    $this->assertText($comment2->subject, t('Comment found in block.'));
-    $this->assertText($comment3->comment, t('Comment found in block.'));
-    $this->assertText($comment4->subject, t('Comment found in block.'));
+    $this->assertText($comment1->subject, 'Comment found in block.');
+    $this->assertText($comment2->subject, 'Comment found in block.');
+    $this->assertText($comment3->comment, 'Comment found in block.');
+    $this->assertText($comment4->subject, 'Comment found in block.');
 
     // Test that links to comments work when comments are across pages.
     $this->setCommentsPerPage(1);
     $this->drupalGet('');
     $this->clickLink($comment1->subject);
-    $this->assertText($comment1->subject, t('Comment link goes to correct page.'));
+    $this->assertText($comment1->subject, 'Comment link goes to correct page.');
     $this->drupalGet('');
     $this->clickLink($comment2->subject);
-    $this->assertText($comment2->subject, t('Comment link goes to correct page.'));
+    $this->assertText($comment2->subject, 'Comment link goes to correct page.');
     $this->clickLink($comment4->subject);
-    $this->assertText($comment4->subject, t('Comment link goes to correct page.'));
+    $this->assertText($comment4->subject, 'Comment link goes to correct page.');
     // Check that when viewing a comment page from a link to the comment, that
     // rel="canonical" is added to the head of the document.
-    $this->assertRaw('<link rel="canonical"', t('Canonical URL was found in the HTML head'));
+    $this->assertRaw('<link rel="canonical"', 'Canonical URL was found in the HTML head');
   }
 }
 
@@ -1774,13 +1776,13 @@ class CommentRSSUnitTest extends CommentHelperCase {
     $comment = $this->postComment($this->node, $this->randomName(), $this->randomName());
     $this->drupalGet('rss.xml');
     $raw = '<comments>' . url('node/' . $this->node->nid, array('fragment' => 'comments', 'absolute' => TRUE)) . '</comments>';
-    $this->assertRaw($raw, t('Comments as part of RSS feed.'));
+    $this->assertRaw($raw, 'Comments as part of RSS feed.');
 
     // Hide comments from RSS feed and check presence.
     $this->node->comment = COMMENT_NODE_HIDDEN;
     node_save($this->node);
     $this->drupalGet('rss.xml');
-    $this->assertNoRaw($raw, t('Hidden comments is not a part of RSS feed.'));
+    $this->assertNoRaw($raw, 'Hidden comments is not a part of RSS feed.');
   }
 }
 
@@ -1814,14 +1816,14 @@ class CommentContentRebuild extends CommentHelperCase {
     $comment_text = $this->randomName();
     $comment = $this->postComment($this->node, $comment_text, $subject_text, TRUE);
     $comment_loaded = comment_load($comment->id);
-    $this->assertTrue($this->commentExists($comment), t('Comment found.'));
+    $this->assertTrue($this->commentExists($comment), 'Comment found.');
 
     // Add the property to the content array and then see if it still exists on build.
     $comment_loaded->content['test_property'] = array('#value' => $this->randomString());
     $built_content = comment_view($comment_loaded, $this->node);
 
     // This means that the content was rebuilt as the added test property no longer exists.
-    $this->assertFalse(isset($built_content['test_property']), t('Comment content was emptied before being built.'));
+    $this->assertFalse(isset($built_content['test_property']), 'Comment content was emptied before being built.');
   }
 }
 
@@ -1887,11 +1889,11 @@ class CommentTokenReplaceTestCase extends CommentHelperCase {
     $tests['[comment:author:name]'] = check_plain($this->admin_user->name);
 
     // Test to make sure that we generated something for each token.
-    $this->assertFalse(in_array(0, array_map('strlen', $tests)), t('No empty tokens generated.'));
+    $this->assertFalse(in_array(0, array_map('strlen', $tests)), 'No empty tokens generated.');
 
     foreach ($tests as $input => $expected) {
       $output = token_replace($input, array('comment' => $comment), array('language' => $language));
-      $this->assertEqual($output, $expected, t('Sanitized comment token %token replaced.', array('%token' => $input)));
+      $this->assertEqual($output, $expected, format_string('Sanitized comment token %token replaced.', array('%token' => $input)));
     }
 
     // Generate and test unsanitized tokens.
@@ -1907,7 +1909,7 @@ class CommentTokenReplaceTestCase extends CommentHelperCase {
 
     foreach ($tests as $input => $expected) {
       $output = token_replace($input, array('comment' => $comment), array('language' => $language, 'sanitize' => FALSE));
-      $this->assertEqual($output, $expected, t('Unsanitized comment token %token replaced.', array('%token' => $input)));
+      $this->assertEqual($output, $expected, format_string('Unsanitized comment token %token replaced.', array('%token' => $input)));
     }
 
     // Load node so comment_count gets computed.
@@ -1920,7 +1922,7 @@ class CommentTokenReplaceTestCase extends CommentHelperCase {
 
     foreach ($tests as $input => $expected) {
       $output = token_replace($input, array('node' => $node), array('language' => $language));
-      $this->assertEqual($output, $expected, t('Node comment token %token replaced.', array('%token' => $input)));
+      $this->assertEqual($output, $expected, format_string('Node comment token %token replaced.', array('%token' => $input)));
     }
   }
 }
@@ -1949,25 +1951,25 @@ class CommentActionsTestCase extends CommentHelperCase {
 
     // Unpublish a comment (direct form: doesn't actually save the comment).
     comment_unpublish_action($comment);
-    $this->assertEqual($comment->status, COMMENT_NOT_PUBLISHED, t('Comment was unpublished'));
-    $this->assertWatchdogMessage('Unpublished comment %subject.', array('%subject' => $subject), t('Found watchdog message'));
+    $this->assertEqual($comment->status, COMMENT_NOT_PUBLISHED, 'Comment was unpublished');
+    $this->assertWatchdogMessage('Unpublished comment %subject.', array('%subject' => $subject), 'Found watchdog message');
     $this->clearWatchdog();
 
     // Unpublish a comment (indirect form: modify the comment in the database).
     comment_unpublish_action(NULL, array('cid' => $comment->cid));
-    $this->assertEqual(comment_load($comment->cid)->status, COMMENT_NOT_PUBLISHED, t('Comment was unpublished'));
-    $this->assertWatchdogMessage('Unpublished comment %subject.', array('%subject' => $subject), t('Found watchdog message'));
+    $this->assertEqual(comment_load($comment->cid)->status, COMMENT_NOT_PUBLISHED, 'Comment was unpublished');
+    $this->assertWatchdogMessage('Unpublished comment %subject.', array('%subject' => $subject), 'Found watchdog message');
 
     // Publish a comment (direct form: doesn't actually save the comment).
     comment_publish_action($comment);
-    $this->assertEqual($comment->status, COMMENT_PUBLISHED, t('Comment was published'));
-    $this->assertWatchdogMessage('Published comment %subject.', array('%subject' => $subject), t('Found watchdog message'));
+    $this->assertEqual($comment->status, COMMENT_PUBLISHED, 'Comment was published');
+    $this->assertWatchdogMessage('Published comment %subject.', array('%subject' => $subject), 'Found watchdog message');
     $this->clearWatchdog();
 
     // Publish a comment (indirect form: modify the comment in the database).
     comment_publish_action(NULL, array('cid' => $comment->cid));
-    $this->assertEqual(comment_load($comment->cid)->status, COMMENT_PUBLISHED, t('Comment was published'));
-    $this->assertWatchdogMessage('Published comment %subject.', array('%subject' => $subject), t('Found watchdog message'));
+    $this->assertEqual(comment_load($comment->cid)->status, COMMENT_PUBLISHED, 'Comment was published');
+    $this->assertWatchdogMessage('Published comment %subject.', array('%subject' => $subject), 'Found watchdog message');
     $this->clearWatchdog();
   }
 
@@ -1983,7 +1985,7 @@ class CommentActionsTestCase extends CommentHelperCase {
    */
   function assertWatchdogMessage($watchdog_message, $variables, $message) {
     $status = (bool) db_query_range("SELECT 1 FROM {watchdog} WHERE message = :message AND variables = :variables", 0, 1, array(':message' => $watchdog_message, ':variables' => serialize($variables)))->fetchField();
-    return $this->assert($status, $message);
+    return $this->assert($status, format_string('@message', array('@message' => $message)));
   }
 
   /**
@@ -2011,13 +2013,13 @@ class CommentFieldsTest extends CommentHelperCase {
    */
   function testCommentDefaultFields() {
     // Do not make assumptions on default node types created by the test
-    // install profile, and create our own.
+    // installation profile, and create our own.
     $this->drupalCreateContentType(array('type' => 'test_node_type'));
 
     // Check that the 'comment_body' field is present on all comment bundles.
     $instances = field_info_instances('comment');
     foreach (node_type_get_types() as $type_name => $info) {
-      $this->assertTrue(isset($instances['comment_node_' . $type_name]['comment_body']), t('The comment_body field is present for comments on type @type', array('@type' => $type_name)));
+      $this->assertTrue(isset($instances['comment_node_' . $type_name]['comment_body']), format_string('The comment_body field is present for comments on type @type', array('@type' => $type_name)));
 
       // Delete the instance along the way.
       field_delete_instance($instances['comment_node_' . $type_name]['comment_body']);
@@ -2025,7 +2027,7 @@ class CommentFieldsTest extends CommentHelperCase {
 
     // Check that the 'comment_body' field is deleted.
     $field = field_info_field('comment_body');
-    $this->assertTrue(empty($field), t('The comment_body field was deleted'));
+    $this->assertTrue(empty($field), 'The comment_body field was deleted');
 
     // Create a new content type.
     $type_name = 'test_node_type_2';
@@ -2034,9 +2036,9 @@ class CommentFieldsTest extends CommentHelperCase {
     // Check that the 'comment_body' field exists and has an instance on the
     // new comment bundle.
     $field = field_info_field('comment_body');
-    $this->assertTrue($field, t('The comment_body field exists'));
+    $this->assertTrue($field, 'The comment_body field exists');
     $instances = field_info_instances('comment');
-    $this->assertTrue(isset($instances['comment_node_' . $type_name]['comment_body']), t('The comment_body field is present for comments on type @type', array('@type' => $type_name)));
+    $this->assertTrue(isset($instances['comment_node_' . $type_name]['comment_body']), format_string('The comment_body field is present for comments on type @type', array('@type' => $type_name)));
   }
 
   /**
@@ -2052,7 +2054,7 @@ class CommentFieldsTest extends CommentHelperCase {
     $edit['modules[Core][comment][enable]'] = FALSE;
     $this->drupalPost('admin/modules', $edit, t('Save configuration'));
     $this->resetAll();
-    $this->assertFalse(module_exists('comment'), t('Comment module disabled.'));
+    $this->assertFalse(module_exists('comment'), 'Comment module disabled.');
 
     // Enable core content type modules (blog, book, and poll).
     $edit = array();
@@ -2067,7 +2069,7 @@ class CommentFieldsTest extends CommentHelperCase {
     $edit['modules[Core][comment][enable]'] = 'comment';
     $this->drupalPost('admin/modules', $edit, t('Save configuration'));
     $this->resetAll();
-    $this->assertTrue(module_exists('comment'), t('Comment module enabled.'));
+    $this->assertTrue(module_exists('comment'), 'Comment module enabled.');
 
     // Create nodes of each type.
     $blog_node = $this->drupalCreateNode(array('type' => 'blog'));
diff --git a/modules/comment/comment.tpl.php b/modules/comment/comment.tpl.php
index a483813d236101fa59fdc55f4356379717eefda4..8298473576c1ea32bf914de68c69cd1df897281d 100644
--- a/modules/comment/comment.tpl.php
+++ b/modules/comment/comment.tpl.php
@@ -55,6 +55,8 @@
  * @see template_preprocess_comment()
  * @see template_process()
  * @see theme_comment()
+ *
+ * @ingroup themeable
  */
 ?>
 <div class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>
diff --git a/modules/contact/contact.info b/modules/contact/contact.info
index c4fe6a06c3b5e2477a4b59b2e7d88ba31eda9c4e..42c369994d36aa0653ffd56ae0c702187d0d811a 100644
--- a/modules/contact/contact.info
+++ b/modules/contact/contact.info
@@ -6,8 +6,8 @@ core = 7.x
 files[] = contact.test
 configure = admin/structure/contact
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/contextual/contextual.info b/modules/contextual/contextual.info
index 69777c6c5ccbf2abc4cca322e1cbeda2ea947a9b..b88194467acbd67679b781651fba2c324ccdec9d 100644
--- a/modules/contextual/contextual.info
+++ b/modules/contextual/contextual.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 files[] = contextual.test
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/dashboard/dashboard.info b/modules/dashboard/dashboard.info
index 6fc1b34786c7b4fbfa75e4c7508b7bf710651ef0..30091ddce6679041edb05077fffc2af8e7b56497 100644
--- a/modules/dashboard/dashboard.info
+++ b/modules/dashboard/dashboard.info
@@ -7,8 +7,8 @@ files[] = dashboard.test
 dependencies[] = block
 configure = admin/dashboard/customize
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/dblog/dblog.info b/modules/dblog/dblog.info
index 18a4ba26857ff5ed535b52c6d64b9dd31b8d26d1..3935ee9a4128bdb0a26a065dfe424ea01f23792d 100644
--- a/modules/dblog/dblog.info
+++ b/modules/dblog/dblog.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 files[] = dblog.test
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/dblog/dblog.module b/modules/dblog/dblog.module
index 9420c538da5c3e05cdc5556a8464562483b7c814..d831548c91cece0d9a4da35c158e4711e08ac06e 100644
--- a/modules/dblog/dblog.module
+++ b/modules/dblog/dblog.module
@@ -96,7 +96,7 @@ function dblog_init() {
 /**
  * Implements hook_cron().
  *
- * Remove expired log messages and flood control events.
+ * Remove expired log messages.
  */
 function dblog_cron() {
   // Cleanup the watchdog table.
diff --git a/modules/dblog/dblog.test b/modules/dblog/dblog.test
index a91356c85875b7bef25f593cf34d8d147c54676d..ad01e97f5de3350511546a3305583261f25a4154 100644
--- a/modules/dblog/dblog.test
+++ b/modules/dblog/dblog.test
@@ -256,7 +256,7 @@ class DBLogTestCase extends DrupalWebTestCase {
     // View dblog page-not-found report page.
     $this->drupalGet('admin/reports/page-not-found');
     $this->assertResponse(200);
-    // Check that full-length url displayed.
+    // Check that full-length URL displayed.
     $this->assertText($not_found_url, t('DBLog event was recorded: [page not found]'));
   }
 
diff --git a/modules/field/field.api.php b/modules/field/field.api.php
index 0d01c59fa161293781a191899105b305098ce17c..5f641173e79e52aebb2e194edc1ed2b4682e9627 100644
--- a/modules/field/field.api.php
+++ b/modules/field/field.api.php
@@ -690,11 +690,10 @@ function hook_field_is_empty($item, $field) {
  * which widget to use. Widget types are defined by implementing
  * hook_field_widget_info().
  *
- * Widgets are
- * @link http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html Form API @endlink
- * elements with additional processing capabilities. Widget hooks are typically
- * called by the Field Attach API during the creation of the field form
- * structure with field_attach_form().
+ * Widgets are @link forms_api_reference.html Form API @endlink elements with
+ * additional processing capabilities. Widget hooks are typically called by the
+ * Field Attach API during the creation of the field form structure with
+ * field_attach_form().
  *
  * @see field
  * @see field_types
@@ -729,6 +728,9 @@ function hook_field_is_empty($item, $field) {
  *       - FIELD_BEHAVIOR_DEFAULT: (default) If the widget accepts default
  *         values.
  *       - FIELD_BEHAVIOR_NONE: if the widget does not support default values.
+ *   - weight: (optional) An integer to determine the weight of this widget
+ *     relative to other widgets in the Field UI when selecting a widget for a
+ *     given field instance.
  *
  * @see hook_field_widget_info_alter()
  * @see hook_field_widget_form()
@@ -738,7 +740,7 @@ function hook_field_is_empty($item, $field) {
  * @see hook_field_widget_settings_form()
  */
 function hook_field_widget_info() {
-    return array(
+  return array(
     'text_textfield' => array(
       'label' => t('Text field'),
       'field types' => array('text'),
@@ -765,6 +767,8 @@ function hook_field_widget_info() {
         'multiple values' => FIELD_BEHAVIOR_DEFAULT,
         'default value' => FIELD_BEHAVIOR_DEFAULT,
       ),
+      // As an advanced widget, force it to sink to the bottom of the choices.
+      'weight' => 2,
     ),
   );
 }
@@ -1072,8 +1076,8 @@ function hook_field_formatter_info() {
  * Perform alterations on Field API formatter types.
  *
  * @param $info
- *   Array of informations on formatter types exposed by
- *   hook_field_field_formatter_info() implementations.
+ *   An array of information on formatter types exposed by
+ *   hook_field_formatter_info() implementations.
  */
 function hook_field_formatter_info_alter(&$info) {
   // Add a setting to a formatter type.
diff --git a/modules/field/field.form.inc b/modules/field/field.form.inc
index 6c27c432913a98a5294b75b38d1f02ba9be62fc5..280f778ffba39a43a4792d3f4308763c7d648bad 100644
--- a/modules/field/field.form.inc
+++ b/modules/field/field.form.inc
@@ -6,7 +6,38 @@
  */
 
 /**
- * Create a separate form element for each field.
+ * Creates a form element for a field and can populate it with a default value.
+ *
+ * If the form element is not associated with an entity (i.e., $entity is NULL)
+ * field_get_default_value will be called to supply the default value for the
+ * field. Also allows other modules to alter the form element by implementing
+ * their own hooks.
+ *
+ * @param $entity_type
+ *   The type of entity (for example 'node' or 'user') that the field belongs
+ *   to.
+ * @param $entity
+ *   The entity object that the field belongs to. This may be NULL if creating a
+ *   form element with a default value.
+ * @param $field
+ *   An array representing the field whose editing element is being created.
+ * @param $instance
+ *   An array representing the structure for $field in its current context.
+ * @param $langcode
+ *   The language associated with the field.
+ * @param $items
+ *   An array of the field values. When creating a new entity this may be NULL
+ *   or an empty array to use default values.
+ * @param $form
+ *   An array representing the form that the editing element will be attached
+ *   to. 
+ * @param $form_state
+ *   An array containing the current state of the form.
+ * @param $get_delta
+ *   Used to get only a specific delta value of a multiple value field.
+ *
+ * @return
+ *  The form element array created for this field.
  */
 function field_default_form($entity_type, $entity, $field, $instance, $langcode, $items, &$form, &$form_state, $get_delta = NULL) {
   // This could be called with no entity, as when a UI module creates a
@@ -278,7 +309,7 @@ function theme_field_multiple_value_form($variables) {
 
     $header = array(
       array(
-        'data' => '<label>' . t('!title: !required', array('!title' => $element['#title'], '!required' => $required)) . "</label>",
+        'data' => '<label>' . t('!title !required', array('!title' => $element['#title'], '!required' => $required)) . "</label>",
         'colspan' => 2,
         'class' => array('field-label'),
       ),
diff --git a/modules/field/field.info b/modules/field/field.info
index 6443781c0fa4a22d75a7272ffa17f8e080df666f..88d4088bd55a39464076e9983622f1b154fbc180 100644
--- a/modules/field/field.info
+++ b/modules/field/field.info
@@ -10,8 +10,8 @@ dependencies[] = field_sql_storage
 required = TRUE
 stylesheets[all][] = theme/field.css
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/field/field.info.inc b/modules/field/field.info.inc
index eb5cc5ca7cf8c194063eb7dc18e6c7d7af902af4..9e7ab938d5e11a470228b956e41e4e5147930368 100644
--- a/modules/field/field.info.inc
+++ b/modules/field/field.info.inc
@@ -54,8 +54,8 @@ function field_info_cache_clear() {
  *     the field type.
  *   - 'widget types': Array of hook_field_widget_info() results, keyed by
  *     widget_type. Each element has the following components: label, field
- *     types, settings, and behaviors from hook_field_widget_info(), as well
- *     as module, giving the module that exposes the widget type.
+ *     types, settings, weight, and behaviors from hook_field_widget_info(),
+ *     as well as module, giving the module that exposes the widget type.
  *   - 'formatter types': Array of hook_field_formatter_info() results, keyed by
  *     formatter_type. Each element has the following components: label, field
  *     types, and behaviors from hook_field_formatter_info(), as well as
@@ -124,6 +124,7 @@ function _field_info_collate_types($reset = FALSE) {
         }
       }
       drupal_alter('field_widget_info', $info['widget types']);
+      uasort($info['widget types'], 'drupal_sort_weight');
 
       // Populate formatter types.
       foreach (module_implements('field_formatter_info') as $module) {
@@ -702,6 +703,10 @@ function field_info_instances($entity_type = NULL, $bundle_name = NULL) {
  *   The field name for the instance.
  * @param $bundle_name
  *   The bundle name for the instance.
+ *
+ * @return
+ *   An associative array of instance data for the specific field and bundle;
+ *   NULL if the instance does not exist.
  */
 function field_info_instance($entity_type, $field_name, $bundle_name) {
   $info = _field_info_collate_fields();
diff --git a/modules/field/field.install b/modules/field/field.install
index 5934a264cace29bee9e9bafd8d62076920a5f583..34d28073d59ddf7c6544b30cd3fd9b9f441b59d4 100644
--- a/modules/field/field.install
+++ b/modules/field/field.install
@@ -172,7 +172,7 @@ function field_schema() {
  * This function can be used for databases whose schema is at field module
  * version 7000 or higher.
  *
- * @ingroup update-api-6.x-to-7.x
+ * @ingroup update_api
  */
 function _update_7000_field_create_field(&$field) {
   // Merge in default values.`
@@ -253,7 +253,7 @@ function _update_7000_field_create_field(&$field) {
  * @param $field_name
  *   The field name to delete.
  *
- * @ingroup update-api-6.x-to-7.x
+ * @ingroup update_api
  */
 function _update_7000_field_delete_field($field_name) {
   $table_name = 'field_data_' . $field_name;
@@ -284,7 +284,7 @@ function _update_7000_field_delete_field($field_name) {
  *
  * This function is valid for a database schema version 7000.
  *
- * @ingroup update-api-6.x-to-7.x
+ * @ingroup update_api
  */
 function _update_7000_field_delete_instance($field_name, $entity_type, $bundle) {
   // Delete field instance configuration data.
@@ -322,6 +322,8 @@ function _update_7000_field_delete_instance($field_name, $entity_type, $bundle)
  * @return
  *   An array of fields matching $conditions, keyed by the property specified
  *   by the $key parameter.
+ *
+ * @ingroup update_api
  */
 function _update_7000_field_read_fields(array $conditions = array(), $key = 'id') {
   $fields = array();
@@ -356,7 +358,7 @@ function _update_7000_field_read_fields(array $conditions = array(), $key = 'id'
  * This function can be used for databases whose schema is at field module
  * version 7000 or higher.
  *
- * @ingroup update-api-6.x-to-7.x
+ * @ingroup update_api
  */
 function _update_7000_field_create_instance($field, &$instance) {
   // Merge in defaults.
diff --git a/modules/field/field.module b/modules/field/field.module
index 6fc97a2bf7500c3c207eb092181f715bd6d909c7..b6cf05c9b691c0011a3d45337369430481cf61d5 100644
--- a/modules/field/field.module
+++ b/modules/field/field.module
@@ -376,7 +376,7 @@ function field_system_info_alter(&$info, $file, $type) {
       }
       if ($non_deleted) {
         if (module_exists('field_ui')) {
-          $explanation = t('Field type(s) in use - see !link', array('!link' => l(t('Field list'), 'admin/reports/fields')));
+          $explanation = t('Field type(s) in use - see <a href="@fields-page">Field list</a>', array('@fields-page' => url('admin/reports/fields')));
         }
         else {
           $explanation = t('Fields type(s) in use');
diff --git a/modules/field/modules/field_sql_storage/field_sql_storage.info b/modules/field/modules/field_sql_storage/field_sql_storage.info
index e00119580bdf819f81274611f1dfed71f8f2a39b..d7d5e8e56730fd234b89196921d3d8f76268b438 100644
--- a/modules/field/modules/field_sql_storage/field_sql_storage.info
+++ b/modules/field/modules/field_sql_storage/field_sql_storage.info
@@ -7,8 +7,8 @@ dependencies[] = field
 files[] = field_sql_storage.test
 required = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/field/modules/field_sql_storage/field_sql_storage.install b/modules/field/modules/field_sql_storage/field_sql_storage.install
index 78c520fcfe42291a940331de5f2a90ae5f39d1d3..24973ab45469fdae3541f161f76510faae345a06 100644
--- a/modules/field/modules/field_sql_storage/field_sql_storage.install
+++ b/modules/field/modules/field_sql_storage/field_sql_storage.install
@@ -30,7 +30,7 @@ function field_sql_storage_schema() {
  * This function can be used for databases whose schema is at field module
  * version 7000 or higher.
  *
- * @ingroup update-api-6.x-to-7.x
+ * @ingroup update_api
  */
 function _update_7000_field_sql_storage_write($entity_type, $bundle, $entity_id, $revision_id, $field_name, $data) {
   $table_name = "field_data_{$field_name}";
diff --git a/modules/field/modules/list/list.info b/modules/field/modules/list/list.info
index bdfe6e4ae531d0fb1cde76c6ea5caa9a3e0c5ee8..515b31095f296178449fac3bb61e4a783eea8d17 100644
--- a/modules/field/modules/list/list.info
+++ b/modules/field/modules/list/list.info
@@ -7,8 +7,8 @@ dependencies[] = field
 dependencies[] = options
 files[] = tests/list.test
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/field/modules/list/tests/list_test.info b/modules/field/modules/list/tests/list_test.info
index cb046ed13dfda992ab0b30631b2ba414b72b54bb..107e3f98a1b9bc1c11c6110d43f9ca23e71a17d9 100644
--- a/modules/field/modules/list/tests/list_test.info
+++ b/modules/field/modules/list/tests/list_test.info
@@ -5,8 +5,8 @@ package = Testing
 version = VERSION
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/field/modules/number/number.info b/modules/field/modules/number/number.info
index 8acefcd3eaa28e4074b84ce0891eb3a5c49511d9..478f2301caa4482fb15a206202095bd21706ac76 100644
--- a/modules/field/modules/number/number.info
+++ b/modules/field/modules/number/number.info
@@ -6,8 +6,8 @@ core = 7.x
 dependencies[] = field
 files[] = number.test
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/field/modules/options/options.info b/modules/field/modules/options/options.info
index 443dee1fa8d0c23f4966952afa054b4f3fa04591..abe3ac44c9d610d66fc01c39cc351f5090632062 100644
--- a/modules/field/modules/options/options.info
+++ b/modules/field/modules/options/options.info
@@ -6,8 +6,8 @@ core = 7.x
 dependencies[] = field
 files[] = options.test
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/field/modules/text/text.info b/modules/field/modules/text/text.info
index e784f8f1b52b14c7c5500f869ea0a2d872134835..811d6417ce33375b98a557b4da01c406acb381d4 100644
--- a/modules/field/modules/text/text.info
+++ b/modules/field/modules/text/text.info
@@ -7,8 +7,8 @@ dependencies[] = field
 files[] = text.test
 required = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/field/tests/field.test b/modules/field/tests/field.test
index 739ddbe99d747094ca389eb198176592ea783675..8004178ebf28a13ae8a5247f4a30667c83b59fd3 100644
--- a/modules/field/tests/field.test
+++ b/modules/field/tests/field.test
@@ -1119,8 +1119,11 @@ class FieldInfoTestCase extends FieldTestCase {
           'test_setting' => 999)));
     field_create_instance($instance);
 
+    $info = entity_get_info('test_entity');
     $instances = field_info_instances('test_entity', $instance['bundle']);
-    $this->assertEqual(count($instances), 1, t('One instance shows up in info when attached to a bundle.'));
+    $this->assertEqual(count($instances), 1, format_string('One instance shows up in info when attached to a bundle on a @label.', array(
+      '@label' => $info['label']
+    )));
     $this->assertTrue($instance < $instances[$instance['field_name']], t('Instance appears in info correctly'));
 
     // Test a valid entity type but an invalid bundle.
diff --git a/modules/field/tests/field_test.entity.inc b/modules/field/tests/field_test.entity.inc
index 52ed3fcd0988cb2c458acd6e0d0967c7d921a1b8..95af3eeba175ba86268cfdc489e57deb88bb98a1 100644
--- a/modules/field/tests/field_test.entity.inc
+++ b/modules/field/tests/field_test.entity.inc
@@ -23,7 +23,7 @@ function field_test_entity_info() {
 
   return array(
     'test_entity' => array(
-      'name' => t('Test Entity'),
+      'label' => t('Test Entity'),
       'fieldable' => TRUE,
       'field cache' => FALSE,
       'base table' => 'test_entity',
@@ -38,7 +38,7 @@ function field_test_entity_info() {
     ),
     // This entity type doesn't get form handling for now...
     'test_cacheable_entity' => array(
-      'name' => t('Test Entity, cacheable'),
+      'label' => t('Test Entity, cacheable'),
       'fieldable' => TRUE,
       'field cache' => TRUE,
       'entity keys' => array(
@@ -50,7 +50,7 @@ function field_test_entity_info() {
       'view modes' => $test_entity_modes,
     ),
     'test_entity_bundle_key' => array(
-      'name' => t('Test Entity with a bundle key.'),
+      'label' => t('Test Entity with a bundle key.'),
       'base table' => 'test_entity_bundle_key',
       'fieldable' => TRUE,
       'field cache' => FALSE,
@@ -63,7 +63,7 @@ function field_test_entity_info() {
     ),
     // In this case, the bundle key is not stored in the database.
     'test_entity_bundle' => array(
-      'name' => t('Test Entity with a specified bundle.'),
+      'label' => t('Test Entity with a specified bundle.'),
       'base table' => 'test_entity_bundle',
       'fieldable' => TRUE,
       'controller class' => 'TestEntityBundleController',
@@ -77,7 +77,7 @@ function field_test_entity_info() {
     ),
     // @see EntityPropertiesTestCase::testEntityLabel()
     'test_entity_no_label' => array(
-      'name' => t('Test entity without label'),
+      'label' => t('Test entity without label'),
       'fieldable' => TRUE,
       'field cache' => FALSE,
       'base table' => 'test_entity',
@@ -90,7 +90,7 @@ function field_test_entity_info() {
       'view modes' => $test_entity_modes,
     ),
     'test_entity_label' => array(
-      'name' => t('Test entity label'),
+      'label' => t('Test entity label'),
       'fieldable' => TRUE,
       'field cache' => FALSE,
       'base table' => 'test_entity',
@@ -104,7 +104,7 @@ function field_test_entity_info() {
       'view modes' => $test_entity_modes,
     ),
     'test_entity_label_callback' => array(
-      'name' => t('Test entity label callback'),
+      'label' => t('Test entity label callback'),
       'fieldable' => TRUE,
       'field cache' => FALSE,
       'base table' => 'test_entity',
diff --git a/modules/field/tests/field_test.info b/modules/field/tests/field_test.info
index 4ad0c992274bcce49a68caa29125e9399b175885..2b7673928f536bd4c67503ee5a113b86319f053d 100644
--- a/modules/field/tests/field_test.info
+++ b/modules/field/tests/field_test.info
@@ -6,8 +6,8 @@ files[] = field_test.entity.inc
 version = VERSION
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/field/theme/field.tpl.php b/modules/field/theme/field.tpl.php
index a6d7a9659645cea40dcae60cd4c64d24ea96f2ba..f0f9d583ffed97be2510454a6095930bb3ae9bde 100644
--- a/modules/field/theme/field.tpl.php
+++ b/modules/field/theme/field.tpl.php
@@ -40,6 +40,8 @@
  *
  * @see template_preprocess_field()
  * @see theme_field()
+ *
+ * @ingroup themeable
  */
 ?>
 <!--
diff --git a/modules/field_ui/field_ui.info b/modules/field_ui/field_ui.info
index 37fe222739608e3cb7758fa2133194c2b70857be..b68a951b281a5ff15462e6c61e1bbe3a0ddc1c1a 100644
--- a/modules/field_ui/field_ui.info
+++ b/modules/field_ui/field_ui.info
@@ -6,8 +6,8 @@ core = 7.x
 dependencies[] = field
 files[] = field_ui.test
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/file/file.api.php b/modules/file/file.api.php
index 72aae40c9b105acbe6b080e02cfb20238225d47e..df178c6f6b3eaa48e4be2e22e499b4c4f8cc7e7d 100644
--- a/modules/file/file.api.php
+++ b/modules/file/file.api.php
@@ -51,12 +51,6 @@ function hook_file_download_access($file_item, $entity_type, $entity) {
  *   The type of $entity; for example, 'node' or 'user'.
  * @param $entity
  *   The $entity to which $file is referenced.
- *
- * @return
- *   An array of grants, keyed by module name, each with a Boolean grant value.
- *   Return an empty array to assert FALSE. You may choose to return your own
- *   module's value in addition to other grants or to overwrite the values set
- *   by other modules.
  */
 function hook_file_download_access_alter(&$grants, $file_item, $entity_type, $entity) {
   // For our example module, we always enforce the rules set by node module.
diff --git a/modules/file/file.info b/modules/file/file.info
index e6e73ca9ace27678336cc6ae4ac6de2afc871f87..16b58dd4b592a614c6d03095ac1cd72ae404aa80 100644
--- a/modules/file/file.info
+++ b/modules/file/file.info
@@ -6,8 +6,8 @@ core = 7.x
 dependencies[] = field
 files[] = tests/file.test
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/file/file.js b/modules/file/file.js
index 577480bbc90a9510ccdab825a718e4e11fd17ab9..0135a3b27ec3d3d8088f2d4695f4a6344b34eb07 100644
--- a/modules/file/file.js
+++ b/modules/file/file.js
@@ -73,7 +73,14 @@ Drupal.file = Drupal.file || {
       var acceptableMatch = new RegExp('\\.(' + extensionPattern + ')$', 'gi');
       if (!acceptableMatch.test(this.value)) {
         var error = Drupal.t("The selected file %filename cannot be uploaded. Only files with the following extensions are allowed: %extensions.", {
-          '%filename': this.value,
+          // According to the specifications of HTML5, a file upload control
+          // should not reveal the real local path to the file that a user
+          // has selected. Some web browsers implement this restriction by
+          // replacing the local path with "C:\fakepath\", which can cause
+          // confusion by leaving the user thinking perhaps Drupal could not
+          // find the file because it messed up the file path. To avoid this
+          // confusion, therefore, we strip out the bogus fakepath string.
+          '%filename': this.value.replace('C:\\fakepath\\', ''),
           '%extensions': extensionPattern.replace(/\|/g, ', ')
         });
         $(this).closest('div.form-managed-file').prepend('<div class="messages error file-upload-js-error">' + error + '</div>');
diff --git a/modules/file/tests/file_module_test.info b/modules/file/tests/file_module_test.info
index 393104e2dbdd1b5e44e2b6f903e2743179548943..a0725de9b78d96cbcb3d34466fd136d6264c5684 100644
--- a/modules/file/tests/file_module_test.info
+++ b/modules/file/tests/file_module_test.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/filter/filter.info b/modules/filter/filter.info
index bf1ad2ae79549417497ace8f2999953ff2306196..8de2adfca41775360e680657c934b865892d7c9b 100644
--- a/modules/filter/filter.info
+++ b/modules/filter/filter.info
@@ -7,8 +7,8 @@ files[] = filter.test
 required = TRUE
 configure = admin/config/content/formats
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/forum/forum.info b/modules/forum/forum.info
index 97cb5021b5d0948a9ea89cb273a8ff07e9f48a55..5f46897dbaf8be24e14b13c655b7151f838adca7 100644
--- a/modules/forum/forum.info
+++ b/modules/forum/forum.info
@@ -9,8 +9,8 @@ files[] = forum.test
 configure = admin/structure/forum
 stylesheets[all][] = forum.css
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index 7e8d81bdebd5228045bb42cfb24cc7372c9cc11b..fe0ef7920dcdc1314f18357d9bf7cad03558f660 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -330,10 +330,12 @@ function forum_node_presave($node) {
     $langcode = key($node->taxonomy_forums);
     if (!empty($node->taxonomy_forums[$langcode])) {
       $node->forum_tid = $node->taxonomy_forums[$langcode][0]['tid'];
-      $old_tid = db_query_range("SELECT f.tid FROM {forum} f INNER JOIN {node} n ON f.vid = n.vid WHERE n.nid = :nid ORDER BY f.vid DESC", 0, 1, array(':nid' => $node->nid))->fetchField();
-      if ($old_tid && isset($node->forum_tid) && ($node->forum_tid != $old_tid) && !empty($node->shadow)) {
-        // A shadow copy needs to be created. Retain new term and add old term.
-        $node->taxonomy_forums[$langcode][] = array('tid' => $old_tid);
+      if (isset($node->nid)) {
+        $old_tid = db_query_range("SELECT f.tid FROM {forum} f INNER JOIN {node} n ON f.vid = n.vid WHERE n.nid = :nid ORDER BY f.vid DESC", 0, 1, array(':nid' => $node->nid))->fetchField();
+        if ($old_tid && isset($node->forum_tid) && ($node->forum_tid != $old_tid) && !empty($node->shadow)) {
+          // A shadow copy needs to be created. Retain new term and add old term.
+          $node->taxonomy_forums[$langcode][] = array('tid' => $old_tid);
+        }
       }
     }
   }
@@ -1328,7 +1330,7 @@ function _forum_get_topic_order($sortby) {
  *   The ID of the node to update.
  */
 function _forum_update_forum_index($nid) {
-  $count = db_query('SELECT COUNT(cid) FROM {comment} WHERE nid = :nid AND status = :status', array(
+  $count = db_query('SELECT COUNT(cid) FROM {comment} c INNER JOIN {forum_index} i ON c.nid = i.nid WHERE c.nid = :nid AND c.status = :status', array(
     ':nid' => $nid,
     ':status' => COMMENT_PUBLISHED,
   ))->fetchField();
diff --git a/modules/forum/forum.test b/modules/forum/forum.test
index d78d962de603e3f722844827672047e7af6c63c4..6937c623dbcf88a6766a7351f089b6ef1b728e08 100644
--- a/modules/forum/forum.test
+++ b/modules/forum/forum.test
@@ -197,6 +197,14 @@ class ForumTestCase extends DrupalWebTestCase {
     $this->drupalGet('forum/' . $this->forum['tid']);
     $this->drupalPost("node/$node->nid/edit", array(), t('Save'));
     $this->assertResponse(200);
+
+    // Make sure constructing a forum node programmatically produces no notices.
+    $node = new stdClass;
+    $node->type = 'forum';
+    $node->title = 'Test forum notices';
+    $node->uid = 1;
+    $node->taxonomy_forums[LANGUAGE_NONE][0]['tid'] = $this->root_forum['tid'];
+    node_save($node);
   }
 
   /**
diff --git a/modules/help/help.info b/modules/help/help.info
index acf9cacb3a4a33c357441a199c5f70379c0ced32..23645a23e34905e3634bb41a026d3c9b8bbafe7c 100644
--- a/modules/help/help.info
+++ b/modules/help/help.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 files[] = help.test
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/image/image.field.inc b/modules/image/image.field.inc
index 5e80d88a7ad70cf1bdfa17aa6174572c7e59a127..e2a0249ed622bf20543ba6596836ad92db449a7b 100644
--- a/modules/image/image.field.inc
+++ b/modules/image/image.field.inc
@@ -600,9 +600,12 @@ function theme_image_formatter($variables) {
   $item = $variables['item'];
   $image = array(
     'path' => $item['uri'],
-    'alt' => $item['alt'],
   );
 
+  if (array_key_exists('alt', $item)) {
+    $image['alt'] = $item['alt'];
+  }
+
   if (isset($item['attributes'])) {
     $image['attributes'] = $item['attributes'];
   }
@@ -613,7 +616,7 @@ function theme_image_formatter($variables) {
   }
 
   // Do not output an empty 'title' attribute.
-  if (drupal_strlen($item['title']) > 0) {
+  if (isset($item['title']) && drupal_strlen($item['title']) > 0) {
     $image['title'] = $item['title'];
   }
 
@@ -631,9 +634,11 @@ function theme_image_formatter($variables) {
     $output = theme('image', $image);
   }
 
-  if (!empty($variables['path']['path'])) {
+  // The link path and link options are both optional, but for the options to be
+  // processed, the link path must at least be an empty string.
+  if (isset($variables['path']['path'])) {
     $path = $variables['path']['path'];
-    $options = $variables['path']['options'];
+    $options = isset($variables['path']['options']) ? $variables['path']['options'] : array();
     // When displaying an image inside a link, the html option must be TRUE.
     $options['html'] = TRUE;
     $output = l($output, $path, $options);
diff --git a/modules/image/image.info b/modules/image/image.info
index 5779943295086f31d1293cf2604e32b5133d8786..df2551816527a94de5d870c31eb59ed0f051d253 100644
--- a/modules/image/image.info
+++ b/modules/image/image.info
@@ -7,8 +7,8 @@ dependencies[] = file
 files[] = image.test
 configure = admin/config/media/image-styles
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/image/image.module b/modules/image/image.module
index a9c4d027c3bf5c25b03ebdbd98ece87c3143d265..ff50452d598085dd4dac64bfa24409852af7b3fe 100644
--- a/modules/image/image.module
+++ b/modules/image/image.module
@@ -34,7 +34,7 @@ define('IMAGE_STORAGE_MODULE', IMAGE_STORAGE_OVERRIDE | IMAGE_STORAGE_DEFAULT);
 require_once DRUPAL_ROOT . '/modules/image/image.field.inc';
 
 /**
- * Implement of hook_help().
+ * Implements hook_help().
  */
 function image_help($path, $arg) {
   switch ($path) {
@@ -1054,7 +1054,7 @@ function image_effect_definitions() {
   $effects = &drupal_static(__FUNCTION__);
 
   if (!isset($effects)) {
-    if ($cache = cache_get("image_effects:$langcode") && !empty($cache->data)) {
+    if ($cache = cache_get("image_effects:$langcode")) {
       $effects = $cache->data;
     }
     else {
@@ -1262,7 +1262,7 @@ function theme_image_style($variables) {
   $variables['width'] = $dimensions['width'];
   $variables['height'] = $dimensions['height'];
 
-  // Determine the url for the styled image.
+  // Determine the URL for the styled image.
   $variables['path'] = image_style_url($variables['style_name'], $variables['path']);
   return theme('image', $variables);
 }
diff --git a/modules/image/image.test b/modules/image/image.test
index e4b6d373a5d48d7083b9e24ef5e41b8ab6972070..1ca8465067364dceec836e6f8080a41ddd1e1981 100644
--- a/modules/image/image.test
+++ b/modules/image/image.test
@@ -183,7 +183,7 @@ class ImageStylesPathAndUrlTestCase extends DrupalWebTestCase {
 
     // Create a working copy of the file.
     $files = $this->drupalGetTestFiles('image');
-    $file = reset($files);
+    $file = array_shift($files);
     $image_info = image_get_info($file->uri);
     $original_uri = file_unmanaged_copy($file->uri, $scheme . '://', FILE_EXISTS_RENAME);
     // Let the image_module_test module know about this file, so it can claim
@@ -212,18 +212,30 @@ class ImageStylesPathAndUrlTestCase extends DrupalWebTestCase {
       $this->assertEqual($this->drupalGetHeader('Expires'), 'Sun, 19 Nov 1978 05:00:00 GMT', t('Expires header was sent.'));
       $this->assertEqual($this->drupalGetHeader('Cache-Control'), 'no-cache, must-revalidate, post-check=0, pre-check=0', t('Cache-Control header was set to prevent caching.'));
       $this->assertEqual($this->drupalGetHeader('X-Image-Owned-By'), 'image_module_test', t('Expected custom header has been added.'));
-      // Verify access is denied to private image styles.
-      $this->drupalLogout();
+
+      // Make sure that a second request to the already existing derivate works
+      // too.
       $this->drupalGet($generate_url);
+      $this->assertResponse(200, t('Image was generated at the URL.'));
+
+      // Repeat this with a different file that we do not have access to and
+      // make sure that access is denied.
+      $file_noaccess = array_shift($files);
+      $original_uri_noaccess = file_unmanaged_copy($file_noaccess->uri, $scheme . '://', FILE_EXISTS_RENAME);
+      $generated_uri_noaccess = $scheme . '://styles/' . $this->style_name . '/' . $scheme . '/'. drupal_basename($original_uri_noaccess);
+      $this->assertFalse(file_exists($generated_uri_noaccess), t('Generated file does not exist.'));
+      $generate_url_noaccess = image_style_url($this->style_name, $original_uri_noaccess);
+
+      $this->drupalGet($generate_url_noaccess);
       $this->assertResponse(403, t('Confirmed that access is denied for the private image style.') );
       // Verify that images are not appended to the response. Currently this test only uses PNG images.
       if (strpos($generate_url, '.png') === FALSE ) {
-        $this->fail( t('Confirming that private image styles are not appended require PNG file.') );
+        $this->fail('Confirming that private image styles are not appended require PNG file.');
       }
       else {
         // Check for PNG-Signature (cf. http://www.libpng.org/pub/png/book/chapter08.html#png.ch08.div.2) in the
         // response body.
-        $this->assertNoRaw( chr(137) . chr(80) . chr(78) . chr(71) . chr(13) . chr(10) . chr(26) . chr(10), t('No PNG signature found in the response body.') );
+        $this->assertNoRaw( chr(137) . chr(80) . chr(78) . chr(71) . chr(13) . chr(10) . chr(26) . chr(10), 'No PNG signature found in the response body.');
       }
     }
   }
@@ -243,7 +255,7 @@ class ImageEffectsUnitTest extends ImageToolkitTestCase {
   }
 
   function setUp() {
-    parent::setUp('image_test');
+    parent::setUp('image_module_test');
     module_load_include('inc', 'image', 'image.effects');
   }
 
@@ -330,6 +342,25 @@ class ImageEffectsUnitTest extends ImageToolkitTestCase {
     $this->assertEqual($calls['rotate'][0][1], 90, t('Degrees were passed correctly'));
     $this->assertEqual($calls['rotate'][0][2], 0xffffff, t('Background color was passed correctly'));
   }
+
+  /**
+   * Test image effect caching.
+   */
+  function testImageEffectsCaching() {
+    $image_effect_definitions_called = &drupal_static('image_module_test_image_effect_info_alter');
+
+    // First call should grab a fresh copy of the data.
+    $effects = image_effect_definitions();
+    $this->assertTrue($image_effect_definitions_called === 1, 'image_effect_definitions() generated data.');
+
+    // Second call should come from cache.
+    drupal_static_reset('image_effect_definitions');
+    drupal_static_reset('image_module_test_image_effect_info_alter');
+    $cached_effects = image_effect_definitions();
+    $this->assertTrue(is_null($image_effect_definitions_called), 'image_effect_definitions() returned data from cache.');
+
+    $this->assertTrue($effects == $cached_effects, 'Cached effects are the same as generated effects.');
+  }
 }
 
 /**
@@ -717,7 +748,7 @@ class ImageFieldDisplayTestCase extends ImageFieldTestCase {
     if ($scheme == 'private') {
       // Only verify HTTP headers when using private scheme and the headers are
       // sent by Drupal.
-      $this->assertEqual($this->drupalGetHeader('Content-Type'), 'image/png; name="' . $test_image->filename . '"', t('Content-Type header was sent.'));
+      $this->assertEqual($this->drupalGetHeader('Content-Type'), 'image/png', t('Content-Type header was sent.'));
       $this->assertEqual($this->drupalGetHeader('Content-Disposition'), 'inline; filename="' . $test_image->filename . '"', t('Content-Disposition header was sent.'));
       $this->assertEqual($this->drupalGetHeader('Cache-Control'), 'private', t('Cache-Control header was sent.'));
 
@@ -1566,3 +1597,64 @@ class ImageFieldDefaultImagesTestCase extends ImageFieldTestCase {
   }
 
 }
+
+/**
+ * Tests image theme functions.
+ */
+class ImageThemeFunctionWebTestCase extends DrupalWebTestCase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Image theme functions',
+      'description' => 'Test that the image theme functions work correctly.',
+      'group' => 'Image',
+    );
+  }
+
+  function setUp() {
+    parent::setUp(array('image'));
+  }
+
+  /**
+   * Tests usage of the image field formatters.
+   */
+  function testImageFormatterTheme() {
+    // Create an image.
+    $files = $this->drupalGetTestFiles('image');
+    $file = reset($files);
+    $original_uri = file_unmanaged_copy($file->uri, 'public://', FILE_EXISTS_RENAME);
+
+    // Create a style.
+    image_style_save(array('name' => 'test'));
+    $url = image_style_url('test', $original_uri);
+
+    // Test using theme_image_formatter() without an image title, alt text, or
+    // link options.
+    $path = $this->randomName();
+    $element = array(
+      '#theme' => 'image_formatter',
+      '#image_style' => 'test',
+      '#item' => array(
+        'uri' => $original_uri,
+      ),
+      '#path' => array(
+        'path' => $path,
+      ),
+    );
+    $rendered_element = render($element);
+    $expected_result = '<a href="' . url($path) . '"><img typeof="foaf:Image" src="' . $url . '" alt="" /></a>';
+    $this->assertEqual($expected_result, $rendered_element, 'theme_image_formatter() correctly renders without title, alt, or path options.');
+
+    // Link the image to a fragment on the page, and not a full URL.
+    $fragment = $this->randomName();
+    $element['#path']['path'] = '';
+    $element['#path']['options'] = array(
+      'external' => TRUE,
+      'fragment' => $fragment,
+    );
+    $rendered_element = render($element);
+    $expected_result = '<a href="#' . $fragment . '"><img typeof="foaf:Image" src="' . $url . '" alt="" /></a>';
+    $this->assertEqual($expected_result, $rendered_element, 'theme_image_formatter() correctly renders a link fragment.');
+  }
+
+}
diff --git a/modules/image/tests/image_module_test.info b/modules/image/tests/image_module_test.info
index 1c107f7d12b019ead2f39ee5d82fc575d8b03711..9e3832236b1c6541002ea50b20208b684ceb514a 100644
--- a/modules/image/tests/image_module_test.info
+++ b/modules/image/tests/image_module_test.info
@@ -6,8 +6,8 @@ core = 7.x
 files[] = image_module_test.module
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/image/tests/image_module_test.module b/modules/image/tests/image_module_test.module
index 766a9d95769110a584faea8a81ecf52792a7c1b3..8a322fb97de384574d6ae8bd5e2880dec5473c53 100644
--- a/modules/image/tests/image_module_test.module
+++ b/modules/image/tests/image_module_test.module
@@ -9,7 +9,6 @@ function image_module_test_file_download($uri) {
   if (variable_get('image_module_test_file_download', FALSE) == $uri) {
     return array('X-Image-Owned-By' => 'image_module_test');
   }
-  return -1;
 }
 
 /**
@@ -39,3 +38,13 @@ function image_module_test_image_effect_info() {
 function image_module_test_null_effect(array &$image, array $data) {
   return TRUE;
 }
+
+/**
+ * Implements hook_image_effect_info_alter().
+ *
+ * Used to keep a count of cache misses in image_effect_definitions().
+ */
+function image_module_test_image_effect_info_alter(&$effects) {
+  $image_effects_definition_called = &drupal_static(__FUNCTION__, 0);
+  $image_effects_definition_called++;
+}
diff --git a/modules/locale/locale.info b/modules/locale/locale.info
index 34db19a62f989441f54468fa2b9c03dc0416f0be..0861a48eb8ca4415ea6850c97e99fca5f0acbbcb 100644
--- a/modules/locale/locale.info
+++ b/modules/locale/locale.info
@@ -6,8 +6,8 @@ core = 7.x
 files[] = locale.test
 configure = admin/config/regional/language
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/locale/locale.install b/modules/locale/locale.install
index 2d94c71709bf03828814d4d27111363725e6b19a..b4db757f194adbb1c4143ab9964056faf6bcc89a 100644
--- a/modules/locale/locale.install
+++ b/modules/locale/locale.install
@@ -201,6 +201,19 @@ function locale_update_7004() {
   }
 }
 
+/**
+ * Increase {locales_languages}.formula column's length.
+ */
+function locale_update_7005() {
+  db_change_field('languages', 'formula', 'formula', array(
+    'type' => 'varchar',
+    'length' => 255,
+    'not null' => TRUE,
+    'default' => '',
+    'description' => 'Plural formula in PHP code to evaluate to get plural indexes.',
+  ));
+}
+
 /**
  * @} End of "addtogroup updates-7.x-extra".
  */
@@ -303,7 +316,7 @@ function locale_schema() {
       ),
       'formula' => array(
         'type' => 'varchar',
-        'length' => 128,
+        'length' => 255,
         'not null' => TRUE,
         'default' => '',
         'description' => 'Plural formula in PHP code to evaluate to get plural indexes.',
diff --git a/modules/locale/locale.module b/modules/locale/locale.module
index a20f3d5d711728ee0eec143a3158269356cab8a3..94e7cd151a345d51bc2ba471488374e7bbb0bfb8 100644
--- a/modules/locale/locale.module
+++ b/modules/locale/locale.module
@@ -1033,7 +1033,7 @@ function locale_url_outbound_alter(&$path, &$options, $original_path) {
       include_once DRUPAL_ROOT . '/includes/language.inc';
 
       foreach (language_types_configurable() as $type) {
-        // Get url rewriter callbacks only from enabled language providers.
+        // Get URL rewriter callbacks only from enabled language providers.
         $negotiation = variable_get("language_negotiation_$type", array());
 
         foreach ($negotiation as $id => $provider) {
diff --git a/modules/locale/locale.test b/modules/locale/locale.test
index 6f3135b088f7f74e9b6bd7c72dd1d45c9c2f9857..632506e131dff78c3f2c07f2a48ebdaae75ae8c0 100644
--- a/modules/locale/locale.test
+++ b/modules/locale/locale.test
@@ -1958,7 +1958,7 @@ class LocalePathFunctionalTest extends DrupalWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Path language settings',
-      'description' => 'Checks you can configure a language for individual url aliases.',
+      'description' => 'Checks you can configure a language for individual URL aliases.',
       'group' => 'Locale',
     );
   }
@@ -2268,7 +2268,7 @@ class LocaleUILanguageNegotiationTest extends DrupalWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'UI language negotiation',
-      'description' => 'Test UI language switching by url path prefix and domain.',
+      'description' => 'Test UI language switching by URL path prefix and domain.',
       'group' => 'Locale',
     );
   }
@@ -2396,7 +2396,7 @@ class LocaleUILanguageNegotiationTest extends DrupalWebTestCase {
     $this->assertResponse(404, "Unknown language path prefix should return 404");
 
     // Setup for domain negotiation, first configure the language to have domain
-    // URL. We use https and a port to make sure that only the domain name is used.
+    // 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.
@@ -2513,7 +2513,7 @@ class LocaleUILanguageNegotiationTest extends DrupalWebTestCase {
     $languages = language_list();
 
     foreach (array('it', 'fr') as $langcode) {
-      // Build the link we're going to test based on the clean url setting.
+      // Build the link we're going to test based on the clean URL setting.
       $link = (!empty($GLOBALS['conf']['clean_url'])) ? $langcode . '.example.com/admin' : $langcode . '.example.com/?q=admin';
 
       // Test URL in another language.
@@ -2524,14 +2524,14 @@ class LocaleUILanguageNegotiationTest extends DrupalWebTestCase {
       $correct_link = $url_scheme . $link;
       $this->assertTrue($url == $correct_link, t('The url() function returns the right url (@url) in accordance with the chosen language', array('@url' => $url . " == " . $correct_link)));
 
-      // Test https via options.
+      // Test HTTPS via options.
       variable_set('https', TRUE);
       $url = url('admin', array('https' => TRUE, 'language' => $languages[$langcode]));
       $correct_link = 'https://' . $link;
       $this->assertTrue($url == $correct_link, t('The url() function returns the right https url (via options) (@url) in accordance with the chosen language', array('@url' => $url . " == " . $correct_link)));
       variable_set('https', FALSE);
 
-      // Test https via current url scheme.
+      // Test HTTPS via current URL scheme.
       $temp_https = $is_https;
       $is_https = TRUE;
       $url = url('admin', array('language' => $languages[$langcode]));
diff --git a/modules/locale/tests/locale_test.info b/modules/locale/tests/locale_test.info
index 11a7f48fa5a85e1438a3aefec6610c3fa71cd844..ffd5175fee4d14ebf8c3e4b87db767dff86145cc 100644
--- a/modules/locale/tests/locale_test.info
+++ b/modules/locale/tests/locale_test.info
@@ -5,8 +5,8 @@ package = Testing
 version = VERSION
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/menu/menu.admin.inc b/modules/menu/menu.admin.inc
index 226c3b005ee22b893bfb54f12d703d9f91a0289d..5ac755e582caccbbaf512352c0af6d3dbac128b1 100644
--- a/modules/menu/menu.admin.inc
+++ b/modules/menu/menu.admin.inc
@@ -99,7 +99,14 @@ function _menu_overview_tree_form($tree) {
       $mlid = 'mlid:' . $item['mlid'];
       $form[$mlid]['#item'] = $item;
       $form[$mlid]['#attributes'] = $item['hidden'] ? array('class' => array('menu-disabled')) : array('class' => array('menu-enabled'));
-      $form[$mlid]['title']['#markup'] = l($item['title'], $item['href'], $item['localized_options']) . ($item['hidden'] ? ' (' . t('disabled') . ')' : '');
+      $form[$mlid]['title']['#markup'] = l($item['title'], $item['href'], $item['localized_options']);
+      if ($item['hidden']) {
+        $form[$mlid]['title']['#markup'] .= ' (' . t('disabled') . ')';
+      }
+      elseif ($item['link_path'] == 'user' && $item['module'] == 'system') {
+        $form[$mlid]['title']['#markup'] .= ' (' . t('logged in users only') . ')';
+      }
+
       $form[$mlid]['hidden'] = array(
         '#type' => 'checkbox',
         '#title' => t('Enable @title menu link', array('@title' => $item['title'])),
@@ -463,7 +470,6 @@ function menu_edit_menu($form, &$form_state, $type, $menu = array()) {
     '#machine_name' => array(
       'exists' => 'menu_edit_menu_name_exists',
       'source' => array('title'),
-      'label' => t('URL path'),
       'replace_pattern' => '[^a-z0-9-]+',
       'replace' => '-',
     ),
diff --git a/modules/menu/menu.info b/modules/menu/menu.info
index f2fa31a37e549f51cbd7e4a9db29bb7020e173fb..18a57a735a1c390b29726e178652ce26ded66dac 100644
--- a/modules/menu/menu.info
+++ b/modules/menu/menu.info
@@ -6,8 +6,8 @@ core = 7.x
 files[] = menu.test
 configure = admin/structure/menu
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/node/node.api.php b/modules/node/node.api.php
index 6d14a073767d9283df004dec01e36dae817a02cb..052effc9ba86b84eae5d2570ab15fba66a83c339 100644
--- a/modules/node/node.api.php
+++ b/modules/node/node.api.php
@@ -498,9 +498,18 @@ function hook_node_revision_delete($node) {
 /**
  * Respond to creation of a new node.
  *
- * This hook is invoked from node_save() after the node is inserted into the
- * node table in the database, after the type-specific hook_insert() is invoked,
- * and after field_attach_insert() is called.
+ * This hook is invoked from node_save() after the database query that will
+ * insert the node into the node table is scheduled for execution, after the
+ * type-specific hook_insert() is invoked, and after field_attach_insert() is
+ * called.
+ *
+ * Note that when this hook is invoked, the changes have not yet been written to
+ * the database, because a database transaction is still in progress. The
+ * transaction is not finalized until the save operation is entirely completed
+ * and node_save() goes out of scope. You should not rely on data in the
+ * database at this time as it is not updated yet. You should also note that any
+ * write/update database queries executed from this hook are also not committed
+ * immediately. Check node_save() and db_transaction() for more info.
  *
  * @param $node
  *   The node that is being created.
@@ -517,40 +526,43 @@ function hook_node_insert($node) {
 }
 
 /**
- * Act on nodes being loaded from the database.
+ * Act on arbitrary nodes being loaded from the database.
+ *
+ * This hook should be used to add information that is not in the node or
+ * node revisions table, not to replace information that is in these tables
+ * (which could interfere with the entity cache). For performance reasons,
+ * information for all available nodes should be loaded in a single query where
+ * possible.
  *
  * This hook is invoked during node loading, which is handled by entity_load(),
  * via classes NodeController and DrupalDefaultEntityController. After the node
  * information is read from the database or the entity cache, hook_load() is
- * invoked on the node's content type module, then field_attach_node_revision()
+ * invoked on the node's content type module, then field_attach_load_revision()
  * or field_attach_load() is called, then hook_entity_load() is invoked on all
  * implementing modules, and finally hook_node_load() is invoked on all
  * implementing modules.
  *
- * This hook should only be used to add information that is not in the node or
- * node revisions table, not to replace information that is in these tables
- * (which could interfere with the entity cache). For performance reasons,
- * information for all available nodes should be loaded in a single query where
- * possible.
- *
- * The $types parameter allows for your module to have an early return (for
- * efficiency) if your module only supports certain node types. However, if your
- * module defines a content type, you can use hook_load() to respond to loading
- * of just that content type.
- *
  * @param $nodes
  *   An array of the nodes being loaded, keyed by nid.
  * @param $types
- *   An array containing the types of the nodes.
+ *   An array containing the node types present in $nodes. Allows for an early
+ *   return for modules that only support certain node types. However, if your
+ *   module defines a content type, you can use hook_load() to respond to
+ *   loading of just that content type.
  *
  * For a detailed usage example, see nodeapi_example.module.
  *
  * @ingroup node_api_hooks
  */
 function hook_node_load($nodes, $types) {
-  $result = db_query('SELECT nid, foo FROM {mytable} WHERE nid IN(:nids)', array(':nids' => array_keys($nodes)));
-  foreach ($result as $record) {
-    $nodes[$record->nid]->foo = $record->foo;
+  // Decide whether any of $types are relevant to our purposes.
+  if (count(array_intersect($types_we_want_to_process, $types))) {
+    // Gather our extra data for each of these nodes.
+    $result = db_query('SELECT nid, foo FROM {mytable} WHERE nid IN(:nids)', array(':nids' => array_keys($nodes)));
+    // Add our extra data to the node objects.
+    foreach ($result as $record) {
+      $nodes[$record->nid]->foo = $record->foo;
+    }
   }
 }
 
@@ -684,9 +696,18 @@ function hook_node_presave($node) {
 /**
  * Respond to updates to a node.
  *
- * This hook is invoked from node_save() after the node is updated in the node
- * table in the database, after the type-specific hook_update() is invoked, and
- * after field_attach_update() is called.
+ * This hook is invoked from node_save() after the database query that will
+ * update node in the node table is scheduled for execution, after the
+ * type-specific hook_update() is invoked, and after field_attach_update() is
+ * called.
+ *
+ * Note that when this hook is invoked, the changes have not yet been written to
+ * the database, because a database transaction is still in progress. The
+ * transaction is not finalized until the save operation is entirely completed
+ * and node_save() goes out of scope. You should not rely on data in the
+ * database at this time as it is not updated yet. You should also note that any
+ * write/update database queries executed from this hook are also not committed
+ * immediately. Check node_save() and db_transaction() for more info.
  *
  * @param $node
  *   The node that is being updated.
diff --git a/modules/node/node.info b/modules/node/node.info
index d684c56851805b6a37a23054058a4eda5f78dab1..d2fd883ae215b55b8f30bb1a66bf737efd134a50 100644
--- a/modules/node/node.info
+++ b/modules/node/node.info
@@ -9,8 +9,8 @@ required = TRUE
 configure = admin/structure/types
 stylesheets[all][] = node.css
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/node/node.install b/modules/node/node.install
index 434410c8d2288c5511706f2a88e34110bd01a327..16d3dbaa0432e6aa3184a2e9feeaa1839318057c 100644
--- a/modules/node/node.install
+++ b/modules/node/node.install
@@ -474,7 +474,7 @@ function node_update_dependencies() {
  *
  * This function is valid for a database schema version 7000.
  *
- * @ingroup update-api-6.x-to-7.x
+ * @ingroup update_api
  */
 function _update_7000_node_get_types() {
   $node_types = db_query('SELECT * FROM {node_type}')->fetchAllAssoc('type', PDO::FETCH_OBJ);
diff --git a/modules/node/node.module b/modules/node/node.module
index 264816c00d1fc9b067ab2b098a3126b23af46e35..d86c74d2d211c4d0ea23094cdb3825ec5702cb2a 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -243,7 +243,7 @@ function node_field_display_node_alter(&$display, $context) {
 }
 
 /**
- * Entity uri callback.
+ * Entity URI callback.
  */
 function node_uri($node) {
   return array(
@@ -1345,6 +1345,14 @@ function node_build_content($node, $view_mode = 'full', $langcode = NULL) {
   // Remove previously built content, if exists.
   $node->content = array();
 
+  // Allow modules to change the view mode.
+  $context = array(
+    'entity_type' => 'node',
+    'entity' => $node,
+    'langcode' => $langcode,
+  );
+  drupal_alter('entity_view_mode', $view_mode, $context);
+
   // The 'view' hook can be implemented to overwrite the default function
   // to display nodes.
   if (node_hook($node, 'view')) {
@@ -1385,6 +1393,10 @@ function node_build_content($node, $view_mode = 'full', $langcode = NULL) {
   // Allow modules to make their own additions to the node.
   module_invoke_all('node_view', $node, $view_mode, $langcode);
   module_invoke_all('entity_view', $node, 'node', $view_mode, $langcode);
+
+  // Make sure the current view mode is stored if no module has already
+  // populated the related key.
+  $node->content += array('#view_mode' => $view_mode);
 }
 
 /**
@@ -1984,6 +1996,9 @@ function node_menu() {
     'page callback' => 'node_feed',
     'access arguments' => array('access content'),
     'type' => MENU_CALLBACK,
+    // Pass a FALSE and array argument to ensure that additional path components
+    // are not passed to node_feed().
+    'page arguments' => array(FALSE, array()),
   );
   // @todo Remove this loop when we have a 'description callback' property.
   // Reset internal static cache of _node_types_build(), forces to rebuild the
@@ -2578,10 +2593,10 @@ function node_view_multiple($nodes, $view_mode = 'teaser', $weight = 0, $langcod
 function node_page_default() {
   $select = db_select('node', 'n')
     ->fields('n', array('nid', 'sticky', 'created'))
-    ->condition('promote', 1)
-    ->condition('status', 1)
-    ->orderBy('sticky', 'DESC')
-    ->orderBy('created', 'DESC')
+    ->condition('n.promote', 1)
+    ->condition('n.status', 1)
+    ->orderBy('n.sticky', 'DESC')
+    ->orderBy('n.created', 'DESC')
     ->extend('PagerDefault')
     ->limit(variable_get('default_nodes_main', 10))
     ->addTag('node_access');
@@ -2764,7 +2779,7 @@ function node_search_validate($form, &$form_state) {
 
   // Insert extra restrictions into the search keywords string.
   if (isset($form_state['values']['type']) && is_array($form_state['values']['type'])) {
-    // Retrieve selected types - Forms API sets the value of unselected
+    // Retrieve selected types - Form API sets the value of unselected
     // checkboxes to 0.
     $form_state['values']['type'] = array_filter($form_state['values']['type']);
     if (count($form_state['values']['type'])) {
@@ -3891,24 +3906,25 @@ function node_unpublish_by_keyword_action($node, $context) {
  */
 function node_requirements($phase) {
   $requirements = array();
-  // Ensure translations don't break at install time
-  $t = get_t();
-  // Only show rebuild button if there are either 0, or 2 or more, rows
-  // in the {node_access} table, or if there are modules that
-  // implement hook_node_grants().
-  $grant_count = db_query('SELECT COUNT(*) FROM {node_access}')->fetchField();
-  if ($grant_count != 1 || count(module_implements('node_grants')) > 0) {
-    $value = format_plural($grant_count, 'One permission in use', '@count permissions in use', array('@count' => $grant_count));
-  } else {
-    $value = $t('Disabled');
-  }
-  $description = $t('If the site is experiencing problems with permissions to content, you may have to rebuild the permissions cache. Rebuilding will remove all privileges to content and replace them with permissions based on the current modules and settings. Rebuilding may take some time if there is a lot of content or complex permission settings. After rebuilding has completed, content will automatically use the new permissions.');
-
-  $requirements['node_access'] = array(
-    'title' => $t('Node Access Permissions'),
-    'value' => $value,
-    'description' => $description . ' ' . l(t('Rebuild permissions'), 'admin/reports/status/rebuild'),
-  );
+  if ($phase === 'runtime') {
+    // Only show rebuild button if there are either 0, or 2 or more, rows
+    // in the {node_access} table, or if there are modules that
+    // implement hook_node_grants().
+    $grant_count = db_query('SELECT COUNT(*) FROM {node_access}')->fetchField();
+    if ($grant_count != 1 || count(module_implements('node_grants')) > 0) {
+      $value = format_plural($grant_count, 'One permission in use', '@count permissions in use', array('@count' => $grant_count));
+    }
+    else {
+      $value = t('Disabled');
+    }
+    $description = t('If the site is experiencing problems with permissions to content, you may have to rebuild the permissions cache. Rebuilding will remove all privileges to content and replace them with permissions based on the current modules and settings. Rebuilding may take some time if there is a lot of content or complex permission settings. After rebuilding has completed, content will automatically use the new permissions.');
+
+    $requirements['node_access'] = array(
+      'title' => t('Node Access Permissions'),
+      'value' => $value,
+      'description' => $description . ' ' . l(t('Rebuild permissions'), 'admin/reports/status/rebuild'),
+    );
+  }
   return $requirements;
 }
 
diff --git a/modules/node/node.test b/modules/node/node.test
index 37d05e529383dfe15f6d9d1b9715c92cb14d2366..d789d3c0e654ad61287a0bbb42709981c6f3f28b 100644
--- a/modules/node/node.test
+++ b/modules/node/node.test
@@ -695,7 +695,7 @@ class NodeBlockTestCase extends DrupalWebTestCase {
     $this->drupalLogin($admin_user);
   }
 
-  function testSearchFormBlock() {
+  function testSyndicateBlock() {
     // Set block title to confirm that the interface is available.
     $this->drupalPost('admin/structure/block/manage/node/syndicate/configure', array('title' => $this->randomName(8)), t('Save block'));
     $this->assertText(t('The block configuration has been saved.'), t('Block configuration set.'));
@@ -832,7 +832,11 @@ class NodeRSSContentTestCase extends DrupalWebTestCase {
     // viewing node.
     $this->drupalGet("node/$node->nid");
     $this->assertNoText($rss_only_content, t('Node content designed for RSS doesn\'t appear when viewing node.'));
-
+    
+    // Check that the node feed page does not try to interpret additional path
+    // components as arguments for node_feed() and returns default content.
+    $this->drupalGet('rss.xml/' . $this->randomName() . '/' . $this->randomName());
+    $this->assertText($rss_only_content, t('Ignore page arguments when delivering rss.xml.'));
   }
 }
 
@@ -2030,9 +2034,9 @@ class NodeQueryAlter extends DrupalWebTestCase {
 
     // Create user with simple node access permission. The 'node test view'
     // permission is implemented and granted by the node_access_test module.
-    $this->accessUser = $this->drupalCreateUser(array('access content', 'node test view'));
-    $this->noAccessUser = $this->drupalCreateUser(array('access content'));
-    $this->noAccessUser2 = $this->drupalCreateUser(array('access content'));
+    $this->accessUser = $this->drupalCreateUser(array('access content overview', 'access content', 'node test view'));
+    $this->noAccessUser = $this->drupalCreateUser(array('access content overview', 'access content'));
+    $this->noAccessUser2 = $this->drupalCreateUser(array('access content overview', 'access content'));
   }
 
   /**
@@ -2045,11 +2049,19 @@ class NodeQueryAlter extends DrupalWebTestCase {
     $this->assertText('Yes, 4 nodes', "4 nodes were found for access user");
     $this->assertNoText('Exception', "No database exception");
 
+    // Test the content overview page.
+    $this->drupalGet('admin/content');
+    $table_rows = $this->xpath('//tbody/tr');
+    $this->assertEqual(4, count($table_rows), "4 nodes were found for access user");
+
     // Verify that a user with no access permission cannot see nodes.
     $this->drupalLogin($this->noAccessUser);
     $this->drupalGet('node_access_test_page');
     $this->assertText('No nodes', "No nodes were found for no access user");
     $this->assertNoText('Exception', "No database exception");
+
+    $this->drupalGet('admin/content');
+    $this->assertText(t('No content available.'));
   }
 
   /**
@@ -2474,24 +2486,24 @@ class NodeAccessPagerTestCase extends DrupalWebTestCase {
     // View the node page. With the default 50 comments per page there should
     // be two pages (0, 1) but no third (2) page.
     $this->drupalGet('node/' . $node->nid);
-    $this->assertText($node->title, t('Node title found.'));
-    $this->assertText(t('Comments'), t('Has a comments section.'));
-    $this->assertRaw('page=1', t('Secound page exists.'));
-    $this->assertNoRaw('page=2', t('No third page exists.'));
+    $this->assertText($node->title);
+    $this->assertText(t('Comments'));
+    $this->assertRaw('page=1');
+    $this->assertNoRaw('page=2');
   }
 
   /**
    * Tests the forum node pager for nodes with multiple grants per realm.
    */
   public function testForumPager() {
-    // Lookup the forums vocabulary vid.
+    // Look up the forums vocabulary ID.
     $vid = variable_get('forum_nav_vocabulary', 0);
-    $this->assertTrue($vid, t('Forum navigation vocabulary found.'));
+    $this->assertTrue($vid, 'Forum navigation vocabulary ID is set.');
 
-    // Lookup the general discussion term.
+    // Look up the general discussion term.
     $tree = taxonomy_get_tree($vid, 0, 1);
     $tid = reset($tree)->tid;
-    $this->assertTrue($tid, t('General discussion term found.'));
+    $this->assertTrue($tid, 'General discussion term is found in the forum vocabulary.');
 
     // Create 30 nodes.
     for ($i = 0; $i < 30; $i++) {
@@ -2510,8 +2522,8 @@ class NodeAccessPagerTestCase extends DrupalWebTestCase {
     // page there should be two pages for 30 nodes, no more.
     $this->drupalLogin($this->web_user);
     $this->drupalGet('forum/' . $tid);
-    $this->assertRaw('page=1', t('Secound page exists.'));
-    $this->assertNoRaw('page=2', t('No third page exists.'));
+    $this->assertRaw('page=1');
+    $this->assertNoRaw('page=2');
   }
 }
 
@@ -2589,3 +2601,52 @@ class NodeAccessFieldTestCase extends NodeWebTestCase {
     $this->assertRaw($default, 'The updated default value is displayed when creating a new node.');
   }
 }
+
+/**
+ * Tests changing view modes for nodes.
+ */
+class NodeEntityViewModeAlterTest extends NodeWebTestCase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Node entity view mode',
+      'description' => 'Test changing view mode.',
+      'group' => 'Node'
+    );
+  }
+
+  function setUp() {
+    parent::setUp(array('node_test'));
+  }
+
+  /**
+   * Create a "Basic page" node and verify its consistency in the database.
+   */
+  function testNodeViewModeChange() {
+    $web_user = $this->drupalCreateUser(array('create page content', 'edit own page content'));
+    $this->drupalLogin($web_user);
+
+    // Create a node.
+    $edit = array();
+    $langcode = LANGUAGE_NONE;
+    $edit["title"] = $this->randomName(8);
+    $edit["body[$langcode][0][value]"] = t('Data that should appear only in the body for the node.');
+    $edit["body[$langcode][0][summary]"] = t('Extra data that should appear only in the teaser for the node.');
+    $this->drupalPost('node/add/page', $edit, t('Save'));
+
+    $node = $this->drupalGetNodeByTitle($edit["title"]);
+
+    // Set the flag to alter the view mode and view the node.
+    variable_set('node_test_change_view_mode', 'teaser');
+    $this->drupalGet('node/' . $node->nid);
+
+    // Check that teaser mode is viewed.
+    $this->assertText('Extra data that should appear only in the teaser for the node.', 'Teaser text present');
+    // Make sure body text is not present.
+    $this->assertNoText('Data that should appear only in the body for the node.', 'Body text not present');
+
+    // Test that the correct build mode has been set.
+    $build = node_view($node);
+    $this->assertEqual($build['#view_mode'], 'teaser', 'The view mode has correctly been set to teaser.');
+  }
+}
diff --git a/modules/node/node.tpl.php b/modules/node/node.tpl.php
index 6d0f489d71df9d4e0dfd4fade820b8c6492f6022..4c358a16d6ba107cbbb3aedb872d5103d8d0edb9 100644
--- a/modules/node/node.tpl.php
+++ b/modules/node/node.tpl.php
@@ -14,7 +14,7 @@
  * - $date: Formatted creation date. Preprocess functions can reformat it by
  *   calling format_date() with the desired parameters on the $created variable.
  * - $name: Themed username of node author output from theme_username().
- * - $node_url: Direct url of the current node.
+ * - $node_url: Direct URL of the current node.
  * - $display_submitted: Whether submission information should be displayed.
  * - $submitted: Submission information created from $name and $date during
  *   template_preprocess_node().
@@ -22,7 +22,7 @@
  *   CSS. It can be manipulated through the variable $classes_array from
  *   preprocess functions. The default values can be one or more of the
  *   following:
- *   - node: The current template type, i.e., "theming hook".
+ *   - node: The current template type; for example, "theming hook".
  *   - node-[type]: The current node type. For example, if the node is a
  *     "Blog entry" it would result in "node-blog". Note that the machine
  *     name will often be in a short form of the human readable label.
@@ -42,7 +42,7 @@
  *
  * Other variables:
  * - $node: Full node object. Contains data that may not be safe.
- * - $type: Node type, i.e. story, page, blog, etc.
+ * - $type: Node type; for example, story, page, blog, etc.
  * - $comment_count: Number of comments attached to the node.
  * - $uid: User ID of the node author.
  * - $created: Time the node was published formatted in Unix timestamp.
@@ -53,7 +53,7 @@
  * - $id: Position of the node. Increments each time it's output.
  *
  * Node status variables:
- * - $view_mode: View mode, e.g. 'full', 'teaser'...
+ * - $view_mode: View mode; for example, "full", "teaser".
  * - $teaser: Flag for the teaser state (shortcut for $view_mode == 'teaser').
  * - $page: Flag for the full page state.
  * - $promote: Flag for front page promotion state.
@@ -67,15 +67,17 @@
  * - $is_admin: Flags true when the current user is an administrator.
  *
  * Field variables: for each field instance attached to the node a corresponding
- * variable is defined, e.g. $node->body becomes $body. 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. $node->body['en'], thus overriding any language negotiation
- * rule that was previously applied.
+ * variable is defined; for example, $node->body becomes $body. 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; for example, $node->body['en'], thus overriding any
+ * language negotiation rule that was previously applied.
  *
  * @see template_preprocess()
  * @see template_preprocess_node()
  * @see template_process()
+ *
+ * @ingroup themeable
  */
 ?>
 <div id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>
diff --git a/modules/node/tests/node_access_test.info b/modules/node/tests/node_access_test.info
index 3723848117847fcbdb83f419090daeaf6db56364..7312d2fa97d53a8e344ee9adab1da34f0a37673c 100644
--- a/modules/node/tests/node_access_test.info
+++ b/modules/node/tests/node_access_test.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/node/tests/node_test.info b/modules/node/tests/node_test.info
index c5bb88f0555c8188ec689bfa8d382349a2bcbbb5..702d44a4e4b80b504fe8e5f7af9eee75aed22f02 100644
--- a/modules/node/tests/node_test.info
+++ b/modules/node/tests/node_test.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/node/tests/node_test.module b/modules/node/tests/node_test.module
index b0ebc149a150199121999b6275bc98ecb8ba0019..a52c1fad002246012a7f0f22f2a289ec80152607 100644
--- a/modules/node/tests/node_test.module
+++ b/modules/node/tests/node_test.module
@@ -149,3 +149,13 @@ function node_test_node_update($node) {
     }
   }
 }
+
+/**
+ * Implements hook_entity_view_mode_alter().
+ */
+function node_test_entity_view_mode_alter(&$view_mode, $context) {
+  // Only alter the view mode if we are on the test callback.
+  if ($change_view_mode = variable_get('node_test_change_view_mode', '')) {
+    $view_mode = $change_view_mode;
+  }
+}
diff --git a/modules/node/tests/node_test_exception.info b/modules/node/tests/node_test_exception.info
index d9c8b6c4226a65ef85c3560fb032f9ecf85100d8..795f53667d09f1c2804a5636b5114280d37d5071 100644
--- a/modules/node/tests/node_test_exception.info
+++ b/modules/node/tests/node_test_exception.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/openid/openid.inc b/modules/openid/openid.inc
index 3c828154034d9df2018fc889a0e56cae423082d9..74a08d576205b9f8019c309c0a4a3ac9a1748d26 100644
--- a/modules/openid/openid.inc
+++ b/modules/openid/openid.inc
@@ -858,7 +858,7 @@ function _openid_invalid_openid_transition($identity, $response) {
     $fallback_account = user_external_load($fallback_identity);
   }
 
-  // Try to replace https with http. OpenID providers often redirect
+  // 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);
diff --git a/modules/openid/openid.info b/modules/openid/openid.info
index 4f65facc494290ac0328c24ccbfcc42d09c6c670..5faa5f5334f9cc705c648bdb58aada7743a0a00e 100644
--- a/modules/openid/openid.info
+++ b/modules/openid/openid.info
@@ -5,8 +5,8 @@ package = Core
 core = 7.x
 files[] = openid.test
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/openid/openid.module b/modules/openid/openid.module
index 6cfdad95acc64642f5588192799f8f7afe1e2c1a..a3f4fc8e0e9d97cea352bd42cf828a3782b78786 100644
--- a/modules/openid/openid.module
+++ b/modules/openid/openid.module
@@ -428,7 +428,7 @@ function openid_discovery($claimed_id) {
 }
 
 /**
- * Implementation of hook_openid_discovery_method_info().
+ * Implements hook_openid_discovery_method_info().
  *
  * Define standard discovery methods.
  */
@@ -566,7 +566,7 @@ function _openid_xrds_discovery($claimed_id) {
 }
 
 /**
- * Implementation of hook_openid_normalization_method_info().
+ * Implements hook_openid_normalization_method_info().
  *
  * Define standard normalization methods.
  */
@@ -1010,7 +1010,7 @@ function openid_verify_assertion_return_url($service, $response) {
 /**
  * Remove expired nonces from the database.
  *
- * Implementation of hook_cron().
+ * Implements hook_cron().
  */
 function openid_cron() {
   db_delete('openid_nonce')
diff --git a/modules/openid/openid.pages.inc b/modules/openid/openid.pages.inc
index 6e3f096e4699c01c386ff5f9826d48a63a5d407d..8a52f20402db40fcce3a68d8f1872a41db9e2824 100644
--- a/modules/openid/openid.pages.inc
+++ b/modules/openid/openid.pages.inc
@@ -56,6 +56,7 @@ function openid_user_identities($account) {
     '#theme' => 'table',
     '#header' => $header,
     '#rows' => $rows,
+    '#empty' => t('No OpenID identities available for this account.'),
   );
   $build['openid_user_add'] = drupal_get_form('openid_user_add');
   return $build;
diff --git a/modules/openid/openid.test b/modules/openid/openid.test
index 1f03c135dbf145ed69801d67df199c124d8c7fea..292c5317c492d5bd860435ee193f612b19e8bf95 100644
--- a/modules/openid/openid.test
+++ b/modules/openid/openid.test
@@ -19,7 +19,7 @@ abstract class OpenIDWebTestCase extends DrupalWebTestCase {
     $this->drupalPost('', $edit, t('Log in'));
 
     // Check we are on the OpenID redirect form.
-    $this->assertTitle(t('OpenID redirect'), t('OpenID redirect page was displayed.'));
+    $this->assertTitle(t('OpenID redirect'), 'OpenID redirect page was displayed.');
 
     // Submit form to the OpenID Provider Endpoint.
     $this->drupalPost(NULL, array(), t('Send'));
@@ -78,13 +78,13 @@ class OpenIDFunctionalTestCase extends OpenIDWebTestCase {
     // the URL of the OpenID Provider Endpoint.
 
     // Identifier is the URL of an XRDS document.
-    // The URL scheme is stripped in order to test that the supplied identifier
-    // is normalized in openid_begin().
+    // On HTTP test environments, the URL scheme is stripped in order to test
+    // that the supplied identifier is normalized in openid_begin().
     $identity = url('openid-test/yadis/xrds', array('absolute' => TRUE));
-    $this->addIdentity(preg_replace('@^https?://@', '', $identity), 2, 'http://example.com/xrds', $identity);
+    $this->addIdentity(preg_replace('@^http://@', '', $identity), 2, 'http://example.com/xrds', $identity);
 
     $identity = url('openid-test/yadis/xrds/delegate', array('absolute' => TRUE));
-    $this->addIdentity(preg_replace('@^https?://@', '', $identity), 2, 'http://example.com/xrds-delegate', $identity);
+    $this->addIdentity(preg_replace('@^http://@', '', $identity), 2, 'http://example.com/xrds-delegate', $identity);
 
     // Identifier is the URL of an XRDS document containing an OP Identifier
     // Element. The Relying Party sends the special value
@@ -92,8 +92,8 @@ class OpenIDFunctionalTestCase extends OpenIDWebTestCase {
     // 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.
+    // Tell openid_test.module to respond with this identifier. If the fragment
+    // part is present in the identifier, it should be retained.
     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());
@@ -162,7 +162,7 @@ class OpenIDFunctionalTestCase extends OpenIDWebTestCase {
 
     // Test logging in via the login block on the front page.
     $this->submitLoginForm($identity);
-    $this->assertLink(t('Log out'), 0, t('User was logged in.'));
+    $this->assertLink(t('Log out'), 0, 'User was logged in.');
 
     $this->drupalLogout();
 
@@ -171,12 +171,12 @@ class OpenIDFunctionalTestCase extends OpenIDWebTestCase {
     $this->drupalPost('user/login', $edit, t('Log in'));
 
     // Check we are on the OpenID redirect form.
-    $this->assertTitle(t('OpenID redirect'), t('OpenID redirect page was displayed.'));
+    $this->assertTitle(t('OpenID redirect'), 'OpenID redirect page was displayed.');
 
     // Submit form to the OpenID Provider Endpoint.
     $this->drupalPost(NULL, array(), t('Send'));
 
-    $this->assertLink(t('Log out'), 0, t('User was logged in.'));
+    $this->assertLink(t('Log out'), 0, 'User was logged in.');
 
     // Verify user was redirected away from user/login to an accessible page.
     $this->assertResponse(200);
@@ -211,12 +211,12 @@ class OpenIDFunctionalTestCase extends OpenIDWebTestCase {
     $this->drupalPost('user/login', $edit, t('Log in'));
 
     // Check we are on the OpenID redirect form.
-    $this->assertTitle(t('OpenID redirect'), t('OpenID redirect page was displayed.'));
+    $this->assertTitle(t('OpenID redirect'), 'OpenID redirect page was displayed.');
 
     // Submit form to the OpenID Provider Endpoint.
     $this->drupalPost(NULL, array(), t('Send'));
 
-    $this->assertLink(t('Log out'), 0, t('User was logged in.'));
+    $this->assertLink(t('Log out'), 0, 'User was logged in.');
 
     // Verify user was redirected away from user/login to an accessible page.
     $this->assertText(t('Operating in maintenance mode.'));
@@ -232,14 +232,14 @@ class OpenIDFunctionalTestCase extends OpenIDWebTestCase {
     // Add identity to user's profile.
     $identity = url('openid-test/yadis/xrds', array('absolute' => TRUE));
     $this->addIdentity($identity);
-    $this->assertText($identity, t('Identity appears in list.'));
+    $this->assertText($identity, 'Identity appears in list.');
 
     // Delete the newly added identity.
     $this->clickLink(t('Delete'));
     $this->drupalPost(NULL, array(), t('Confirm'));
 
-    $this->assertText(t('OpenID deleted.'), t('Identity deleted'));
-    $this->assertNoText($identity, t('Identity no longer appears in list.'));
+    $this->assertText(t('OpenID deleted.'), 'Identity deleted');
+    $this->assertNoText($identity, 'Identity no longer appears in list.');
   }
 
   /**
@@ -263,11 +263,11 @@ class OpenIDFunctionalTestCase extends OpenIDWebTestCase {
       'accounts[' . $this->web_user->uid . ']' => TRUE,
     );
     $this->drupalPost('admin/people', $edit, t('Update'));
-    $this->assertRaw('The update has been performed.', t('Account was blocked.'));
+    $this->assertRaw('The update has been performed.', 'Account was blocked.');
     $this->drupalLogout();
 
     $this->submitLoginForm($identity);
-    $this->assertRaw(t('The username %name has not been activated or is blocked.', array('%name' => $this->web_user->name)), t('User login was blocked.'));
+    $this->assertRaw(t('The username %name has not been activated or is blocked.', array('%name' => $this->web_user->name)), 'User login was blocked.');
   }
 
   /**
@@ -291,14 +291,14 @@ class OpenIDFunctionalTestCase extends OpenIDWebTestCase {
     $this->drupalPost('user/' . $this->web_user->uid . '/openid', $edit, t('Add an OpenID'));
 
     if ($claimed_id === FALSE) {
-      $this->assertRaw(t('Sorry, that is not a valid OpenID. Ensure you have spelled your ID correctly.'), t('Invalid identity was rejected.'));
+      $this->assertRaw(t('Sorry, that is not a valid OpenID. Ensure you have spelled your ID correctly.'), 'Invalid identity was rejected.');
       return;
     }
 
     // OpenID 1 used a HTTP redirect, OpenID 2 uses a HTML form that is submitted automatically using JavaScript.
     if ($version == 2) {
       // Check we are on the OpenID redirect form.
-      $this->assertTitle(t('OpenID redirect'), t('OpenID redirect page was displayed.'));
+      $this->assertTitle(t('OpenID redirect'), 'OpenID redirect page was displayed.');
 
       // Submit form to the OpenID Provider Endpoint.
       $this->drupalPost(NULL, array(), t('Send'));
@@ -307,7 +307,7 @@ class OpenIDFunctionalTestCase extends OpenIDWebTestCase {
     if (!isset($claimed_id)) {
       $claimed_id = $identity;
     }
-    $this->assertRaw(t('Successfully added %identity', array('%identity' => $claimed_id)), t('Identity %identity was added.', array('%identity' => $identity)));
+    $this->assertRaw(t('Successfully added %identity', array('%identity' => $claimed_id)), format_string('Identity %identity was added.', array('%identity' => $identity)));
   }
 
   /**
@@ -380,8 +380,8 @@ class OpenIDFunctionalTestCase extends OpenIDWebTestCase {
     variable_set('openid_test_response', $response);
     $this->submitLoginForm($identity);
     $this->assertNoRaw('OpenID login failed.');
-    $this->assertFieldByName('name', '', t('No username was supplied by provider.'));
-    $this->assertFieldByName('mail', '', t('No e-mail address was supplied by provider.'));
+    $this->assertFieldByName('name', '', 'No username was supplied by provider.');
+    $this->assertFieldByName('mail', '', 'No e-mail address was supplied by provider.');
 
     // Check that unsigned SREG fields are ignored.
     $response = array(
@@ -392,8 +392,8 @@ class OpenIDFunctionalTestCase extends OpenIDWebTestCase {
     variable_set('openid_test_response', $response);
     $this->submitLoginForm($identity);
     $this->assertNoRaw('OpenID login failed.');
-    $this->assertFieldByName('name', 'john', t('Username was supplied by provider.'));
-    $this->assertFieldByName('mail', '', t('E-mail address supplied by provider was ignored.'));
+    $this->assertFieldByName('name', 'john', 'Username was supplied by provider.');
+    $this->assertFieldByName('mail', '', 'E-mail address supplied by provider was ignored.');
   }
 }
 
@@ -426,14 +426,14 @@ class OpenIDRegistrationTestCase extends OpenIDWebTestCase {
     // Use a User-supplied Identity that is the URL of an XRDS document.
     $identity = url('openid-test/yadis/xrds', array('absolute' => TRUE));
     $this->submitLoginForm($identity);
-    $this->assertRaw(t('Once you have verified your e-mail address, you may log in via OpenID.'), t('User was asked to verify e-mail address.'));
-    $this->assertRaw(t('A welcome message with further instructions has been sent to your e-mail address.'), t('A welcome message was sent to the user.'));
+    $this->assertRaw(t('Once you have verified your e-mail address, you may log in via OpenID.'), 'User was asked to verify e-mail address.');
+    $this->assertRaw(t('A welcome message with further instructions has been sent to your e-mail address.'), 'A welcome message was sent to the user.');
     $reset_url = $this->getPasswordResetURLFromMail();
 
     $user = user_load_by_name('john');
-    $this->assertTrue($user, t('User was registered with right username.'));
-    $this->assertEqual($user->mail, 'john@example.com', t('User was registered with right email address.'));
-    $this->assertFalse($user->data, t('No additional user info was saved.'));
+    $this->assertTrue($user, 'User was registered with right username.');
+    $this->assertEqual($user->mail, 'john@example.com', 'User was registered with right email address.');
+    $this->assertFalse($user->data, 'No additional user info was saved.');
 
     $this->submitLoginForm($identity);
     $this->assertRaw(t('You must validate your email address for this account before logging in via OpenID.'));
@@ -446,7 +446,7 @@ class OpenIDRegistrationTestCase extends OpenIDWebTestCase {
 
     // Verify that the account was activated.
     $this->submitLoginForm($identity);
-    $this->assertLink(t('Log out'), 0, t('User was logged in.'));
+    $this->assertLink(t('Log out'), 0, 'User was logged in.');
   }
 
   /**
@@ -461,17 +461,17 @@ class OpenIDRegistrationTestCase extends OpenIDWebTestCase {
     // Use a User-supplied Identity that is the URL of an XRDS document.
     $identity = url('openid-test/yadis/xrds', array('absolute' => TRUE));
     $this->submitLoginForm($identity);
-    $this->assertLink(t('Log out'), 0, t('User was logged in.'));
+    $this->assertLink(t('Log out'), 0, 'User was logged in.');
 
     $user = user_load_by_name('john');
-    $this->assertTrue($user, t('User was registered with right username.'));
-    $this->assertEqual($user->mail, 'john@example.com', t('User was registered with right email address.'));
-    $this->assertFalse($user->data, t('No additional user info was saved.'));
+    $this->assertTrue($user, 'User was registered with right username.');
+    $this->assertEqual($user->mail, 'john@example.com', 'User was registered with right email address.');
+    $this->assertFalse($user->data, 'No additional user info was saved.');
 
     $this->drupalLogout();
 
     $this->submitLoginForm($identity);
-    $this->assertLink(t('Log out'), 0, t('User was logged in.'));
+    $this->assertLink(t('Log out'), 0, 'User was logged in.');
   }
 
   /**
@@ -487,29 +487,29 @@ class OpenIDRegistrationTestCase extends OpenIDWebTestCase {
     $identity = url('openid-test/yadis/xrds', array('absolute' => TRUE));
     $this->submitLoginForm($identity);
 
-    $this->assertRaw(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'))), t('User was asked to complete the registration process manually.'));
-    $this->assertRaw(t('The name %name is already taken.', array('%name' => $web_user->name)), t('Form validation error for username was displayed.'));
-    $this->assertRaw(t('The e-mail address %mail is not valid.', array('%mail' => 'mail@invalid#')), t('Form validation error for e-mail address was displayed.'));
+    $this->assertRaw(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'))), 'User was asked to complete the registration process manually.');
+    $this->assertRaw(t('The name %name is already taken.', array('%name' => $web_user->name)), 'Form validation error for username was displayed.');
+    $this->assertRaw(t('The e-mail address %mail is not valid.', array('%mail' => 'mail@invalid#')), 'Form validation error for e-mail address was displayed.');
 
     // Enter username and e-mail address manually.
     $edit = array('name' => 'john', 'mail' => 'john@example.com');
     $this->drupalPost(NULL, $edit, t('Create new account'));
-    $this->assertRaw(t('Once you have verified your e-mail address, you may log in via OpenID.'), t('User was asked to verify e-mail address.'));
+    $this->assertRaw(t('Once you have verified your e-mail address, you may log in via OpenID.'), 'User was asked to verify e-mail address.');
     $reset_url = $this->getPasswordResetURLFromMail();
 
     $user = user_load_by_name('john');
-    $this->assertTrue($user, t('User was registered with right username.'));
-    $this->assertFalse($user->data, t('No additional user info was saved.'));
+    $this->assertTrue($user, 'User was registered with right username.');
+    $this->assertFalse($user->data, 'No additional user info was saved.');
 
     // Follow the one-time login that was sent in the welcome e-mail.
     $this->drupalGet($reset_url);
     $this->drupalPost(NULL, array(), t('Log in'));
 
     // The user is taken to user/%uid/edit.
-    $this->assertFieldByName('mail', 'john@example.com', t('User was registered with right e-mail address.'));
+    $this->assertFieldByName('mail', 'john@example.com', 'User was registered with right e-mail address.');
 
     $this->clickLink(t('OpenID identities'));
-    $this->assertRaw($identity, t('OpenID identity was registered.'));
+    $this->assertRaw($identity, 'OpenID identity was registered.');
   }
 
   /**
@@ -523,29 +523,29 @@ class OpenIDRegistrationTestCase extends OpenIDWebTestCase {
     // Use a User-supplied Identity that is the URL of an XRDS document.
     $identity = url('openid-test/yadis/xrds', array('absolute' => TRUE));
     $this->submitLoginForm($identity);
-    $this->assertRaw(t('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'))), t('User was asked to complete the registration process manually.'));
-    $this->assertNoRaw(t('You must enter a username.'), t('Form validation error for username was not displayed.'));
-    $this->assertNoRaw(t('You must enter an e-mail address.'), t('Form validation error for e-mail address was not displayed.'));
+    $this->assertRaw(t('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'))), 'User was asked to complete the registration process manually.');
+    $this->assertNoRaw(t('You must enter a username.'), 'Form validation error for username was not displayed.');
+    $this->assertNoRaw(t('You must enter an e-mail address.'), 'Form validation error for e-mail address was not displayed.');
 
     // Enter username and e-mail address manually.
     $edit = array('name' => 'john', 'mail' => 'john@example.com');
     $this->drupalPost(NULL, $edit, t('Create new account'));
-    $this->assertRaw(t('Once you have verified your e-mail address, you may log in via OpenID.'), t('User was asked to verify e-mail address.'));
+    $this->assertRaw(t('Once you have verified your e-mail address, you may log in via OpenID.'), 'User was asked to verify e-mail address.');
     $reset_url = $this->getPasswordResetURLFromMail();
 
     $user = user_load_by_name('john');
-    $this->assertTrue($user, t('User was registered with right username.'));
-    $this->assertFalse($user->data, t('No additional user info was saved.'));
+    $this->assertTrue($user, 'User was registered with right username.');
+    $this->assertFalse($user->data, 'No additional user info was saved.');
 
     // Follow the one-time login that was sent in the welcome e-mail.
     $this->drupalGet($reset_url);
     $this->drupalPost(NULL, array(), t('Log in'));
 
     // The user is taken to user/%uid/edit.
-    $this->assertFieldByName('mail', 'john@example.com', t('User was registered with right e-mail address.'));
+    $this->assertFieldByName('mail', 'john@example.com', 'User was registered with right e-mail address.');
 
     $this->clickLink(t('OpenID identities'));
-    $this->assertRaw($identity, t('OpenID identity was registered.'));
+    $this->assertRaw($identity, 'OpenID identity was registered.');
   }
 
   /**
@@ -568,11 +568,11 @@ class OpenIDRegistrationTestCase extends OpenIDWebTestCase {
     // Use a User-supplied Identity that is the URL of an XRDS document.
     $identity = url('openid-test/yadis/xrds', array('absolute' => TRUE));
     $this->submitLoginForm($identity);
-    $this->assertLink(t('Log out'), 0, t('User was logged in.'));
+    $this->assertLink(t('Log out'), 0, 'User was logged in.');
 
     $user = user_load_by_name('john');
-    $this->assertTrue($user, t('User was registered with right username.'));
-    $this->assertEqual($user->mail, 'john@example.com', t('User was registered with right email address.'));
+    $this->assertTrue($user, 'User was registered with right username.');
+    $this->assertEqual($user->mail, 'john@example.com', 'User was registered with right email address.');
   }
 }
 
@@ -624,7 +624,7 @@ class OpenIDInvalidIdentifierTransitionTestCase extends OpenIDFunctionalTestCase
     $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.'));
+    $this->assertRaw(t('There is already an existing account associated with the OpenID identifier that you have provided.'), 'Message that OpenID identifier must be updated manually was displayed.');
   }
 
   /**
@@ -655,7 +655,7 @@ class OpenIDInvalidIdentifierTransitionTestCase extends OpenIDFunctionalTestCase
     $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.'));
+    $this->assertRaw(t('New OpenID identifier %identity was added as a replacement for invalid identifier %invalid_identity.', array('%invalid_identity' => $identity_stripped, '%identity' => $identity)), 'Message that OpenID identifier was added automatically was displayed.');
   }
 }
 
@@ -680,25 +680,25 @@ class OpenIDTestCase extends DrupalWebTestCase {
    * Test _openid_dh_XXX_to_XXX() functions.
    */
   function testConversion() {
-    $this->assertEqual(_openid_dh_long_to_base64('12345678901234567890123456789012345678901234567890'), 'CHJ/Y2mq+DyhUCZ0evjH8ZbOPwrS', t('_openid_dh_long_to_base64() returned expected result.'));
-    $this->assertEqual(_openid_dh_base64_to_long('BsH/g8Nrpn2dtBSdu/sr1y8hxwyx'), '09876543210987654321098765432109876543210987654321', t('_openid_dh_base64_to_long() returned expected result.'));
+    $this->assertEqual(_openid_dh_long_to_base64('12345678901234567890123456789012345678901234567890'), 'CHJ/Y2mq+DyhUCZ0evjH8ZbOPwrS', '_openid_dh_long_to_base64() returned expected result.');
+    $this->assertEqual(_openid_dh_base64_to_long('BsH/g8Nrpn2dtBSdu/sr1y8hxwyx'), '09876543210987654321098765432109876543210987654321', '_openid_dh_base64_to_long() returned expected result.');
 
-    $this->assertEqual(_openid_dh_long_to_binary('12345678901234567890123456789012345678901234567890'), "\x08r\x7fci\xaa\xf8<\xa1P&tz\xf8\xc7\xf1\x96\xce?\x0a\xd2", t('_openid_dh_long_to_binary() returned expected result.'));
-    $this->assertEqual(_openid_dh_binary_to_long("\x06\xc1\xff\x83\xc3k\xa6}\x9d\xb4\x14\x9d\xbb\xfb+\xd7/!\xc7\x0c\xb1"), '09876543210987654321098765432109876543210987654321', t('_openid_dh_binary_to_long() returned expected result.'));
+    $this->assertEqual(_openid_dh_long_to_binary('12345678901234567890123456789012345678901234567890'), "\x08r\x7fci\xaa\xf8<\xa1P&tz\xf8\xc7\xf1\x96\xce?\x0a\xd2", '_openid_dh_long_to_binary() returned expected result.');
+    $this->assertEqual(_openid_dh_binary_to_long("\x06\xc1\xff\x83\xc3k\xa6}\x9d\xb4\x14\x9d\xbb\xfb+\xd7/!\xc7\x0c\xb1"), '09876543210987654321098765432109876543210987654321', '_openid_dh_binary_to_long() returned expected result.');
   }
 
   /**
    * Test _openid_dh_xorsecret().
    */
   function testOpenidDhXorsecret() {
-    $this->assertEqual(_openid_dh_xorsecret('123456790123456790123456790', "abc123ABC\x00\xFF"), "\xa4'\x06\xbe\xf1.\x00y\xff\xc2\xc1", t('_openid_dh_xorsecret() returned expected result.'));
+    $this->assertEqual(_openid_dh_xorsecret('123456790123456790123456790', "abc123ABC\x00\xFF"), "\xa4'\x06\xbe\xf1.\x00y\xff\xc2\xc1", '_openid_dh_xorsecret() returned expected result.');
   }
 
   /**
    * Test _openid_get_bytes().
    */
   function testOpenidGetBytes() {
-    $this->assertEqual(strlen(_openid_get_bytes(20)), 20, t('_openid_get_bytes() returned expected result.'));
+    $this->assertEqual(strlen(_openid_get_bytes(20)), 20, '_openid_get_bytes() returned expected result.');
   }
 
   /**
@@ -718,7 +718,7 @@ class OpenIDTestCase extends DrupalWebTestCase {
     );
     $association = new stdClass();
     $association->mac_key = "1234567890abcdefghij\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9";
-    $this->assertEqual(_openid_signature($association, $response, array('foo', 'bar')), 'QnKZQzSFstT+GNiJDFOptdcZjrc=', t('Expected signature calculated.'));
+    $this->assertEqual(_openid_signature($association, $response, array('foo', 'bar')), 'QnKZQzSFstT+GNiJDFOptdcZjrc=', 'Expected signature calculated.');
   }
 
   /**
@@ -729,26 +729,26 @@ class OpenIDTestCase extends DrupalWebTestCase {
     // section 7.2. If the user-supplied string starts with xri:// it should be
     // stripped and the resulting string should be treated as an XRI when it
     // starts with "=", "@", "+", "$", "!" or "(".
-    $this->assertTrue(_openid_is_xri('xri://=foo'), t('_openid_is_xri() returned expected result for an xri identifier with xri scheme.'));
-    $this->assertTrue(_openid_is_xri('xri://@foo'), t('_openid_is_xri() returned expected result for an xri identifier with xri scheme.'));
-    $this->assertTrue(_openid_is_xri('xri://+foo'), t('_openid_is_xri() returned expected result for an xri identifier with xri scheme.'));
-    $this->assertTrue(_openid_is_xri('xri://$foo'), t('_openid_is_xri() returned expected result for an xri identifier with xri scheme.'));
-    $this->assertTrue(_openid_is_xri('xri://!foo'), t('_openid_is_xri() returned expected result for an xri identifier with xri scheme..'));
-    $this->assertTrue(_openid_is_xri('xri://(foo'), t('_openid_is_xri() returned expected result for an xri identifier with xri scheme..'));
-
-    $this->assertTrue(_openid_is_xri('=foo'), t('_openid_is_xri() returned expected result for an xri identifier.'));
-    $this->assertTrue(_openid_is_xri('@foo'), t('_openid_is_xri() returned expected result for an xri identifier.'));
-    $this->assertTrue(_openid_is_xri('+foo'), t('_openid_is_xri() returned expected result for an xri identifier.'));
-    $this->assertTrue(_openid_is_xri('$foo'), t('_openid_is_xri() returned expected result for an xri identifier.'));
-    $this->assertTrue(_openid_is_xri('!foo'), t('_openid_is_xri() returned expected result for an xri identifier.'));
-    $this->assertTrue(_openid_is_xri('(foo'), t('_openid_is_xri() returned expected result for an xri identifier.'));
-
-    $this->assertFalse(_openid_is_xri('foo'), t('_openid_is_xri() returned expected result for an http URL.'));
-    $this->assertFalse(_openid_is_xri('xri://foo'), t('_openid_is_xri() returned expected result for an http URL.'));
-    $this->assertFalse(_openid_is_xri('http://foo/'), t('_openid_is_xri() returned expected result for an http URL.'));
-    $this->assertFalse(_openid_is_xri('http://example.com/'), t('_openid_is_xri() returned expected result for an http URL.'));
-    $this->assertFalse(_openid_is_xri('user@example.com/'), t('_openid_is_xri() returned expected result for an http URL.'));
-    $this->assertFalse(_openid_is_xri('http://user@example.com/'), t('_openid_is_xri() returned expected result for an http URL.'));
+    $this->assertTrue(_openid_is_xri('xri://=foo'), '_openid_is_xri() returned expected result for an xri identifier with xri scheme.');
+    $this->assertTrue(_openid_is_xri('xri://@foo'), '_openid_is_xri() returned expected result for an xri identifier with xri scheme.');
+    $this->assertTrue(_openid_is_xri('xri://+foo'), '_openid_is_xri() returned expected result for an xri identifier with xri scheme.');
+    $this->assertTrue(_openid_is_xri('xri://$foo'), '_openid_is_xri() returned expected result for an xri identifier with xri scheme.');
+    $this->assertTrue(_openid_is_xri('xri://!foo'), '_openid_is_xri() returned expected result for an xri identifier with xri scheme..');
+    $this->assertTrue(_openid_is_xri('xri://(foo'), '_openid_is_xri() returned expected result for an xri identifier with xri scheme..');
+
+    $this->assertTrue(_openid_is_xri('=foo'), '_openid_is_xri() returned expected result for an xri identifier.');
+    $this->assertTrue(_openid_is_xri('@foo'), '_openid_is_xri() returned expected result for an xri identifier.');
+    $this->assertTrue(_openid_is_xri('+foo'), '_openid_is_xri() returned expected result for an xri identifier.');
+    $this->assertTrue(_openid_is_xri('$foo'), '_openid_is_xri() returned expected result for an xri identifier.');
+    $this->assertTrue(_openid_is_xri('!foo'), '_openid_is_xri() returned expected result for an xri identifier.');
+    $this->assertTrue(_openid_is_xri('(foo'), '_openid_is_xri() returned expected result for an xri identifier.');
+
+    $this->assertFalse(_openid_is_xri('foo'), '_openid_is_xri() returned expected result for an http URL.');
+    $this->assertFalse(_openid_is_xri('xri://foo'), '_openid_is_xri() returned expected result for an http URL.');
+    $this->assertFalse(_openid_is_xri('http://foo/'), '_openid_is_xri() returned expected result for an http URL.');
+    $this->assertFalse(_openid_is_xri('http://example.com/'), '_openid_is_xri() returned expected result for an http URL.');
+    $this->assertFalse(_openid_is_xri('user@example.com/'), '_openid_is_xri() returned expected result for an http URL.');
+    $this->assertFalse(_openid_is_xri('http://user@example.com/'), '_openid_is_xri() returned expected result for an http URL.');
   }
 
   /**
@@ -758,16 +758,16 @@ class OpenIDTestCase extends DrupalWebTestCase {
     // Test that the normalization is according to OpenID Authentication 2.0,
     // section 7.2 and 11.5.2.
 
-    $this->assertEqual(openid_normalize('$foo'), '$foo', t('openid_normalize() correctly normalized an XRI.'));
-    $this->assertEqual(openid_normalize('xri://$foo'), '$foo', t('openid_normalize() correctly normalized an XRI with an xri:// scheme.'));
+    $this->assertEqual(openid_normalize('$foo'), '$foo', 'openid_normalize() correctly normalized an XRI.');
+    $this->assertEqual(openid_normalize('xri://$foo'), '$foo', 'openid_normalize() correctly normalized an XRI with an xri:// scheme.');
 
-    $this->assertEqual(openid_normalize('example.com/'), 'http://example.com/', t('openid_normalize() correctly normalized a URL with a missing scheme.'));
-    $this->assertEqual(openid_normalize('example.com'), 'http://example.com/', t('openid_normalize() correctly normalized a URL with a missing scheme and empty path.'));
-    $this->assertEqual(openid_normalize('http://example.com'), 'http://example.com/', t('openid_normalize() correctly normalized a URL with an empty path.'));
+    $this->assertEqual(openid_normalize('example.com/'), 'http://example.com/', 'openid_normalize() correctly normalized a URL with a missing scheme.');
+    $this->assertEqual(openid_normalize('example.com'), 'http://example.com/', 'openid_normalize() correctly normalized a URL with a missing scheme and empty path.');
+    $this->assertEqual(openid_normalize('http://example.com'), 'http://example.com/', 'openid_normalize() correctly normalized a URL with an empty path.');
 
-    $this->assertEqual(openid_normalize('http://example.com/path'), 'http://example.com/path', t('openid_normalize() correctly normalized a URL with a path.'));
+    $this->assertEqual(openid_normalize('http://example.com/path'), 'http://example.com/path', 'openid_normalize() correctly normalized a URL with a path.');
 
-    $this->assertEqual(openid_normalize('http://example.com/path#fragment'), 'http://example.com/path', t('openid_normalize() correctly normalized a URL with a fragment.'));
+    $this->assertEqual(openid_normalize('http://example.com/path#fragment'), 'http://example.com/path', 'openid_normalize() correctly normalized a URL with a fragment.');
   }
 
   /**
@@ -786,24 +786,24 @@ class OpenIDTestCase extends DrupalWebTestCase {
     );
 
     $values = openid_extract_namespace($response, 'http://example.com/ns/dummy', NULL, FALSE);
-    $this->assertEqual($values, array(), t('Nothing found for unused namespace.'));
+    $this->assertEqual($values, array(), 'Nothing found for unused namespace.');
 
     $values = openid_extract_namespace($response, 'http://example.com/ns/dummy', 'sreg', FALSE);
-    $this->assertEqual($values, array('nickname' => 'john'), t('Value found for fallback prefix.'));
+    $this->assertEqual($values, array('nickname' => 'john'), 'Value found for fallback prefix.');
 
     $values = openid_extract_namespace($response, OPENID_NS_SREG, 'sreg', FALSE);
-    $this->assertEqual($values, array('nickname' => 'george', 'email' => 'george@example.com'), t('Namespace takes precedence over fallback prefix.'));
+    $this->assertEqual($values, array('nickname' => 'george', 'email' => 'george@example.com'), 'Namespace takes precedence over fallback prefix.');
 
     // ext1.email is signed, but ext1.nickname is not.
     $values = openid_extract_namespace($response, OPENID_NS_SREG, 'sreg', TRUE);
-    $this->assertEqual($values, array('email' => 'george@example.com'), t('Unsigned namespaced fields ignored.'));
+    $this->assertEqual($values, array('email' => 'george@example.com'), 'Unsigned namespaced fields ignored.');
 
     $values = openid_extract_namespace($response, 'http://example.com/ns/ext2', 'sreg', FALSE);
-    $this->assertEqual($values, array('foo' => '123', 'bar' => '456'), t('Unsigned fields found.'));
+    $this->assertEqual($values, array('foo' => '123', 'bar' => '456'), 'Unsigned fields found.');
 
     // ext2.foo and ext2.bar are ignored, because ns.ext2 is not signed. The
     // fallback prefix is not used, because the namespace is specified.
     $values = openid_extract_namespace($response, 'http://example.com/ns/ext2', 'sreg', TRUE);
-    $this->assertEqual($values, array(), t('Unsigned fields ignored.'));
+    $this->assertEqual($values, array(), 'Unsigned fields ignored.');
   }
 }
diff --git a/modules/openid/tests/openid_test.info b/modules/openid/tests/openid_test.info
index 5fd142eec149a4f88ad7b00a6bd230047811b70b..dccc075ce7c88234c6e944fdaffd8da601435c4d 100644
--- a/modules/openid/tests/openid_test.info
+++ b/modules/openid/tests/openid_test.info
@@ -6,8 +6,8 @@ core = 7.x
 dependencies[] = openid
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/overlay/overlay-child-rtl.css b/modules/overlay/overlay-child-rtl.css
index 7fd39f44031ca573a195ef6d9712a35046e897e2..2e5a267c4b6d2a7119546073701c0761c3db7ae0 100644
--- a/modules/overlay/overlay-child-rtl.css
+++ b/modules/overlay/overlay-child-rtl.css
@@ -1,4 +1,9 @@
 
+/**
+ * @file
+ * RTL styling for Overlay child pages.
+ */
+
 html {
   direction: rtl;
 }
diff --git a/modules/overlay/overlay-child.css b/modules/overlay/overlay-child.css
index a2b23b462dd96a130ce345f1fb2d743364985664..959ebddbdd5cc152b64fae8855a024502c5efb59 100644
--- a/modules/overlay/overlay-child.css
+++ b/modules/overlay/overlay-child.css
@@ -1,4 +1,9 @@
 
+/**
+ * @file
+ * Basic styling for the Overlay child pages.
+ */
+
 html.js {
   background: transparent !important;
   overflow-y: scroll;
diff --git a/modules/overlay/overlay-child.js b/modules/overlay/overlay-child.js
index e78e3831c9189fde0247c7feefe7c4dfab7df6b2..4ff6cf0c886a9a62d252870d368c5beead3ddc3b 100644
--- a/modules/overlay/overlay-child.js
+++ b/modules/overlay/overlay-child.js
@@ -1,3 +1,7 @@
+/**
+ * @file
+ * Attaches the behaviors for the Overlay child pages.
+ */
 
 (function ($) {
 
diff --git a/modules/overlay/overlay-parent.css b/modules/overlay/overlay-parent.css
index dad6d5575b564dbcc1a202272722d5429a36e0b1..9459a7af389ab5c773688d411a9bdfe0e9dc15ff 100644
--- a/modules/overlay/overlay-parent.css
+++ b/modules/overlay/overlay-parent.css
@@ -1,4 +1,9 @@
 
+/**
+ * @file
+ * Basic styling for the Overlay module.
+ */
+
 html.overlay-open,
 html.overlay-open body {
   height: 100%;
diff --git a/modules/overlay/overlay-parent.js b/modules/overlay/overlay-parent.js
index ace7deff77e7bc1745d3c4b572bc50506e5916bc..413475977b6587687f56eeda5c0f82ca5d60f05c 100644
--- a/modules/overlay/overlay-parent.js
+++ b/modules/overlay/overlay-parent.js
@@ -1,3 +1,8 @@
+/**
+ * @file
+ * Attaches the behaviors for the Overlay parent pages.
+ */
+
 (function ($) {
 
 /**
@@ -339,7 +344,7 @@ Drupal.overlay.setFocusBefore = function ($element, document) {
  * Check if the given link is in the administrative section of the site.
  *
  * @param url
- *   The url to be tested.
+ *   The URL to be tested.
  *
  * @return boolean
  *   TRUE if the URL represents an administrative link, FALSE otherwise.
@@ -374,7 +379,7 @@ Drupal.overlay.isAdminLink = function (url) {
  * Determine whether a link is external to the site.
  *
  * @param url
- *   The url to be tested.
+ *   The URL to be tested.
  *
  * @return boolean
  *   TRUE if the URL is external to the site, FALSE otherwise.
@@ -560,7 +565,7 @@ Drupal.overlay.eventhandlerOverrideLink = function (event) {
 
   var target = $target[0];
   var href = target.href;
-  // Only handle links that have an href attribute and use the http(s) protocol.
+  // Only handle links that have an href attribute and use the HTTP(S) protocol.
   if (href != undefined && href != '' && target.protocol.match(/^https?\:/)) {
     var anchor = href.replace(target.ownerDocument.location.href, '');
     // Skip anchor links.
@@ -607,7 +612,14 @@ Drupal.overlay.eventhandlerOverrideLink = function (event) {
       else {
         // Add the overlay-context state to the link, so "overlay-restore" links
         // can restore the context.
-        $target.attr('href', $.param.fragment(href, { 'overlay-context': this.getPath(window.location) + window.location.search }));
+        if ($target[0].hash) {
+          // Leave links with an existing fragment alone. Adding an extra
+          // parameter to a link like "node/1#section-1" breaks the link.
+        }
+        else {
+          // For links with no existing fragment, add the overlay context.
+          $target.attr('href', $.param.fragment(href, { 'overlay-context': this.getPath(window.location) + window.location.search }));
+        }
 
         // When the link has a destination query parameter and that destination
         // is an admin link we need to fragmentize it. This will make it reopen
diff --git a/modules/overlay/overlay.info b/modules/overlay/overlay.info
index 7f5669b18a773443554976945c76ebf18024d5a8..f6dd0277e187f375c92705624d7dd126ea7c89f3 100644
--- a/modules/overlay/overlay.info
+++ b/modules/overlay/overlay.info
@@ -4,8 +4,8 @@ package = Core
 version = VERSION
 core = 7.x
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/overlay/overlay.install b/modules/overlay/overlay.install
index 2fa7c84bc658fa15ecf950aa77f1b0e9fb47018b..2df860b5e6ed78cdaaf2199e4bdf4a5c256c9d88 100644
--- a/modules/overlay/overlay.install
+++ b/modules/overlay/overlay.install
@@ -2,14 +2,14 @@
 
 /**
  * @file
- * Install, update and uninstall functions for the overlay module.
+ * Install, update, and uninstall functions for the Overlay module.
  */
 
 /**
  * Implements hook_enable().
  *
  * If the module is being enabled through the admin UI, and not from an
- * install profile, reopen the modules page in an overlay.
+ * installation profile, reopen the modules page in an overlay.
  */
 function overlay_enable() {
   if (strpos(current_path(), 'admin/modules') === 0) {
diff --git a/modules/overlay/overlay.module b/modules/overlay/overlay.module
index 6acc2603dc4d3821fdb7aa7ccd986891085641df..c07cc6cfa91824e61de84e7aaa4b3cb073718acc 100644
--- a/modules/overlay/overlay.module
+++ b/modules/overlay/overlay.module
@@ -302,7 +302,10 @@ function overlay_page_alter(&$page) {
 }
 
 /**
- * Menu callback; dismisses the overlay accessibility message for this user.
+ * Page callback: Dismisses the overlay accessibility message for this user.
+ *
+ * @return
+ *   A render array for a page containing a list of content.
  */
 function overlay_user_dismiss_message() {
   global $user;
@@ -327,10 +330,12 @@ function overlay_user_dismiss_message() {
  * If the current user can access the overlay and has not previously indicated
  * that this message should be dismissed, this function returns a message
  * containing a link to disable the overlay. Nothing is returned for anonymous
- * users, because the links control per-user settings. Therefore, because some
- * screen readers are unable to properly read overlay contents, site builders
- * are discouraged from granting the "access overlay" permission to the
- * anonymous role. See http://drupal.org/node/890284.
+ * users, because the links control per-user settings. Because some screen
+ * readers are unable to properly read overlay contents, site builders are
+ * discouraged from granting the "access overlay" permission to the anonymous
+ * role.
+ *
+ * @see http://drupal.org/node/890284
  */
 function overlay_disable_message() {
   global $user;
@@ -385,7 +390,13 @@ function overlay_disable_message() {
 /**
  * Returns the HTML for the message about how to disable the overlay.
  *
- * @see overlay_disable_message()
+ * @param $variables
+ *   An associative array with an 'element' element, which itself is an
+ *   associative array containing:
+ *   - profile_link: The link to this user's account.
+ *   - dismiss_message_link: The link to dismiss the overlay.
+ *
+ * @ingroup themeable
  */
 function theme_overlay_disable_message($variables) {
   $element = $variables['element'];
@@ -473,8 +484,12 @@ function overlay_preprocess_maintenance_page(&$variables) {
 }
 
 /**
- * Preprocesses template variables for overlay.tpl.php
+ * Implements template_preprocess_HOOK() for overlay.tpl.php
  *
+ * If the current page request is inside the overlay, add appropriate classes
+ * to the <body> element, and simplify the page title.
+ *
+ * @see template_process_overlay()
  * @see overlay.tpl.php
  */
 function template_preprocess_overlay(&$variables) {
@@ -485,20 +500,21 @@ function template_preprocess_overlay(&$variables) {
 }
 
 /**
- * Processes variables for overlay.tpl.php
+ * Implements template_process_HOOK() for overlay.tpl.php
+ *
+ * Places the rendered HTML for the page body into a top level variable.
  *
  * @see template_preprocess_overlay()
  * @see overlay.tpl.php
  */
 function template_process_overlay(&$variables) {
-  // Place the rendered HTML for the page body into a top level variable.
   $variables['page'] = $variables['page']['#children'];
 }
 
 /**
  * Implements hook_preprocess_page().
  *
- * Hide tabs inside the overlay.
+ * If the current page request is inside the overlay, hide the tabs.
  *
  * @see overlay_get_mode()
  */
@@ -509,7 +525,7 @@ function overlay_preprocess_page(&$variables) {
 }
 
 /**
- * Callback to request that the overlay display an empty page.
+ * Stores and returns whether an empty page override is needed.
  *
  * This is used to prevent a page request which closes the overlay (for
  * example, a form submission) from being fully re-rendered before the overlay
@@ -550,7 +566,7 @@ function overlay_page_delivery_callback_alter(&$callback) {
 }
 
 /**
- * Delivery callback to display an empty page.
+ * Prints an empty page.
  *
  * This function is used to print out a bare minimum empty page which still has
  * the scripts and styles necessary in order to trigger the overlay to close.
@@ -562,7 +578,7 @@ function overlay_deliver_empty_page() {
 }
 
 /**
- * Get the current overlay mode.
+ * Gets the current overlay mode.
  *
  * @see overlay_set_mode()
  */
@@ -688,12 +704,13 @@ function overlay_overlay_child_initialize() {
 }
 
 /**
- * Callback to request that the overlay close as soon as the page is displayed.
+ * Requests that the overlay overlay closes when the page is displayed.
  *
  * @param $redirect
  *   (optional) The path that should open in the parent window after the
  *   overlay closes. If not set, no redirect will be performed on the parent
  *   window.
+ *
  * @param $redirect_options
  *   (optional) An associative array of options to use when generating the
  *   redirect URL.
@@ -757,7 +774,7 @@ function overlay_supplemental_regions() {
 }
 
 /**
- * Helper function for returning a list of page regions related to the overlay.
+ * Returns a list of page regions related to the overlay.
  *
  * @param $type
  *   The type of regions to return. This can either be 'overlay_regions' or
@@ -923,7 +940,7 @@ function overlay_store_rendered_content($id = NULL, $content = NULL) {
 }
 
 /**
- * Request that the parent window refresh a particular page region.
+ * Requests that the parent window refreshes a particular page region.
  *
  * @param $region
  *   The name of the page region to refresh. The parent window will trigger a
@@ -938,7 +955,7 @@ function overlay_request_refresh($region) {
 }
 
 /**
- * Request that the entire parent window be reloaded when the overlay closes.
+ * Requests that the entire parent window is reloaded when the overlay closes.
  *
  * @see overlay_trigger_refresh()
  */
@@ -947,7 +964,7 @@ function overlay_request_page_refresh() {
 }
 
 /**
- * Check if the parent window needs to be refreshed on this page load.
+ * Checks if the parent window needs to be refreshed on this page load.
  *
  * If the previous page load requested that any page regions be refreshed, or
  * if it requested that the entire page be refreshed when the overlay closes,
diff --git a/modules/overlay/overlay.tpl.php b/modules/overlay/overlay.tpl.php
index 54b10af1f1c210a22aa3dc5e7ed458e38618cca2..df863375238a35e9c6d31c2a48422c37e88af8fa 100644
--- a/modules/overlay/overlay.tpl.php
+++ b/modules/overlay/overlay.tpl.php
@@ -17,6 +17,8 @@
  * @see template_preprocess()
  * @see template_preprocess_overlay()
  * @see template_process()
+ *
+ * @ingroup themeable
  */
 ?>
 
diff --git a/modules/path/path.info b/modules/path/path.info
index 64c037442ed30d39892c2db6b9087f5d9d918322..8e79a1e721f21aabd05d349e00de7429b9793862 100644
--- a/modules/path/path.info
+++ b/modules/path/path.info
@@ -6,8 +6,8 @@ core = 7.x
 files[] = path.test
 configure = admin/config/search/path
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/path/path.module b/modules/path/path.module
index 1bb06f42b29411e93268a7165800634c0d2acad7..81c7bb2c59cb41ceef6a1bd0d248beefeef2946d 100644
--- a/modules/path/path.module
+++ b/modules/path/path.module
@@ -137,8 +137,6 @@ function path_form_node_form_alter(&$form, $form_state) {
     '#title' => t('URL alias'),
     '#default_value' => $path['alias'],
     '#maxlength' => 255,
-    '#collapsible' => TRUE,
-    '#collapsed' => TRUE,
     '#description' => t('Optionally specify an alternative URL by which this content can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.'),
   );
   $form['path']['pid'] = array('#type' => 'value', '#value' => $path['pid']);
diff --git a/modules/php/php.info b/modules/php/php.info
index ce6cde508320d397d6f7c71323a4d366477d2955..5409ab1080a2d0d0a5692edb8f521b4bdbc49a51 100644
--- a/modules/php/php.info
+++ b/modules/php/php.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 files[] = php.test
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/poll/poll-results.tpl.php b/modules/poll/poll-results.tpl.php
index 5e14dec21e420dcb793265cbedbeed8c1f1c05f4..678bc2b125c4c0aa15bd4d50bcca4121d37524e4 100644
--- a/modules/poll/poll-results.tpl.php
+++ b/modules/poll/poll-results.tpl.php
@@ -15,6 +15,8 @@
  * - $vote: The choice number of the current user's vote.
  *
  * @see template_preprocess_poll_results()
+ *
+ * @ingroup themeable
  */
 ?>
 <div class="poll">
diff --git a/modules/poll/poll-vote.tpl.php b/modules/poll/poll-vote.tpl.php
index 068ff7c05352210aea674e53d60b96e14f82c151..699a26d427fd55f99c808be27f6ca61eb5561d41 100644
--- a/modules/poll/poll-vote.tpl.php
+++ b/modules/poll/poll-vote.tpl.php
@@ -12,6 +12,8 @@
  *   form_alter hooks.
  *
  * @see template_preprocess_poll_vote()
+ *
+ * @ingroup themeable
  */
 ?>
 <div class="poll">
diff --git a/modules/poll/poll.info b/modules/poll/poll.info
index 908327fa93baa7143fa0796e1541736d18940587..2c1536ce7bc3a9afe4dc9330e00fda97fccdcf54 100644
--- a/modules/poll/poll.info
+++ b/modules/poll/poll.info
@@ -6,8 +6,8 @@ core = 7.x
 files[] = poll.test
 stylesheets[all][] = poll.css
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/poll/poll.module b/modules/poll/poll.module
index 6cea886481d93aa79cb67a3dd3424c0453adb290..70eb65dce8f7e2ba648d9758bfa6cfcce933868a 100644
--- a/modules/poll/poll.module
+++ b/modules/poll/poll.module
@@ -817,7 +817,7 @@ function poll_view_results($node, $view_mode, $block = FALSE) {
   // Make sure that choices are ordered by their weight.
   uasort($node->choice, 'drupal_sort_weight');
 
-  // Count the votes and find the maximum
+  // Count the votes and find the maximum.
   $total_votes = 0;
   $max_votes = 0;
   foreach ($node->choice as $choice) {
diff --git a/modules/poll/poll.test b/modules/poll/poll.test
index 9982222c82b4b2bc1fe88479b9c51e2ce706f6fc..35eea2237268166007d850b69656016ed9c37189 100644
--- a/modules/poll/poll.test
+++ b/modules/poll/poll.test
@@ -64,7 +64,7 @@ class PollTestCase extends DrupalWebTestCase {
     $this->drupalPost(NULL, $edit, t('Save'));
     $node = $this->drupalGetNodeByTitle($title);
     $this->assertText(t('@type @title has been created.', array('@type' => node_type_get_name('poll'), '@title' => $title)), 'Poll has been created.');
-    $this->assertTrue($node->nid, t('Poll has been found in the database.'));
+    $this->assertTrue($node->nid, 'Poll has been found in the database.');
 
     return isset($node->nid) ? $node->nid : FALSE;
   }
@@ -137,7 +137,7 @@ class PollTestCase extends DrupalWebTestCase {
         // The expected weight of each choice is higher than the previous one.
         $weight++;
         // Directly assert the weight form element value for this choice.
-        $this->assertFieldByName('choice[chid:' . $id . '][weight]', $weight, t('Found choice @id with weight @weight.', array(
+        $this->assertFieldByName('choice[chid:' . $id . '][weight]', $weight, format_string('Found choice @id with weight @weight.', array(
           '@id' => $id,
           '@weight' => $weight,
         )));
@@ -167,7 +167,7 @@ class PollTestCase extends DrupalWebTestCase {
       $expected_order = $expected;
       foreach ($elements as $element) {
         $next_label = array_shift($expected_order);
-        $this->assertEqual((string) $element, $next_label, t('Found choice @label in preview.', array(
+        $this->assertEqual((string) $element, $next_label, format_string('Found choice @label in preview.', array(
           '@label' => $next_label,
         )));
       }
@@ -232,7 +232,7 @@ class PollCreateTestCase extends PollTestCase {
     $this->assertEqual(end($option), $new_option, 'Last item is equal to new option.');
 
     $votes = $this->xpath('//div[@id="node-1"]//div[@class="poll"]//div[@class="percent"]');
-    $this->assertTrue(strpos(end($votes), $vote_count) > 0, t("Votes saved."));
+    $this->assertTrue(strpos(end($votes), $vote_count) > 0, "Votes saved.");
   }
 
   function testPollClose() {
@@ -254,7 +254,7 @@ class PollCreateTestCase extends PollTestCase {
     // Verify 'Vote' button no longer appears.
     $this->drupalGet('node/' . $poll_nid);
     $elements = $this->xpath('//input[@id="edit-vote"]');
-    $this->assertTrue(empty($elements), t("Vote button doesn't appear."));
+    $this->assertTrue(empty($elements), "Vote button doesn't appear.");
 
     // Verify status on 'poll' page is 'closed'.
     $this->drupalGet('poll');
@@ -272,7 +272,7 @@ class PollCreateTestCase extends PollTestCase {
     $this->drupalPost('node/' . $poll_nid, $vote_edit, t('Vote'));
     $this->assertText('Your vote was recorded.', 'Your vote was recorded.');
     $elements = $this->xpath('//input[@value="Cancel your vote"]');
-    $this->assertTrue(isset($elements[0]), t("'Cancel your vote' button appears."));
+    $this->assertTrue(isset($elements[0]), "'Cancel your vote' button appears.");
 
     // Edit the poll node and close the poll.
     $this->drupalLogout();
@@ -283,7 +283,7 @@ class PollCreateTestCase extends PollTestCase {
     // Verify 'Cancel your vote' button no longer appears.
     $this->drupalGet('node/' . $poll_nid);
     $elements = $this->xpath('//input[@value="Cancel your vote"]');
-    $this->assertTrue(empty($elements), t("'Cancel your vote' button no longer appears."));
+    $this->assertTrue(empty($elements), "'Cancel your vote' button no longer appears.");
   }
 }
 
@@ -323,7 +323,7 @@ class PollVoteTestCase extends PollTestCase {
     $this->assertText('Your vote was recorded.', 'Your vote was recorded.');
     $this->assertText('Total votes: 1', 'Vote count updated correctly.');
     $elements = $this->xpath('//input[@value="Cancel your vote"]');
-    $this->assertTrue(isset($elements[0]), t("'Cancel your vote' button appears."));
+    $this->assertTrue(isset($elements[0]), "'Cancel your vote' button appears.");
 
     $this->drupalGet("node/$poll_nid/votes");
     $this->assertText(t('This table lists all the recorded votes for this poll. If anonymous users are allowed to vote, they will be identified by the IP address of the computer they used when they voted.'), 'Vote table text.');
@@ -359,7 +359,7 @@ class PollVoteTestCase extends PollTestCase {
     $this->assertText('Your vote was recorded.', 'Your vote was recorded.');
     $this->assertText('Total votes: 1', 'Vote count updated correctly.');
     $elements = $this->xpath('//input[@value="Cancel your vote"]');
-    $this->assertTrue(empty($elements), t("'Cancel your vote' button does not appear."));
+    $this->assertTrue(empty($elements), "'Cancel your vote' button does not appear.");
   }
 }
 
@@ -383,13 +383,13 @@ class PollBlockTestCase extends PollTestCase {
   function testRecentBlock() {
     // Set block title to confirm that the interface is available.
     $this->drupalPost('admin/structure/block/manage/poll/recent/configure', array('title' => $this->randomName(8)), t('Save block'));
-    $this->assertText(t('The block configuration has been saved.'), t('Block configuration set.'));
+    $this->assertText(t('The block configuration has been saved.'), 'Block configuration set.');
 
     // Set the block to a region to confirm block is available.
     $edit = array();
     $edit['blocks[poll_recent][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.'));
+    $this->assertText(t('The block settings have been updated.'), 'Block successfully move to footer region.');
 
     // Create a poll which should appear in recent polls block.
     $title = $this->randomName();
@@ -465,9 +465,9 @@ class PollJSAddChoice extends DrupalWebTestCase {
     $commands = $this->drupalPostAJAX(NULL, $edit, array('op' => t('More choices')));
     $this->content = $commands[1]['data'];
 
-    $this->assertFieldByName('choice[chid:0][chtext]', $edit['choice[new:0][chtext]'], t('Field !i found', array('!i' => 0)));
-    $this->assertFieldByName('choice[chid:1][chtext]', $edit['choice[new:1][chtext]'], t('Field !i found', array('!i' => 1)));
-    $this->assertFieldByName('choice[new:0][chtext]', '', t('Field !i found', array('!i' => 2)));
+    $this->assertFieldByName('choice[chid:0][chtext]', $edit['choice[new:0][chtext]'], format_string('Field !i found', array('!i' => 0)));
+    $this->assertFieldByName('choice[chid:1][chtext]', $edit['choice[new:1][chtext]'], format_string('Field !i found', array('!i' => 1)));
+    $this->assertFieldByName('choice[new:0][chtext]', '', format_string('Field !i found', array('!i' => 2)));
   }
 }
 
@@ -524,49 +524,49 @@ class PollVoteCheckHostname extends PollTestCase {
 
     // User1 vote on Poll.
     $this->drupalPost('node/' . $this->poll_nid, $edit, t('Vote'));
-    $this->assertText(t('Your vote was recorded.'), t('%user vote was recorded.', array('%user' => $this->web_user1->name)));
-    $this->assertText(t('Total votes: @votes', array('@votes' => 1)), t('Vote count updated correctly.'));
+    $this->assertText(t('Your vote was recorded.'), format_string('%user vote was recorded.', array('%user' => $this->web_user1->name)));
+    $this->assertText(t('Total votes: @votes', array('@votes' => 1)), 'Vote count updated correctly.');
 
     // Check to make sure User1 cannot vote again.
     $this->drupalGet('node/' . $this->poll_nid);
     $elements = $this->xpath('//input[@value="Vote"]');
-    $this->assertTrue(empty($elements), t("%user is not able to vote again.", array('%user' => $this->web_user1->name)));
+    $this->assertTrue(empty($elements), format_string("%user is not able to vote again.", array('%user' => $this->web_user1->name)));
     $elements = $this->xpath('//input[@value="Cancel your vote"]');
-    $this->assertTrue(!empty($elements), t("'Cancel your vote' button appears."));
+    $this->assertTrue(!empty($elements), "'Cancel your vote' button appears.");
 
     // Logout User1.
     $this->drupalLogout();
 
     // Fill the page cache by requesting the poll.
     $this->drupalGet('node/' . $this->poll_nid);
-    $this->assertEqual($this->drupalGetHeader('x-drupal-cache'), 'MISS', t('Page was cacheable but was not in the cache.'));
+    $this->assertEqual($this->drupalGetHeader('x-drupal-cache'), 'MISS', 'Page was cacheable but was not in the cache.');
     $this->drupalGet('node/' . $this->poll_nid);
-    $this->assertEqual($this->drupalGetHeader('x-drupal-cache'), 'HIT', t('Page was cached.'));
+    $this->assertEqual($this->drupalGetHeader('x-drupal-cache'), 'HIT', 'Page was cached.');
 
     // Anonymous user vote on Poll.
     $this->drupalPost(NULL, $edit, t('Vote'));
-    $this->assertText(t('Your vote was recorded.'), t('Anonymous vote was recorded.'));
-    $this->assertText(t('Total votes: @votes', array('@votes' => 2)), t('Vote count updated correctly.'));
+    $this->assertText(t('Your vote was recorded.'), 'Anonymous vote was recorded.');
+    $this->assertText(t('Total votes: @votes', array('@votes' => 2)), 'Vote count updated correctly.');
     $elements = $this->xpath('//input[@value="Cancel your vote"]');
-    $this->assertTrue(!empty($elements), t("'Cancel your vote' button appears."));
+    $this->assertTrue(!empty($elements), "'Cancel your vote' button appears.");
 
     // Check to make sure Anonymous user cannot vote again.
     $this->drupalGet('node/' . $this->poll_nid);
-    $this->assertFalse($this->drupalGetHeader('x-drupal-cache'), t('Page was not cacheable.'));
+    $this->assertFalse($this->drupalGetHeader('x-drupal-cache'), 'Page was not cacheable.');
     $elements = $this->xpath('//input[@value="Vote"]');
-    $this->assertTrue(empty($elements), t("Anonymous is not able to vote again."));
+    $this->assertTrue(empty($elements), "Anonymous is not able to vote again.");
     $elements = $this->xpath('//input[@value="Cancel your vote"]');
-    $this->assertTrue(!empty($elements), t("'Cancel your vote' button appears."));
+    $this->assertTrue(!empty($elements), "'Cancel your vote' button appears.");
 
     // Login User2.
     $this->drupalLogin($this->web_user2);
 
     // User2 vote on poll.
     $this->drupalPost('node/' . $this->poll_nid, $edit, t('Vote'));
-    $this->assertText(t('Your vote was recorded.'), t('%user vote was recorded.', array('%user' => $this->web_user2->name)));
+    $this->assertText(t('Your vote was recorded.'), format_string('%user vote was recorded.', array('%user' => $this->web_user2->name)));
     $this->assertText(t('Total votes: @votes', array('@votes' => 3)), 'Vote count updated correctly.');
     $elements = $this->xpath('//input[@value="Cancel your vote"]');
-    $this->assertTrue(empty($elements), t("'Cancel your vote' button does not appear."));
+    $this->assertTrue(empty($elements), "'Cancel your vote' button does not appear.");
 
     // Logout User2.
     $this->drupalLogout();
@@ -582,22 +582,22 @@ class PollVoteCheckHostname extends PollTestCase {
     // Check to make sure Anonymous user can vote again with a new session after
     // a hostname change.
     $this->drupalGet('node/' . $this->poll_nid);
-    $this->assertEqual($this->drupalGetHeader('x-drupal-cache'), 'MISS', t('Page was cacheable but was not in the cache.'));
+    $this->assertEqual($this->drupalGetHeader('x-drupal-cache'), 'MISS', 'Page was cacheable but was not in the cache.');
     $this->drupalPost(NULL, $edit, t('Vote'));
-    $this->assertText(t('Your vote was recorded.'), t('%user vote was recorded.', array('%user' => $this->web_user2->name)));
+    $this->assertText(t('Your vote was recorded.'), format_string('%user vote was recorded.', array('%user' => $this->web_user2->name)));
     $this->assertText(t('Total votes: @votes', array('@votes' => 4)), 'Vote count updated correctly.');
     $elements = $this->xpath('//input[@value="Cancel your vote"]');
-    $this->assertTrue(!empty($elements), t("'Cancel your vote' button appears."));
+    $this->assertTrue(!empty($elements), "'Cancel your vote' button appears.");
 
     // Check to make sure Anonymous user cannot vote again with a new session,
     // and that the vote from the previous session cannot be cancelledd.
     $this->curlClose();
     $this->drupalGet('node/' . $this->poll_nid);
-    $this->assertEqual($this->drupalGetHeader('x-drupal-cache'), 'MISS', t('Page was cacheable but was not in the cache.'));
+    $this->assertEqual($this->drupalGetHeader('x-drupal-cache'), 'MISS', 'Page was cacheable but was not in the cache.');
     $elements = $this->xpath('//input[@value="Vote"]');
-    $this->assertTrue(empty($elements), t('Anonymous is not able to vote again.'));
+    $this->assertTrue(empty($elements), 'Anonymous is not able to vote again.');
     $elements = $this->xpath('//input[@value="Cancel your vote"]');
-    $this->assertTrue(empty($elements), t("'Cancel your vote' button does not appear."));
+    $this->assertTrue(empty($elements), "'Cancel your vote' button does not appear.");
 
     // Login User1.
     $this->drupalLogin($this->web_user1);
@@ -605,9 +605,9 @@ class PollVoteCheckHostname extends PollTestCase {
     // Check to make sure User1 still cannot vote even after hostname changed.
     $this->drupalGet('node/' . $this->poll_nid);
     $elements = $this->xpath('//input[@value="Vote"]');
-    $this->assertTrue(empty($elements), t("%user is not able to vote again.", array('%user' => $this->web_user1->name)));
+    $this->assertTrue(empty($elements), format_string("%user is not able to vote again.", array('%user' => $this->web_user1->name)));
     $elements = $this->xpath('//input[@value="Cancel your vote"]');
-    $this->assertTrue(!empty($elements), t("'Cancel your vote' button appears."));
+    $this->assertTrue(!empty($elements), "'Cancel your vote' button appears.");
   }
 }
 
@@ -683,11 +683,11 @@ class PollTokenReplaceTestCase extends PollTestCase {
     $tests['[node:poll-duration]'] = format_interval($poll->runtime, 1, $language->language);
 
     // Test to make sure that we generated something for each token.
-    $this->assertFalse(in_array(0, array_map('strlen', $tests)), t('No empty tokens generated.'));
+    $this->assertFalse(in_array(0, array_map('strlen', $tests)), 'No empty tokens generated.');
 
     foreach ($tests as $input => $expected) {
       $output = token_replace($input, array('node' => $poll), array('language' => $language));
-      $this->assertEqual($output, $expected, t('Sanitized poll token %token replaced.', array('%token' => $input)));
+      $this->assertEqual($output, $expected, format_string('Sanitized poll token %token replaced.', array('%token' => $input)));
     }
 
     // Generate and test unsanitized tokens.
@@ -695,7 +695,7 @@ class PollTokenReplaceTestCase extends PollTestCase {
 
     foreach ($tests as $input => $expected) {
       $output = token_replace($input, array('node' => $poll), array('language' => $language, 'sanitize' => FALSE));
-      $this->assertEqual($output, $expected, t('Unsanitized poll token %token replaced.', array('%token' => $input)));
+      $this->assertEqual($output, $expected, format_string('Unsanitized poll token %token replaced.', array('%token' => $input)));
     }
   }
 }
@@ -718,33 +718,33 @@ class PollExpirationTestCase extends PollTestCase {
     $title = $this->randomName();
     $choices = $this->_generateChoices(2);
     $poll_nid = $this->pollCreate($title, $choices, FALSE);
-    $this->assertTrue($poll_nid, t('Poll for auto-expire test created.'));
+    $this->assertTrue($poll_nid, 'Poll for auto-expire test created.');
 
     // Visit the poll edit page and verify that by default, expiration
     // is set to unlimited.
     $this->drupalGet("node/$poll_nid/edit");
-    $this->assertField('runtime', t('Poll expiration setting found.'));
+    $this->assertField('runtime', 'Poll expiration setting found.');
     $elements = $this->xpath('//select[@id="edit-runtime"]/option[@selected="selected"]');
-    $this->assertTrue(isset($elements[0]['value']) && $elements[0]['value'] == 0, t('Poll expiration set to unlimited.'));
+    $this->assertTrue(isset($elements[0]['value']) && $elements[0]['value'] == 0, 'Poll expiration set to unlimited.');
 
     // Set the expiration to one week.
     $edit = array();
     $poll_expiration = 604800; // One week.
     $edit['runtime'] = $poll_expiration;
     $this->drupalPost(NULL, $edit, t('Save'));
-    $this->assertRaw(t('Poll %title has been updated.', array('%title' => $title)), t('Poll expiration settings saved.'));
+    $this->assertRaw(t('Poll %title has been updated.', array('%title' => $title)), 'Poll expiration settings saved.');
 
     // Make sure that the changed expiration settings is kept.
     $this->drupalGet("node/$poll_nid/edit");
     $elements = $this->xpath('//select[@id="edit-runtime"]/option[@selected="selected"]');
-    $this->assertTrue(isset($elements[0]['value']) && $elements[0]['value'] == $poll_expiration, t('Poll expiration set to unlimited.'));
+    $this->assertTrue(isset($elements[0]['value']) && $elements[0]['value'] == $poll_expiration, 'Poll expiration set to unlimited.');
 
     // Force a cron run. Since the expiration date has not yet been reached,
     // the poll should remain active.
     drupal_cron_run();
     $this->drupalGet("node/$poll_nid/edit");
     $elements = $this->xpath('//input[@id="edit-active-1"]');
-    $this->assertTrue(isset($elements[0]) && !empty($elements[0]['checked']), t('Poll is still active.'));
+    $this->assertTrue(isset($elements[0]) && !empty($elements[0]['checked']), 'Poll is still active.');
 
     // Test expiration. Since REQUEST_TIME is a constant and we don't
     // want to keep SimpleTest waiting until the moment of expiration arrives,
@@ -759,7 +759,7 @@ class PollExpirationTestCase extends PollTestCase {
     drupal_cron_run();
     $this->drupalGet("node/$poll_nid/edit");
     $elements = $this->xpath('//input[@id="edit-active-0"]');
-    $this->assertTrue(isset($elements[0]) && !empty($elements[0]['checked']), t('Poll has expired.'));
+    $this->assertTrue(isset($elements[0]) && !empty($elements[0]['checked']), 'Poll has expired.');
   }
 }
 
@@ -781,7 +781,7 @@ class PollDeleteChoiceTestCase extends PollTestCase {
     $title = $this->randomName();
     $choices = array('First choice', 'Second choice', 'Third choice');
     $poll_nid = $this->pollCreate($title, $choices, FALSE);
-    $this->assertTrue($poll_nid, t('Poll for choice deletion logic test created.'));
+    $this->assertTrue($poll_nid, 'Poll for choice deletion logic test created.');
 
     // Edit the poll, and try to delete first poll choice.
     $this->drupalGet("node/$poll_nid/edit");
@@ -793,9 +793,9 @@ class PollDeleteChoiceTestCase extends PollTestCase {
     $this->clickLink($title);
 
     // Check the first poll choice is deleted, while the others remain.
-    $this->assertNoText('First choice', t('First choice removed.'));
-    $this->assertText('Second choice', t('Second choice remains.'));
-    $this->assertText('Third choice', t('Third choice remains.'));
+    $this->assertNoText('First choice', 'First choice removed.');
+    $this->assertText('Second choice', 'Second choice remains.');
+    $this->assertText('Third choice', 'Third choice remains.');
   }
 }
 
@@ -828,7 +828,7 @@ class PollTranslateTestCase extends PollTestCase {
     $title = $this->randomName();
     $choices = array($this->randomName(), $this->randomName());
     $poll_nid = $this->pollCreate($title, $choices, FALSE);
-    $this->assertTrue($poll_nid, t('Poll for translation logic test created.'));
+    $this->assertTrue($poll_nid, 'Poll for translation logic test created.');
 
     $this->drupalLogout();
     $this->drupalLogin($admin_user);
@@ -838,14 +838,14 @@ class PollTranslateTestCase extends PollTestCase {
     $edit = array();
     $edit['langcode'] = 'nl';
     $this->drupalPost('admin/config/regional/language/add', $edit, t('Add language'));
-    $this->assertRaw(t('The language %language has been created and can now be used.', array('%language' => 'Dutch')), t('Language Dutch has been created.'));
+    $this->assertRaw(t('The language %language has been created and can now be used.', array('%language' => 'Dutch')), 'Language Dutch has been created.');
 
     // Set "Poll" content type to use multilingual support with translation.
     $this->drupalGet('admin/structure/types/manage/poll');
     $edit = array();
     $edit['language_content_type'] = 2;
     $this->drupalPost('admin/structure/types/manage/poll', $edit, t('Save content type'));
-    $this->assertRaw(t('The content type %type has been updated.', array('%type' => 'Poll')), t('Poll content type has been updated.'));
+    $this->assertRaw(t('The content type %type has been updated.', array('%type' => 'Poll')), 'Poll content type has been updated.');
 
     // Edit poll.
     $this->drupalGet("node/$poll_nid/edit");
@@ -866,7 +866,7 @@ class PollTranslateTestCase extends PollTestCase {
     $this->assertFieldByName('choice[chid:1][chvotes]', '0', ('Found choice with vote count 0'));
     $this->assertFieldByName('choice[chid:2][chvotes]', '0', ('Found choice with vote count 0'));
     // Check that the choice names got copied from the Dutch poll.
-    $this->assertFieldByName('choice[chid:1][chtext]', $dutch_poll->choice[1]['chtext'], t('Found choice with text @text', array('@text' => $dutch_poll->choice[1]['chtext'])));
-    $this->assertFieldByName('choice[chid:2][chtext]', $dutch_poll->choice[2]['chtext'], t('Found choice with text @text', array('@text' => $dutch_poll->choice[2]['chtext'])));
+    $this->assertFieldByName('choice[chid:1][chtext]', $dutch_poll->choice[1]['chtext'], format_string('Found choice with text @text', array('@text' => $dutch_poll->choice[1]['chtext'])));
+    $this->assertFieldByName('choice[chid:2][chtext]', $dutch_poll->choice[2]['chtext'], format_string('Found choice with text @text', array('@text' => $dutch_poll->choice[2]['chtext'])));
   }
 }
diff --git a/modules/profile/profile-wrapper.tpl.php b/modules/profile/profile-wrapper.tpl.php
index 997ab9860179e7e5dea1dd715928eef4955e24d7..3940ba02e97e46a0229bf5a8181294cfdfdc6a89 100644
--- a/modules/profile/profile-wrapper.tpl.php
+++ b/modules/profile/profile-wrapper.tpl.php
@@ -6,7 +6,7 @@
  * profiles.
  *
  * This template is used when viewing a list of users. It can be a general
- * list for viewing all users with the url of "example.com/profile" or when
+ * list for viewing all users with the URL of "example.com/profile" or when
  * viewing a set of users who share a specific value for a profile such
  * as "example.com/profile/country/belgium".
  *
diff --git a/modules/profile/profile.info b/modules/profile/profile.info
index 552eac6ec0e4f6405f7c6bb405fc9eae65a1768a..051ad84be1e715f11768243eed56b9ca2cd12206 100644
--- a/modules/profile/profile.info
+++ b/modules/profile/profile.info
@@ -11,8 +11,8 @@ configure = admin/config/people/profile
 ; See user_system_info_alter().
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/profile/profile.module b/modules/profile/profile.module
index 6b00d4296ae4471142f79dbf00d1d6a7c151557f..d76d08ac65f8de42e93ed412561958c4d727cf80 100644
--- a/modules/profile/profile.module
+++ b/modules/profile/profile.module
@@ -229,7 +229,7 @@ function profile_user_insert(&$edit, $account, $category) {
 /**
  * Implements hook_user_cancel().
  */
-function profile_user_cancel(&$edit, $account, $method) {
+function profile_user_cancel($edit, $account, $method) {
   switch ($method) {
     case 'user_cancel_reassign':
       db_delete('profile_value')
diff --git a/modules/rdf/rdf.info b/modules/rdf/rdf.info
index 81e2a176b2516e57231a6c494df7ef820ecb8d50..6b0e523dd2b17c4d43479e105aa854b49d99897f 100644
--- a/modules/rdf/rdf.info
+++ b/modules/rdf/rdf.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 files[] = rdf.test
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/rdf/rdf.test b/modules/rdf/rdf.test
index 9f786ab5b50a3cf1b3f297899c79aa50f2d53762..b8aeb90a1312be0e533aabc0f77d944f056dbe7d 100644
--- a/modules/rdf/rdf.test
+++ b/modules/rdf/rdf.test
@@ -159,7 +159,7 @@ class RdfRdfaMarkupTestCase extends DrupalWebTestCase {
     $image = current($this->drupalGetTestFiles('image'));
 
     // Create an array for drupalPost with the field names as the keys and
-    // the uris for the test files as the values.
+    // the URIs for the test files as the values.
     $edit = array("files[" . $field_name . "_" . $langcode . "_0]" => drupal_realpath($file->uri),
                   "files[" . $image_field . "_" . $langcode . "_0]" => drupal_realpath($image->uri));
 
diff --git a/modules/rdf/tests/rdf_test.info b/modules/rdf/tests/rdf_test.info
index dbe56097a6ea347feaa7e461301da22ffa1f2543..0dbbce8bf06eb1701bec37f558fd7860c622bd84 100644
--- a/modules/rdf/tests/rdf_test.info
+++ b/modules/rdf/tests/rdf_test.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/search/search-result.tpl.php b/modules/search/search-result.tpl.php
index 949452ac34cb53cfd3127c06e023cd9e3af59aac..47e89ef8ed24e10a3141a923ace5167c12c92102 100644
--- a/modules/search/search-result.tpl.php
+++ b/modules/search/search-result.tpl.php
@@ -60,6 +60,8 @@
  * @see template_preprocess()
  * @see template_preprocess_search_result()
  * @see template_process()
+ *
+ * @ingroup themeable
  */
 ?>
 <li class="<?php print $classes; ?>"<?php print $attributes; ?>>
diff --git a/modules/search/search-results.tpl.php b/modules/search/search-results.tpl.php
index e35be1edcfaaeffad733a0449de8ba79b0efb8b2..aa9bf8d4de298da5751834ed56ecce49415d5242 100644
--- a/modules/search/search-results.tpl.php
+++ b/modules/search/search-results.tpl.php
@@ -19,6 +19,8 @@
  *
  *
  * @see template_preprocess_search_results()
+ *
+ * @ingroup themeable
  */
 ?>
 <?php if ($search_results): ?>
diff --git a/modules/search/search.info b/modules/search/search.info
index e8cd028dcdc3c4d1f070d3a3a7a7d905f31eb099..25271b996344b958fa729f9dae519e9fd4829d6c 100644
--- a/modules/search/search.info
+++ b/modules/search/search.info
@@ -8,8 +8,8 @@ files[] = search.test
 configure = admin/config/search/settings
 stylesheets[all][] = search.css
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/search/search.pages.inc b/modules/search/search.pages.inc
index 833ea8bccd5373f1f35400108c328d15f36bc463..b74847303bae31392b553a735aa36f40f99d0d93 100644
--- a/modules/search/search.pages.inc
+++ b/modules/search/search.pages.inc
@@ -156,5 +156,4 @@ function search_form_submit($form, &$form_state) {
   }
 
   $form_state['redirect'] = $form_state['action'] . '/' . $keys;
-  return;
 }
diff --git a/modules/search/tests/search_embedded_form.info b/modules/search/tests/search_embedded_form.info
index 489d941a882d1a2ff07cb9e8c23a4d668da93535..2c48e471ee98ca44c0d8fdfe40bd3c0b62adbc06 100644
--- a/modules/search/tests/search_embedded_form.info
+++ b/modules/search/tests/search_embedded_form.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/search/tests/search_extra_type.info b/modules/search/tests/search_extra_type.info
index 60b415680569e7a417b4dae9e1ff7775b453bc43..208fb6d31ed38553cb18bde37207c677ba07d470 100644
--- a/modules/search/tests/search_extra_type.info
+++ b/modules/search/tests/search_extra_type.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/shortcut/shortcut.admin.inc b/modules/shortcut/shortcut.admin.inc
index 91ce7c8373b482f1572cb8e3d5e5794c7040d98d..c592a318563295d41b931c88d669eb542dea5ee7 100644
--- a/modules/shortcut/shortcut.admin.inc
+++ b/modules/shortcut/shortcut.admin.inc
@@ -471,7 +471,7 @@ function _shortcut_link_form_elements($shortcut_link = NULL) {
     );
   }
   else {
-    $shortcut_link['link_path'] = drupal_get_path_alias($shortcut_link['link_path']);
+    $shortcut_link['link_path'] = ($shortcut_link['link_path'] == '<front>') ? '' : drupal_get_path_alias($shortcut_link['link_path']);
   }
 
   $form['shortcut_link']['#tree'] = TRUE;
@@ -520,7 +520,11 @@ function shortcut_link_edit_validate($form, &$form_state) {
  */
 function shortcut_link_edit_submit($form, &$form_state) {
   // Normalize the path in case it is an alias.
-  $form_state['values']['shortcut_link']['link_path'] = drupal_get_normal_path($form_state['values']['shortcut_link']['link_path']);
+  $shortcut_path = drupal_get_normal_path($form_state['values']['shortcut_link']['link_path']);
+  if (empty($shortcut_path)) {
+    $shortcut_path = '<front>';
+  }
+  $form_state['values']['shortcut_link']['link_path'] = $shortcut_path;
 
   $shortcut_link = array_merge($form_state['values']['original_shortcut_link'], $form_state['values']['shortcut_link']);
 
@@ -577,6 +581,9 @@ function shortcut_admin_add_link($shortcut_link, &$shortcut_set, $limit = NULL)
 
   // Normalize the path in case it is an alias.
   $shortcut_link['link_path'] = drupal_get_normal_path($shortcut_link['link_path']);
+  if (empty($shortcut_link['link_path'])) {
+    $shortcut_link['link_path'] = '<front>';
+  }
 
   // Add the link to the end of the list.
   $shortcut_set->links[] = $shortcut_link;
diff --git a/modules/shortcut/shortcut.admin.js b/modules/shortcut/shortcut.admin.js
index 5554e5a7c37f6ef980beec0070f2de13065bdc83..422cc4ce306455a256544e4869b6b644cc1853b4 100644
--- a/modules/shortcut/shortcut.admin.js
+++ b/modules/shortcut/shortcut.admin.js
@@ -50,7 +50,7 @@ Drupal.behaviors.shortcutDrag = {
             // the tableDrag system. However, the row that swapped with it
             // has moved to the "disabled" section, so we need to force its
             // status to be disabled and mark it also as changed.
-            var changedRowObject = new tableDrag.row(changedRow, 'mouse', self.indentEnabled, self.maxDepth, true);
+            var changedRowObject = new tableDrag.row(changedRow, 'mouse', false, 0, true);
             changedRowObject.markChanged();
             tableDrag.rowStatusChange(changedRowObject);
           }
diff --git a/modules/shortcut/shortcut.info b/modules/shortcut/shortcut.info
index 15526702decc341d3ec1f441faf0ff6b25418835..cc741e188f0e611b98ea5290936f1b1be0188a7a 100644
--- a/modules/shortcut/shortcut.info
+++ b/modules/shortcut/shortcut.info
@@ -6,8 +6,8 @@ core = 7.x
 files[] = shortcut.test
 configure = admin/config/user-interface/shortcut
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/shortcut/shortcut.module b/modules/shortcut/shortcut.module
index 4c67a141635110313717d3a374b96372db85fda4..2f6db0ad35cfad9533825b02813f5d7322f57764 100644
--- a/modules/shortcut/shortcut.module
+++ b/modules/shortcut/shortcut.module
@@ -86,7 +86,7 @@ function shortcut_menu() {
     'title' => 'Edit shortcuts',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('shortcut_set_customize', 4),
-    'title callback' => 'shortcut_set_title',
+    'title callback' => 'shortcut_set_title_callback',
     'title arguments' => array(4),
     'access callback' => 'shortcut_set_edit_access',
     'access arguments' => array(4),
@@ -617,8 +617,8 @@ function shortcut_valid_link($path) {
   if ($path != $normal_path) {
     $path = $normal_path;
   }
-  // Only accept links that correspond to valid paths on the site itself.
-  return !url_is_external($path) && menu_get_item($path);
+  // An empty path is valid too and will be converted to <front>.
+  return (!url_is_external($path) && menu_get_item($path)) || empty($path) || $path == '<front>';
 }
 
 /**
@@ -735,9 +735,15 @@ function shortcut_toolbar_pre_render($toolbar) {
 }
 
 /**
- * Returns the title of a shortcut set.
+ * Returns the sanitized title of a shortcut set.
  *
- * Title callback for the editing pages for shortcut sets.
+ * Deprecated. This function was previously used as a menu item title callback
+ * but has been replaced by shortcut_set_title_callback() (which does not
+ * sanitize the title, since the menu system does that automatically). In
+ * Drupal 7, use that function for title callbacks, and call check_plain()
+ * directly if you need a sanitized title. In Drupal 8, this function will be
+ * restored as a title callback and therefore will no longer sanitize its
+ * output.
  *
  * @param $shortcut_set
  *   An object representing the shortcut set, as returned by
@@ -747,3 +753,15 @@ function shortcut_set_title($shortcut_set) {
   return check_plain($shortcut_set->title);
 }
 
+/**
+ * Returns the title of a shortcut set.
+ *
+ * Title callback for the editing pages for shortcut sets.
+ *
+ * @param $shortcut_set
+ *   An object representing the shortcut set, as returned by
+ *   shortcut_set_load().
+ */
+function shortcut_set_title_callback($shortcut_set) {
+  return $shortcut_set->title;
+}
diff --git a/modules/shortcut/shortcut.test b/modules/shortcut/shortcut.test
index 322c63f1119b2e9fc2390440611514a039c787ee..801d58550036cad15b31930c5974bfce109d604c 100644
--- a/modules/shortcut/shortcut.test
+++ b/modules/shortcut/shortcut.test
@@ -124,6 +124,7 @@ class ShortcutLinksTestCase extends ShortcutTestCase {
 
     // Create some paths to test.
     $test_cases = array(
+      array('path' => ''),
       array('path' => 'admin'),
       array('path' => 'admin/config/system/site-information'),
       array('path' => "node/{$this->node->nid}/edit"),
@@ -141,7 +142,8 @@ class ShortcutLinksTestCase extends ShortcutTestCase {
       $this->assertResponse(200);
       $saved_set = shortcut_set_load($set->set_name);
       $paths = $this->getShortcutInformation($saved_set, 'link_path');
-      $this->assertTrue(in_array(drupal_get_normal_path($test['path']), $paths), 'Shortcut created: '. $test['path']);
+      $test_path = empty($test['path']) ? '<front>' : $test['path'];
+      $this->assertTrue(in_array(drupal_get_normal_path($test_path), $paths), 'Shortcut created: '. $test['path']);
       $this->assertLink($title, 0, 'Shortcut link found on the page.');
     }
   }
diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php
index d83dbeb6fe558807388a64188aedf680b85a9ca5..e3cab62a276609d15fe3ca987ecf466e46680ce9 100644
--- a/modules/simpletest/drupal_web_test_case.php
+++ b/modules/simpletest/drupal_web_test_case.php
@@ -632,7 +632,7 @@ abstract class DrupalTestCase {
    *   'one' => array(0, 1),
    *   'two' => array(2, 3),
    * );
-   * $permutations = $this->permute($parameters);
+   * $permutations = DrupalTestCase::generatePermutations($parameters)
    * // Result:
    * $permutations == array(
    *   array('one' => 0, 'two' => 2),
@@ -1685,13 +1685,20 @@ class DrupalWebTestCase extends DrupalTestCase {
 
     if (!isset($this->curlHandle)) {
       $this->curlHandle = curl_init();
+
+      // Some versions/configurations of cURL break on a NULL cookie jar, so
+      // supply a real file.
+      if (empty($this->cookieFile)) {
+        $this->cookieFile = $this->public_files_directory . '/cookie.jar';
+      }
+
       $curl_options = array(
         CURLOPT_COOKIEJAR => $this->cookieFile,
         CURLOPT_URL => $base_url,
         CURLOPT_FOLLOWLOCATION => FALSE,
         CURLOPT_RETURNTRANSFER => TRUE,
-        CURLOPT_SSL_VERIFYPEER => FALSE, // Required to make the tests run on https.
-        CURLOPT_SSL_VERIFYHOST => FALSE, // Required to make the tests run on https.
+        CURLOPT_SSL_VERIFYPEER => FALSE, // Required to make the tests run on HTTPS.
+        CURLOPT_SSL_VERIFYHOST => FALSE, // Required to make the tests run on HTTPS.
         CURLOPT_HEADERFUNCTION => array(&$this, 'curlHeaderCallback'),
         CURLOPT_USERAGENT => $this->databasePrefix,
       );
@@ -1699,7 +1706,12 @@ class DrupalWebTestCase extends DrupalTestCase {
         $curl_options[CURLOPT_HTTPAUTH] = $this->httpauth_method;
         $curl_options[CURLOPT_USERPWD] = $this->httpauth_credentials;
       }
-      curl_setopt_array($this->curlHandle, $this->additionalCurlOptions + $curl_options);
+      // curl_setopt_array() returns FALSE if any of the specified options
+      // cannot be set, and stops processing any further options.
+      $result = curl_setopt_array($this->curlHandle, $this->additionalCurlOptions + $curl_options);
+      if (!$result) {
+        throw new Exception('One or more cURL options could not be set.');
+      }
 
       // By default, the child session name should be the same as the parent.
       $this->session_name = session_name();
@@ -2337,9 +2349,16 @@ class DrupalWebTestCase extends DrupalTestCase {
       if (isset($edit[$name])) {
         switch ($type) {
           case 'text':
+          case 'tel':
           case 'textarea':
+          case 'url':
+          case 'number':
+          case 'range':
+          case 'color':
           case 'hidden':
           case 'password':
+          case 'email':
+          case 'search':
             $post[$name] = $edit[$name];
             unset($edit[$name]);
             break;
@@ -2686,10 +2705,10 @@ class DrupalWebTestCase extends DrupalTestCase {
   }
 
   /**
-   * Get the current url from the cURL handler.
+   * Get the current URL from the cURL handler.
    *
    * @return
-   *   The current url.
+   *   The current URL.
    */
   protected function getUrl() {
     return $this->url;
diff --git a/modules/simpletest/simpletest.api.php b/modules/simpletest/simpletest.api.php
index 04c080bfd544ba107180042d4f88378579d153ae..d262ad613775a246af476645d79906b44d17b800 100644
--- a/modules/simpletest/simpletest.api.php
+++ b/modules/simpletest/simpletest.api.php
@@ -20,7 +20,7 @@
  */
 function hook_simpletest_alter(&$groups) {
   // An alternative session handler module would not want to run the original
-  // Session https handling test because it checks the sessions table in the
+  // Session HTTPS handling test because it checks the sessions table in the
   // database.
   unset($groups['Session']['testHttpsSession']);
 }
diff --git a/modules/simpletest/simpletest.info b/modules/simpletest/simpletest.info
index 587715c2cb0ba71baca5590c916d5c48d5d9acd4..b9a77fc6cd86d630a5f0ca426d3ee22b030244d2 100644
--- a/modules/simpletest/simpletest.info
+++ b/modules/simpletest/simpletest.info
@@ -40,7 +40,6 @@ files[] = tests/update.test
 files[] = tests/xmlrpc.test
 files[] = tests/upgrade/upgrade.test
 files[] = tests/upgrade/upgrade.comment.test
-files[] = tests/upgrade/update.field.test
 files[] = tests/upgrade/upgrade.filter.test
 files[] = tests/upgrade/upgrade.forum.test
 files[] = tests/upgrade/upgrade.locale.test
@@ -49,13 +48,15 @@ files[] = tests/upgrade/upgrade.node.test
 files[] = tests/upgrade/upgrade.taxonomy.test
 files[] = tests/upgrade/upgrade.trigger.test
 files[] = tests/upgrade/upgrade.translatable.test
-files[] = tests/upgrade/update.trigger.test
 files[] = tests/upgrade/upgrade.upload.test
-files[] = tests/upgrade/update.user.test
 files[] = tests/upgrade/upgrade.user.test
+files[] = tests/upgrade/update.aggregator.test
+files[] = tests/upgrade/update.trigger.test
+files[] = tests/upgrade/update.field.test
+files[] = tests/upgrade/update.user.test
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/actions_loop_test.info b/modules/simpletest/tests/actions_loop_test.info
index 4606cb207577972e410b2fdae93ed3ada16b0b02..6efd837dd7960a442e31b359515acf18dda818be 100644
--- a/modules/simpletest/tests/actions_loop_test.info
+++ b/modules/simpletest/tests/actions_loop_test.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/ajax_forms_test.info b/modules/simpletest/tests/ajax_forms_test.info
index 8614055f68ad16df9385c7111d269d4f60d8b350..6b93949f83028f9f026b0890bf35247397ddb72a 100644
--- a/modules/simpletest/tests/ajax_forms_test.info
+++ b/modules/simpletest/tests/ajax_forms_test.info
@@ -5,8 +5,8 @@ package = Testing
 version = VERSION
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/ajax_forms_test.module b/modules/simpletest/tests/ajax_forms_test.module
index 6a95710a80ad9360b70546ff0230d2695cdb65d1..28404224e1d1db4fdbbb7b1a6e725a4f62776221 100644
--- a/modules/simpletest/tests/ajax_forms_test.module
+++ b/modules/simpletest/tests/ajax_forms_test.module
@@ -7,7 +7,6 @@
 
 /**
  * Implements hook_menu().
- * @return unknown_type
  */
 function ajax_forms_test_menu() {
   $items = array();
@@ -94,9 +93,6 @@ function ajax_forms_test_simple_form_checkbox_callback($form, $form_state) {
 
 /**
  * Form to display the Ajax Commands.
- * @param $form
- * @param $form_state
- * @return unknown_type
  */
 function ajax_forms_test_ajax_commands_form($form, &$form_state) {
   $form = array();
diff --git a/modules/simpletest/tests/ajax_test.info b/modules/simpletest/tests/ajax_test.info
index 275e608ddafb450402c41e251a249f6214f58e19..ef9b93f843bfa6bc83515221adc36ac4441ec4e1 100644
--- a/modules/simpletest/tests/ajax_test.info
+++ b/modules/simpletest/tests/ajax_test.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/batch_test.info b/modules/simpletest/tests/batch_test.info
index 7f9309775e6c657f76f14eb06ff7a493a8ea6a54..6ded129f4769e4370f7be4fd8cf671a28be18596 100644
--- a/modules/simpletest/tests/batch_test.info
+++ b/modules/simpletest/tests/batch_test.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test
index 437b67cd157165f94cdb68de27d88252a85c240f..e8e403330c49544bb70c0f61bf29d972fdfb2dd7 100644
--- a/modules/simpletest/tests/common.test
+++ b/modules/simpletest/tests/common.test
@@ -1847,14 +1847,14 @@ class DrupalRenderTestCase extends DrupalWebTestCase {
 class ValidUrlTestCase extends DrupalUnitTestCase {
   public static function getInfo() {
     return array(
-      'name' => 'Valid Url',
-      'description' => "Performs tests on Drupal's valid url function.",
+      'name' => 'Valid URL',
+      'description' => "Performs tests on Drupal's valid URL function.",
       'group' => 'System'
     );
   }
 
   /**
-   * Test valid absolute urls.
+   * Test valid absolute URLs.
    */
   function testValidAbsolute() {
     $url_schemes = array('http', 'https', 'ftp');
@@ -1889,7 +1889,7 @@ class ValidUrlTestCase extends DrupalUnitTestCase {
   }
 
   /**
-   * Test invalid absolute urls.
+   * Test invalid absolute URLs.
    */
   function testInvalidAbsolute() {
     $url_schemes = array('http', 'https', 'ftp');
@@ -1909,7 +1909,7 @@ class ValidUrlTestCase extends DrupalUnitTestCase {
   }
 
   /**
-   * Test valid relative urls.
+   * Test valid relative URLs.
    */
   function testValidRelative() {
     $valid_relative_urls = array(
@@ -1930,7 +1930,7 @@ class ValidUrlTestCase extends DrupalUnitTestCase {
   }
 
   /**
-   * Test invalid relative urls.
+   * Test invalid relative URLs.
    */
   function testInvalidRelative() {
     $invalid_relative_urls = array(
@@ -2540,12 +2540,12 @@ class DrupalAddFeedTestCase extends DrupalWebTestCase {
         'output_url' => url($path, array('absolute' => TRUE)),
         'title' => '',
       ),
-      'external url without title' => array(
+      'external URL without title' => array(
         'input_url' => $external_url,
         'output_url' => $external_url,
         'title' => '',
       ),
-      'local url without title' => array(
+      'local URL without title' => array(
         'input_url' => $fully_qualified_local_url,
         'output_url' => $fully_qualified_local_url,
         'title' => '',
@@ -2555,12 +2555,12 @@ class DrupalAddFeedTestCase extends DrupalWebTestCase {
         'output_url' => url($path_for_title, array('absolute' => TRUE)),
         'title' => $this->randomName(12),
       ),
-      'external url with title' => array(
+      'external URL with title' => array(
         'input_url' => $external_for_title,
         'output_url' => $external_for_title,
         'title' => $this->randomName(12),
       ),
-      'local url with title' => array(
+      'local URL with title' => array(
         'input_url' => $fully_qualified_for_title,
         'output_url' => $fully_qualified_for_title,
         'title' => $this->randomName(12),
@@ -2581,9 +2581,36 @@ class DrupalAddFeedTestCase extends DrupalWebTestCase {
    * Create a pattern representing the RSS feed in the page.
    */
   function urlToRSSLinkPattern($url, $title = '') {
-    // Escape any regular expression characters in the url ('?' is the worst).
+    // Escape any regular expression characters in the URL ('?' is the worst).
     $url = preg_replace('/([+?.*])/', '[$0]', $url);
     $generated_pattern = '%<link +rel="alternate" +type="application/rss.xml" +title="' . $title . '" +href="' . $url . '" */>%';
     return $generated_pattern;
   }
 }
+
+/**
+ * Test for theme_feed_icon().
+ */
+class FeedIconTest extends DrupalWebTestCase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Feed icon',
+      'description' => 'Check escaping of theme_feed_icon()',
+      'group' => 'System',
+    );
+  }
+
+  /**
+   * Check that special characters are correctly escaped. Test for issue #1211668.
+   */
+  function testFeedIconEscaping() {
+    $variables = array();
+    $variables['url'] = 'node';
+    $variables['title'] = '<>&"\'';
+    $text = theme_feed_icon($variables);
+    preg_match('/title="(.*?)"/', $text, $matches);
+    $this->assertEqual($matches[1], 'Subscribe to &amp;&quot;&#039;', 'theme_feed_icon() escapes reserved HTML characters.');
+  }
+
+}
diff --git a/modules/simpletest/tests/common_test.info b/modules/simpletest/tests/common_test.info
index f3d6f50d9350e7ca29345a02461ef38bd87e1082..b999bb0682bfa6447ef710a4b4d32999c777b872 100644
--- a/modules/simpletest/tests/common_test.info
+++ b/modules/simpletest/tests/common_test.info
@@ -7,8 +7,8 @@ stylesheets[all][] = common_test.css
 stylesheets[print][] = common_test.print.css
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/common_test_cron_helper.info b/modules/simpletest/tests/common_test_cron_helper.info
index 408aae051dd8db27f790af6e0e15931dbb27aefa..0ccf87db31247c3648e4afcd2283ee4ea905f6a2 100644
--- a/modules/simpletest/tests/common_test_cron_helper.info
+++ b/modules/simpletest/tests/common_test_cron_helper.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/database_test.info b/modules/simpletest/tests/database_test.info
index 2b7a7880efd4a2269adbbf94b00469a8465acccf..1e2a3ea012a455d9b5281bbd7f59fbf4e00a2266 100644
--- a/modules/simpletest/tests/database_test.info
+++ b/modules/simpletest/tests/database_test.info
@@ -5,8 +5,8 @@ package = Testing
 version = VERSION
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/database_test.test b/modules/simpletest/tests/database_test.test
index 660833606d75ae9a719a9cba3ee1b3d3de43dc68..6e1d1597991d0c61f622acae20fece2597999323 100644
--- a/modules/simpletest/tests/database_test.test
+++ b/modules/simpletest/tests/database_test.test
@@ -2803,14 +2803,17 @@ class DatabaseLoggingTestCase extends DatabaseTestCase {
    * Test that we can log the existence of a query.
    */
   function testEnableLogging() {
-    Database::startLog('testing');
+    $log = Database::startLog('testing');
 
     db_query('SELECT name FROM {test} WHERE age > :age', array(':age' => 25))->fetchCol();
     db_query('SELECT age FROM {test} WHERE name = :name', array(':name' => 'Ringo'))->fetchCol();
 
+    // Trigger a call that does not have file in the backtrace.
+    call_user_func_array('db_query', array('SELECT age FROM {test} WHERE name = :name', array(':name' => 'Ringo')))->fetchCol();
+
     $queries = Database::getLog('testing', 'default');
 
-    $this->assertEqual(count($queries), 2, t('Correct number of queries recorded.'));
+    $this->assertEqual(count($queries), 3, t('Correct number of queries recorded.'));
 
     foreach ($queries as $query) {
       $this->assertEqual($query['caller']['function'], __FUNCTION__, t('Correct function in query log.'));
@@ -3746,9 +3749,9 @@ class DatabaseTransactionTestCase extends DatabaseTestCase {
 class DatabaseNextIdCase extends DrupalWebTestCase {
   public static function getInfo() {
     return array(
-      'name' => t('Sequences API'),
-      'description' => t('Test the secondary sequences API.'),
-      'group' => t('Database'),
+      'name' => 'Sequences API',
+      'description' => 'Test the secondary sequences API.',
+      'group' => 'Database',
     );
   }
 
@@ -3773,9 +3776,9 @@ class DatabaseNextIdCase extends DrupalWebTestCase {
 class DatabaseEmptyStatementTestCase extends DrupalWebTestCase {
   public static function getInfo() {
     return array(
-      'name' => t('Empty statement'),
-      'description' => t('Test the empty pseudo-statement class.'),
-      'group' => t('Database'),
+      'name' => 'Empty statement',
+      'description' => 'Test the empty pseudo-statement class.',
+      'group' => 'Database',
     );
   }
 
diff --git a/modules/simpletest/tests/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info b/modules/simpletest/tests/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info
index 0e5344c656e029ec313b7cd78803e5d90374c33a..07a44a1439ce091d0faac95065b2065485240a70 100644
--- a/modules/simpletest/tests/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info
+++ b/modules/simpletest/tests/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info b/modules/simpletest/tests/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info
index f7b50a35936650d30d4f980e5b9dbd6cdd71e040..1ad4e306b6ba9d4af8aed9728331345ab799307f 100644
--- a/modules/simpletest/tests/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info
+++ b/modules/simpletest/tests/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/entity_cache_test.info b/modules/simpletest/tests/entity_cache_test.info
index 6842cb1a7e8dc74365c32898f21e6fd826de8a34..c2f02075aff1a2e9d77c36f8e7c068b19ed4b17b 100644
--- a/modules/simpletest/tests/entity_cache_test.info
+++ b/modules/simpletest/tests/entity_cache_test.info
@@ -6,8 +6,8 @@ core = 7.x
 dependencies[] = entity_cache_test_dependency
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/entity_cache_test_dependency.info b/modules/simpletest/tests/entity_cache_test_dependency.info
index 21b7233cbfc3b8ad812d01bf10c8f3932bf6b0db..71018af312918d1d2a0012a9771ed25992573ccb 100644
--- a/modules/simpletest/tests/entity_cache_test_dependency.info
+++ b/modules/simpletest/tests/entity_cache_test_dependency.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/entity_crud_hook_test.info b/modules/simpletest/tests/entity_crud_hook_test.info
index e79a8f03d83cf16d26eeb117eb7a5ffc806c90db..9540f9ac64f48c3bd5739776e0edbc1802ad9554 100644
--- a/modules/simpletest/tests/entity_crud_hook_test.info
+++ b/modules/simpletest/tests/entity_crud_hook_test.info
@@ -5,8 +5,8 @@ package = Testing
 version = VERSION
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/entity_crud_hook_test.module b/modules/simpletest/tests/entity_crud_hook_test.module
index 873a162ced9c325f1cfc764e8dff187563586828..d25dff1b3cb68d64ee464cf5e4a9d3161285c922 100644
--- a/modules/simpletest/tests/entity_crud_hook_test.module
+++ b/modules/simpletest/tests/entity_crud_hook_test.module
@@ -1,8 +1,9 @@
 <?php
 
-//
-// Presave hooks
-//
+/**
+ * @file
+ * Test module for the Entity CRUD API.
+ */
 
 /**
  * Implements hook_entity_presave().
@@ -53,10 +54,6 @@ function entity_crud_hook_test_user_presave() {
   $_SESSION['entity_crud_hook_test'][] = (__FUNCTION__ . ' called');
 }
 
-//
-// Insert hooks
-//
-
 /**
  * Implements hook_entity_insert().
  */
@@ -106,10 +103,6 @@ function entity_crud_hook_test_user_insert() {
   $_SESSION['entity_crud_hook_test'][] = (__FUNCTION__ . ' called');
 }
 
-//
-// Load hooks
-//
-
 /**
  * Implements hook_entity_load().
  */
@@ -159,10 +152,6 @@ function entity_crud_hook_test_user_load() {
   $_SESSION['entity_crud_hook_test'][] = (__FUNCTION__ . ' called');
 }
 
-//
-// Update hooks
-//
-
 /**
  * Implements hook_entity_update().
  */
@@ -212,10 +201,6 @@ function entity_crud_hook_test_user_update() {
   $_SESSION['entity_crud_hook_test'][] = (__FUNCTION__ . ' called');
 }
 
-//
-// Delete hooks
-//
-
 /**
  * Implements hook_entity_delete().
  */
diff --git a/modules/simpletest/tests/entity_crud_hook_test.test b/modules/simpletest/tests/entity_crud_hook_test.test
index 3f18fc855546392dd27e800af960562a34ea5de6..178e34dc74ff68f47f0882cbc95f3a932cd2778b 100644
--- a/modules/simpletest/tests/entity_crud_hook_test.test
+++ b/modules/simpletest/tests/entity_crud_hook_test.test
@@ -1,8 +1,14 @@
 <?php
 
 /**
- * Test invocation of hooks when inserting, loading, updating or deleting an
- * entity. Tested hooks are:
+ * @file
+ * CRUD hook tests for the Entity CRUD API.
+ */
+
+/**
+ * Tests invocation of hooks when performing an action.
+ *
+ * Tested hooks are:
  * - hook_entity_insert()
  * - hook_entity_load()
  * - hook_entity_update()
@@ -48,7 +54,7 @@ class EntityCrudHookTestCase extends DrupalWebTestCase {
   }
 
   /**
-   * Test hook invocations for CRUD operations on comments.
+   * Tests hook invocations for CRUD operations on comments.
    */
   public function testCommentHooks() {
     $node = (object) array(
@@ -108,7 +114,7 @@ class EntityCrudHookTestCase extends DrupalWebTestCase {
   }
 
   /**
-   * Test hook invocations for CRUD operations on files.
+   * Tests hook invocations for CRUD operations on files.
    */
   public function testFileHooks() {
     $url = 'public://entity_crud_hook_test.file';
@@ -154,7 +160,7 @@ class EntityCrudHookTestCase extends DrupalWebTestCase {
   }
 
   /**
-   * Test hook invocations for CRUD operations on nodes.
+   * Tests hook invocations for CRUD operations on nodes.
    */
   public function testNodeHooks() {
     $node = (object) array(
@@ -200,7 +206,7 @@ class EntityCrudHookTestCase extends DrupalWebTestCase {
   }
 
   /**
-   * Test hook invocations for CRUD operations on taxonomy terms.
+   * Tests hook invocations for CRUD operations on taxonomy terms.
    */
   public function testTaxonomyTermHooks() {
     $vocabulary = (object) array(
@@ -248,7 +254,7 @@ class EntityCrudHookTestCase extends DrupalWebTestCase {
   }
 
   /**
-   * Test hook invocations for CRUD operations on taxonomy vocabularies.
+   * Tests hook invocations for CRUD operations on taxonomy vocabularies.
    */
   public function testTaxonomyVocabularyHooks() {
     $vocabulary = (object) array(
@@ -288,7 +294,7 @@ class EntityCrudHookTestCase extends DrupalWebTestCase {
   }
 
   /**
-   * Test hook invocations for CRUD operations on users.
+   * Tests hook invocations for CRUD operations on users.
    */
   public function testUserHooks() {
     $edit = array(
diff --git a/modules/simpletest/tests/entity_query_access_test.info b/modules/simpletest/tests/entity_query_access_test.info
index 8914b4366a48d0e8f084eef3600fa1f477917755..e5437532cdec95f056ff64e1e965ac79cbf02474 100644
--- a/modules/simpletest/tests/entity_query_access_test.info
+++ b/modules/simpletest/tests/entity_query_access_test.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/error_test.info b/modules/simpletest/tests/error_test.info
index 2c36304458f4e8379abed3fa89ae28f2e768473c..12a5a51ba953f10a1dcc68c08dea63e54031e1e3 100644
--- a/modules/simpletest/tests/error_test.info
+++ b/modules/simpletest/tests/error_test.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/file_test.info b/modules/simpletest/tests/file_test.info
index 699b9d8f965d585f2f3922d7227f0f57bbd379d8..b7b7619724215fc195a9812a99813eea66d8cff8 100644
--- a/modules/simpletest/tests/file_test.info
+++ b/modules/simpletest/tests/file_test.info
@@ -6,8 +6,8 @@ core = 7.x
 files[] = file_test.module
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/filter_test.info b/modules/simpletest/tests/filter_test.info
index 758ca57124e0405641d55d57036e06a668b94157..9f58a303953a05e1aebb3f4955d574b172d91992 100644
--- a/modules/simpletest/tests/filter_test.info
+++ b/modules/simpletest/tests/filter_test.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/form.test b/modules/simpletest/tests/form.test
index 985abe31bd3a10b254f72dcd78d21451b2652e70..7eac198ad2c942e71929b9a4d044b81984cc525d 100644
--- a/modules/simpletest/tests/form.test
+++ b/modules/simpletest/tests/form.test
@@ -189,6 +189,38 @@ class FormsTestCase extends DrupalWebTestCase {
     $this->assertRaw("The form_test_validate_required_form form was submitted successfully.", 'Validation form submitted successfully.');
   }
 
+  /**
+   * Tests validation for required textfield element without title.
+   *
+   * Submits a test form containing a textfield form elements without title.
+   * The form is submitted twice, first without value for the required field
+   * and then with value. Each submission is checked for relevant error
+   * messages.
+   *
+   * @see form_test_validate_required_form_no_title()
+   */
+  function testRequiredTextfieldNoTitle() {
+    $form = $form_state = array();
+    $form = form_test_validate_required_form_no_title($form, $form_state);
+
+    // Attempt to submit the form with no required field set.
+    $edit = array();
+    $this->drupalPost('form-test/validate-required-no-title', $edit, 'Submit');
+    $this->assertNoRaw("The form_test_validate_required_form_no_title form was submitted successfully.", 'Validation form submitted successfully.');
+
+    // Check the page for the error class on the textfield.
+    $this->assertFieldByXPath('//input[contains(@class, "error")]', FALSE, 'Error input form element class found.');
+
+    // Submit again with required fields set and verify that there are no
+    // error messages.
+    $edit = array(
+      'textfield' => $this->randomString(),
+    );
+    $this->drupalPost(NULL, $edit, 'Submit');
+    $this->assertNoFieldByXpath('//input[contains(@class, "error")]', FALSE, 'No error input form element class found.');
+    $this->assertRaw("The form_test_validate_required_form_no_title form was submitted successfully.", 'Validation form submitted successfully.');
+  }
+
   /**
    * Test default value handling for checkboxes.
    *
@@ -1308,6 +1340,81 @@ class FormsRebuildTestCase extends DrupalWebTestCase {
   }
 }
 
+/**
+ * Tests form redirection.
+ */
+class FormsRedirectTestCase extends DrupalWebTestCase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Form redirecting',
+      'description' => 'Tests functionality of drupal_redirect_form().',
+      'group' => 'Form API',
+    );
+  }
+
+  function setUp() {
+    parent::setUp(array('form_test'));
+  }
+
+  /**
+   * Tests form redirection.
+   */
+  function testRedirect() {
+    $path = 'form-test/redirect';
+    $options = array('query' => array('foo' => 'bar'));
+    $options['absolute'] = TRUE;
+
+    // Test basic redirection.
+    $edit = array(
+      'redirection' => TRUE,
+      'destination' => $this->randomName(),
+    );
+    $this->drupalPost($path, $edit, t('Submit'));
+    $this->assertUrl($edit['destination'], array(), 'Basic redirection works.');
+
+
+    // Test without redirection.
+    $edit = array(
+      'redirection' => FALSE,
+    );
+    $this->drupalPost($path, $edit, t('Submit'));
+    $this->assertUrl($path, array(), 'When redirect is set to FALSE, there should be no redirection.');
+
+    // Test redirection with query parameters.
+    $edit = array(
+      'redirection' => TRUE,
+      'destination' => $this->randomName(),
+    );
+    $this->drupalPost($path, $edit, t('Submit'), $options);
+    $this->assertUrl($edit['destination'], array(), 'Redirection with query parameters works.');
+
+    // Test without redirection but with query parameters.
+    $edit = array(
+      'redirection' => FALSE,
+    );
+    $this->drupalPost($path, $edit, t('Submit'), $options);
+    $this->assertUrl($path, $options, 'When redirect is set to FALSE, there should be no redirection, and the query parameters should be passed along.');
+
+    // Test redirection back to the original path.
+    $edit = array(
+      'redirection' => TRUE,
+      'destination' => '',
+    );
+    $this->drupalPost($path, $edit, t('Submit'));
+    $this->assertUrl($path, array(), 'When using an empty redirection string, there should be no redirection.');
+
+    // Test redirection back to the original path with query parameters.
+    $edit = array(
+      'redirection' => TRUE,
+      'destination' => '',
+    );
+    $this->drupalPost($path, $edit, t('Submit'), $options);
+    $this->assertUrl($path, $options, 'When using an empty redirection string, there should be no redirection, and the query parameters should be passed along.');
+  }
+
+}
+
 /**
  * Test the programmatic form submission behavior.
  */
@@ -1675,3 +1782,34 @@ class FormCheckboxTestCase extends DrupalWebTestCase {
     }
   }
 }
+
+/**
+ * Tests uniqueness of generated HTML IDs.
+ */
+class HTMLIdTestCase extends DrupalWebTestCase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Unique HTML IDs',
+      'description' => 'Tests functionality of drupal_html_id().',
+      'group' => 'Form API',
+    );
+  }
+
+  function setUp() {
+    parent::setUp('form_test');
+  }
+
+  /**
+   * Tests that HTML IDs do not get duplicated when form validation fails.
+   */
+  function testHTMLId() {
+    $this->drupalGet('form-test/double-form');
+    $this->assertNoDuplicateIds('There are no duplicate IDs');
+
+    // Submit second form with empty title.
+    $edit = array();
+    $this->drupalPost(NULL, $edit, 'Save', array(), array(), 'form-test-html-id--2');
+    $this->assertNoDuplicateIds('There are no duplicate IDs');
+  }
+}
diff --git a/modules/simpletest/tests/form_test.info b/modules/simpletest/tests/form_test.info
index f07ad5bdb9453a4b5cc9a6ab6804ae9519a25675..a5be94b8c86c59285f529b89c83465ed76a62ad0 100644
--- a/modules/simpletest/tests/form_test.info
+++ b/modules/simpletest/tests/form_test.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/form_test.module b/modules/simpletest/tests/form_test.module
index e4ac77b12500cc36276209ffdecb3c38d088ce18..b4d2f54990048b5612611de77ef015a51880d856 100644
--- a/modules/simpletest/tests/form_test.module
+++ b/modules/simpletest/tests/form_test.module
@@ -30,6 +30,13 @@ function form_test_menu() {
     'access callback' => TRUE,
     'type' => MENU_CALLBACK,
   );
+  $items['form-test/validate-required-no-title'] = array(
+    'title' => 'Form #required validation without #title',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('form_test_validate_required_form_no_title'),
+    'access callback' => TRUE,
+    'type' => MENU_CALLBACK,
+  );
   $items['form-test/limit-validation-errors'] = array(
     'title' => 'Form validation with some error suppression',
     'page callback' => 'drupal_get_form',
@@ -151,6 +158,14 @@ function form_test_menu() {
     'type' => MENU_CALLBACK,
   );
 
+  $items['form-test/redirect'] = array(
+    'title' => 'Redirect test',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('form_test_redirect'),
+    'access callback' => TRUE,
+    'type' => MENU_CALLBACK,
+  );
+
   $items['form_test/form-labels'] = array(
     'title' => 'Form label test',
     'page callback' => 'drupal_get_form',
@@ -186,6 +201,12 @@ function form_test_menu() {
       'type' => MENU_CALLBACK,
     );
   }
+  $items['form-test/double-form'] = array(
+    'title' => 'Double form test',
+    'page callback' => 'form_test_double_form',
+    'access callback' => TRUE,
+    'type' => MENU_CALLBACK,
+  );
 
   $items['form-test/load-include-menu'] = array(
     'title' => 'FAPI test loading includes',
@@ -398,6 +419,26 @@ function form_test_validate_required_form_submit($form, &$form_state) {
   drupal_set_message('The form_test_validate_required_form form was submitted successfully.');
 }
 
+/**
+ * Form constructor to test the #required property without #title.
+ */
+function form_test_validate_required_form_no_title($form, &$form_state) {
+  $form['textfield'] = array(
+    '#type' => 'textfield',
+    '#required' => TRUE,
+  );
+  $form['actions'] = array('#type' => 'actions');
+  $form['actions']['submit'] = array('#type' => 'submit', '#value' => 'Submit');
+  return $form;
+}
+
+/**
+ * Form submission handler for form_test_validate_required_form_no_title().
+ */
+function form_test_validate_required_form_no_title_submit($form, &$form_state) {
+  drupal_set_message('The form_test_validate_required_form_no_title form was submitted successfully.');
+}
+
 /**
  * Builds a simple form with a button triggering partial validation.
  */
@@ -1643,6 +1684,43 @@ function form_test_clicked_button_submit($form, &$form_state) {
   drupal_set_message('Submit handler for form_test_clicked_button executed.');
 }
 
+/**
+ * Form builder to detect form redirect.
+ */
+function form_test_redirect($form, &$form_state) {
+  $form['redirection'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Use redirection'),
+  );
+  $form['destination'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Redirect destination'),
+    '#states' => array(
+      'visible' => array(
+        ':input[name="redirection"]' => array('checked' => TRUE),
+      ),
+    ),
+  );
+  $form['submit'] = array(
+    '#type' => 'submit',
+    '#value' => t('Submit'),
+  );
+
+  return $form;
+}
+
+/**
+ * Form submit handler to test different redirect behaviours.
+ */
+function form_test_redirect_submit(&$form, &$form_state) {
+  if (!empty($form_state['values']['redirection'])) {
+    $form_state['redirect'] = !empty($form_state['values']['destination']) ? $form_state['values']['destination'] : NULL;
+  }
+  else {
+    $form_state['redirect'] = FALSE;
+  }
+}
+
 /**
  * Implements hook_form_FORM_ID_alter() for the registration form.
  */
@@ -1742,3 +1820,29 @@ function form_test_checkboxes_zero($form, &$form_state, $json = TRUE) {
 function _form_test_checkboxes_zero_no_redirect($form, &$form_state) {
   $form_state['redirect'] = FALSE;
 }
+
+/**
+ * Menu callback returns two instances of the same form.
+ */
+function form_test_double_form() {
+  return array(
+    'form1' => drupal_get_form('form_test_html_id'),
+    'form2' => drupal_get_form('form_test_html_id'),
+  );
+}
+
+/**
+ * Builds a simple form to test duplicate HTML IDs.
+ */
+function form_test_html_id($form, &$form_state) {
+  $form['name'] = array(
+    '#type' => 'textfield',
+    '#title' => 'name',
+    '#required' => TRUE,
+  );
+  $form['submit'] = array(
+    '#type' => 'submit',
+    '#value' => 'Save',
+  );
+  return $form;
+}
diff --git a/modules/simpletest/tests/https.php b/modules/simpletest/tests/https.php
index b5ffab69345544cbdfeb326cc430005b7b5b08b3..0e1a4edebc085713f59163da71549ae6ec668310 100644
--- a/modules/simpletest/tests/https.php
+++ b/modules/simpletest/tests/https.php
@@ -2,13 +2,13 @@
 
 /**
  * @file
- * Fake an https request, for use during testing.
+ * Fake an HTTPS request, for use during testing.
  */
 
 // Set a global variable to indicate a mock HTTPS request.
 $is_https_mock = empty($_SERVER['HTTPS']);
 
-// Change to https.
+// Change to HTTPS.
 $_SERVER['HTTPS'] = 'on';
 foreach ($_SERVER as $key => $value) {
   $_SERVER[$key] = str_replace('modules/simpletest/tests/https.php', 'index.php', $value);
diff --git a/modules/simpletest/tests/image.test b/modules/simpletest/tests/image.test
index 962aa661fe9a6b06ed52dd4676497f45b1b30e53..403c9d7d88f41cb9818e1e6923dcd9073718944f 100644
--- a/modules/simpletest/tests/image.test
+++ b/modules/simpletest/tests/image.test
@@ -14,7 +14,13 @@ class ImageToolkitTestCase extends DrupalWebTestCase {
   protected $image;
 
   function setUp() {
-    parent::setUp('image_test');
+    $modules = func_get_args();
+    if (isset($modules[0]) && is_array($modules[0])) {
+      $modules = $modules[0];
+    }
+    $modules[] = 'image_test';
+
+    parent::setUp($modules);
 
     // Use the image_test.module's test toolkit.
     $this->toolkit = 'test';
diff --git a/modules/simpletest/tests/image_test.info b/modules/simpletest/tests/image_test.info
index dcd97f6ac1cd1c17b4770a56856cfff1b02125d8..f3b342290b0494077784cca42642d1c17228dd74 100644
--- a/modules/simpletest/tests/image_test.info
+++ b/modules/simpletest/tests/image_test.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/mail.test b/modules/simpletest/tests/mail.test
index 09dcde60c0db8b0ffa0ca512289678d27d11b1a0..b7ce68544f79e9f2fd53bfad0947d0b7cbb2634c 100644
--- a/modules/simpletest/tests/mail.test
+++ b/modules/simpletest/tests/mail.test
@@ -150,7 +150,7 @@ class DrupalHtmlToTextTestCase extends DrupalWebTestCase {
     $tests = array(
       // @todo Trailing linefeeds should be trimmed.
       '<a href = "http://drupal.org">Drupal.org</a>' => "Drupal.org [1]\n\n[1] http://drupal.org\n",
-      // @todo Footer urls should be absolute.
+      // @todo Footer URLs should be absolute.
       "<a href = \"$base_path\">Homepage</a>" => "Homepage [1]\n\n[1] $base_url/\n",
       '<address>Drupal</address>' => "Drupal\n",
       // @todo The <address> tag is currently not supported.
@@ -367,7 +367,7 @@ class DrupalHtmlToTextTestCase extends DrupalWebTestCase {
       . '<br /><a href="http://www.example.com">Host, no path</a>'
       . '<br /><a href="' . $base_path . 'node/1">Path, no host</a>'
       . '<br /><a href="node/1">Relative path</a>';
-    // @todo Footnote urls should be absolute.
+    // @todo Footnote URLs should be absolute.
     $tt = "Host and path [1]"
       . "\nHost, no path [2]"
       // @todo The following two references should be combined.
diff --git a/modules/simpletest/tests/menu.test b/modules/simpletest/tests/menu.test
index b31fee6e380a1d08ca88875f4d2a047c5e14bbeb..1ecc1b1c1dabf5f33f33b14f206e03f71d5db27e 100644
--- a/modules/simpletest/tests/menu.test
+++ b/modules/simpletest/tests/menu.test
@@ -599,7 +599,7 @@ class MenuRouterTestCase extends DrupalWebTestCase {
   }
 
   /**
-   * Get a url and assert the title given a case number. If override is true,
+   * Get a URL and assert the title given a case number. If override is true,
    * the title is asserted to begin with "Alternative".
    */
   private function menuItemTitlesCasesHelper($case_no, $override = FALSE) {
diff --git a/modules/simpletest/tests/menu_test.info b/modules/simpletest/tests/menu_test.info
index 1c01522194746cc6603f0bbc3f106b21d829959b..1b9c676bef2d6929ad47ce8066a4afe69ecc7bd9 100644
--- a/modules/simpletest/tests/menu_test.info
+++ b/modules/simpletest/tests/menu_test.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/module.test b/modules/simpletest/tests/module.test
index f55c08af4c973128a94acad3a05ea37e57649b62..769c4cf89f96b7468641d5ba3f3bba023ecd4c58 100644
--- a/modules/simpletest/tests/module.test
+++ b/modules/simpletest/tests/module.test
@@ -25,7 +25,7 @@ class ModuleUnitTest extends DrupalWebTestCase {
     $profile_info = install_profile_info('standard', 'en');
     $module_list = $profile_info['dependencies'];
 
-    // Install profile is a module that is expected to be loaded.
+    // Installation profile is a module that is expected to be loaded.
     $module_list[] = 'standard';
 
     sort($module_list);
@@ -171,12 +171,12 @@ class ModuleUnitTest extends DrupalWebTestCase {
     $this->assertFalse(module_exists('php'), t('Disabling a module with unlisted dependents succeeded.'));
     $this->assertEqual(variable_get('test_module_disable_order', array()), array('forum', 'poll', 'php'), t('Modules were disabled in the correct order by module_disable().'));
 
-    // Disable a module that is listed as a dependency by the install profile.
-    // Make sure that the profile itself is not on the list of dependent
-    // modules to be disabled.
+    // Disable a module that is listed as a dependency by the installation
+    // profile. Make sure that the profile itself is not on the list of
+    // dependent modules to be disabled.
     $profile = drupal_get_profile();
     $info = install_profile_info($profile);
-    $this->assertTrue(in_array('comment', $info['dependencies']), t('Comment module is listed as a dependency of the install profile.'));
+    $this->assertTrue(in_array('comment', $info['dependencies']), t('Comment module is listed as a dependency of the installation profile.'));
     $this->assertTrue(module_exists('comment'), t('Comment module is enabled.'));
     module_disable(array('comment'));
     $this->assertFalse(module_exists('comment'), t('Comment module was disabled.'));
diff --git a/modules/simpletest/tests/module_test.info b/modules/simpletest/tests/module_test.info
index 8a3c8a622b58eaed6ca437702d0990f5d8965c3b..e591d354c2f6a5df3e57bc2fdc4b174f17f087aa 100644
--- a/modules/simpletest/tests/module_test.info
+++ b/modules/simpletest/tests/module_test.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/path_test.info b/modules/simpletest/tests/path_test.info
index e896f3676cfefd1ad3c07d875f29d13205cc9a76..94c850841d80601022d527f45df394be64088f9c 100644
--- a/modules/simpletest/tests/path_test.info
+++ b/modules/simpletest/tests/path_test.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/requirements1_test.info b/modules/simpletest/tests/requirements1_test.info
index f061b451ce2631476ea67b42126e35ad6ccc64cf..855ada58dedbb83186db77f6e310d441a1b90222 100644
--- a/modules/simpletest/tests/requirements1_test.info
+++ b/modules/simpletest/tests/requirements1_test.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/requirements1_test.install b/modules/simpletest/tests/requirements1_test.install
index 651d911abb88ea2fdc328fda58d0c988665ff1c8..91caca3f5b1005af9ccf649afc8fa46d75e09265 100644
--- a/modules/simpletest/tests/requirements1_test.install
+++ b/modules/simpletest/tests/requirements1_test.install
@@ -5,7 +5,7 @@
  */
 function requirements1_test_requirements($phase) {
   $requirements = array();
-  // Ensure translations don't break at install time.
+  // Ensure translations don't break during installation.
   $t = get_t();
 
   // Always fails requirements.
diff --git a/modules/simpletest/tests/requirements2_test.info b/modules/simpletest/tests/requirements2_test.info
index 1137617c2e6c5dab2134910262032ea9027f54f4..f1d5886de562aa7363e2b077582e51e8161f4c72 100644
--- a/modules/simpletest/tests/requirements2_test.info
+++ b/modules/simpletest/tests/requirements2_test.info
@@ -7,8 +7,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/session.test b/modules/simpletest/tests/session.test
index e5ceb75388302038e6d229270479b663b995db2f..a0feffbb0d82bdfaf8543bbb828cd4feb2f9dd4e 100644
--- a/modules/simpletest/tests/session.test
+++ b/modules/simpletest/tests/session.test
@@ -289,14 +289,14 @@ class SessionTestCase extends DrupalWebTestCase {
 }
 
 /**
- * Ensure that when running under https two session cookies are generated.
+ * Ensure that when running under HTTPS two session cookies are generated.
  */
 class SessionHttpsTestCase extends DrupalWebTestCase {
 
   public static function getInfo() {
     return array(
-      'name' => 'Session https handling',
-      'description' => 'Ensure that when running under https two session cookies are generated.',
+      'name' => 'Session HTTPS handling',
+      'description' => 'Ensure that when running under HTTPS two session cookies are generated.',
       'group' => 'Session'
     );
   }
@@ -384,7 +384,7 @@ class SessionHttpsTestCase extends DrupalWebTestCase {
     $this->cookies = array();
 
     if ($is_https) {
-      // The functionality does not make sense when running on https.
+      // The functionality does not make sense when running on HTTPS.
       return;
     }
 
diff --git a/modules/simpletest/tests/session_test.info b/modules/simpletest/tests/session_test.info
index bf78757afc26142a555f5401f7bc5d2e3b53eb6d..35b2f7f528f599ccd26666b0dba985ebc74d733e 100644
--- a/modules/simpletest/tests/session_test.info
+++ b/modules/simpletest/tests/session_test.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/system_dependencies_test.info b/modules/simpletest/tests/system_dependencies_test.info
index 0659255a642e0489129f26a41d33d1b34da7e1e4..09e49cb82861e851668666a94bd0ae8610277aa9 100644
--- a/modules/simpletest/tests/system_dependencies_test.info
+++ b/modules/simpletest/tests/system_dependencies_test.info
@@ -6,8 +6,8 @@ core = 7.x
 hidden = TRUE
 dependencies[] = _missing_dependency
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/system_incompatible_core_version_dependencies_test.info b/modules/simpletest/tests/system_incompatible_core_version_dependencies_test.info
index bc7017a24d26945af35c1eb6877860f6fef2ad4a..03de8dd7367cf08334ab353492f840fb6700bb3e 100644
--- a/modules/simpletest/tests/system_incompatible_core_version_dependencies_test.info
+++ b/modules/simpletest/tests/system_incompatible_core_version_dependencies_test.info
@@ -6,8 +6,8 @@ core = 7.x
 hidden = TRUE
 dependencies[] = system_incompatible_core_version_test
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/system_incompatible_core_version_test.info b/modules/simpletest/tests/system_incompatible_core_version_test.info
index 55d75842642c37c86a162a66a519308eb5a66af5..98f045a3af4d6e2c0a106fce81906ac4de45c473 100644
--- a/modules/simpletest/tests/system_incompatible_core_version_test.info
+++ b/modules/simpletest/tests/system_incompatible_core_version_test.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 5.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/system_incompatible_module_version_dependencies_test.info b/modules/simpletest/tests/system_incompatible_module_version_dependencies_test.info
index a02e41b071e71c8b415386dd086c4a990163c64e..5cba8c5c8db75b9706dfe7dc3df94d5dbb36a32e 100644
--- a/modules/simpletest/tests/system_incompatible_module_version_dependencies_test.info
+++ b/modules/simpletest/tests/system_incompatible_module_version_dependencies_test.info
@@ -7,8 +7,8 @@ hidden = TRUE
 ; system_incompatible_module_version_test declares version 1.0
 dependencies[] = system_incompatible_module_version_test (>2.0)
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/system_incompatible_module_version_test.info b/modules/simpletest/tests/system_incompatible_module_version_test.info
index 660b2c42ce6d67bddb8172a709bd55cdb590edcb..229df45544a949749fd20101edba9332fccbb19a 100644
--- a/modules/simpletest/tests/system_incompatible_module_version_test.info
+++ b/modules/simpletest/tests/system_incompatible_module_version_test.info
@@ -5,8 +5,8 @@ version = 1.0
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/system_test.info b/modules/simpletest/tests/system_test.info
index 037c7441e709df8624484006ba0e99986114b184..f88b575abccaaf87380311288b3b7b5cbcab2fa1 100644
--- a/modules/simpletest/tests/system_test.info
+++ b/modules/simpletest/tests/system_test.info
@@ -6,8 +6,8 @@ core = 7.x
 files[] = system_test.module
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/taxonomy_test.info b/modules/simpletest/tests/taxonomy_test.info
index aab15a9c07f1fa8126a0e334c936848465e7fb31..4b36f5508f35a9cfdc5a256c057be69056bd82df 100644
--- a/modules/simpletest/tests/taxonomy_test.info
+++ b/modules/simpletest/tests/taxonomy_test.info
@@ -6,8 +6,8 @@ core = 7.x
 hidden = TRUE
 dependencies[] = taxonomy
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/taxonomy_test.module b/modules/simpletest/tests/taxonomy_test.module
index aae13a2d448bda09c183efce3051016a471b90d4..f82950c30269131ca949f0f9be210353e5894520 100644
--- a/modules/simpletest/tests/taxonomy_test.module
+++ b/modules/simpletest/tests/taxonomy_test.module
@@ -3,6 +3,8 @@
 /**
  * @file
  * Test module for Taxonomy hooks and functions not used in core.
+ *
+ * @see TaxonomyHooksTestCase::testTaxonomyTermHooks()
  */
 
 /**
@@ -54,6 +56,34 @@ function taxonomy_test_taxonomy_term_delete($term) {
     ->execute();
 }
 
+/**
+ * Implements hook_taxonomy_term_view().
+ */
+function taxonomy_test_taxonomy_term_view($term, $view_mode, $langcode) {
+  if ($view_mode == 'full') {
+    $term->content['taxonomy_test_term_view_check'] = array(
+      '#prefix' => '<div>',
+      '#markup' => t('The antonym is %antonym', array('%antonym' => $term->antonym)),
+      '#suffix' => '</div>',
+      '#weight' => 10,
+    );
+  }
+}
+
+/**
+ * Implements hook_entity_view().
+ */
+function taxonomy_test_entity_view($entity, $type, $view_mode, $langcode) {
+  if ($type == 'taxonomy_term' && $view_mode == 'full') {
+    $entity->content['taxonomy_test_entity_view_check'] = array(
+      '#prefix' => '<div>',
+      '#markup' => t('The antonym is %antonym', array('%antonym' => $entity->antonym)),
+      '#suffix' => '</div>',
+      '#weight' => 20,
+    );
+  }
+}
+
 /**
  * Implements hook_form_alter().
  */
diff --git a/modules/simpletest/tests/theme.test b/modules/simpletest/tests/theme.test
index 27a8e47b9d831d70adeff5af4b91714392bbb475..0ee473e3f6bf0b363ce37de7e1ed25845e5ff229 100644
--- a/modules/simpletest/tests/theme.test
+++ b/modules/simpletest/tests/theme.test
@@ -230,18 +230,19 @@ class ThemeItemListUnitTest extends DrupalWebTestCase {
   }
 
   /**
-   * Test nested list rendering.
+   * Test item list rendering.
    */
-  function testNestedList() {
-    $items = array('a', array('data' => 'b', 'children' => array('c', 'd')), 'e');
+  function testItemList() {
+    $items = array('a', array('data' => 'b', 'children' => array('c' => 'c', 'd' => 'd', 'e' => 'e')), 'f');
     $expected = '<div class="item-list"><ul><li class="first">a</li>
 <li>b<div class="item-list"><ul><li class="first">c</li>
-<li class="last">d</li>
-</ul></div></li>
+<li>d</li>
 <li class="last">e</li>
+</ul></div></li>
+<li class="last">f</li>
 </ul></div>';
     $output = theme('item_list', array('items' => $items));
-    $this->assertIdentical($expected, $output, 'Nested list is rendered correctly.');
+    $this->assertIdentical($expected, $output, 'Item list is rendered correctly.');
   }
 }
 
diff --git a/modules/simpletest/tests/theme_test.info b/modules/simpletest/tests/theme_test.info
index 776cce1a9ef2fba4f9427f77e0793fa599f1add6..b76dee573247f167ba64d14499f7a14345d353b5 100644
--- a/modules/simpletest/tests/theme_test.info
+++ b/modules/simpletest/tests/theme_test.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/themes/test_basetheme/test_basetheme.info b/modules/simpletest/tests/themes/test_basetheme/test_basetheme.info
index b2eeeaf9ab827a7887af788d564e7465bda9d428..97553613c24e73d933df3eae9ef71c9427efdac4 100644
--- a/modules/simpletest/tests/themes/test_basetheme/test_basetheme.info
+++ b/modules/simpletest/tests/themes/test_basetheme/test_basetheme.info
@@ -6,8 +6,8 @@ hidden = TRUE
 settings[basetheme_only] = base theme value
 settings[subtheme_override] = base theme value
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/themes/test_subtheme/test_subtheme.info b/modules/simpletest/tests/themes/test_subtheme/test_subtheme.info
index eb81c38149aceb4c4a6c896d4c379735888dd6af..082f782ea395836743c60ee3673969c93f87a8c5 100644
--- a/modules/simpletest/tests/themes/test_subtheme/test_subtheme.info
+++ b/modules/simpletest/tests/themes/test_subtheme/test_subtheme.info
@@ -6,8 +6,8 @@ hidden = TRUE
 
 settings[subtheme_override] = subtheme value
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/themes/test_theme/test_theme.info b/modules/simpletest/tests/themes/test_theme/test_theme.info
index 6a23f4944b47c497114fe14a0370bfee82367569..fa187353885db612da028e83add1bf4988e58656 100644
--- a/modules/simpletest/tests/themes/test_theme/test_theme.info
+++ b/modules/simpletest/tests/themes/test_theme/test_theme.info
@@ -17,8 +17,8 @@ stylesheets[all][] = system.base.css
 
 settings[theme_test_setting] = default value
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/update_script_test.info b/modules/simpletest/tests/update_script_test.info
index 5d16cd63c062766a667d06ed78a1001f3933e0ce..3a240fe769d822b721fc06a9dc85a2d90cc70e26 100644
--- a/modules/simpletest/tests/update_script_test.info
+++ b/modules/simpletest/tests/update_script_test.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/update_test_1.info b/modules/simpletest/tests/update_test_1.info
index 8f0ea2479743e1ac88238ae1004549cca12f9369..c4febe3d2c1409bf4d67e7e4434234e0d171a4f2 100644
--- a/modules/simpletest/tests/update_test_1.info
+++ b/modules/simpletest/tests/update_test_1.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/update_test_2.info b/modules/simpletest/tests/update_test_2.info
index 8f0ea2479743e1ac88238ae1004549cca12f9369..c4febe3d2c1409bf4d67e7e4434234e0d171a4f2 100644
--- a/modules/simpletest/tests/update_test_2.info
+++ b/modules/simpletest/tests/update_test_2.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/update_test_3.info b/modules/simpletest/tests/update_test_3.info
index 8f0ea2479743e1ac88238ae1004549cca12f9369..c4febe3d2c1409bf4d67e7e4434234e0d171a4f2 100644
--- a/modules/simpletest/tests/update_test_3.info
+++ b/modules/simpletest/tests/update_test_3.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/upgrade/drupal-6.forum.database.php b/modules/simpletest/tests/upgrade/drupal-6.forum.database.php
index 5a2cc332464eb7d1adbc48180aa578ee24dde269..059af6d22ebedcb125a08c59f9f022d7fd2c7b61 100644
--- a/modules/simpletest/tests/upgrade/drupal-6.forum.database.php
+++ b/modules/simpletest/tests/upgrade/drupal-6.forum.database.php
@@ -258,3 +258,17 @@ db_insert('vocabulary_node_types')->fields(array(
 ))
 ->execute();
 
+// Provide all users with the ability to create forum topics.
+$results = db_select('permission', 'p')
+  ->fields('p')
+  ->execute();
+
+foreach ($results as $result) {
+  $permissions = $result->perm . ', create forum topics';
+  db_update('permission')
+    ->fields(array(
+      'perm' => $permissions,
+    ))
+    ->condition('rid', $result->rid)
+    ->execute();
+}
diff --git a/modules/simpletest/tests/upgrade/drupal-6.menu.database.php b/modules/simpletest/tests/upgrade/drupal-6.menu.database.php
index 8962615fb8a270b3d3793213a21755c9cbd6a9ca..7fae337aa7c7e1d5a412c1c622efc1ffeb5a02d4 100644
--- a/modules/simpletest/tests/upgrade/drupal-6.menu.database.php
+++ b/modules/simpletest/tests/upgrade/drupal-6.menu.database.php
@@ -126,6 +126,33 @@ db_insert('menu_links')->fields(array(
   'p9' => '0',
   'updated' => '0',
 ))
+->values(array(
+  'menu_name' => 'secondary-links',
+  'mlid' => '206',
+  'plid' => '0',
+  'link_path' => 'node',
+  'router_path' => 'node',
+  'link_title' => 'node-page-with-query',
+  'options' => 'a:2:{s:5:"query";s:14:"page=1&node=10";s:10:"attributes";a:1:{s:5:"title";s:0:"";}}',
+  'module' => 'menu',
+  'hidden' => '0',
+  'external' => '0',
+  'has_children' => '0',
+  'expanded' => '0',
+  'weight' => '2',
+  'depth' => '1',
+  'customized' => '1',
+  'p1' => '206',
+  'p2' => '0',
+  'p3' => '0',
+  'p4' => '0',
+  'p5' => '0',
+  'p6' => '0',
+  'p7' => '0',
+  'p8' => '0',
+  'p9' => '0',
+  'updated' => '0',
+))
 ->execute();
 db_insert('blocks')->fields(array(
   'bid',
diff --git a/modules/simpletest/tests/upgrade/drupal-6.upload.database.php b/modules/simpletest/tests/upgrade/drupal-6.upload.database.php
index c7f032ecbd35d32b1343be7924f1d071a884ce3f..46ebe2cb0abbf474eb93460ca0d3deb5d2ff49c4 100644
--- a/modules/simpletest/tests/upgrade/drupal-6.upload.database.php
+++ b/modules/simpletest/tests/upgrade/drupal-6.upload.database.php
@@ -416,3 +416,34 @@ db_insert('upload')->fields(array(
   'weight' => '0',
 ))
 ->execute();
+
+// Add series of entries for invalid node vids to the {upload} table.
+for ($i = 30; $i < 250; $i += 2) {
+  db_insert('upload')->fields(array(
+    'fid',
+    'nid',
+    'vid',
+    'description',
+    'list',
+    'weight',
+  ))
+  // Invalid fid, invalid vid.
+  ->values(array(
+    'fid' => $i,
+    'nid' => '40',
+    'vid' => 24 + $i,
+    'description' => 'crazy-basename.png',
+    'list' => '1',
+    'weight' => '0',
+  ))
+  // Valid fid, invalid vid.
+  ->values(array(
+    'fid' => 2,
+    'nid' => '40',
+    'vid' => 24 + $i + 1,
+    'description' => 'crazy-basename.png',
+    'list' => '1',
+    'weight' => '0',
+  ))
+  ->execute();
+}
diff --git a/modules/simpletest/tests/upgrade/drupal-7.aggregator.database.php b/modules/simpletest/tests/upgrade/drupal-7.aggregator.database.php
new file mode 100644
index 0000000000000000000000000000000000000000..00ea7d2282a036652136b9ea4abe2070032f6259
--- /dev/null
+++ b/modules/simpletest/tests/upgrade/drupal-7.aggregator.database.php
@@ -0,0 +1,149 @@
+<?php
+/**
+ * @file
+ * Test content for the aggregator update path.
+ */
+
+db_insert('aggregator_feed')->fields(array(
+  'fid',
+  'title',
+  'url',
+  'refresh',
+  'checked',
+  'queued',
+  'link',
+  'description',
+  'image',
+  'hash',
+  'etag',
+  'modified',
+  'block',
+))
+  ->values(array(
+  'fid' => '1',
+  'title' => 'Drupal commit log',
+  'url' => 'http://drupal.org/commitlog/feed',
+  'refresh' => '3600',
+  'checked' => '1347209523',
+  'queued' => '0',
+  'link' => 'http://drupal.org/versioncontrol/garbage/path',
+  'description' => '',
+  'image' => '',
+  'hash' => '84f57ae5bffa7fd56942a6293be91244d8551cd18204a7c7de6a17065ea4d54d',
+  'etag' => '"1347206975"',
+  'modified' => '1347206975',
+  'block' => '5',
+))
+  ->execute();
+
+db_insert('aggregator_item')->fields(array(
+  'iid',
+  'fid',
+  'title',
+  'link',
+  'author',
+  'description',
+  'timestamp',
+  'guid',
+))
+  ->values(array(
+  'iid' => '1',
+  'fid' => '1',
+  'title' => 'Domain Access: Commit b904022 on 7.x-2.x authored by bforchhammer, committed by agentrickard',
+  'link' => 'http://drupal.org/commitlog/commit/2%2C410/b90402243b4a9dee0d2e2c4a729dcb2f58dc53c0',
+  'author' => 'bforchhammer',
+  'description' => "<div class=\"view view-commitlog-commit-items view-id-commitlog_commit_items view-display-id-block_1 view-dom-id-10\">\n    \n  \n  \n      <div class=\"view-content\">\n        <div class=\"views-row views-row-1 views-row-odd views-row-first\">\n      \n  <div class=\"views-field-path\">\n                <span class=\"field-content\"><a href=\"http://drupalcode.org/project/domain.git/blob/b90402243b4a9dee0d2e2c4a729dcb2f58dc53c0:/domain_source/domain_source.info\">/domain_source/domain_source.info</a></span>\n  </div>\n  \n  <div class=\"views-field-changed-lines\">\n                <span class=\"field-content\">1 addition & 1 deletion</span>\n  </div>\n  \n  <div class=\"views-field-visual-diffstat\">\n                <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"minus\">-</span><span class=\"no-op\"> </span><span class=\"no-op\"> </span><span class=\"no-op\"> </span><span class=\"no-op\"> </span><span class=\"no-op\"> </span></span></span>\n  </div>\n  </div>\n  <div class=\"views-row views-row-2 views-row-even views-row-last\">\n      \n  <div class=\"views-field-path\">\n                <span class=\"field-content\"><a href=\"http://drupalcode.org/project/domain.git/blob/b90402243b4a9dee0d2e2c4a729dcb2f58dc53c0:/domain_source/domain_source.views.inc\">/domain_source/domain_source.views.inc</a></span>\n  </div>\n  \n  <div class=\"views-field-changed-lines\">\n                <span class=\"field-content\">13 additions & 1 deletion</span>\n  </div>\n  \n  <div class=\"views-field-visual-diffstat\">\n                <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"minus\">-</span></span></span>\n  </div>\n  </div>\n    </div>\n  \n  \n  \n  \n  \n  \n</div>\n<pre>Patch #1685658 by bforchhammer. Better handling of current domain for Domain Source.\n</pre>",
+  'timestamp' => '1347206044',
+  'guid' => 'VCS Operation 3936918 at http://drupal.org',
+))
+  ->values(array(
+  'iid' => '2',
+  'fid' => '1',
+  'title' => 'Video: Commit b0b7ff0 on 7.x-2.x by Jorrit',
+  'link' => 'http://drupal.org/commitlog/commit/846/b0b7ff08fed89c76454aa54627cc219361365d7b',
+  'author' => 'Jorrit',
+  'description' => "<div class=\"view view-commitlog-commit-items view-id-commitlog_commit_items view-display-id-block_1 view-dom-id-9\">\n    \n  \n  \n      <div class=\"view-content\">\n        <div class=\"views-row views-row-1 views-row-odd views-row-first\">\n      \n  <div class=\"views-field-path\">\n                <span class=\"field-content\"><a href=\"http://drupalcode.org/project/video.git/blob/b0b7ff08fed89c76454aa54627cc219361365d7b:/libraries/phpvideotoolkit/phpvideotoolkit.php5.php\">/libraries/phpvideotoolkit/phpvideotoolkit.php5.php</a></span>\n  </div>\n  \n  <div class=\"views-field-changed-lines\">\n                <span class=\"field-content\">5 additions & 5 deletions</span>\n  </div>\n  \n  <div class=\"views-field-visual-diffstat\">\n                <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"minus\">-</span><span class=\"minus\">-</span><span class=\"minus\">-</span><span class=\"no-op\"> </span></span></span>\n  </div>\n  </div>\n  <div class=\"views-row views-row-2 views-row-even\">\n      \n  <div class=\"views-field-path\">\n                <span class=\"field-content\"><a href=\"http://drupalcode.org/project/video.git/blob/b0b7ff08fed89c76454aa54627cc219361365d7b:/tests/TranscoderAbstractionFactoryFfmpeg.test\">/tests/TranscoderAbstractionFactoryFfmpeg.test</a></span>\n  </div>\n  \n  <div class=\"views-field-changed-lines\">\n                <span class=\"field-content\">21 additions & 7 deletions</span>\n  </div>\n  \n  <div class=\"views-field-visual-diffstat\">\n                <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"minus\">-</span><span class=\"minus\">-</span></span></span>\n  </div>\n  </div>\n  <div class=\"views-row views-row-3 views-row-odd views-row-last\">\n      \n  <div class=\"views-field-path\">\n                <span class=\"field-content\"><a href=\"http://drupalcode.org/project/video.git/blob/b0b7ff08fed89c76454aa54627cc219361365d7b:/transcoders/TranscoderAbstractionFactoryFfmpeg.inc\">/transcoders/TranscoderAbstractionFactoryFfmpeg.inc</a></span>\n  </div>\n  \n  <div class=\"views-field-changed-lines\">\n                <span class=\"field-content\">31 additions & 22 deletions</span>\n  </div>\n  \n  <div class=\"views-field-visual-diffstat\">\n                <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"minus\">-</span><span class=\"minus\">-</span><span class=\"minus\">-</span></span></span>\n  </div>\n  </div>\n    </div>\n  \n  \n  \n  \n  \n  \n</div>\n<pre>Issue #1492296 by Jorrit: Added support for avconv binaries instead of FFmpeg.\n</pre>",
+  'timestamp' => '1347206397',
+  'guid' => 'VCS Operation 3936924 at http://drupal.org',
+))
+  ->values(array(
+  'iid' => '3',
+  'fid' => '1',
+  'title' => 'Remove Login Tabs: Commit 6e1eb5a on 7.x-1.x by highrockmedia',
+  'link' => 'http://drupal.org/commitlog/commit/41%2C610/6e1eb5a4a952db3264e7696e840ac3d797f4b477',
+  'author' => 'highrockmedia',
+  'description' => "<div class=\"view view-commitlog-commit-items view-id-commitlog_commit_items view-display-id-block_1 view-dom-id-8\">\n    \n  \n  \n      <div class=\"view-content\">\n        <div class=\"views-row views-row-1 views-row-odd views-row-first views-row-last\">\n      \n  <div class=\"views-field-path\">\n                <span class=\"field-content\"><a href=\"http://drupalcode.org/sandbox/highrockmedia/1702096.git/blob/6e1eb5a4a952db3264e7696e840ac3d797f4b477:/readme.txt\">/readme.txt</a></span>\n  </div>\n  \n  <div class=\"views-field-changed-lines\">\n                <span class=\"field-content\">10 additions & 2 deletions</span>\n  </div>\n  \n  <div class=\"views-field-visual-diffstat\">\n                <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"minus\">-</span></span></span>\n  </div>\n  </div>\n    </div>\n  \n  \n  \n  \n  \n  \n</div>\n<pre>Updating readme\n</pre>",
+  'timestamp' => '1347206401',
+  'guid' => 'VCS Operation 3936920 at http://drupal.org',
+))
+  ->values(array(
+  'iid' => '4',
+  'fid' => '1',
+  'title' => 'TimeGroup: Commit 6ed4c08 on 7.x-1.x by Sweetchuck',
+  'link' => 'http://drupal.org/commitlog/commit/40%2C448/6ed4c085e5d9a8d33e091e1b8a65c73eab2dc99e',
+  'author' => 'Sweetchuck',
+  'description' => "<div class=\"view view-commitlog-commit-items view-id-commitlog_commit_items view-display-id-block_1 view-dom-id-7\">\n    \n  \n  \n      <div class=\"view-content\">\n        <div class=\"views-row views-row-1 views-row-odd views-row-first views-row-last\">\n      \n  <div class=\"views-field-path\">\n                <span class=\"field-content\"><a href=\"http://drupalcode.org/sandbox/Sweetchuck/1666642.git/blob/6ed4c085e5d9a8d33e091e1b8a65c73eab2dc99e:/includes/ctools/export_ui/timegroup.inc\">/includes/ctools/export_ui/timegroup.inc</a></span>\n  </div>\n  \n  <div class=\"views-field-changed-lines\">\n                <span class=\"field-content\">1 addition & 1 deletion</span>\n  </div>\n  \n  <div class=\"views-field-visual-diffstat\">\n                <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"minus\">-</span><span class=\"no-op\"> </span><span class=\"no-op\"> </span><span class=\"no-op\"> </span><span class=\"no-op\"> </span><span class=\"no-op\"> </span></span></span>\n  </div>\n  </div>\n    </div>\n  \n  \n  \n  \n  \n  \n</div>\n<pre>CTools UI - Wrong default value for timeoffset fix.\n</pre>",
+  'timestamp' => '1347206533',
+  'guid' => 'VCS Operation 3936942 at http://drupal.org',
+))
+  ->values(array(
+  'iid' => '5',
+  'fid' => '1',
+  'title' => 'Domain Access: Commit 1140172 on 6.x-2.x authored by bforchhammer, committed by agentrickard',
+  'link' => 'http://drupal.org/commitlog/commit/2%2C410/11401723f5c5d11032dd141ba4939ed889a7a915',
+  'author' => 'bforchhammer',
+  'description' => "<div class=\"view view-commitlog-commit-items view-id-commitlog_commit_items view-display-id-block_1 view-dom-id-6\">\n    \n  \n  \n      <div class=\"view-content\">\n        <div class=\"views-row views-row-1 views-row-odd views-row-first\">\n      \n  <div class=\"views-field-path\">\n                <span class=\"field-content\"><a href=\"http://drupalcode.org/project/domain.git/blob/11401723f5c5d11032dd141ba4939ed889a7a915:/domain_source/domain_source.views.inc\">/domain_source/domain_source.views.inc</a></span>\n  </div>\n  \n  <div class=\"views-field-changed-lines\">\n                <span class=\"field-content\">33 additions & 1 deletion</span>\n  </div>\n  \n  <div class=\"views-field-visual-diffstat\">\n                <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"no-op\"> </span></span></span>\n  </div>\n  </div>\n  <div class=\"views-row views-row-2 views-row-even views-row-last\">\n      \n  <div class=\"views-field-path\">\n                <span class=\"field-content\"><a href=\"http://drupalcode.org/project/domain.git/blob/11401723f5c5d11032dd141ba4939ed889a7a915:/domain_source/includes/domain_source_handler_filter_domain_id.inc\">/domain_source/includes/domain_source_handler_filter_domain_id.inc</a></span>\n  </div>\n  \n  <div class=\"views-field-changed-lines\">\n                <span class=\"field-content\">28 additions & 0 deletions</span>\n  </div>\n  \n  <div class=\"views-field-visual-diffstat\">\n                <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span></span></span>\n  </div>\n  </div>\n    </div>\n  \n  \n  \n  \n  \n  \n</div>\n<pre>Patch #1685658 by bforchhammer. Better handling of current domain for Domain Source.\n</pre>",
+  'timestamp' => '1347206541',
+  'guid' => 'VCS Operation 3936926 at http://drupal.org',
+))
+  ->values(array(
+  'iid' => '6',
+  'fid' => '1',
+  'title' => 'Domain Access: Commit 19b1c36 on 7.x-2.x by agentrickard',
+  'link' => 'http://drupal.org/commitlog/commit/2%2C410/19b1c366d86cecd8a9f6e1a6e835c0566f5c02db',
+  'author' => 'agentrickard',
+  'description' => "<div class=\"view view-commitlog-commit-items view-id-commitlog_commit_items view-display-id-block_1 view-dom-id-5\">\n    \n  \n  \n      <div class=\"view-content\">\n        <div class=\"views-row views-row-1 views-row-odd views-row-first views-row-last\">\n      \n  <div class=\"views-field-path\">\n                <span class=\"field-content\"><a href=\"http://drupalcode.org/project/domain.git/blob/19b1c366d86cecd8a9f6e1a6e835c0566f5c02db:/domain_source/includes/domain_source_handler_filter_domain_id.inc\">/domain_source/includes/domain_source_handler_filter_domain_id.inc</a></span>\n  </div>\n  \n  <div class=\"views-field-changed-lines\">\n                <span class=\"field-content\">28 additions & 0 deletions</span>\n  </div>\n  \n  <div class=\"views-field-visual-diffstat\">\n                <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span></span></span>\n  </div>\n  </div>\n    </div>\n  \n  \n  \n  \n  \n  \n</div>\n<pre>Adds new Views file to Domain Source.\n</pre>",
+  'timestamp' => '1347206601',
+  'guid' => 'VCS Operation 3936928 at http://drupal.org',
+))
+  ->values(array(
+  'iid' => '7',
+  'fid' => '1',
+  'title' => 'Domain Access: Commit d2d5456 on 7.x-3.x by agentrickard',
+  'link' => 'http://drupal.org/commitlog/commit/2%2C410/d2d5456cad6ca57bb72e743da6a7112a74d7a331',
+  'author' => 'agentrickard',
+  'description' => "<div class=\"view view-commitlog-commit-items view-id-commitlog_commit_items view-display-id-block_1 view-dom-id-4\">\n    \n  \n  \n      <div class=\"view-content\">\n        <div class=\"views-row views-row-1 views-row-odd views-row-first views-row-last\">\n      \n  <div class=\"views-field-path\">\n                <span class=\"field-content\"><a href=\"http://drupalcode.org/project/domain.git/blob/d2d5456cad6ca57bb72e743da6a7112a74d7a331:/domain_source/includes/domain_source_handler_filter_domain_id.inc\">/domain_source/includes/domain_source_handler_filter_domain_id.inc</a></span>\n  </div>\n  \n  <div class=\"views-field-changed-lines\">\n                <span class=\"field-content\">29 additions & 0 deletions</span>\n  </div>\n  \n  <div class=\"views-field-visual-diffstat\">\n                <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span></span></span>\n  </div>\n  </div>\n    </div>\n  \n  \n  \n  \n  \n  \n</div>\n<pre>Adds new Views file to Domain Source.\n</pre>",
+  'timestamp' => '1347206620',
+  'guid' => 'VCS Operation 3936930 at http://drupal.org',
+))
+  ->values(array(
+  'iid' => '8',
+  'fid' => '1',
+  'title' => 'Skarabee: Commit 400b519 on 7.x-1.x by sboersma',
+  'link' => 'http://drupal.org/commitlog/commit/23%2C278/400b5190f59b1cb58d6b27fa10ac668e9580aa73',
+  'author' => 'sboersma',
+  'description' => "<div class=\"view view-commitlog-commit-items view-id-commitlog_commit_items view-display-id-block_1 view-dom-id-3\">\n    \n  \n  \n      <div class=\"view-content\">\n        <div class=\"views-row views-row-1 views-row-odd views-row-first views-row-last\">\n      \n  <div class=\"views-field-path\">\n                <span class=\"field-content\"><a href=\"http://drupalcode.org/sandbox/sboersma/1176520.git/blob/400b5190f59b1cb58d6b27fa10ac668e9580aa73:/skarabee.install\">/skarabee.install</a></span>\n  </div>\n  \n  <div class=\"views-field-changed-lines\">\n                <span class=\"field-content\">3 additions & 3 deletions</span>\n  </div>\n  \n  <div class=\"views-field-visual-diffstat\">\n                <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"minus\">-</span><span class=\"minus\">-</span><span class=\"minus\">-</span><span class=\"no-op\"> </span></span></span>\n  </div>\n  </div>\n    </div>\n  \n  \n  \n  \n  \n  \n</div>\n<pre>sboersma: Changed variable deletion method.\n</pre>",
+  'timestamp' => '1347206709',
+  'guid' => 'VCS Operation 3936932 at http://drupal.org',
+))
+  ->values(array(
+  'iid' => '9',
+  'fid' => '1',
+  'title' => 'Config entity listing plugin API: Commit dd3fa73 on 8.x-list by damiankloip',
+  'link' => 'http://drupal.org/commitlog/commit/43%2C586/dd3fa73b0bcdca833bbde1d1ddb3cefe42003693',
+  'author' => 'damiankloip',
+  'description' => "<div class=\"view view-commitlog-commit-items view-id-commitlog_commit_items view-display-id-block_1 view-dom-id-2\">\n    \n  \n  \n      <div class=\"view-content\">\n        <div class=\"views-row views-row-1 views-row-odd views-row-first views-row-last\">\n      \n  <div class=\"views-field-path\">\n                <span class=\"field-content\"><a href=\"http://drupalcode.org/sandbox/damiankloip/1778654.git/blob/dd3fa73b0bcdca833bbde1d1ddb3cefe42003693:/core/modules/config/lib/Drupal/config/Tests/ConfigEntityListingTest.php\">/core/modules/config/lib/Drupal/config/Tests/ConfigEntityListingTest.php</a></span>\n  </div>\n  \n  <div class=\"views-field-changed-lines\">\n                <span class=\"field-content\">10 additions & 2 deletions</span>\n  </div>\n  \n  <div class=\"views-field-visual-diffstat\">\n                <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"minus\">-</span></span></span>\n  </div>\n  </div>\n    </div>\n  \n  \n  \n  \n  \n  \n</div>\n<pre>Added tests for getList() method\n</pre>",
+  'timestamp' => '1347206738',
+  'guid' => 'VCS Operation 3936936 at http://drupal.org',
+))
+  ->values(array(
+  'iid' => '10',
+  'fid' => '1',
+  'title' => 'AutoSlave: Commit 76891da on 7.x-1.x by gielfeldt',
+  'link' => 'http://drupal.org/commitlog/commit/42%2C968/76891daf3cea9c294daf56a26760cb1bf33ea58a',
+  'author' => 'gielfeldt',
+  'description' => "<div class=\"view view-commitlog-commit-items view-id-commitlog_commit_items view-display-id-block_1 view-dom-id-1\">\n    \n  \n  \n      <div class=\"view-content\">\n        <div class=\"views-row views-row-1 views-row-odd views-row-first\">\n      \n  <div class=\"views-field-path\">\n                <span class=\"field-content\"><a href=\"http://drupalcode.org/project/autoslave.git/blob/76891daf3cea9c294daf56a26760cb1bf33ea58a:/autoslave.module\">/autoslave.module</a></span>\n  </div>\n  \n  <div class=\"views-field-changed-lines\">\n                <span class=\"field-content\">10 additions & 7 deletions</span>\n  </div>\n  \n  <div class=\"views-field-visual-diffstat\">\n                <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"minus\">-</span><span class=\"minus\">-</span><span class=\"minus\">-</span></span></span>\n  </div>\n  </div>\n  <div class=\"views-row views-row-2 views-row-even views-row-last\">\n      \n  <div class=\"views-field-path\">\n                <span class=\"field-content\"><a href=\"http://drupalcode.org/project/autoslave.git/blob/76891daf3cea9c294daf56a26760cb1bf33ea58a:/autoslave/database.inc\">/autoslave/database.inc</a></span>\n  </div>\n  \n  <div class=\"views-field-changed-lines\">\n                <span class=\"field-content\">10 additions & 2 deletions</span>\n  </div>\n  \n  <div class=\"views-field-visual-diffstat\">\n                <span class=\"field-content\"><span class=\"versioncontrol-diffstat clear-block\"><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"plus\">+</span><span class=\"minus\">-</span></span></span>\n  </div>\n  </div>\n    </div>\n  \n  \n  \n  \n  \n  \n</div>\n<pre>Keep track of affected tables per commit.\n</pre>",
+  'timestamp' => '1347206751',
+  'guid' => 'VCS Operation 3936934 at http://drupal.org',
+))
+  ->execute();
diff --git a/modules/simpletest/tests/upgrade/drupal-7.filled.standard_all.database.php.gz b/modules/simpletest/tests/upgrade/drupal-7.filled.standard_all.database.php.gz
index 5cc5690e15a771722e312656218f8a55ff512889..472eedb230b7d9feb3f44dc53e4851210fc5ab13 100644
Binary files a/modules/simpletest/tests/upgrade/drupal-7.filled.standard_all.database.php.gz and b/modules/simpletest/tests/upgrade/drupal-7.filled.standard_all.database.php.gz differ
diff --git a/modules/simpletest/tests/upgrade/update.aggregator.test b/modules/simpletest/tests/upgrade/update.aggregator.test
new file mode 100644
index 0000000000000000000000000000000000000000..d4135774e72b03b02c7d390687095cc59f1671d8
--- /dev/null
+++ b/modules/simpletest/tests/upgrade/update.aggregator.test
@@ -0,0 +1,47 @@
+<?php
+/**
+ * @file
+ * Tests schema changes in aggregator.module.
+ */
+class AggregatorUpdatePathTestCase extends UpdatePathTestCase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Aggregator update path',
+      'description' => 'Aggregator update path tests.',
+      'group' => 'Upgrade path',
+    );
+  }
+
+  public function setUp() {
+    // Use the normal installation and add our feed data.
+    $path = drupal_get_path('module', 'simpletest') . '/tests/upgrade';
+    $this->databaseDumpFiles = array(
+      $path . '/drupal-7.bare.standard_all.database.php.gz',
+      $path . '/drupal-7.aggregator.database.php',
+    );
+    parent::setUp();
+
+    // Our test data only relies on aggregator.module.
+    $this->uninstallModulesExcept(array('aggregator'));
+  }
+
+  /**
+   * Tests that the aggregator.module update is successful.
+   */
+  public function testAggregatorUpdate() {
+    // Get a selection of the fields affected by the schema update.
+    $query = db_select('aggregator_feed', 'af');
+    $query->join('aggregator_item', 'ai', 'af.fid = ai.fid');
+    $query
+      ->fields('af', array('url', 'link'))
+      ->fields('ai', array('link', 'guid'));
+
+    $pre_update_data = $query->execute()->fetchAll();
+    $this->assertTrue($this->performUpgrade(), 'The update was completed successfully.');
+    $post_update_data = $query->execute()->fetchAll();
+
+    $this->assertTrue($pre_update_data == $post_update_data, 'Feed data was preserved during the update.');
+  }
+
+}
diff --git a/modules/simpletest/tests/upgrade/upgrade.forum.test b/modules/simpletest/tests/upgrade/upgrade.forum.test
index 99269d9f4005e4199dc62845f4d556f730c675f0..ebac85415333c134163f4a0e50f217b8450fff24 100644
--- a/modules/simpletest/tests/upgrade/upgrade.forum.test
+++ b/modules/simpletest/tests/upgrade/upgrade.forum.test
@@ -56,5 +56,9 @@ class ForumUpgradePathTestCase extends UpgradePathTestCase {
 
     $this->drupalGet("forum/$tid");
     $this->assertText('Bananas');
-    }
+    $this->drupalLogout();
+
+    $this->drupalGet("node/add/forum/$tid");
+    $this->assertResponse(200, t('User can access forum creation page.'));
+  }
 }
diff --git a/modules/simpletest/tests/url_alter_test.info b/modules/simpletest/tests/url_alter_test.info
index 741d1625cab260a84995ad075a4730acb9eb130d..d7fe962cf9fbe2fcdefd4c14c071ebb667066c23 100644
--- a/modules/simpletest/tests/url_alter_test.info
+++ b/modules/simpletest/tests/url_alter_test.info
@@ -5,8 +5,8 @@ package = Testing
 version = VERSION
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/simpletest/tests/xmlrpc_test.info b/modules/simpletest/tests/xmlrpc_test.info
index 45abde00f46e3a734d9813eedb4f904e0172406a..b6a3cc49e6a2fe4d4206a5293b326a27ac87e0be 100644
--- a/modules/simpletest/tests/xmlrpc_test.info
+++ b/modules/simpletest/tests/xmlrpc_test.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/statistics/statistics.info b/modules/statistics/statistics.info
index bd7b8458aefb98c4f013d87e992d705df5ed420c..628a94efbbe384df01eb2828709ea5fb43ecc5bc 100644
--- a/modules/statistics/statistics.info
+++ b/modules/statistics/statistics.info
@@ -6,8 +6,8 @@ core = 7.x
 files[] = statistics.test
 configure = admin/config/system/statistics
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/statistics/statistics.test b/modules/statistics/statistics.test
index a40ecc80e2e1e127a1f9bc4302f500c8d19ee484..d2155da6c665ae2c01d552ec4745a7dd6f776c44 100644
--- a/modules/statistics/statistics.test
+++ b/modules/statistics/statistics.test
@@ -92,18 +92,18 @@ class StatisticsLoggingTestCase extends DrupalWebTestCase {
 
     // Verify logging of an uncached page.
     $this->drupalGet($path);
-    $this->assertIdentical($this->drupalGetHeader('X-Drupal-Cache'), 'MISS', t('Testing an uncached page.'));
+    $this->assertIdentical($this->drupalGetHeader('X-Drupal-Cache'), 'MISS', 'Testing an uncached page.');
     $log = db_query('SELECT * FROM {accesslog}')->fetchAll(PDO::FETCH_ASSOC);
-    $this->assertTrue(is_array($log) && count($log) == 1, t('Page request was logged.'));
+    $this->assertTrue(is_array($log) && count($log) == 1, 'Page request was logged.');
     $this->assertEqual(array_intersect_key($log[0], $expected), $expected);
     $node_counter = statistics_get($this->node->nid);
     $this->assertIdentical($node_counter['totalcount'], '1');
 
     // Verify logging of a cached page.
     $this->drupalGet($path);
-    $this->assertIdentical($this->drupalGetHeader('X-Drupal-Cache'), 'HIT', t('Testing a cached page.'));
+    $this->assertIdentical($this->drupalGetHeader('X-Drupal-Cache'), 'HIT', 'Testing a cached page.');
     $log = db_query('SELECT * FROM {accesslog}')->fetchAll(PDO::FETCH_ASSOC);
-    $this->assertTrue(is_array($log) && count($log) == 2, t('Page request was logged.'));
+    $this->assertTrue(is_array($log) && count($log) == 2, 'Page request was logged.');
     $this->assertEqual(array_intersect_key($log[1], $expected), $expected);
     $node_counter = statistics_get($this->node->nid);
     $this->assertIdentical($node_counter['totalcount'], '2');
@@ -113,7 +113,7 @@ class StatisticsLoggingTestCase extends DrupalWebTestCase {
     $this->drupalGet($path);
     $log = db_query('SELECT * FROM {accesslog}')->fetchAll(PDO::FETCH_ASSOC);
     // Check the 6th item since login and account pages are also logged
-    $this->assertTrue(is_array($log) && count($log) == 6, t('Page request was logged.'));
+    $this->assertTrue(is_array($log) && count($log) == 6, 'Page request was logged.');
     $this->assertEqual(array_intersect_key($log[5], $expected), $expected);
     $node_counter = statistics_get($this->node->nid);
     $this->assertIdentical($node_counter['totalcount'], '3');
@@ -126,11 +126,16 @@ class StatisticsLoggingTestCase extends DrupalWebTestCase {
     );
     $this->drupalGet($path);
     $log = db_query('SELECT * FROM {accesslog}')->fetchAll(PDO::FETCH_ASSOC);
-    $this->assertTrue(is_array($log) && count($log) == 7, t('Page request was logged.'));
+    $this->assertTrue(is_array($log) && count($log) == 7, 'Page request was logged.');
     $this->assertEqual(array_intersect_key($log[6], $expected), $expected);
 
-    // Create a path longer than 255 characters.
-    $long_path = $this->randomName(256);
+    // Create a path longer than 255 characters. Drupal's .htaccess file
+    // instructs Apache to test paths against the file system before routing to
+    // index.php. Many file systems restrict file names to 255 characters
+    // (http://en.wikipedia.org/wiki/Comparison_of_file_systems#Limits), and
+    // Apache returns a 403 when testing longer file names, but the total path
+    // length is not restricted.
+    $long_path = $this->randomName(127) . '/' . $this->randomName(128);
 
     // Test that the long path is properly truncated when logged.
     $this->drupalGet($long_path);
@@ -158,9 +163,9 @@ class StatisticsReportsTestCase extends StatisticsTestCase {
    */
   function testRecentHits() {
     $this->drupalGet('admin/reports/hits');
-    $this->assertText('test', t('Hit title found.'));
-    $this->assertText('node/1', t('Hit URL found.'));
-    $this->assertText('Anonymous', t('Hit user found.'));
+    $this->assertText('test', 'Hit title found.');
+    $this->assertText('node/1', 'Hit URL found.');
+    $this->assertText('Anonymous', 'Hit user found.');
   }
 
   /**
@@ -168,8 +173,8 @@ class StatisticsReportsTestCase extends StatisticsTestCase {
    */
   function testTopPages() {
     $this->drupalGet('admin/reports/pages');
-    $this->assertText('test', t('Hit title found.'));
-    $this->assertText('node/1', t('Hit URL found.'));
+    $this->assertText('test', 'Hit title found.');
+    $this->assertText('node/1', 'Hit URL found.');
   }
 
   /**
@@ -177,7 +182,7 @@ class StatisticsReportsTestCase extends StatisticsTestCase {
    */
   function testTopReferrers() {
     $this->drupalGet('admin/reports/referrers');
-    $this->assertText('http://example.com', t('Hit referrer found.'));
+    $this->assertText('http://example.com', 'Hit referrer found.');
   }
 
   /**
@@ -185,9 +190,9 @@ class StatisticsReportsTestCase extends StatisticsTestCase {
    */
   function testDetails() {
     $this->drupalGet('admin/reports/access/1');
-    $this->assertText('test', t('Hit title found.'));
-    $this->assertText('node/1', t('Hit URL found.'));
-    $this->assertText('Anonymous', t('Hit user found.'));
+    $this->assertText('test', 'Hit title found.');
+    $this->assertText('node/1', 'Hit URL found.');
+    $this->assertText('Anonymous', 'Hit user found.');
   }
 
   /**
@@ -196,8 +201,8 @@ class StatisticsReportsTestCase extends StatisticsTestCase {
   function testAccessLogging() {
     $this->drupalGet('admin/reports/referrers');
     $this->drupalGet('admin/reports/hits');
-    $this->assertText('Top referrers in the past 3 days', t('Hit title found.'));
-    $this->assertText('admin/reports/referrers', t('Hit URL found.'));
+    $this->assertText('Top referrers in the past 3 days', 'Hit title found.');
+    $this->assertText('admin/reports/referrers', 'Hit URL found.');
   }
 
   /**
@@ -222,12 +227,12 @@ class StatisticsReportsTestCase extends StatisticsTestCase {
 
     // Get some page and check if the block is displayed.
     $this->drupalGet('user');
-    $this->assertText('Popular content', t('Found the popular content block.'));
-    $this->assertText("Today's", t('Found today\'s popular content.'));
-    $this->assertText('All time', t('Found the alll time popular content.'));
-    $this->assertText('Last viewed', t('Found the last viewed popular content.'));
+    $this->assertText('Popular content', 'Found the popular content block.');
+    $this->assertText("Today's", 'Found today\'s popular content.');
+    $this->assertText('All time', 'Found the alll time popular content.');
+    $this->assertText('Last viewed', 'Found the last viewed popular content.');
 
-    $this->assertRaw(l($node->title, 'node/' . $node->nid), t('Found link to visited node.'));
+    $this->assertRaw(l($node->title, 'node/' . $node->nid), 'Found link to visited node.');
   }
 }
 
@@ -254,30 +259,30 @@ class StatisticsBlockVisitorsTestCase extends StatisticsTestCase {
     // and that a 'block IP address' link is displayed.
     $this->drupalLogin($this->blocking_user);
     $this->drupalGet('admin/reports/visitors');
-    $this->assertText($test_ip_address, t('IP address found.'));
-    $this->assertText(t('block IP address'), t('Block IP link displayed'));
+    $this->assertText($test_ip_address, 'IP address found.');
+    $this->assertText(t('block IP address'), 'Block IP link displayed');
 
     // Block the IP address.
     $this->clickLink('block IP address');
-    $this->assertText(t('IP address blocking'), t('IP blocking page displayed.'));
+    $this->assertText(t('IP address blocking'), 'IP blocking page displayed.');
     $edit = array();
     $edit['ip'] = $test_ip_address;
     $this->drupalPost('admin/config/people/ip-blocking', $edit, t('Add'));
     $ip = db_query("SELECT iid from {blocked_ips} WHERE ip = :ip", array(':ip' => $edit['ip']))->fetchField();
-    $this->assertNotEqual($ip, FALSE, t('IP address found in database'));
-    $this->assertRaw(t('The IP address %ip has been blocked.', array('%ip' => $edit['ip'])), t('IP address was blocked.'));
+    $this->assertNotEqual($ip, FALSE, 'IP address found in database');
+    $this->assertRaw(t('The IP address %ip has been blocked.', array('%ip' => $edit['ip'])), 'IP address was blocked.');
 
     // Verify that the block/unblock link on the top visitors page has been
     // altered.
     $this->drupalGet('admin/reports/visitors');
-    $this->assertText(t('unblock IP address'), t('Unblock IP address link displayed'));
+    $this->assertText(t('unblock IP address'), 'Unblock IP address link displayed');
 
     // Unblock the IP address.
     $this->clickLink('unblock IP address');
-    $this->assertRaw(t('Are you sure you want to delete %ip?', array('%ip' => $test_ip_address)), t('IP address deletion confirmation found.'));
+    $this->assertRaw(t('Are you sure you want to delete %ip?', array('%ip' => $test_ip_address)), 'IP address deletion confirmation found.');
     $edit = array();
     $this->drupalPost('admin/config/people/ip-blocking/delete/1', NULL, t('Delete'));
-    $this->assertRaw(t('The IP address %ip was deleted.', array('%ip' => $test_ip_address)), t('IP address deleted.'));
+    $this->assertRaw(t('The IP address %ip was deleted.', array('%ip' => $test_ip_address)), 'IP address deleted.');
   }
 }
 
@@ -321,32 +326,32 @@ class StatisticsAdminTestCase extends DrupalWebTestCase {
    * Verifies that the statistics settings page works.
    */
   function testStatisticsSettings() {
-    $this->assertFalse(variable_get('statistics_enable_access_log', 0), t('Access log is disabled by default.'));
-    $this->assertFalse(variable_get('statistics_count_content_views', 0), t('Count content view log is disabled by default.'));
+    $this->assertFalse(variable_get('statistics_enable_access_log', 0), 'Access log is disabled by default.');
+    $this->assertFalse(variable_get('statistics_count_content_views', 0), 'Count content view log is disabled by default.');
 
     $this->drupalGet('admin/reports/pages');
-    $this->assertRaw(t('No statistics available.'), t('Verifying text shown when no statistics is available.'));
+    $this->assertRaw(t('No statistics available.'), 'Verifying text shown when no statistics is available.');
 
     // Enable access log and counter on content view.
     $edit['statistics_enable_access_log'] = 1;
     $edit['statistics_count_content_views'] = 1;
     $this->drupalPost('admin/config/system/statistics', $edit, t('Save configuration'));
-    $this->assertTrue(variable_get('statistics_enable_access_log'), t('Access log is enabled.'));
-    $this->assertTrue(variable_get('statistics_count_content_views'), t('Count content view log is enabled.'));
+    $this->assertTrue(variable_get('statistics_enable_access_log'), 'Access log is enabled.');
+    $this->assertTrue(variable_get('statistics_count_content_views'), 'Count content view log is enabled.');
 
     // Hit the node.
     $this->drupalGet('node/' . $this->test_node->nid);
 
     $this->drupalGet('admin/reports/pages');
-    $this->assertText('node/1', t('Test node found.'));
+    $this->assertText('node/1', 'Test node found.');
 
     // Hit the node again (the counter is incremented after the hit, so
     // "1 read" will actually be shown when the node is hit the second time).
     $this->drupalGet('node/' . $this->test_node->nid);
-    $this->assertText('1 read', t('Node is read once.'));
+    $this->assertText('1 read', 'Node is read once.');
 
     $this->drupalGet('node/' . $this->test_node->nid);
-    $this->assertText('2 reads', t('Node is read 2 times.'));
+    $this->assertText('2 reads', 'Node is read 2 times.');
   }
 
   /**
@@ -395,10 +400,10 @@ class StatisticsAdminTestCase extends DrupalWebTestCase {
     $this->drupalPost(NULL, NULL, t('Cancel account'));
     // Confirm account cancellation request.
     $this->drupalGet("user/$account->uid/cancel/confirm/$timestamp/" . user_pass_rehash($account->pass, $timestamp, $account->login));
-    $this->assertFalse(user_load($account->uid, TRUE), t('User is not found in the database.'));
+    $this->assertFalse(user_load($account->uid, TRUE), 'User is not found in the database.');
 
     $this->drupalGet('admin/reports/visitors');
-    $this->assertNoText($account->name, t('Did not find user in visitor statistics.'));
+    $this->assertNoText($account->name, 'Did not find user in visitor statistics.');
   }
 
   /**
@@ -412,10 +417,10 @@ class StatisticsAdminTestCase extends DrupalWebTestCase {
 
     $this->drupalGet('node/' . $this->test_node->nid);
     $this->drupalGet('node/' . $this->test_node->nid);
-    $this->assertText('1 read', t('Node is read once.'));
+    $this->assertText('1 read', 'Node is read once.');
 
     $this->drupalGet('admin/reports/pages');
-    $this->assertText('node/' . $this->test_node->nid, t('Hit URL found.'));
+    $this->assertText('node/' . $this->test_node->nid, 'Hit URL found.');
 
     // statistics_cron will subtract the statistics_flush_accesslog_timer
     // variable from REQUEST_TIME in the delete query, so wait two secs here to
@@ -424,14 +429,14 @@ class StatisticsAdminTestCase extends DrupalWebTestCase {
     $this->cronRun();
 
     $this->drupalGet('admin/reports/pages');
-    $this->assertNoText('node/' . $this->test_node->nid, t('No hit URL found.'));
+    $this->assertNoText('node/' . $this->test_node->nid, 'No hit URL found.');
 
     $result = db_select('node_counter', 'nc')
       ->fields('nc', array('daycount'))
       ->condition('nid', $this->test_node->nid, '=')
       ->execute()
       ->fetchField();
-    $this->assertFalse($result, t('Daycounter is zero.'));
+    $this->assertFalse($result, 'Daycounter is zero.');
   }
 }
 
@@ -470,11 +475,11 @@ class StatisticsTokenReplaceTestCase extends StatisticsTestCase {
     $tests['[node:last-view:short]'] = format_date($statistics['timestamp'], 'short');
 
     // Test to make sure that we generated something for each token.
-    $this->assertFalse(in_array(0, array_map('strlen', $tests)), t('No empty tokens generated.'));
+    $this->assertFalse(in_array(0, array_map('strlen', $tests)), 'No empty tokens generated.');
 
     foreach ($tests as $input => $expected) {
       $output = token_replace($input, array('node' => $node), array('language' => $language));
-      $this->assertEqual($output, $expected, t('Statistics token %token replaced.', array('%token' => $input)));
+      $this->assertEqual($output, $expected, format_string('Statistics token %token replaced.', array('%token' => $input)));
     }
   }
 }
diff --git a/modules/syslog/syslog.info b/modules/syslog/syslog.info
index dbdd1e16036fac29412dfee30fe3bdc0aa189553..963d87c5e6def619deb9087dfa7e483e214450b2 100644
--- a/modules/syslog/syslog.info
+++ b/modules/syslog/syslog.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 files[] = syslog.test
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/syslog/syslog.module b/modules/syslog/syslog.module
index 132760626312201d77d56071ffc92e6ca443ef38..af3eb0a0f0894e312a685fcb2a2cbaa27ae0cc36 100644
--- a/modules/syslog/syslog.module
+++ b/modules/syslog/syslog.module
@@ -70,10 +70,11 @@ function syslog_form_system_logging_settings_alter(&$form, &$form_state) {
   $form['actions']['#weight'] = 1;
 }
 
- /**
+/**
  * Lists all possible syslog facilities for UNIX/Linux.
  *
  * @return array
+ *   An array of syslog facilities for UNIX/Linux.
  */
 function syslog_facility_list() {
   return array(
diff --git a/modules/syslog/syslog.test b/modules/syslog/syslog.test
index 1f7ab2ea8bf8f216d4a62ab959f9db5c9f437eb1..4707bd0dff174e6dc27659eae2eaed88f956efe0 100644
--- a/modules/syslog/syslog.test
+++ b/modules/syslog/syslog.test
@@ -37,7 +37,7 @@ class SyslogTestCase extends DrupalWebTestCase {
       $this->drupalGet('admin/config/development/logging');
       if ($this->parse()) {
         $field = $this->xpath('//option[@value=:value]', array(':value' => LOG_LOCAL6)); // Should be one field.
-        $this->assertTrue($field[0]['selected'] == 'selected', t('Facility value saved.'));
+        $this->assertTrue($field[0]['selected'] == 'selected', 'Facility value saved.');
       }
     }
   }
diff --git a/modules/system/html.tpl.php b/modules/system/html.tpl.php
index 0e012774dcef95dc5ed502bdea28e8a9f91a21b3..c3e24c94628be40562f2f22803bf2562117b5183 100644
--- a/modules/system/html.tpl.php
+++ b/modules/system/html.tpl.php
@@ -39,6 +39,8 @@
  * @see template_preprocess()
  * @see template_preprocess_html()
  * @see template_process()
+ *
+ * @ingroup themeable
  */
 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
   "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
diff --git a/modules/system/maintenance-page.tpl.php b/modules/system/maintenance-page.tpl.php
index 31de3bb2385826a31b04ab676970de37c5b32cc4..69d267f810dce3931e742a78a325f87ac18e2a54 100644
--- a/modules/system/maintenance-page.tpl.php
+++ b/modules/system/maintenance-page.tpl.php
@@ -9,6 +9,8 @@
  *
  * @see template_preprocess()
  * @see template_preprocess_maintenance_page()
+ *
+ * @ingroup themeable
  */
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
diff --git a/modules/system/page.tpl.php b/modules/system/page.tpl.php
index bd440afb2766a8b2519826c7d38f32aadbead450..bd61489e0f8beac69b14f8cc3987715764b22b48 100644
--- a/modules/system/page.tpl.php
+++ b/modules/system/page.tpl.php
@@ -68,6 +68,8 @@
  * @see template_preprocess_page()
  * @see template_process()
  * @see html.tpl.php
+ *
+ * @ingroup themeable
  */
 ?>
 
diff --git a/modules/system/region.tpl.php b/modules/system/region.tpl.php
index b29e24f0178f56318ed3415a6c06e40f42786618..deb8d3aed817c33010040f81b12c2da50ffbb75e 100644
--- a/modules/system/region.tpl.php
+++ b/modules/system/region.tpl.php
@@ -24,6 +24,8 @@
  * @see template_preprocess()
  * @see template_preprocess_region()
  * @see template_process()
+ *
+ * @ingroup themeable
  */
 ?>
 <?php if ($content): ?>
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index 23a975b0cf57dda5724a955ff6ebc72be71c1a0b..061898c8557d3ec6003b044595c694621266fe79 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -691,8 +691,16 @@ function _system_theme_settings_validate_path($path) {
  * Process system_theme_settings form submissions.
  */
 function system_theme_settings_submit($form, &$form_state) {
+  // Exclude unnecessary elements before saving.
+  form_state_values_clean($form_state);
+
   $values = $form_state['values'];
 
+  // Extract the name of the theme from the submitted form values, then remove
+  // it from the array so that it is not saved as part of the variable.
+  $key = $values['var'];
+  unset($values['var']);
+
   // If the user uploaded a new logo or favicon, save it to a permanent location
   // and use it in place of the default theme-provided file.
   if ($file = $values['logo_upload']) {
@@ -722,10 +730,7 @@ function system_theme_settings_submit($form, &$form_state) {
   if (empty($values['default_favicon']) && !empty($values['favicon_path'])) {
     $values['favicon_mimetype'] = file_get_mimetype($values['favicon_path']);
   }
-  $key = $values['var'];
 
-  // Exclude unnecessary elements before saving.
-  unset($values['var'], $values['submit'], $values['reset'], $values['form_id'], $values['op'], $values['form_build_id'], $values['form_token']);
   variable_set($key, $values);
   drupal_set_message(t('The configuration options have been saved.'));
 
@@ -808,7 +813,7 @@ function system_modules($form, $form_state = array()) {
   // Used when checking if module implements a help page.
   $help_arg = module_exists('help') ? drupal_help_arg() : FALSE;
 
-  // Used when displaying modules that are required by the install profile.
+  // Used when displaying modules that are required by the installation profile.
   require_once DRUPAL_ROOT . '/includes/install.inc';
   $distribution_name = check_plain(drupal_install_profile_distribution_name());
 
@@ -1269,8 +1274,8 @@ function system_modules_uninstall($form, $form_state = NULL) {
         '#title_display' => 'invisible',
       );
       // All modules which depend on this one must be uninstalled first, before
-      // we can allow this module to be uninstalled. (The install profile is
-      // excluded from this list.)
+      // we can allow this module to be uninstalled. (The installation profile
+      // is excluded from this list.)
       foreach (array_keys($module->required_by) as $dependent) {
         if ($dependent != $profile && drupal_get_installed_schema_version($dependent) != SCHEMA_UNINSTALLED) {
           $dependent_name = isset($all_modules[$dependent]->info['name']) ? $all_modules[$dependent]->info['name'] : $dependent;
diff --git a/modules/system/system.api.php b/modules/system/system.api.php
index 79ac8f169d6e2d67842537a5215fc59fbe766ae8..adef26141fbc2ee6405082c68088848968fd3c09 100644
--- a/modules/system/system.api.php
+++ b/modules/system/system.api.php
@@ -85,8 +85,8 @@ function hook_hook_info_alter(&$hooks) {
  *   - load hook: The name of the hook which should be invoked by
  *     DrupalDefaultEntityController:attachLoad(), for example 'node_load'.
  *   - uri callback: A function taking an entity as argument and returning the
- *     uri elements of the entity, e.g. 'path' and 'options'. The actual entity
- *     uri can be constructed by passing these elements to url().
+ *     URI elements of the entity, e.g. 'path' and 'options'. The actual entity
+ *     URI can be constructed by passing these elements to url().
  *   - label callback: (optional) A function taking an entity and an entity type
  *     as arguments and returning the label of the entity. The entity label is
  *     the main string associated with an entity; for example, the title of a
@@ -465,6 +465,24 @@ function hook_entity_view_alter(&$build, $type) {
   }
 }
 
+/**
+ * Change the view mode of an entity that is being displayed.
+ *
+ * @param string $view_mode
+ *   The view_mode that is to be used to display the entity.
+ * @param array $context
+ *   Array with contextual information, including:
+ *   - entity_type: The type of the entity that is being viewed.
+ *   - entity: The entity object.
+ *   - langcode: The langcode the entity is being viewed in.
+ */
+function hook_entity_view_mode_alter(&$view_mode, $context) {
+  // For nodes, change the view mode when it is teaser.
+  if ($context['entity_type'] == 'node' && $view_mode == 'teaser') {
+    $view_mode = 'my_custom_view_mode';
+  }
+}
+
 /**
  * Define administrative paths.
  *
@@ -623,7 +641,7 @@ function hook_cron_queue_info_alter(&$queues) {
 }
 
 /**
- * Allows modules to declare their own Forms API element types and specify their
+ * Allows modules to declare their own Form API element types and specify their
  * default values.
  *
  * This hook allows modules to declare their own form element types and to
@@ -689,7 +707,8 @@ function hook_element_info_alter(&$type) {
  * Perform cleanup tasks.
  *
  * This hook is run at the end of each page request. It is often used for
- * page logging and specialized cleanup. This hook MUST NOT print anything.
+ * page logging and specialized cleanup. This hook MUST NOT print anything
+ * because by the time it runs the response is already sent to the browser.
  *
  * 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
@@ -1040,7 +1059,7 @@ function hook_menu_get_item_alter(&$router_item, $path, $original_map) {
  * This 'abc' object will then be passed into the callback functions defined
  * for the menu item, such as the page callback function mymodule_abc_edit()
  * to replace the integer 1 in the argument array. Note that a load function
- * should return FALSE when it is unable to provide a loadable object. For 
+ * should return FALSE when it is unable to provide a loadable object. For
  * example, the node_load() function for the 'node/%node/edit' menu item will
  * return FALSE for the path 'node/999/edit' if a node with a node ID of 999
  * does not exist. The menu routing system will return a 404 error in this case.
@@ -1632,6 +1651,7 @@ function hook_page_alter(&$page) {
  *
  * @see hook_form_BASE_FORM_ID_alter()
  * @see hook_form_FORM_ID_alter()
+ * @see forms_api_reference.html
  */
 function hook_form_alter(&$form, &$form_state, $form_id) {
   if (isset($form['type']) && $form['type']['#value'] . '_node_settings' == $form_id) {
@@ -1668,6 +1688,7 @@ function hook_form_alter(&$form, &$form_state, $form_id) {
  * @see hook_form_alter()
  * @see hook_form_BASE_FORM_ID_alter()
  * @see drupal_prepare_form()
+ * @see forms_api_reference.html
  */
 function hook_form_FORM_ID_alter(&$form, &$form_state, $form_id) {
   // Modification for the form with the given form ID goes here. For example, if
@@ -1959,7 +1980,7 @@ function hook_mail_alter(&$message) {
  * purposes of hook_module_implements_alter(), these variants are treated as
  * a single hook. Thus, to ensure that your implementation of
  * hook_form_FORM_ID_alter() is called at the right time, you will have to
- * have to change the order of hook_form_alter() implementation in
+ * change the order of hook_form_alter() implementation in
  * hook_module_implements_alter().
  *
  * @param $implementations
@@ -2147,6 +2168,9 @@ function hook_permission() {
  *     registers the 'node' theme hook, 'theme_node' will be assigned to its
  *     function. If the chameleon theme registers the node hook, it will be
  *     assigned 'chameleon_node' as its function.
+ *   - base hook: A string declaring the base theme hook if this theme
+ *     implementation is actually implementing a suggestion for another theme
+ *     hook.
  *   - pattern: A regular expression pattern to be used to allow this theme
  *     implementation to have a dynamic name. The convention is to use __ to
  *     differentiate the dynamic portion of the theme. For example, to allow
@@ -2958,7 +2982,7 @@ function hook_file_url_alter(&$uri) {
  * The returned 'requirements' will be listed on the status report in the
  * administration section, with indication of the severity level.
  * Moreover, any requirement with a severity of REQUIREMENT_ERROR severity will
- * result in a notice on the the administration overview page.
+ * result in a notice on the administration configuration page.
  *
  * @param $phase
  *   The phase in which requirements are checked:
@@ -2983,7 +3007,7 @@ function hook_file_url_alter(&$uri) {
  */
 function hook_requirements($phase) {
   $requirements = array();
-  // Ensure translations don't break at install time
+  // Ensure translations don't break during installation.
   $t = get_t();
 
   // Report Drupal version
@@ -3035,7 +3059,7 @@ function hook_requirements($phase) {
  * more tables and their related keys and indexes. A schema is defined by
  * hook_schema() which must live in your module's .install file.
  *
- * This hook is called at both install and uninstall time, and in the latter
+ * This hook is called at 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().
  *
@@ -3284,6 +3308,17 @@ function hook_install() {
  * the same directory as mymodule.module. Drupal core's updates are implemented
  * using the system module as a name and stored in database/updates.inc.
  *
+ * Not all module functions are available from within a hook_update_N() function.
+ * In order to call a function from your mymodule.module or an include file,
+ * you need to explicitly load that file first.
+ *
+ * During database updates the schema of any module could be out of date. For
+ * this reason, caution is needed when using any API function within an update
+ * function - particularly CRUD functions, functions that depend on the schema
+ * (for example by using drupal_write_record()), and any functions that invoke
+ * hooks. See @link update_api Update versions of API functions @endlink for
+ * details.
+ *
  * If your update task is potentially time-consuming, you'll need to implement a
  * multipass update to avoid PHP timeouts. Multipass updates use the $sandbox
  * parameter provided by the batch API (normally, $context['sandbox']) to store
@@ -3308,6 +3343,7 @@ function hook_install() {
  *
  * @see batch
  * @see schemaapi
+ * @see update_api
  * @see hook_update_last_removed()
  * @see update_get_update_list()
  */
@@ -3735,7 +3771,7 @@ function hook_drupal_goto_alter(&$path, &$options, &$http_response_code) {
 function hook_html_head_alter(&$head_elements) {
   foreach ($head_elements as $key => $element) {
     if (isset($element['#attributes']['rel']) && $element['#attributes']['rel'] == 'canonical') {
-      // I want a custom canonical url.
+      // I want a custom canonical URL.
       $head_elements[$key]['#attributes']['href'] = mymodule_canonical_url();
     }
   }
@@ -4631,3 +4667,114 @@ function hook_filetransfer_info_alter(&$filetransfer_info) {
 /**
  * @} End of "addtogroup hooks".
  */
+
+/**
+ * @defgroup update_api Update versions of API functions
+ * @{
+ * Functions that are similar to normal API functions, but do not invoke hooks.
+ *
+ * These simplified versions of core API functions are provided for use by
+ * update functions (hook_update_N() implementations).
+ *
+ * During database updates the schema of any module could be out of date. For
+ * this reason, caution is needed when using any API function within an update
+ * function - particularly CRUD functions, functions that depend on the schema
+ * (for example by using drupal_write_record()), and any functions that invoke
+ * hooks.
+ *
+ * Instead, a simplified utility function should be used. If a utility version
+ * of the API function you require does not already exist, then you should
+ * create a new function. The new utility function should be named
+ * _update_N_mymodule_my_function(). N is the schema version the function acts
+ * on (the schema version is the number N from the hook_update_N()
+ * implementation where this schema was introduced, or a number following the
+ * same numbering scheme), and mymodule_my_function is the name of the original
+ * API function including the module's name.
+ *
+ * Examples:
+ * - _update_6000_mymodule_save(): This function performs a save operation
+ *   without invoking any hooks using the 6.x schema.
+ * - _update_7000_mymodule_save(): This function performs the same save
+ *   operation using the 7.x schema.
+ *
+ * The utility function should not invoke any hooks, and should perform database
+ * operations using functions from the
+ * @link database Database abstraction layer, @endlink
+ * like db_insert(), db_update(), db_delete(), db_query(), and so on.
+ *
+ * If a change to the schema necessitates a change to the utility function, a
+ * new function should be created with a name based on the version of the schema
+ * it acts on. See _update_7000_bar_get_types() and _update_7001_bar_get_types()
+ * in the code examples that follow.
+ *
+ * For example, foo.install could contain:
+ * @code
+ * function foo_update_dependencies() {
+ *   // foo_update_7010() needs to run after bar_update_7000().
+ *   $dependencies['foo'][7010] = array(
+ *     'bar' => 7000,
+ *   );
+ *
+ *   // foo_update_7036() needs to run after bar_update_7001().
+ *   $dependencies['foo'][7036] = array(
+ *     'bar' => 7001,
+ *   );
+ *
+ *   return $dependencies;
+ * }
+ *
+ * function foo_update_7000() {
+ *   // No updates have been run on the {bar_types} table yet, so this needs
+ *   // to work with the 6.x schema.
+ *   foreach (_update_6000_bar_get_types() as $type) {
+ *     // Rename a variable.
+ *   }
+ * }
+ *
+ * function foo_update_7010() {
+ *    // Since foo_update_7010() is going to run after bar_update_7000(), it
+ *    // needs to operate on the new schema, not the old one.
+ *    foreach (_update_7000_bar_get_types() as $type) {
+ *      // Rename a different variable.
+ *    }
+ * }
+ *
+ * function foo_update_7036() {
+ *   // This update will run after bar_update_7001().
+ *   foreach (_update_7001_bar_get_types() as $type) {
+ *   }
+ * }
+ * @endcode
+ *
+ * And bar.install could contain:
+ * @code
+ * function bar_update_7000() {
+ *   // Type and bundle are confusing, so we renamed the table.
+ *   db_rename_table('bar_types', 'bar_bundles');
+ * }
+ *
+ * function bar_update_7001() {
+ *   // Database table names should be singular when possible.
+ *   db_rename_table('bar_bundles', 'bar_bundle');
+ * }
+ *
+ * function _update_6000_bar_get_types() {
+ *   db_query('SELECT * FROM {bar_types}')->fetchAll();
+ * }
+ *
+ * function _update_7000_bar_get_types() {
+ *   db_query('SELECT * FROM {bar_bundles'})->fetchAll();
+ * }
+ *
+ * function _update_7001_bar_get_types() {
+ *   db_query('SELECT * FROM {bar_bundle}')->fetchAll();
+ * }
+ * @endcode
+ *
+ * @see hook_update_N()
+ * @see hook_update_dependencies()
+ */
+
+/**
+ * @} End of "defgroup update_api".
+ */
diff --git a/modules/system/system.base.css b/modules/system/system.base.css
index 65383dd3486eba409bec5943a474b9b2c221a8ab..412b18a82106d2ef99b8a256c2ccd1155744e4c8 100644
--- a/modules/system/system.base.css
+++ b/modules/system/system.base.css
@@ -231,6 +231,8 @@ html.js .js-hide {
   position: absolute !important;
   clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
   clip: rect(1px, 1px, 1px, 1px);
+  overflow: hidden;
+  height: 1px;
 }
 
 /**
@@ -241,6 +243,8 @@ html.js .js-hide {
 .element-invisible.element-focusable:focus {
   position: static !important;
   clip: auto;
+  overflow: visible;
+  height: auto;
 }
 
 /**
diff --git a/modules/system/system.info b/modules/system/system.info
index e1d603846c811d131363aa9d1660622eebd4c74d..fab267a7107928aeb05524e5a0fa9e1c2669b0ee 100644
--- a/modules/system/system.info
+++ b/modules/system/system.info
@@ -12,8 +12,8 @@ files[] = system.test
 required = TRUE
 configure = admin/config/system
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/system/system.install b/modules/system/system.install
index 1161d6cddf1111cbbdbb66f88372985ceb4b9566..7b667678ec0dcc547c1a923345f5ec3a5db220e3 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -16,7 +16,7 @@
 function system_requirements($phase) {
   global $base_url;
   $requirements = array();
-  // Ensure translations don't break at install time
+  // Ensure translations don't break during installation.
   $t = get_t();
 
   // Report Drupal version
@@ -28,8 +28,8 @@ function system_requirements($phase) {
       'weight' => -10,
     );
 
-    // Display the currently active install profile, if the site
-    // is not running the default install profile.
+    // Display the currently active installation profile, if the site
+    // is not running the default installation profile.
     $profile = drupal_get_profile();
     if ($profile != 'standard') {
       $info = system_get_info('module', $profile);
@@ -308,7 +308,7 @@ function system_requirements($phase) {
     variable_get('file_private_path', FALSE),
   );
 
-  // Do not check for the temporary files directory at install time
+  // Do not check for the temporary files directory during installation
   // unless it has been set in settings.php. In this case the user has
   // no alternative but to fix the directory if it is not writable.
   if ($phase == 'install') {
@@ -412,7 +412,7 @@ function system_requirements($phase) {
     $profile = drupal_get_profile();
     $files = system_rebuild_module_data();
     foreach ($files as $module => $file) {
-      // Ignore disabled modules and install profiles.
+      // Ignore disabled modules and installation profiles.
       if (!$file->status || $module == $profile) {
         continue;
       }
@@ -810,7 +810,6 @@ function system_schema() {
         'length' => 255,
         'not null' => TRUE,
         'default' => '',
-        'binary' => TRUE,
       ),
       'uri' => array(
         'description' => 'The URI to access the file (either local or remote).',
@@ -1689,6 +1688,12 @@ function system_update_dependencies() {
     'block' => 7002,
   );
 
+  // system_update_7061() queries the {node_revision} table, so it must run
+  // after node_update_7001(), which renames the {node_revisions} table.
+  $dependencies['system'][7061] = array(
+    'node' => 7001,
+  );
+
   // system_update_7067() migrates role permissions and therefore must run
   // after the {role} and {role_permission} tables are properly set up, which
   // happens in user_update_7007().
@@ -1711,17 +1716,18 @@ function system_update_dependencies() {
 function system_update_7000() {
   $result = db_query("SELECT rid, perm FROM {permission} ORDER BY rid");
   foreach ($result as $role) {
-    $renamed_permission = preg_replace('/(?<=^|,\ )create\ blog\ entries(?=,|$)/', 'create blog content', $role->perm);
-    $renamed_permission = preg_replace('/(?<=^|,\ )edit\ own\ blog\ entries(?=,|$)/', 'edit own blog content', $role->perm);
-    $renamed_permission = preg_replace('/(?<=^|,\ )edit\ any\ blog\ entry(?=,|$)/', 'edit any blog content', $role->perm);
-    $renamed_permission = preg_replace('/(?<=^|,\ )delete\ own\ blog\ entries(?=,|$)/', 'delete own blog content', $role->perm);
-    $renamed_permission = preg_replace('/(?<=^|,\ )delete\ any\ blog\ entry(?=,|$)/', 'delete any blog content', $role->perm);
-
-    $renamed_permission = preg_replace('/(?<=^|,\ )create\ forum\ topics(?=,|$)/', 'create forum content', $role->perm);
-    $renamed_permission = preg_replace('/(?<=^|,\ )delete\ any\ forum\ topic(?=,|$)/', 'delete any forum content', $role->perm);
-    $renamed_permission = preg_replace('/(?<=^|,\ )delete\ own\ forum\ topics(?=,|$)/', 'delete own forum content', $role->perm);
-    $renamed_permission = preg_replace('/(?<=^|,\ )edit\ any\ forum\ topic(?=,|$)/', 'edit any forum content', $role->perm);
-    $renamed_permission = preg_replace('/(?<=^|,\ )edit\ own\ forum\ topics(?=,|$)/', 'edit own forum content', $role->perm);
+    $renamed_permission = $role->perm;
+    $renamed_permission = preg_replace('/(?<=^|,\ )create\ blog\ entries(?=,|$)/', 'create blog content', $renamed_permission);
+    $renamed_permission = preg_replace('/(?<=^|,\ )edit\ own\ blog\ entries(?=,|$)/', 'edit own blog content', $renamed_permission);
+    $renamed_permission = preg_replace('/(?<=^|,\ )edit\ any\ blog\ entry(?=,|$)/', 'edit any blog content', $renamed_permission);
+    $renamed_permission = preg_replace('/(?<=^|,\ )delete\ own\ blog\ entries(?=,|$)/', 'delete own blog content', $renamed_permission);
+    $renamed_permission = preg_replace('/(?<=^|,\ )delete\ any\ blog\ entry(?=,|$)/', 'delete any blog content', $renamed_permission);
+
+    $renamed_permission = preg_replace('/(?<=^|,\ )create\ forum\ topics(?=,|$)/', 'create forum content', $renamed_permission);
+    $renamed_permission = preg_replace('/(?<=^|,\ )delete\ any\ forum\ topic(?=,|$)/', 'delete any forum content', $renamed_permission);
+    $renamed_permission = preg_replace('/(?<=^|,\ )delete\ own\ forum\ topics(?=,|$)/', 'delete own forum content', $renamed_permission);
+    $renamed_permission = preg_replace('/(?<=^|,\ )edit\ any\ forum\ topic(?=,|$)/', 'edit any forum content', $renamed_permission);
+    $renamed_permission = preg_replace('/(?<=^|,\ )edit\ own\ forum\ topics(?=,|$)/', 'edit own forum content', $renamed_permission);
 
     if ($renamed_permission != $role->perm) {
       db_update('permission')
@@ -2729,6 +2735,26 @@ function system_update_7061(&$sandbox) {
   }
 
   if (!isset($sandbox['progress'])) {
+    // Delete stale rows from {upload} where the fid is not in the {files} table.
+    db_delete('upload')
+      ->notExists(
+        db_select('files', 'f')
+        ->fields('f', array('fid'))
+        ->where('f.fid = {upload}.fid')
+      )
+      ->execute();
+
+    // Delete stale rows from {upload} where the vid is not in the
+    // {node_revision} table. The table has already been renamed in
+    // node_update_7001().
+    db_delete('upload')
+      ->notExists(
+        db_select('node_revision', 'nr')
+        ->fields('nr', array('vid'))
+        ->where('nr.vid = {upload}.vid')
+      )
+      ->execute();
+
     // Retrieve a list of node revisions that have uploaded files attached.
     // DISTINCT queries are expensive, especially when paged, so we store the
     // data in its own table for the duration of the update.
@@ -2793,7 +2819,7 @@ function system_update_7061(&$sandbox) {
     $scheme = file_default_scheme() . '://';
     foreach ($node_revisions as $vid => $revision) {
       foreach ($revision['file'][LANGUAGE_NONE] as $delta => $file) {
-        // We will convert filepaths to uri using the default scheme
+        // We will convert filepaths to URI using the default scheme
         // and stripping off the existing file directory path.
         $file['uri'] = $scheme . preg_replace('!^' . preg_quote($basename) . '!', '', $file['filepath']);
         $file['uri'] = file_stream_wrapper_uri_normalize($file['uri']);
@@ -2958,8 +2984,9 @@ function system_update_7069() {
  */
 
 /**
- * @defgroup updates-7.x-extra Extra system updates for 7.x
+ * @defgroup updates-7.x-extra Extra updates for 7.x
  * @{
+ * Update functions between 7.x versions.
  */
 
 /**
@@ -3024,6 +3051,41 @@ function system_update_7074() {
   // PostgreSQL.
 }
 
+/**
+ * Convert menu_links query strings into arrays.
+ */
+function system_update_7076() {
+  $query = db_select('menu_links', 'ml', array('fetch' => PDO::FETCH_ASSOC))
+    ->fields('ml', array('mlid', 'options'));
+  foreach ($query->execute() as $menu_link) {
+    if (strpos($menu_link['options'], 'query') !== FALSE) {
+      $menu_link['options'] = unserialize($menu_link['options']);
+      if (isset($menu_link['options']['query']) && is_string($menu_link['options']['query'])) {
+        $menu_link['options']['query'] = drupal_get_query_array($menu_link['options']['query']);
+        db_update('menu_links')
+          ->fields(array(
+            'options' => serialize($menu_link['options']),
+          ))
+          ->condition('mlid', $menu_link['mlid'], '=')
+          ->execute();
+      }
+    }
+  }
+}
+
+/**
+ * Revert {file_managed}.filename changed to a binary column.
+ */
+function system_update_7077() {
+  db_change_field('file_managed', 'filename', 'filename', array(
+    'description' => 'Name of the file with no path components. This may differ from the basename of the URI if the file is renamed to avoid overwriting an existing file.',
+    'type' => 'varchar',
+    'length' => 255,
+    'not null' => TRUE,
+    'default' => '',
+  ));
+}
+
 /**
  * @} End of "defgroup updates-7.x-extra".
  * The next series of updates should start at 8000.
diff --git a/modules/system/system.module b/modules/system/system.module
index 9897fb25e18bc14398ff1c2a7592e7b3e0c7d81f..d47ab8a8100e67b309594e3d8e65f811da3f940d 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -1740,16 +1740,27 @@ function _system_themes_access($theme) {
 /**
  * Setup a given callback to run via authorize.php with elevated privileges.
  *
- * To use authorize.php, certain variables must be stashed into $_SESSION.
- * This function sets up all the necessary $_SESSION variables, then returns
- * the full path to authorize.php so the caller can redirect to authorize.php.
- * That initiates the workflow that will eventually lead to the callback being
- * invoked. The callback will be invoked at a low bootstrap level, without all
- * modules being invoked, so it needs to be careful not to assume any code
- * exists.
+ * To use authorize.php, certain variables must be stashed into $_SESSION. This
+ * function sets up all the necessary $_SESSION variables. The calling function
+ * should then redirect to authorize.php, using the full path returned by
+ * system_authorized_get_url(). That initiates the workflow that will eventually
+ * lead to the callback being invoked. The callback will be invoked at a low
+ * bootstrap level, without all modules being invoked, so it needs to be careful
+ * not to assume any code exists. Example (system_authorized_run()):
+ * @code
+ *   system_authorized_init($callback, $file, $arguments, $page_title);
+ *   drupal_goto(system_authorized_get_url());
+ * @endcode
+ * Example (update_manager_install_form_submit()):
+ * @code
+ *  system_authorized_init('update_authorize_run_install',
+ *    drupal_get_path('module', 'update') . '/update.authorize.inc',
+ *    $arguments, t('Update manager'));
+ *  $form_state['redirect'] = system_authorized_get_url();
+ * @endcode
  *
  * @param $callback
- *   The name of the function to invoke one the user authorizes the operation.
+ *   The name of the function to invoke once the user authorizes the operation.
  * @param $file
  *   The full path to the file where the callback function is implemented.
  * @param $arguments
@@ -1785,11 +1796,13 @@ function system_authorized_init($callback, $file, $arguments = array(), $page_ti
  * @param array $options
  *   Optional array of options to pass to url().
  * @return
- *   The full URL to authorize.php, using https if available.
+ *   The full URL to authorize.php, using HTTPS if available.
+ *
+ * @see system_authorized_init()
  */
 function system_authorized_get_url(array $options = array()) {
   global $base_url;
-  // Force https if available, regardless of what the caller specifies.
+  // Force HTTPS if available, regardless of what the caller specifies.
   $options['https'] = TRUE;
   // We prefix with $base_url so we get a full path even if clean URLs are
   // disabled.
@@ -2348,14 +2361,14 @@ function _system_rebuild_module_data() {
   // Find modules
   $modules = drupal_system_listing('/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\.module$/', 'modules', 'name', 0);
 
-  // Include the install profile in modules that are loaded.
+  // Include the installation profile in modules that are loaded.
   $profile = drupal_get_profile();
   $modules[$profile] = new stdClass();
   $modules[$profile]->name = $profile;
   $modules[$profile]->uri = 'profiles/' . $profile . '/' . $profile . '.profile';
   $modules[$profile]->filename = $profile . '.profile';
 
-  // Install profile hooks are always executed last.
+  // Installation profile hooks are always executed last.
   $modules[$profile]->weight = 1000;
 
   // Set defaults for module info.
@@ -2396,7 +2409,7 @@ function _system_rebuild_module_data() {
       $module->info['scripts'] = _system_info_add_path($module->info['scripts'], $path);
     }
 
-    // Install profiles are hidden by default, unless explicitly specified
+    // Installation profiles are hidden by default, unless explicitly specified
     // otherwise in the .info file.
     if ($key == $profile && !isset($modules[$key]->info['hidden'])) {
       $modules[$key]->info['hidden'] = TRUE;
@@ -2409,7 +2422,7 @@ function _system_rebuild_module_data() {
   }
 
   if (isset($modules[$profile])) {
-    // The install profile is required, if it's a valid module.
+    // The installation profile is required, if it's a valid module.
     $modules[$profile]->info['required'] = TRUE;
     // Add a default distribution name if the profile did not provide one. This
     // matches the default value used in install_profile_info().
@@ -3759,7 +3772,7 @@ function _system_date_formats_build() {
   }
 
   // Get custom formats added to the database by the end user.
-  $result = db_query('SELECT df.dfid, df.format, df.type, df.locked, dfl.language FROM {date_formats} df LEFT JOIN {date_format_type} dft ON df.type = dft.type LEFT JOIN {date_format_locale} dfl ON df.format = dfl.format AND df.type = dfl.type ORDER BY df.type, df.format');
+  $result = db_query('SELECT df.dfid, df.format, df.type, df.locked, dfl.language FROM {date_formats} df LEFT JOIN {date_format_locale} dfl ON df.format = dfl.format AND df.type = dfl.type ORDER BY df.type, df.format');
   foreach ($result as $record) {
     // If this date type isn't set, initialise the array.
     if (!isset($date_formats[$record->type])) {
diff --git a/modules/system/theme.api.php b/modules/system/theme.api.php
index cd7ecfde8edeb325fb920ebdcb4cca056c676d36..6865421cfb84da46352de4fd935a307af1b096c8 100644
--- a/modules/system/theme.api.php
+++ b/modules/system/theme.api.php
@@ -70,8 +70,8 @@
  * Allow themes to alter the theme-specific settings form.
  *
  * With this hook, themes can alter the theme-specific settings form in any way
- * allowable by Drupal's Forms API, such as adding form elements, changing
- * default values and removing form elements. See the Forms API documentation on
+ * allowable by Drupal's Form API, such as adding form elements, changing
+ * default values and removing form elements. See the Form API documentation on
  * api.drupal.org for detailed information.
  *
  * Note that the base theme's form alterations will be run before any sub-theme
diff --git a/modules/taxonomy/taxonomy-term.tpl.php b/modules/taxonomy/taxonomy-term.tpl.php
index b1ff20e3cee7edc0f6bacd2a6ed69ea7c43e8fea..d410d1ef3bef3812dd1daf2cfe34a6aeca999119 100644
--- a/modules/taxonomy/taxonomy-term.tpl.php
+++ b/modules/taxonomy/taxonomy-term.tpl.php
@@ -11,7 +11,7 @@
  *   such as render($content['field_example']). Use
  *   hide($content['field_example']) to temporarily suppress the printing of a
  *   given element.
- * - $term_url: Direct url of the current term.
+ * - $term_url: Direct URL of the current term.
  * - $term_name: Name of the current term.
  * - $classes: String of classes that can be used to style contextually through
  *   CSS. It can be manipulated through the variable $classes_array from
@@ -36,6 +36,8 @@
  * @see template_preprocess()
  * @see template_preprocess_taxonomy_term()
  * @see template_process()
+ *
+ * @ingroup themeable
  */
 ?>
 <div id="taxonomy-term-<?php print $term->tid; ?>" class="<?php print $classes; ?>">
diff --git a/modules/taxonomy/taxonomy.api.php b/modules/taxonomy/taxonomy.api.php
index cb778c9a764f9ecd1b55b79e12013ee85c00ee28..5667eb96d5d5ac05a3e26312b25822177e885969 100644
--- a/modules/taxonomy/taxonomy.api.php
+++ b/modules/taxonomy/taxonomy.api.php
@@ -181,6 +181,30 @@ function hook_taxonomy_term_delete($term) {
   db_delete('term_synoynm')->condition('tid', $term->tid)->execute();
 }
 
+/**
+ * Act on a taxonomy term that is being assembled before rendering.
+ *
+ * The module may add elements to $term->content prior to rendering. The
+ * structure of $term->content is a renderable array as expected by
+ * drupal_render().
+ *
+ * @param $term
+ *   The term that is being assembled for rendering.
+ * @param $view_mode
+ *   The $view_mode parameter from taxonomy_term_view().
+ * @param $langcode
+ *   The language code used for rendering.
+ *
+ * @see hook_entity_view()
+ */
+function hook_taxonomy_term_view($term, $view_mode, $langcode) {
+  $term->content['my_additional_field'] = array(
+    '#markup' => $additional_field,
+    '#weight' => 10,
+    '#theme' => 'mymodule_my_additional_field',
+  );
+}
+
 /**
  * Alter the results of taxonomy_term_view().
  *
diff --git a/modules/taxonomy/taxonomy.info b/modules/taxonomy/taxonomy.info
index a6ecfe202bed544ec0add7f8d2687a49cceaca5c..2a565ab05cd1bab6962f4afce5fc2c5e941e7c93 100644
--- a/modules/taxonomy/taxonomy.info
+++ b/modules/taxonomy/taxonomy.info
@@ -8,8 +8,8 @@ files[] = taxonomy.module
 files[] = taxonomy.test
 configure = admin/structure/taxonomy
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/taxonomy/taxonomy.install b/modules/taxonomy/taxonomy.install
index 711a0f983d42a0945dee2597b1ee583398f76693..c353c9c8c27b75abab550ee471b2cf067a451716 100644
--- a/modules/taxonomy/taxonomy.install
+++ b/modules/taxonomy/taxonomy.install
@@ -266,7 +266,7 @@ function taxonomy_update_dependencies() {
  *
  * This function is valid for a database schema version 7002.
  *
- * @ingroup update-api-6.x-to-7.x
+ * @ingroup update_api
  */
 function _update_7002_taxonomy_get_vocabularies() {
   return db_query('SELECT v.* FROM {taxonomy_vocabulary} v ORDER BY v.weight, v.name')->fetchAllAssoc('vid', PDO::FETCH_OBJ);
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index d501282fea0b41a5d02b91757c9ec2a471aad3db..9be7dfcbe9e44375443761fad97d6c545a42b4da 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -140,7 +140,7 @@ function taxonomy_entity_info() {
 }
 
 /**
- * Entity uri callback.
+ * Entity URI callback.
  */
 function taxonomy_term_uri($term) {
   return array(
@@ -323,8 +323,8 @@ function taxonomy_menu() {
   );
 
   $items['admin/structure/taxonomy/%taxonomy_vocabulary_machine_name'] = array(
-    'title callback' => 'taxonomy_admin_vocabulary_title_callback',
-    'title arguments' => array(3),
+    'title callback' => 'entity_label',
+    'title arguments' => array('taxonomy_vocabulary', 3),
     'page callback' => 'drupal_get_form',
     'page arguments' => array('taxonomy_overview_terms', 3),
     'access arguments' => array('administer taxonomy'),
@@ -375,7 +375,13 @@ function taxonomy_term_edit_access($term) {
 }
 
 /**
- * Return the vocabulary name given the vocabulary object.
+ * Returns the sanitized name of a vocabulary.
+ *
+ * Deprecated. This function was previously used as a menu item title callback
+ * but has been replaced by using entity_label() (which does not
+ * sanitize the title, since the menu system does that automatically). In
+ * Drupal 7, use that function for title callbacks, and call check_plain()
+ * directly if you need a sanitized title.
  */
 function taxonomy_admin_vocabulary_title_callback($vocabulary) {
   return check_plain($vocabulary->name);
@@ -386,7 +392,8 @@ function taxonomy_admin_vocabulary_title_callback($vocabulary) {
  *
  * @param $vocabulary
  *   A vocabulary object with the following properties:
- *   - vid: The ID of the vocabulary.
+ *   - vid: (optional) The ID of the vocabulary (omit if creating a new
+ *     vocabulary; only use to update an existing vocabulary).
  *   - name: The human-readable name of the vocabulary.
  *   - machine_name: The machine name of the vocabulary.
  *   - description: (optional) The vocabulary's description.
@@ -401,7 +408,7 @@ function taxonomy_admin_vocabulary_title_callback($vocabulary) {
  *
  * @return
  *   Status constant indicating whether the vocabulary was inserted (SAVED_NEW)
- *   or updated(SAVED_UPDATED).
+ *   or updated (SAVED_UPDATED).
  */
 function taxonomy_vocabulary_save($vocabulary) {
   // Prevent leading and trailing spaces in vocabulary names.
@@ -735,6 +742,114 @@ function taxonomy_term_delete($tid) {
   }
 }
 
+/**
+ * Generates an array which displays a term detail page.
+ *
+ * @param term
+ *   A taxonomy term object.
+ * @return
+ *   A $page element suitable for use by drupal_page_render().
+ */
+function taxonomy_term_show($term) {
+  return taxonomy_term_view_multiple(array($term->tid => $term), 'full');
+}
+
+/**
+ * Constructs a drupal_render() style array from an array of loaded terms.
+ *
+ * @param $terms
+ *   An array of taxonomy terms as returned by taxonomy_term_load_multiple().
+ * @param $view_mode
+ *   View mode, e.g. 'full', 'teaser'...
+ * @param $weight
+ *   An integer representing the weight of the first taxonomy term in the list.
+ * @param $langcode
+ *   (optional) A language code to use for rendering. Defaults to the global
+ *   content language of the current request.
+ *
+ * @return
+ *   An array in the format expected by drupal_render().
+ */
+function taxonomy_term_view_multiple($terms, $view_mode = 'teaser', $weight = 0, $langcode = NULL) {
+  field_attach_prepare_view('taxonomy_term', $terms, $view_mode, $langcode);
+  entity_prepare_view('taxonomy_term', $terms, $langcode);
+  $build = array();
+  foreach ($terms as $term) {
+    $build['taxonomy_terms'][$term->tid] = taxonomy_term_view($term, $view_mode, $langcode);
+    $build['taxonomy_terms'][$term->tid]['#weight'] = $weight;
+    $weight++;
+  }
+  $build['taxonomy_terms']['#sorted'] = TRUE;
+  return $build;
+}
+
+/**
+ * Builds a structured array representing the term's content.
+ *
+ * The content built for the taxonomy term (field values, file attachments or
+ * other term components) will vary depending on the $view_mode parameter.
+ *
+ * Drupal core defines the following view modes for terms, with the following
+ * default use cases:
+ *   - full (default): term is displayed on its own page (taxonomy/term/123)
+ * Contributed modules might define additional view modes, or use existing
+ * view modes in additional contexts.
+ *
+ * @param $term
+ *   A taxonomy term object.
+ * @param $view_mode
+ *   View mode, e.g. 'full', 'teaser'...
+ * @param $langcode
+ *   (optional) A language code to use for rendering. Defaults to the global
+ *   content language of the current request.
+ */
+function taxonomy_term_build_content($term, $view_mode = 'full', $langcode = NULL) {
+  if (!isset($langcode)) {
+    $langcode = $GLOBALS['language_content']->language;
+  }
+
+  // Remove previously built content, if exists.
+  $term->content = array();
+
+  // Allow modules to change the view mode.
+  $context = array(
+    'entity_type' => 'taxonomy_term',
+    'entity' => $term,
+    'langcode' => $langcode,
+  );
+  drupal_alter('entity_view_mode', $view_mode, $context);
+
+  // Add the term description if the term has one and it is visible.
+  $type = 'taxonomy_term';
+  $entity_ids = entity_extract_ids($type, $term);
+  $settings = field_view_mode_settings($type, $entity_ids[2]);
+  $fields = field_extra_fields_get_display($type, $entity_ids[2], $view_mode);
+  if (!empty($term->description) && isset($fields['description']) && $fields['description']['visible']) {
+    $term->content['description'] = array(
+      '#markup' => check_markup($term->description, $term->format, '', TRUE),
+      '#weight' => $fields['description']['weight'],
+      '#prefix' => '<div class="taxonomy-term-description">',
+      '#suffix' => '</div>',
+    );
+  }
+
+  // Build fields content.
+  // In case of a multiple view, taxonomy_term_view_multiple() already ran the
+  // 'prepare_view' step. An internal flag prevents the operation from running
+  // twice.
+  field_attach_prepare_view('taxonomy_term', array($term->tid => $term), $view_mode, $langcode);
+  entity_prepare_view('taxonomy_term', array($term->tid => $term), $langcode);
+  $term->content += field_attach_view('taxonomy_term', $term, $view_mode, $langcode);
+
+  // Allow modules to make their own additions to the taxonomy term.
+  module_invoke_all('taxonomy_term_view', $term, $view_mode, $langcode);
+  module_invoke_all('entity_view', $term, 'taxonomy_term', $view_mode, $langcode);
+
+  // Make sure the current view mode is stored if no module has already
+  // populated the related key.
+  $term->content += array('#view_mode' => $view_mode);
+}
+
 /**
  * Generate an array for rendering the given term.
  *
@@ -754,31 +869,23 @@ function taxonomy_term_view($term, $view_mode = 'full', $langcode = NULL) {
     $langcode = $GLOBALS['language_content']->language;
   }
 
-  field_attach_prepare_view('taxonomy_term', array($term->tid => $term), $view_mode, $langcode);
-  entity_prepare_view('taxonomy_term', array($term->tid => $term), $langcode);
+  // Populate $term->content with a render() array.
+  taxonomy_term_build_content($term, $view_mode, $langcode);
+  $build = $term->content;
+
+  // We don't need duplicate rendering info in $term->content.
+  unset($term->content);
 
-  $build = array(
+  $build += array(
     '#theme' => 'taxonomy_term',
     '#term' => $term,
     '#view_mode' => $view_mode,
     '#language' => $langcode,
   );
 
-  $build += field_attach_view('taxonomy_term', $term, $view_mode, $langcode);
-
-  // Add term description if the term has one.
-  if (!empty($term->description)) {
-    $build['description'] = array(
-      '#markup' => check_markup($term->description, $term->format, '', TRUE),
-      '#weight' => 0,
-      '#prefix' => '<div class="taxonomy-term-description">',
-      '#suffix' => '</div>',
-    );
-  }
-
   $build['#attached']['css'][] = drupal_get_path('module', 'taxonomy') . '/taxonomy.css';
 
-  // Allow modules to modify the structured term.
+  // Allow modules to modify the structured taxonomy term.
   $type = 'taxonomy_term';
   drupal_alter(array('taxonomy_term_view', 'entity_view'), $build, $type);
 
@@ -1000,8 +1107,8 @@ function taxonomy_get_tree($vid, $parent = 0, $max_depth = NULL, $load_entities
   $parents = &drupal_static(__FUNCTION__ . ':parents', array());
   $terms = &drupal_static(__FUNCTION__ . ':terms', array());
 
-  // We cache trees, so it's not CPU-intensive to call get_tree() on a term
-  // and its children, too.
+  // We cache trees, so it's not CPU-intensive to call taxonomy_get_tree() on a
+  // term and its children, too.
   if (!isset($children[$vid])) {
     $children[$vid] = array();
     $parents[$vid] = array();
@@ -1914,7 +2021,7 @@ function taxonomy_taxonomy_term_delete($term) {
  * Converts EntityFieldQuery instances on taxonomy terms that have an entity
  * condition on term bundles (vocabulary machine names). Since the vocabulary
  * machine name is not present in the {taxonomy_term_data} table itself, we have
- * to convert the bundle condition into a proprety condition of vocabulary IDs
+ * to convert the bundle condition into a property condition of vocabulary IDs
  * to match against {taxonomy_term_data}.vid.
  */
 function taxonomy_entity_query_alter($query) {
diff --git a/modules/taxonomy/taxonomy.pages.inc b/modules/taxonomy/taxonomy.pages.inc
index 501ebbe102455c96d76d3bfb845666564361705a..299c7bb6ee1f158184b593b720e58e2b633cd7c6 100644
--- a/modules/taxonomy/taxonomy.pages.inc
+++ b/modules/taxonomy/taxonomy.pages.inc
@@ -14,7 +14,9 @@
  *   The page content.
  */
 function taxonomy_term_page($term) {
-  // Assign the term name as the page title.
+  // If there is a menu link to this term, the link becomes the last part of
+  // the active trail, and the link name becomes the page title. Thus, we must
+  // explicitly set the page title to be the term title.
   drupal_set_title($term->name);
 
   // Build breadcrumb based on the hierarchy of the term.
@@ -33,8 +35,17 @@ function taxonomy_term_page($term) {
   drupal_set_breadcrumb($breadcrumb);
   drupal_add_feed('taxonomy/term/' . $term->tid . '/feed', 'RSS - ' . $term->name);
 
-  $build = array();
-
+  // Set the term path as the canonical URL to prevent duplicate content.
+  $uri = entity_uri('taxonomy_term', $term);
+  drupal_add_html_head_link(array('rel' => 'canonical', 'href' => url($uri['path'], $uri['options'])), TRUE);
+  // Set the non-aliased path as a default shortlink.
+  drupal_add_html_head_link(array('rel' => 'shortlink', 'href' => url($uri['path'], array_merge($uri['options'], array('alias' => TRUE)))), TRUE);
+
+  // Normally we would call taxonomy_term_show() here, but for backwards
+  // compatibility in Drupal 7 we do not want to do that (it produces different
+  // data structures and HTML markup than what Drupal 7 released with). Calling
+  // taxonomy_term_view() directly provides essentially the same thing, but
+  // allows us to wrap the rendered term in our desired array structure.
   $build['term_heading'] = array(
     '#prefix' => '<div class="term-listing-heading">',
     '#suffix' => '</div>',
@@ -47,7 +58,7 @@ function taxonomy_term_page($term) {
     $build['pager'] = array(
       '#theme' => 'pager',
       '#weight' => 5,
-     );
+    );
   }
   else {
     $build['no_content'] = array(
diff --git a/modules/taxonomy/taxonomy.test b/modules/taxonomy/taxonomy.test
index 32ae84d66e2ce15bf04a85f4a469199e56a5ec54..123bdce40fed3b8f74a2d4afddd224f503429cdb 100644
--- a/modules/taxonomy/taxonomy.test
+++ b/modules/taxonomy/taxonomy.test
@@ -98,6 +98,18 @@ class TaxonomyVocabularyFunctionalTest extends TaxonomyWebTestCase {
     $edit['machine_name'] = '!&^%';
     $this->drupalPost('admin/structure/taxonomy/add', $edit, t('Save'));
     $this->assertText(t('The machine-readable name must contain only lowercase letters, numbers, and underscores.'));
+
+    // Ensure that vocabulary titles are escaped properly.
+    $edit = array();
+    $edit['name'] = 'Don\'t Panic';
+    $edit['description'] = $this->randomName();
+    $edit['machine_name'] = 'don_t_panic';
+    $this->drupalPost('admin/structure/taxonomy/add', $edit, t('Save'));
+
+    $site_name = variable_get('site_name', 'Drupal');
+    $this->drupalGet('admin/structure/taxonomy/don_t_panic');
+    $this->assertTitle(t('Don\'t Panic | @site-name', array('@site-name' => $site_name)));
+    $this->assertNoTitle(t('Don&#039;t Panic | @site-name', array('@site-name' => $site_name)));
   }
 
   /**
@@ -1378,12 +1390,16 @@ class TaxonomyHooksTestCase extends TaxonomyWebTestCase {
 
   function setUp() {
     parent::setUp('taxonomy', 'taxonomy_test');
+    module_load_include('inc', 'taxonomy', 'taxonomy.pages');
     $taxonomy_admin = $this->drupalCreateUser(array('administer taxonomy'));
     $this->drupalLogin($taxonomy_admin);
   }
 
   /**
-   * Test that hooks are run correctly on creating, editing and deleting a term.
+   * Test that hooks are run correctly on creating, editing, viewing,
+   * and deleting a term.
+   *
+   * @see taxonomy_test.module
    */
   function testTaxonomyTermHooks() {
     $vocabulary = $this->createVocabulary();
@@ -1408,6 +1424,13 @@ class TaxonomyHooksTestCase extends TaxonomyWebTestCase {
     $term = taxonomy_term_load($term->tid);
     $this->assertEqual($edit['antonym'], $term->antonym, 'Antonym was successfully edited.');
 
+    // View the term and ensure that hook_taxonomy_term_view() and
+    // hook_entity_view() are invoked.
+    $term = taxonomy_term_load($term->tid);
+    $term_build = taxonomy_term_page($term);
+    $this->assertFalse(empty($term_build['term_heading']['term']['taxonomy_test_term_view_check']), 'hook_taxonomy_term_view() was invoked when viewing the term.');
+    $this->assertFalse(empty($term_build['term_heading']['term']['taxonomy_test_entity_view_check']), 'hook_entity_view() was invoked when viewing the term.');
+
     // Delete the term.
     taxonomy_term_delete($term->tid);
     $antonym = db_query('SELECT tid FROM {taxonomy_term_antonym} WHERE tid = :tid', array(':tid' => $term->tid))->fetchField();
diff --git a/modules/toolbar/toolbar.info b/modules/toolbar/toolbar.info
index 2f811f88c81b1699698174cc5fb3a881073c29c8..3191b5f5316b428d783e4ae3f583fbf3de6ea6ee 100644
--- a/modules/toolbar/toolbar.info
+++ b/modules/toolbar/toolbar.info
@@ -4,8 +4,8 @@ core = 7.x
 package = Core
 version = VERSION
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/toolbar/toolbar.tpl.php b/modules/toolbar/toolbar.tpl.php
index 1df0cf03bf2306bcce7d1728b7aa1187d53b67bd..e85212997a3d37538a458470e09bad6bf72f25dc 100644
--- a/modules/toolbar/toolbar.tpl.php
+++ b/modules/toolbar/toolbar.tpl.php
@@ -19,6 +19,8 @@
  *
  * @see template_preprocess()
  * @see template_preprocess_toolbar()
+ *
+ * @ingroup themeable
  */
 ?>
 <div id="toolbar" class="<?php print $classes; ?> clearfix">
diff --git a/modules/tracker/tracker.info b/modules/tracker/tracker.info
index 117e4428640f294a2d399e8dc344726a1084f719..d3d8706cd635af4582ee9b85f2eaa732a2552d64 100644
--- a/modules/tracker/tracker.info
+++ b/modules/tracker/tracker.info
@@ -6,8 +6,8 @@ version = VERSION
 core = 7.x
 files[] = tracker.test
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/translation/tests/translation_test.info b/modules/translation/tests/translation_test.info
index 60787d0ae0c4e92d00fe42bc1b9a7b14f154e0ce..d11abcf95b33bc16257c36f944606a308d8f8810 100644
--- a/modules/translation/tests/translation_test.info
+++ b/modules/translation/tests/translation_test.info
@@ -5,8 +5,8 @@ package = Testing
 version = VERSION
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/translation/translation.info b/modules/translation/translation.info
index 83532f55af75cbdeb5cfb80dd4ff4e26aa25d772..1449c7adf6beea40b64f545f1ee3cb47392acf8b 100644
--- a/modules/translation/translation.info
+++ b/modules/translation/translation.info
@@ -6,8 +6,8 @@ version = VERSION
 core = 7.x
 files[] = translation.test
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/trigger/tests/trigger_test.info b/modules/trigger/tests/trigger_test.info
index 56df2bc9878ebf1b57da237987fba7655152d60e..5067e6a8bf46c45c945c4da2ae7600eb45125b1d 100644
--- a/modules/trigger/tests/trigger_test.info
+++ b/modules/trigger/tests/trigger_test.info
@@ -4,8 +4,8 @@ package = Testing
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/trigger/trigger.info b/modules/trigger/trigger.info
index ffecce7d7df5fa9bcdfcd753ea8e4b05fe0b5033..222b382826acd31bda3c982385e222b578a81690 100644
--- a/modules/trigger/trigger.info
+++ b/modules/trigger/trigger.info
@@ -6,8 +6,8 @@ core = 7.x
 files[] = trigger.test
 configure = admin/structure/trigger
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/update/tests/aaa_update_test.info b/modules/update/tests/aaa_update_test.info
index dd2c362e7c7f0403ebe1853dac79f26977d2ae68..7c5179a23f0a8e295e97526236fe9d222645fa5d 100644
--- a/modules/update/tests/aaa_update_test.info
+++ b/modules/update/tests/aaa_update_test.info
@@ -4,8 +4,8 @@ package = Testing
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/update/tests/bbb_update_test.info b/modules/update/tests/bbb_update_test.info
index be2d9dd5fc328899e1c9ded568bfe9b896e64345..d88c1fe9df4ae0ca574cd2a2e90a438eb1142105 100644
--- a/modules/update/tests/bbb_update_test.info
+++ b/modules/update/tests/bbb_update_test.info
@@ -4,8 +4,8 @@ package = Testing
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/update/tests/ccc_update_test.info b/modules/update/tests/ccc_update_test.info
index 5e4ffd789867ef81ed568f56750a26b6dcdedef4..591af8fbc4a8f8380ad2724befffcae6ddd1b8b9 100644
--- a/modules/update/tests/ccc_update_test.info
+++ b/modules/update/tests/ccc_update_test.info
@@ -4,8 +4,8 @@ package = Testing
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/update/tests/themes/update_test_basetheme/update_test_basetheme.info b/modules/update/tests/themes/update_test_basetheme/update_test_basetheme.info
index c12f03fe75aadafbcd4dc5c95c21f62686dd26d6..9e92226dcffaa9e457e9570f031e796965fd7fa9 100644
--- a/modules/update/tests/themes/update_test_basetheme/update_test_basetheme.info
+++ b/modules/update/tests/themes/update_test_basetheme/update_test_basetheme.info
@@ -3,8 +3,8 @@ description = Test theme which acts as a base theme for other test subthemes.
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/update/tests/themes/update_test_subtheme/update_test_subtheme.info b/modules/update/tests/themes/update_test_subtheme/update_test_subtheme.info
index 097a88a7bbe31334fdc4ad1501f850e040fc16c2..3dca01d4767c4526806e3afc754a9bf3d4c02d9d 100644
--- a/modules/update/tests/themes/update_test_subtheme/update_test_subtheme.info
+++ b/modules/update/tests/themes/update_test_subtheme/update_test_subtheme.info
@@ -4,8 +4,8 @@ core = 7.x
 base theme = update_test_basetheme
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/update/tests/update_test.info b/modules/update/tests/update_test.info
index 9dac643f321fc138602cd423a1aada51c30f02d7..d6883aef67fb6791bd6b3444f25b95218cc916f0 100644
--- a/modules/update/tests/update_test.info
+++ b/modules/update/tests/update_test.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/update/update.compare.inc b/modules/update/update.compare.inc
index cd8b762d0623046bf7f54771d98ae6ca130f5d64..6e0c5feeec4e6d2455b9c46862212b6479a63c08 100644
--- a/modules/update/update.compare.inc
+++ b/modules/update/update.compare.inc
@@ -592,7 +592,10 @@ function update_calculate_project_update_status($project, &$project_data, $avail
 
     // See if this is a higher major version than our target and yet still
     // supported. If so, record it as an "Also available" release.
-    if ($release['version_major'] > $target_major) {
+    // Note: some projects have a HEAD release from CVS days, which could
+    // be one of those being compared. They would not have version_major
+    // set, so we must call isset first.
+    if (isset($release['version_major']) && $release['version_major'] > $target_major) {
       if (in_array($release['version_major'], $supported_majors)) {
         if (!isset($project_data['also'])) {
           $project_data['also'] = array();
diff --git a/modules/update/update.fetch.inc b/modules/update/update.fetch.inc
index 860a1b975911b0b6da8c88df206610ec1806e26c..bf0039f4411b2fc364de7bc28526f76b94daa217 100644
--- a/modules/update/update.fetch.inc
+++ b/modules/update/update.fetch.inc
@@ -288,17 +288,25 @@ function _update_build_fetch_url($project, $site_key = '') {
   $name = $project['name'];
   $url = _update_get_fetch_url_base($project);
   $url .= '/' . $name . '/' . DRUPAL_CORE_COMPATIBILITY;
-  // Only append a site_key and the version information if we have a site_key
-  // in the first place, and if this is not a disabled module or theme. We do
-  // not want to record usage statistics for disabled code.
+
+  // Only append usage infomation if we have a site key and the project is
+  // enabled. We do not want to record usage statistics for disabled projects.
   if (!empty($site_key) && (strpos($project['project_type'], 'disabled') === FALSE)) {
+    // Append the site key.
     $url .= (strpos($url, '?') !== FALSE) ? '&' : '?';
     $url .= 'site_key=';
     $url .= rawurlencode($site_key);
+
+    // Append the version.
     if (!empty($project['info']['version'])) {
       $url .= '&version=';
       $url .= rawurlencode($project['info']['version']);
     }
+
+    // Append the list of modules or themes enabled.
+    $list = array_keys($project['includes']);
+    $url .= '&list=';
+    $url .= rawurlencode(implode(',', $list));
   }
   return $url;
 }
diff --git a/modules/update/update.info b/modules/update/update.info
index cd9ec8c06ff7f107250d211d913429cf974a4fac..f1a00def9ee7f4fd961037da8d523e4d2335c295 100644
--- a/modules/update/update.info
+++ b/modules/update/update.info
@@ -6,8 +6,8 @@ core = 7.x
 files[] = update.test
 configure = admin/reports/updates/settings
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/update/update.test b/modules/update/update.test
index e297194ae3a7606af836f2a2bfc2898d8450f946..b29f6ac86c500a68490e38fefe2024c1db2c8796 100644
--- a/modules/update/update.test
+++ b/modules/update/update.test
@@ -769,6 +769,7 @@ class UpdateCoreUnitTestCase extends DrupalUnitTestCase {
     $project['project_type'] = '';
     $project['info']['version'] = '';
     $project['info']['project status url'] = 'http://www.example.com';
+    $project['includes'] = array('module1' => 'Module 1', 'module2' => 'Module 2');
     $site_key = '';
     $expected = 'http://www.example.com/' . $project['name'] . '/' . DRUPAL_CORE_COMPATIBILITY;
     $url = _update_build_fetch_url($project, $site_key);
@@ -785,14 +786,16 @@ class UpdateCoreUnitTestCase extends DrupalUnitTestCase {
     $project['project_type'] = '';
     $expected = 'http://www.example.com/' . $project['name'] . '/' . DRUPAL_CORE_COMPATIBILITY;
     $expected .= '?site_key=site_key';
+    $expected .= '&list=' . rawurlencode('module1,module2');
     $url = _update_build_fetch_url($project, $site_key);
     $this->assertEqual($url, $expected, "When site_key provided, '$url' should be '$expected'.");
 
-    // http://drupal.org/node/1481156 test incorrect logic when url contains
+    // http://drupal.org/node/1481156 test incorrect logic when URL contains
     // a question mark.
     $project['info']['project status url'] = 'http://www.example.com/?project=';
     $expected = 'http://www.example.com/?project=/' . $project['name'] . '/' . DRUPAL_CORE_COMPATIBILITY;
     $expected .= '&site_key=site_key';
+    $expected .= '&list=' . rawurlencode('module1,module2');
     $url = _update_build_fetch_url($project, $site_key);
     $this->assertEqual($url, $expected, "When ? is present, '$url' should be '$expected'.");
 
diff --git a/modules/user/tests/user_form_test.info b/modules/user/tests/user_form_test.info
index 577cbb10677e86e2f7cbf836feb2c8f203a4da37..1b33a82d640b314a616905d8bc23cc8a90f1aab3 100644
--- a/modules/user/tests/user_form_test.info
+++ b/modules/user/tests/user_form_test.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/user/user-picture.tpl.php b/modules/user/user-picture.tpl.php
index a33d2661d744606038af3db79e87ec96df310618..ee821878602f0664e4a2afe45ead665cc5c82af2 100644
--- a/modules/user/user-picture.tpl.php
+++ b/modules/user/user-picture.tpl.php
@@ -12,6 +12,8 @@
  *   check_plain() before use.
  *
  * @see template_preprocess_user_picture()
+ *
+ * @ingroup themeable
  */
 ?>
 <?php if ($user_picture): ?>
diff --git a/modules/user/user-profile.tpl.php b/modules/user/user-profile.tpl.php
index a1611c8353120422b28150f4453bd4ebf3159855..0a64fed84542f9f27976e4c3eb80e7b9ae999fa7 100644
--- a/modules/user/user-profile.tpl.php
+++ b/modules/user/user-profile.tpl.php
@@ -30,6 +30,8 @@
  * @see user-profile-item.tpl.php
  *   Where the html is handled for each item in the group.
  * @see template_preprocess_user_profile()
+ *
+ * @ingroup themeable
  */
 ?>
 <div class="profile"<?php print $attributes; ?>>
diff --git a/modules/user/user.api.php b/modules/user/user.api.php
index f610408dc15a39e20add35e88ceb3e49f369bd29..64c863fe4c63c653234cd0da651082d01813fcea 100644
--- a/modules/user/user.api.php
+++ b/modules/user/user.api.php
@@ -299,6 +299,14 @@ function hook_user_login(&$edit, $account) {
 /**
  * The user just logged out.
  *
+ * Note that when this hook is invoked, the changes have not yet been written to
+ * the database, because a database transaction is still in progress. The
+ * transaction is not finalized until the save operation is entirely completed
+ * and user_save() goes out of scope. You should not rely on data in the
+ * database at this time as it is not updated yet. You should also note that any
+ * write/update database queries executed from this hook are also not committed
+ * immediately. Check user_save() and db_transaction() for more info.
+ *
  * @param $account
  *   The user object on which the operation was just performed.
  */
@@ -317,6 +325,14 @@ function hook_user_logout($account) {
  * The module should format its custom additions for display and add them to the
  * $account->content array.
  *
+ * Note that when this hook is invoked, the changes have not yet been written to
+ * the database, because a database transaction is still in progress. The
+ * transaction is not finalized until the save operation is entirely completed
+ * and user_save() goes out of scope. You should not rely on data in the
+ * database at this time as it is not updated yet. You should also note that any
+ * write/update database queries executed from this hook are also not committed
+ * immediately. Check user_save() and db_transaction() for more info.
+ *
  * @param $account
  *   The user object on which the operation is being performed.
  * @param $view_mode
diff --git a/modules/user/user.info b/modules/user/user.info
index e39c54b75931a65cce515efaba3af2c285f07bfb..1f271a4951bcb521ae40ee2e407ed06b0883e9ce 100644
--- a/modules/user/user.info
+++ b/modules/user/user.info
@@ -9,8 +9,8 @@ required = TRUE
 configure = admin/config/people
 stylesheets[all][] = user.css
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/modules/user/user.install b/modules/user/user.install
index 217577de7e5019ae4f23bcde7a20ee05c3e314bb..cff873a451a574be0b4a3fe8eefe01429ee96667 100644
--- a/modules/user/user.install
+++ b/modules/user/user.install
@@ -384,7 +384,7 @@ function user_update_dependencies() {
  *   An array of permissions names.
  * @param $module
  *   The name of the module defining the permissions.
- * @ingroup update-api-6.x-to-7.x
+ * @ingroup update_api
  */
 function _update_7000_user_role_grant_permissions($rid, array $permissions, $module) {
   // Grant new permissions for the role.
diff --git a/modules/user/user.module b/modules/user/user.module
index 47ac642738999b195fdf35ea64808cb2d417d8c1..2c02f8ce921a6281c4a260d20dd6cda51c20a965 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -187,7 +187,7 @@ function user_entity_info() {
 }
 
 /**
- * Entity uri callback.
+ * Entity URI callback.
  */
 function user_uri($user) {
   return array(
@@ -1307,7 +1307,6 @@ function user_login_block($form) {
   );
   $form['pass'] = array('#type' => 'password',
     '#title' => t('Password'),
-    '#maxlength' => 60,
     '#size' => 15,
     '#required' => TRUE,
   );
@@ -1873,7 +1872,7 @@ function user_menu_link_alter(&$link) {
  */
 function user_translated_menu_link_alter(&$link) {
   // Hide the "User account" link for anonymous users.
-  if ($link['link_path'] == 'user' && $link['module'] == 'system' && user_is_anonymous()) {
+  if ($link['link_path'] == 'user' && $link['module'] == 'system' && !$GLOBALS['user']->uid) {
     $link['hidden'] = 1;
   }
 }
@@ -2574,6 +2573,14 @@ function user_build_content($account, $view_mode = 'full', $langcode = NULL) {
   // Remove previously built content, if exists.
   $account->content = array();
 
+  // Allow modules to change the view mode.
+  $context = array(
+    'entity_type' => 'user',
+    'entity' => $account,
+    'langcode' => $langcode,
+  );
+  drupal_alter('entity_view_mode', $view_mode, $context);
+
   // Build fields content.
   field_attach_prepare_view('user', array($account->uid => $account), $view_mode, $langcode);
   entity_prepare_view('user', array($account->uid => $account), $langcode);
@@ -2582,6 +2589,10 @@ function user_build_content($account, $view_mode = 'full', $langcode = NULL) {
   // Populate $account->content with a render() array.
   module_invoke_all('user_view', $account, $view_mode, $langcode);
   module_invoke_all('entity_view', $account, 'user', $view_mode, $langcode);
+
+  // Make sure the current view mode is stored if no module has already
+  // populated the related key.
+  $account->content += array('#view_mode' => $view_mode);
 }
 
 /**
diff --git a/modules/user/user.test b/modules/user/user.test
index b53db0769df18ddc7ebf297f2c90a8a1f5f2635f..92af9fa9ab00512dae45eb9adaa1d209b15bea7f 100644
--- a/modules/user/user.test
+++ b/modules/user/user.test
@@ -1487,7 +1487,7 @@ class UserAutocompleteTestCase extends DrupalWebTestCase {
 
 
 /**
- * Test user-links in secondary menu.
+ * Tests user links in the secondary menu.
  */
 class UserAccountLinksUnitTests extends DrupalWebTestCase {
   public static function getInfo() {
@@ -1498,6 +1498,10 @@ class UserAccountLinksUnitTests extends DrupalWebTestCase {
     );
   }
 
+  function setUp() {
+    parent::setUp('menu');
+  }
+
   /**
    * Tests the secondary menu.
    */
@@ -1533,6 +1537,36 @@ class UserAccountLinksUnitTests extends DrupalWebTestCase {
     $element = $this->xpath('//ul[@id=:menu_id]', array(':menu_id' => 'secondary-menu-links'));
     $this->assertEqual(count($element), 0, 'No secondary-menu for logged-out users.');
   }
+
+  /**
+   * Tests disabling the 'My account' link.
+   */
+  function testDisabledAccountLink() {
+    // Create an admin user and log in.
+    $this->drupalLogin($this->drupalCreateUser(array('access administration pages', 'administer menu')));
+
+    // Verify that the 'My account' link is enabled.
+    $this->drupalGet('admin/structure/menu/manage/user-menu');
+    $this->assertFieldChecked('edit-mlid2-hidden', "The 'My account' link is enabled by default.");
+
+    // Disable the 'My account' link.
+    $edit = array(
+      'mlid:2[hidden]' => FALSE,
+    );
+    $this->drupalPost('admin/structure/menu/manage/user-menu', $edit, t('Save configuration'));
+
+    // Get the homepage.
+    $this->drupalGet('<front>');
+
+    // Verify that the 'My account' link does not appear when disabled.
+    $link = $this->xpath('//ul[@id=:menu_id]/li/a[contains(@href, :href) and text()=:text]', array(
+      ':menu_id' => 'secondary-menu-links',
+      ':href' => 'user',
+      ':text' => 'My account',
+    ));
+    $this->assertEqual(count($link), 0, 'My account link is not in the secondary menu.');
+  }
+
 }
 
 /**
diff --git a/profiles/minimal/minimal.info b/profiles/minimal/minimal.info
index 7981a92f323a3edeaae72d4103f0857efdcf1f60..24df0c61da76fa07cd9fcbdeff2ce3c901b0c728 100644
--- a/profiles/minimal/minimal.info
+++ b/profiles/minimal/minimal.info
@@ -5,8 +5,8 @@ core = 7.x
 dependencies[] = block
 dependencies[] = dblog
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/profiles/minimal/minimal.install b/profiles/minimal/minimal.install
index 6099da1ced999594ce93ca21ec3e6ad61e421f75..9cf4fa2f80b9d4afbb9a438af500e694a0bfa6fd 100644
--- a/profiles/minimal/minimal.install
+++ b/profiles/minimal/minimal.install
@@ -1,7 +1,7 @@
 <?php
 /**
  * @file
- * Install, update and uninstall functions for the minimal install profile.
+ * Install, update and uninstall functions for the minimal installation profile.
  */
 
 /**
diff --git a/profiles/standard/standard.info b/profiles/standard/standard.info
index 36ae60e8e58bbebc2182db9809c6cb4e09de8748..ad397f4f49a96ab274a0d6156902d836466b54a4 100644
--- a/profiles/standard/standard.info
+++ b/profiles/standard/standard.info
@@ -24,8 +24,8 @@ dependencies[] = field_ui
 dependencies[] = file
 dependencies[] = rdf
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/profiles/standard/standard.install b/profiles/standard/standard.install
index ab3e8a1ad600a833dd49072ba665e9d7b2f81470..1d563a48d79d58fba8a8862f7808c6fe4e9eaf8c 100644
--- a/profiles/standard/standard.install
+++ b/profiles/standard/standard.install
@@ -1,7 +1,7 @@
 <?php
 /**
  * @file
- * Install, update and uninstall functions for the standard install profile.
+ * Install, update and uninstall functions for the standard installation profile.
  */
 
 /**
diff --git a/profiles/testing/modules/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info b/profiles/testing/modules/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info
index 99563e9df586fdd21765602b6ac5b5cae3b75b24..4fcb81ea9f732571cef4f09de2a67959d8263798 100644
--- a/profiles/testing/modules/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info
+++ b/profiles/testing/modules/drupal_system_listing_compatible_test/drupal_system_listing_compatible_test.info
@@ -6,8 +6,8 @@ core = 7.x
 hidden = TRUE
 files[] = drupal_system_listing_compatible_test.test
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/profiles/testing/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info b/profiles/testing/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info
index 347fa3f254c4509cb40f297fcbae4468dec83346..068432fbb5cb4962f0f3eb1984b89ac69ec1a91e 100644
--- a/profiles/testing/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info
+++ b/profiles/testing/modules/drupal_system_listing_incompatible_test/drupal_system_listing_incompatible_test.info
@@ -8,8 +8,8 @@ version = VERSION
 core = 6.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/profiles/testing/testing.info b/profiles/testing/testing.info
index 3bf881fc87b71cdbad006e212b653a14836c9f2f..124c9c045d5d3d9fcec648c6157a8eb246fa15cb 100644
--- a/profiles/testing/testing.info
+++ b/profiles/testing/testing.info
@@ -4,8 +4,8 @@ version = VERSION
 core = 7.x
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/scripts/drupal.sh b/scripts/drupal.sh
index 5d064f5713a3c7bf7706b1de3a570b8621043cd0..76bd750f5718c2c82918c4b85b2a0315ee9d3afb 100755
--- a/scripts/drupal.sh
+++ b/scripts/drupal.sh
@@ -113,7 +113,7 @@ while ($param = array_shift($_SERVER['argv'])) {
           $_REQUEST = $_GET;
         }
 
-        // set file to execute or Drupal path (clean urls enabled)
+        // set file to execute or Drupal path (clean URLs enabled)
         if (isset($path['path']) && file_exists(substr($path['path'], 1))) {
           $_SERVER['PHP_SELF'] = $_SERVER['REQUEST_URI'] = $path['path'];
           $cmd = substr($path['path'], 1);
diff --git a/scripts/generate-d7-content.sh b/scripts/generate-d7-content.sh
index 364a25c92c6be805dea61b17a163adc31e470317..1e1d13fa91bdc4cde52b7ac313393609fb8e01c8 100644
--- a/scripts/generate-d7-content.sh
+++ b/scripts/generate-d7-content.sh
@@ -129,8 +129,7 @@ if (module_exists('taxonomy')) {
       }
       else {
         $instance['widget'] = array(
-          'type' => 'select',
-          'module' => 'options',
+          'type' => 'options_select',
           'settings' => array(),
         );
       }
diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh
index f651f22bb18175ace420bc86414b1711d1bed72f..334501527f445c7df63aec129096808f7caa8993 100755
--- a/scripts/run-tests.sh
+++ b/scripts/run-tests.sh
@@ -268,14 +268,14 @@ function simpletest_script_init($server_software) {
     exit();
   }
 
-  // Get url from arguments.
+  // Get URL from arguments.
   if (!empty($args['url'])) {
     $parsed_url = parse_url($args['url']);
     $host = $parsed_url['host'] . (isset($parsed_url['port']) ? ':' . $parsed_url['port'] : '');
     $path = isset($parsed_url['path']) ? $parsed_url['path'] : '';
 
     // If the passed URL schema is 'https' then setup the $_SERVER variables
-    // properly so that testing will run under https.
+    // properly so that testing will run under HTTPS.
     if ($parsed_url['scheme'] == 'https') {
       $_SERVER['HTTPS'] = 'on';
     }
diff --git a/sites/README.txt b/sites/README.txt
new file mode 100644
index 0000000000000000000000000000000000000000..9aecef2d79b1fa6f94913f3877b39eb2e62c92cb
--- /dev/null
+++ b/sites/README.txt
@@ -0,0 +1,19 @@
+This directory structure contains the settings and configuration files specific
+to your site or sites and is an integral part of multisite configuration.
+
+The sites/all/ subdirectory structure should be used to place your custom and
+downloaded extensions including modules, themes, and third party libraries.
+
+Downloaded installation profiles should be placed in the /profiles directory
+in the Drupal root.
+
+In multisite configuration, extensions found in the sites/all directory
+structure are available to all sites. Alternatively, the sites/your_site_name/
+subdirectory pattern may be used to restrict extensions to a specific
+site instance.
+
+See the respective README.txt files in sites/all/themes and sites/all/modules
+for additional information about obtaining and organizing extensions.
+
+See INSTALL.txt in the Drupal root for information about single-site
+installation or multisite configuration.
diff --git a/sites/all/README.txt b/sites/all/README.txt
deleted file mode 100644
index c8970883a7adc39b30d7d00c93713a7b19cd336e..0000000000000000000000000000000000000000
--- a/sites/all/README.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-
-This directory should be used to place downloaded and custom modules
-and themes which are common to all sites. Keeping contributed and
-custom modules and themes in the sites directory will aid in upgrading
-Drupal core files. Place contributed and custom modules and themes in
-the sites/all/modules and sites/all/themes directories respectively.
-
diff --git a/sites/all/modules/README.txt b/sites/all/modules/README.txt
index f4e35b558359cac87ace1a6e6db58384dcc928a5..c72b43e4fb878439c7e8fd62dc57708fc7ab9eb0 100644
--- a/sites/all/modules/README.txt
+++ b/sites/all/modules/README.txt
@@ -1,4 +1,16 @@
+Place downloaded and custom modules that extend your site functionality beyond
+Drupal core in this directory to ensure clean separation from core modules and
+to facilitate safe, self-contained code updates. Contributed modules from the
+Drupal community may be downloaded at http://drupal.org/project/modules.
 
-This directory should be used to place downloaded and custom modules
-which are common to all sites. This will allow you to more easily
-update Drupal core files.
+It is safe to organize modules into subdirectories, such as "contrib" for
+contributed modules, and "custom" for custom modules. Note that if you move a
+module to a subdirectory after it has been enabled, you may need to clear the
+Drupal cache so that it can be found.
+
+In multisite configuration, modules found in this directory are available to
+all sites. Alternatively, the sites/your_site_name/modules directory pattern may
+be used to restrict modules to a specific site instance.
+
+Refer to the "Developing for Drupal" section of the README.txt in the Drupal
+root directory for further information on extending Drupal with custom modules.
diff --git a/sites/all/themes/README.txt b/sites/all/themes/README.txt
index e9425214b2f9a103c136356e25e9323cd55162d9..e308af205e22eda37da072dedab3612aceca335a 100644
--- a/sites/all/themes/README.txt
+++ b/sites/all/themes/README.txt
@@ -1,4 +1,14 @@
+Place downloaded and custom themes that modify your site's appearance in this
+directory to ensure clean separation from Drupal core and to facilitate safe,
+self-contained code updates. Contributed themes from the Drupal community may
+be downloaded at http://drupal.org/project/themes.
 
-This directory should be used to place downloaded and custom themes
-which are common to all sites. This will allow you to more easily
-update Drupal core files.
+It is safe to organize themes into subdirectories and is recommended to use
+Drupal's sub-theme functionality to ensure easy maintenance and upgrades.
+
+In multisite configuration, themes found in this directory are available to
+all sites. Alternatively, the sites/your_site_name/themes directory pattern may
+be used to restrict themes to a specific site instance.
+
+Refer to the "Appearance" section of the README.txt in the Drupal root
+directory for further information on theming.
diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php
index 30699a0a24a885da914488a64599abb84564031d..2b207f224138f6a0a3c6bc9ece062eedb2366796 100644
--- a/sites/default/default.settings.php
+++ b/sites/default/default.settings.php
@@ -5,41 +5,51 @@
  * Drupal site-specific configuration file.
  *
  * IMPORTANT NOTE:
- * This file may have been set to read-only by the Drupal installation
- * program. If you make changes to this file, be sure to protect it again
- * after making your modifications. Failure to remove write permissions
- * to this file is a security risk.
- *
- * The configuration file to be loaded is based upon the rules below.
- *
- * The configuration directory will be discovered by stripping the
- * website's hostname from left to right and pathname from right to
- * left. The first configuration file found will be used and any
- * others will be ignored. If no other configuration file is found
- * then the default configuration file at 'sites/default' will be used.
+ * This file may have been set to read-only by the Drupal installation program.
+ * If you make changes to this file, be sure to protect it again after making
+ * your modifications. Failure to remove write permissions to this file is a
+ * security risk.
+ *
+ * The configuration file to be loaded is based upon the rules below. However
+ * if the multisite aliasing file named sites/sites.php is present, it will be
+ * loaded, and the aliases in the array $sites will override the default
+ * directory rules below. See sites/example.sites.php for more information about
+ * aliases.
+ *
+ * The configuration directory will be discovered by stripping the website's
+ * hostname from left to right and pathname from right to left. The first
+ * configuration file found will be used and any others will be ignored. If no
+ * other configuration file is found then the default configuration file at
+ * 'sites/default' will be used.
  *
  * For example, for a fictitious site installed at
- * http://www.drupal.org/mysite/test/, the 'settings.php'
- * is searched in the following directories:
+ * http://www.drupal.org:8080/mysite/test/, the 'settings.php' file is searched
+ * for in the following directories:
  *
+ * - sites/8080.www.drupal.org.mysite.test
  * - sites/www.drupal.org.mysite.test
  * - sites/drupal.org.mysite.test
  * - sites/org.mysite.test
  *
+ * - sites/8080.www.drupal.org.mysite
  * - sites/www.drupal.org.mysite
  * - sites/drupal.org.mysite
  * - sites/org.mysite
  *
+ * - sites/8080.www.drupal.org
  * - sites/www.drupal.org
  * - sites/drupal.org
  * - sites/org
  *
  * - sites/default
  *
- * If you are installing on a non-standard port number, prefix the
+ * Note that if you are installing on a non-standard port number, prefix the
  * hostname with that number. For example,
  * http://www.drupal.org:8080/mysite/test/ could be loaded from
  * sites/8080.www.drupal.org.mysite.test/.
+ *
+ * @see example.sites.php
+ * @see conf_path()
  */
 
 /**
@@ -480,33 +490,64 @@ ini_set('session.cookie_lifetime', 2000000);
  */
 $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>';
+$conf['404_fast_html'] = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"><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.
+ * By default the page request process will return a fast 404 page for missing
+ * files if they match the regular expression set in '404_fast_paths' and not
+ * '404_fast_paths_exclude' above. 404 errors will simultaneously be logged in
+ * the Drupal system log.
+ *
+ * You can choose to return a fast 404 page earlier for missing pages (as soon
+ * as settings.php is loaded) by uncommenting the line below. This speeds up
+ * server response time when loading 404 error pages and prevents the 404 error
+ * from being logged in the Drupal system log. In order to prevent valid pages
+ * such as image styles and other generated content that may match the
+ * '404_fast_html' regular expression from returning 404 errors, it is necessary
+ * to add them to the '404_fast_paths_exclude' regular expression above. Make
+ * sure that you understand the effects of this feature before uncommenting the
+ * line below.
  */
 # drupal_fast_404();
 
+/**
+ * External access proxy settings:
+ *
+ * If your site must access the Internet via a web proxy then you can enter
+ * the proxy settings here. Currently only basic authentication is supported
+ * by using the username and password variables. The proxy_user_agent variable
+ * can be set to NULL for proxies that require no User-Agent header or to a
+ * non-empty string for proxies that limit requests to a specific agent. The
+ * proxy_exceptions variable is an array of host names to be accessed directly,
+ * not via proxy.
+ */
+# $conf['proxy_server'] = '';
+# $conf['proxy_port'] = 8080;
+# $conf['proxy_username'] = '';
+# $conf['proxy_password'] = '';
+# $conf['proxy_user_agent'] = '';
+# $conf['proxy_exceptions'] = array('127.0.0.1', 'localhost');
+
 /**
  * Authorized file system operations:
  *
  * The Update manager module included with Drupal provides a mechanism for
  * site administrators to securely install missing updates for the site
- * directly through the web user interface by providing either SSH or FTP
- * credentials. This allows the site to update the new files as the user who
- * owns all the Drupal files, instead of as the user the webserver is running
- * as. However, some sites might wish to disable this functionality, and only
- * update the code directly via SSH or FTP themselves. This setting completely
+ * directly through the web user interface. On securely-configured servers,
+ * the Update manager will require the administrator to provide SSH or FTP
+ * credentials before allowing the installation to proceed; this allows the
+ * site to update the new files as the user who owns all the Drupal files,
+ * instead of as the user the webserver is running as. On servers where the
+ * webserver user is itself the owner of the Drupal files, the administrator
+ * will not be prompted for SSH or FTP credentials (note that these server
+ * setups are common on shared hosting, but are inherently insecure).
+ *
+ * Some sites might wish to disable the above functionality, and only update
+ * the code directly via SSH or FTP themselves. This setting completely
  * disables all functionality related to these authorized file operations.
  *
+ * @see http://drupal.org/node/244924
+ *
  * Remove the leading hash signs to disable.
  */
 # $conf['allow_authorize_operations'] = FALSE;
diff --git a/sites/example.sites.php b/sites/example.sites.php
index 4fa065da5ca745753a958bd447b6d814f0123ab4..f6bf1a2f33b79d78e013bdda8f0fe589dec47234 100644
--- a/sites/example.sites.php
+++ b/sites/example.sites.php
@@ -4,43 +4,55 @@
  * @file
  * Configuration file for Drupal's multi-site directory aliasing feature.
  *
- * Drupal searches for an appropriate configuration directory based on the
- * website's hostname and pathname. A detailed description of the rules for
- * discovering the configuration directory can be found in the comment
- * documentation in 'sites/default/default.settings.php'.
+ * This file allows you to define a set of aliases that map hostnames, ports, and
+ * pathnames to configuration directories in the sites directory. These aliases
+ * are loaded prior to scanning for directories, and they are exempt from the
+ * normal discovery rules. See default.settings.php to view how Drupal discovers
+ * the configuration directory when no alias is found.
  *
- * This file allows you to define a set of aliases that map hostnames and
- * pathnames to configuration directories. These aliases are loaded prior to
- * scanning for directories, and they are exempt from the normal discovery
- * rules. The aliases are defined in an associative array named $sites, which
- * should look similar to the following:
+ * Aliases are useful on development servers, where the domain name may not be
+ * the same as the domain of the live server. Since Drupal stores file paths in
+ * the database (files, system table, etc.) this will ensure the paths are
+ * correct when the site is deployed to a live server.
  *
+ * To use this file, copy and rename it such that its path plus filename is
+ * 'sites/sites.php'. If you don't need to use multi-site directory aliasing,
+ * then you can safely ignore this file, and Drupal will ignore it too.
+ *
+ * Aliases are defined in an associative array named $sites. The array is
+ * written in the format: '<port>.<domain>.<path>' => 'directory'. As an
+ * example, to map http://www.drupal.org:8080/mysite/test to the configuration
+ * directory sites/example.com, the array should be defined as:
+ * @code
  * $sites = array(
- *   'devexample.com' => 'example.com',
- *   'localhost.example' => 'example.com',
+ *   '8080.www.drupal.org.mysite.test' => 'example.com',
  * );
+ * @endcode
+ * The URL, http://www.drupal.org:8080/mysite/test/, could be a symbolic link or
+ * an Apache Alias directive that points to the Drupal root containing
+ * index.php. An alias could also be created for a subdomain. See the
+ * @link http://drupal.org/documentation/install online Drupal installation guide @endlink
+ * for more information on setting up domains, subdomains, and subdirectories.
  *
- * The above array will cause Drupal to look for a directory named
- * "example.com" in the sites directory whenever a request comes from
- * "example.com", "devexample.com", or "localhost/example". That is useful
- * on development servers, where the domain name may not be the same as the
- * domain of the live server. Since Drupal stores file paths into the database
- * (files, system table, etc.) this will ensure the paths are correct while
- * accessed on development servers.
+ * The following examples look for a site configuration in sites/example.com:
+ * @code
+ * URL: http://dev.drupal.org
+ * $sites['dev.drupal.org'] = 'example.com';
  *
- * To use this file, copy and rename it such that its path plus filename is
- * 'sites/sites.php'. If you don't need to use multi-site directory aliasing,
- * then you can safely ignore this file, and Drupal will ignore it too.
- */
-
-/**
- * Multi-site directory aliasing:
+ * URL: http://localhost/example
+ * $sites['localhost.example'] = 'example.com';
+ *
+ * URL: http://localhost:8080/example
+ * $sites['8080.localhost.example'] = 'example.com';
+ *
+ * URL: http://www.drupal.org:8080/mysite/test/
+ * $sites['8080.www.drupal.org.mysite.test'] = 'example.com';
+ * @endcode
  *
- * Edit the lines below to define directory aliases. Remove the leading hash
- * signs to enable.
+ * @see default.settings.php
+ * @see conf_path()
+ * @see http://drupal.org/documentation/install/multi-site
  */
-# $sites['devexample.com'] = 'example.com';
-# $sites['localhost.example'] = 'example.com';
 
 
 /**
diff --git a/themes/bartik/bartik.info b/themes/bartik/bartik.info
index 6486aa6a743576ccbfd0aba0e278a0c710bafab3..96e95740ce2460fa72aabd512bce61cfeeef3bf7 100644
--- a/themes/bartik/bartik.info
+++ b/themes/bartik/bartik.info
@@ -34,8 +34,8 @@ regions[footer] = Footer
 settings[shortcut_module_link] = 0
 
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/themes/bartik/templates/comment-wrapper.tpl.php b/themes/bartik/templates/comment-wrapper.tpl.php
index 864dc41c4086de489187617561428a6d1fcd24db..c0ca74b16a484f194a5aebf969d5c6a73112a515 100644
--- a/themes/bartik/templates/comment-wrapper.tpl.php
+++ b/themes/bartik/templates/comment-wrapper.tpl.php
@@ -32,7 +32,6 @@
  *   into a string within the variable $classes.
  *
  * @see template_preprocess_comment_wrapper()
- * @see theme_comment_wrapper()
  */
 ?>
 <div id="comments" class="<?php print $classes; ?>"<?php print $attributes; ?>>
diff --git a/themes/bartik/templates/node.tpl.php b/themes/bartik/templates/node.tpl.php
index f215b477bb3200ea9bdb0f989e110110d58a4bdf..df5b4549322620a26689de5f7e9514e926d90850 100644
--- a/themes/bartik/templates/node.tpl.php
+++ b/themes/bartik/templates/node.tpl.php
@@ -14,7 +14,7 @@
  * - $date: Formatted creation date. Preprocess functions can reformat it by
  *   calling format_date() with the desired parameters on the $created variable.
  * - $name: Themed username of node author output from theme_username().
- * - $node_url: Direct url of the current node.
+ * - $node_url: Direct URL of the current node.
  * - $display_submitted: Whether submission information should be displayed.
  * - $submitted: Submission information created from $name and $date during
  *   template_preprocess_node().
@@ -22,7 +22,7 @@
  *   CSS. It can be manipulated through the variable $classes_array from
  *   preprocess functions. The default values can be one or more of the
  *   following:
- *   - node: The current template type, i.e., "theming hook".
+ *   - node: The current template type; for example, "theming hook".
  *   - node-[type]: The current node type. For example, if the node is a
  *     "Blog entry" it would result in "node-blog". Note that the machine
  *     name will often be in a short form of the human readable label.
@@ -42,7 +42,7 @@
  *
  * Other variables:
  * - $node: Full node object. Contains data that may not be safe.
- * - $type: Node type, i.e. story, page, blog, etc.
+ * - $type: Node type; for example, story, page, blog, etc.
  * - $comment_count: Number of comments attached to the node.
  * - $uid: User ID of the node author.
  * - $created: Time the node was published formatted in Unix timestamp.
@@ -53,7 +53,7 @@
  * - $id: Position of the node. Increments each time it's output.
  *
  * Node status variables:
- * - $view_mode: View mode, e.g. 'full', 'teaser'...
+ * - $view_mode: View mode; for example, "full", "teaser".
  * - $teaser: Flag for the teaser state (shortcut for $view_mode == 'teaser').
  * - $page: Flag for the full page state.
  * - $promote: Flag for front page promotion state.
@@ -67,11 +67,11 @@
  * - $is_admin: Flags true when the current user is an administrator.
  *
  * Field variables: for each field instance attached to the node a corresponding
- * variable is defined, e.g. $node->body becomes $body. 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. $node->body['en'], thus overriding any language negotiation
- * rule that was previously applied.
+ * variable is defined; for example, $node->body becomes $body. 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; for example, $node->body['en'], thus overriding any
+ * language negotiation rule that was previously applied.
  *
  * @see template_preprocess()
  * @see template_preprocess_node()
diff --git a/themes/garland/garland.info b/themes/garland/garland.info
index 78db5a9b33fbc10cf3068043ebdaf58b24511e6b..bfd7a17c9728b5bdfcca0b08c7d8d46bd953a70c 100644
--- a/themes/garland/garland.info
+++ b/themes/garland/garland.info
@@ -7,8 +7,8 @@ stylesheets[all][] = style.css
 stylesheets[print][] = print.css
 settings[garland_width] = fluid
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/themes/seven/page.tpl.php b/themes/seven/page.tpl.php
index 4d40cf89c075032745b886d38e218534ed103a86..6ab3ae8417c9366bc348c93fb7a2aa40536cf4af 100644
--- a/themes/seven/page.tpl.php
+++ b/themes/seven/page.tpl.php
@@ -11,7 +11,7 @@
 
   <div id="page">
     <?php if ($secondary_local_tasks): ?>
-      <div class="tabs-secondary clearfix"><ul class="tabs secondary"><?php print render($secondary_local_tasks); ?></ul></div>
+      <div class="tabs-secondary clearfix"><?php print render($secondary_local_tasks); ?></div>
     <?php endif; ?>
 
     <div id="content" class="clearfix">
diff --git a/themes/seven/seven.info b/themes/seven/seven.info
index ad25590791b8009a9db3e19aec227efd6bc48fea..705e9f3a478576389ec6a237ec1ac5a24097909a 100644
--- a/themes/seven/seven.info
+++ b/themes/seven/seven.info
@@ -13,8 +13,8 @@ regions[page_bottom] = Page bottom
 regions[sidebar_first] = First sidebar
 regions_hidden[] = sidebar_first
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"
 
diff --git a/themes/stark/stark.info b/themes/stark/stark.info
index 21736359e3bf05dcc44421e98ed3f82886039113..f60e470f07ce670925b044b08b7340b9f1846524 100644
--- a/themes/stark/stark.info
+++ b/themes/stark/stark.info
@@ -5,8 +5,8 @@ version = VERSION
 core = 7.x
 stylesheets[all][] = layout.css
 
-; Information added by drupal.org packaging script on 2012-10-17
-version = "7.16"
+; Information added by drupal.org packaging script on 2012-11-07
+version = "7.17"
 project = "drupal"
-datestamp = "1350508567"
+datestamp = "1352325357"