From 728f8e6d31efa89419e3c3aa0342896a2fd7576b Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Wed, 24 May 2017 19:27:14 +0200 Subject: [PATCH] updated core to 7.54 --- CHANGELOG.txt | 19 +++ includes/bootstrap.inc | 14 +- includes/cache.inc | 14 +- includes/common.inc | 11 +- includes/date.inc | 20 +-- includes/form.inc | 4 +- includes/menu.inc | 3 +- includes/stream_wrappers.inc | 152 +++++++++++++++++- modules/aggregator/aggregator.info | 6 +- modules/aggregator/tests/aggregator_test.info | 6 +- modules/block/block.info | 6 +- modules/block/tests/block_test.info | 6 +- .../block_test_theme/block_test_theme.info | 6 +- modules/blog/blog.info | 6 +- modules/book/book.info | 6 +- modules/color/color.info | 6 +- modules/color/color.test | 2 +- modules/comment/comment.info | 6 +- modules/comment/comment.test | 10 +- modules/contact/contact.info | 6 +- modules/contextual/contextual.info | 6 +- modules/dashboard/dashboard.info | 6 +- modules/dblog/dblog.admin.inc | 2 +- modules/dblog/dblog.info | 6 +- modules/field/field.info | 6 +- .../field_sql_storage/field_sql_storage.info | 6 +- modules/field/modules/list/list.info | 6 +- .../field/modules/list/tests/list_test.info | 6 +- modules/field/modules/number/number.info | 6 +- modules/field/modules/number/number.module | 9 ++ modules/field/modules/number/number.test | 46 ++++++ modules/field/modules/options/options.info | 6 +- modules/field/modules/options/options.test | 28 +++- modules/field/modules/text/text.info | 6 +- modules/field/tests/field_test.info | 6 +- modules/field_ui/field_ui.info | 6 +- modules/file/file.info | 6 +- modules/file/file.module | 3 +- modules/file/tests/file.test | 50 ++++++ modules/file/tests/file_module_test.info | 6 +- modules/filter/filter.info | 6 +- modules/filter/filter.module | 2 +- modules/forum/forum.info | 6 +- modules/help/help.info | 6 +- modules/image/image.info | 6 +- modules/image/tests/image_module_test.info | 6 +- modules/locale/locale.info | 6 +- modules/locale/tests/locale_test.info | 6 +- modules/menu/menu.info | 6 +- modules/node/node.info | 6 +- modules/node/tests/node_access_test.info | 6 +- modules/node/tests/node_test.info | 6 +- modules/node/tests/node_test_exception.info | 6 +- modules/openid/openid.info | 6 +- modules/openid/tests/openid_test.info | 6 +- modules/overlay/overlay.info | 6 +- modules/path/path.info | 6 +- modules/php/php.info | 6 +- modules/poll/poll.info | 6 +- modules/profile/profile.info | 6 +- modules/rdf/rdf.info | 6 +- modules/rdf/tests/rdf_test.info | 6 +- modules/search/search.admin.inc | 10 ++ modules/search/search.info | 6 +- modules/search/search.install | 1 + modules/search/search.pages.inc | 7 +- modules/search/search.test | 15 +- .../search/tests/search_embedded_form.info | 6 +- modules/search/tests/search_extra_type.info | 6 +- modules/search/tests/search_node_tags.info | 6 +- modules/shortcut/shortcut.info | 6 +- modules/simpletest/drupal_web_test_case.php | 12 +- modules/simpletest/simpletest.info | 6 +- .../simpletest/tests/actions_loop_test.info | 6 +- modules/simpletest/tests/ajax_forms_test.info | 6 +- modules/simpletest/tests/ajax_test.info | 6 +- modules/simpletest/tests/batch_test.info | 6 +- modules/simpletest/tests/boot_test_1.info | 6 +- modules/simpletest/tests/boot_test_2.info | 6 +- modules/simpletest/tests/common_test.info | 6 +- .../tests/common_test_cron_helper.info | 6 +- modules/simpletest/tests/database_test.info | 6 +- .../drupal_autoload_test.info | 6 +- ...drupal_system_listing_compatible_test.info | 6 +- ...upal_system_listing_incompatible_test.info | 6 +- .../simpletest/tests/entity_cache_test.info | 6 +- .../tests/entity_cache_test_dependency.info | 6 +- .../tests/entity_crud_hook_test.info | 6 +- .../tests/entity_query_access_test.info | 6 +- modules/simpletest/tests/error_test.info | 6 +- modules/simpletest/tests/file_test.info | 6 +- modules/simpletest/tests/filter_test.info | 6 +- modules/simpletest/tests/form.test | 8 + modules/simpletest/tests/form_test.info | 6 +- modules/simpletest/tests/form_test.module | 28 ++++ modules/simpletest/tests/image_test.info | 6 +- modules/simpletest/tests/menu_test.info | 6 +- modules/simpletest/tests/module_test.info | 6 +- modules/simpletest/tests/path_test.info | 6 +- .../tests/psr_0_test/psr_0_test.info | 6 +- .../tests/psr_4_test/psr_4_test.info | 6 +- .../simpletest/tests/requirements1_test.info | 6 +- .../simpletest/tests/requirements2_test.info | 6 +- modules/simpletest/tests/session_test.info | 6 +- .../tests/system_dependencies_test.info | 6 +- ...atible_core_version_dependencies_test.info | 6 +- ...system_incompatible_core_version_test.info | 6 +- ...ible_module_version_dependencies_test.info | 6 +- ...stem_incompatible_module_version_test.info | 6 +- .../tests/system_project_namespace_test.info | 6 +- modules/simpletest/tests/system_test.info | 6 +- modules/simpletest/tests/taxonomy_test.info | 6 +- modules/simpletest/tests/theme.test | 31 ++++ modules/simpletest/tests/theme_test.info | 6 +- modules/simpletest/tests/theme_test.module | 24 +++ .../themes/engines/nyan_cat/nyan_cat.engine | 53 ++++++ .../themes/test_basetheme/test_basetheme.info | 6 +- .../themes/test_subtheme/test_subtheme.info | 6 +- .../tests/themes/test_theme/test_theme.info | 6 +- .../theme_test_template_test.nyan-cat.html | 1 + .../test_theme_nyan_cat.info | 11 ++ .../simpletest/tests/update_script_test.info | 6 +- modules/simpletest/tests/update_test_1.info | 6 +- modules/simpletest/tests/update_test_2.info | 6 +- modules/simpletest/tests/update_test_3.info | 6 +- modules/simpletest/tests/url_alter_test.info | 6 +- modules/simpletest/tests/xmlrpc_test.info | 6 +- modules/statistics/statistics.info | 6 +- modules/syslog/syslog.info | 6 +- modules/system/system.api.php | 16 ++ modules/system/system.info | 6 +- modules/system/system.module | 10 ++ modules/system/system.test | 54 +++++++ modules/system/tests/cron_queue_test.info | 6 +- modules/system/tests/system_cron_test.info | 6 +- modules/taxonomy/taxonomy.info | 6 +- modules/toolbar/toolbar.info | 6 +- modules/tracker/tracker.info | 6 +- .../translation/tests/translation_test.info | 6 +- modules/translation/translation.info | 6 +- modules/trigger/tests/trigger_test.info | 6 +- modules/trigger/trigger.info | 6 +- modules/update/tests/aaa_update_test.info | 6 +- modules/update/tests/bbb_update_test.info | 6 +- modules/update/tests/ccc_update_test.info | 6 +- .../update_test_admintheme.info | 6 +- .../update_test_basetheme.info | 6 +- .../update_test_subtheme.info | 6 +- modules/update/tests/update_test.info | 6 +- modules/update/update.info | 6 +- modules/user/tests/user_form_test.info | 6 +- modules/user/user.info | 6 +- modules/user/user.module | 38 +---- modules/user/user.test | 53 ------ profiles/minimal/minimal.info | 6 +- profiles/standard/standard.info | 6 +- ...drupal_system_listing_compatible_test.info | 6 +- ...upal_system_listing_incompatible_test.info | 6 +- profiles/testing/testing.info | 6 +- themes/bartik/bartik.info | 6 +- themes/garland/garland.info | 6 +- themes/seven/seven.info | 6 +- themes/stark/stark.info | 6 +- 163 files changed, 1022 insertions(+), 513 deletions(-) create mode 100644 modules/simpletest/tests/themes/engines/nyan_cat/nyan_cat.engine create mode 100644 modules/simpletest/tests/themes/test_theme_nyan_cat/templates/theme_test_template_test.nyan-cat.html create mode 100644 modules/simpletest/tests/themes/test_theme_nyan_cat/test_theme_nyan_cat.info diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 0bd51e04..c015fb4f 100755 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,4 +1,23 @@ +Drupal 7.54, 2017-02-01 +----------------------- +- Modules are now able to define theme engines (API addition: + https://www.drupal.org/node/2826480). +- Logging of searches can now be disabled (new option in the administrative + interface). +- Added menu tree render structure to (pre-)process hooks for theme_menu_tree() + (API addition: https://www.drupal.org/node/2827134). +- Added new function for determining whether an HTTPS request is being served + (API addition: https://www.drupal.org/node/2824590). +- Fixed incorrect default value for short and medium date formats on the date + type configuration page. +- File validation error message is now removed after subsequent upload of valid + file. +- Numerous bug fixes. +- Numerous API documentation improvements. +- Additional performance improvements. +- Additional automated test coverage. + Drupal 7.53, 2016-12-07 ----------------------- - Fixed drag and drop support on newer Chrome/IE 11+ versions after 7.51 update diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index ed6d864c..99a5ac84 100755 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -8,7 +8,7 @@ /** * The current system version. */ -define('VERSION', '7.53'); +define('VERSION', '7.54'); /** * Core API compatibility. @@ -718,6 +718,16 @@ function drupal_valid_http_host($host) { && preg_match('/^\[?(?:[a-zA-Z0-9-:\]_]+\.?)+$/', $host); } +/** + * Checks whether an HTTPS request is being served. + * + * @return bool + * TRUE if the request is HTTPS, FALSE otherwise. + */ +function drupal_is_https() { + return isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on'; +} + /** * Sets the base URL, cookie domain, and session name from configuration. */ @@ -731,7 +741,7 @@ function drupal_settings_initialize() { if (file_exists(DRUPAL_ROOT . '/' . conf_path() . '/settings.php')) { include_once DRUPAL_ROOT . '/' . conf_path() . '/settings.php'; } - $is_https = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on'; + $is_https = drupal_is_https(); if (isset($base_url)) { // Parse fixed base URL from settings.php. diff --git a/includes/cache.inc b/includes/cache.inc index 4c2bed32..945dd663 100755 --- a/includes/cache.inc +++ b/includes/cache.inc @@ -122,7 +122,12 @@ function cache_get_multiple(array &$cids, $bin = 'cache') { * the administrator panel. * - cache_path: Stores the system paths that have an alias. * @param $expire - * (optional) One of the following values: + * (optional) Controls the maximum lifetime of this cache entry. Note that + * caches might be subject to clearing at any time, so this setting does not + * guarantee a minimum lifetime. With this in mind, the cache should not be + * used for data that must be kept during a cache clear, like sessions. + * + * Use one of the following values: * - CACHE_PERMANENT: Indicates that the item should never be removed unless * explicitly told to using cache_clear_all() with a cache ID. * - CACHE_TEMPORARY: Indicates that the item should be removed at the next @@ -262,7 +267,12 @@ interface DrupalCacheInterface { * 1MB in size to be stored by default. When caching large arrays or * similar, take care to ensure $data does not exceed this size. * @param $expire - * (optional) One of the following values: + * (optional) Controls the maximum lifetime of this cache entry. Note that + * caches might be subject to clearing at any time, so this setting does not + * guarantee a minimum lifetime. With this in mind, the cache should not be + * used for data that must be kept during a cache clear, like sessions. + * + * Use one of the following values: * - CACHE_PERMANENT: Indicates that the item should never be removed unless * explicitly told to using cache_clear_all() with a cache ID. * - CACHE_TEMPORARY: Indicates that the item should be removed at the next diff --git a/includes/common.inc b/includes/common.inc index 339a69b3..da8996a1 100755 --- a/includes/common.inc +++ b/includes/common.inc @@ -3986,7 +3986,11 @@ function drupal_html_id($id) { // be merged with content already on the base page. The HTML IDs must be // unique for the fully merged content. Therefore, initialize $seen_ids to // take into account IDs that are already in use on the base page. - $seen_ids_init = &drupal_static(__FUNCTION__ . ':init'); + static $drupal_static_fast; + if (!isset($drupal_static_fast['seen_ids_init'])) { + $drupal_static_fast['seen_ids_init'] = &drupal_static(__FUNCTION__ . ':init'); + } + $seen_ids_init = &$drupal_static_fast['seen_ids_init']; if (!isset($seen_ids_init)) { // Ideally, Drupal would provide an API to persist state information about // prior page requests in the database, and we'd be able to add this @@ -4031,7 +4035,10 @@ function drupal_html_id($id) { } } } - $seen_ids = &drupal_static(__FUNCTION__, $seen_ids_init); + if (!isset($drupal_static_fast['seen_ids'])) { + $drupal_static_fast['seen_ids'] = &drupal_static(__FUNCTION__, $seen_ids_init); + } + $seen_ids = &$drupal_static_fast['seen_ids']; $id = strtr(drupal_strtolower($id), array(' ' => '-', '_' => '-', '[' => '-', ']' => '')); diff --git a/includes/date.inc b/includes/date.inc index 01ab131b..9e68fee4 100755 --- a/includes/date.inc +++ b/includes/date.inc @@ -12,11 +12,6 @@ function system_default_date_formats() { $formats = array(); // Short date formats. - $formats[] = array( - 'type' => 'short', - 'format' => 'Y-m-d H:i', - 'locales' => array(), - ); $formats[] = array( 'type' => 'short', 'format' => 'm/d/Y - H:i', @@ -37,6 +32,11 @@ function system_default_date_formats() { 'format' => 'd.m.Y - H:i', 'locales' => array('de-ch', 'de-de', 'de-lu', 'fi-fi', 'fr-ch', 'is-is', 'pl-pl', 'ro-ro', 'ru-ru'), ); + $formats[] = array( + 'type' => 'short', + 'format' => 'Y-m-d H:i', + 'locales' => array(), + ); $formats[] = array( 'type' => 'short', 'format' => 'm/d/Y - g:ia', @@ -84,11 +84,6 @@ function system_default_date_formats() { ); // Medium date formats. - $formats[] = array( - 'type' => 'medium', - 'format' => 'D, Y-m-d H:i', - 'locales' => array(), - ); $formats[] = array( 'type' => 'medium', 'format' => 'D, m/d/Y - H:i', @@ -104,6 +99,11 @@ function system_default_date_formats() { 'format' => 'D, Y/m/d - H:i', 'locales' => array('en-ca', 'fr-ca', 'no-no', 'sv-se'), ); + $formats[] = array( + 'type' => 'medium', + 'format' => 'D, Y-m-d H:i', + 'locales' => array(), + ); $formats[] = array( 'type' => 'medium', 'format' => 'F j, Y - H:i', diff --git a/includes/form.inc b/includes/form.inc index 130775f4..e749239e 100755 --- a/includes/form.inc +++ b/includes/form.inc @@ -1176,7 +1176,7 @@ function drupal_validate_form($form_id, &$form, &$form_state) { // If the session token was set by drupal_prepare_form(), ensure that it // matches the current user's session. This is duplicate to code in // form_builder() but left to protect any custom form handling code. - if (isset($form['#token'])) { + if (!empty($form['#token'])) { if (!drupal_valid_token($form_state['values']['form_token'], $form['#token']) || !empty($form_state['invalid_token'])) { _drupal_invalid_token_set_form_error(); // Stop here and don't run any further validation handlers, because they @@ -1837,7 +1837,7 @@ function form_builder($form_id, &$element, &$form_state) { // If the session token was set by drupal_prepare_form(), ensure that it // matches the current user's session. $form_state['invalid_token'] = FALSE; - if (isset($element['#token'])) { + if (!empty($element['#token'])) { if (empty($form_state['input']['form_token']) || !drupal_valid_token($form_state['input']['form_token'], $element['#token'])) { // Set an early form error to block certain input processing since that // opens the door for CSRF vulnerabilities. diff --git a/includes/menu.inc b/includes/menu.inc index 05ecac06..4664d27e 100755 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -1606,6 +1606,7 @@ function _menu_tree_data(&$links, $parents, $depth) { * Implements template_preprocess_HOOK() for theme_menu_tree(). */ function template_preprocess_menu_tree(&$variables) { + $variables['#tree'] = $variables['tree']; $variables['tree'] = $variables['tree']['#children']; } @@ -2682,7 +2683,7 @@ function menu_link_load($mlid) { } /** - * Clears the cached cached data for a single named menu. + * Clears the cached data for a single named menu. */ function menu_cache_clear($menu_name = 'navigation') { $cache_cleared = &drupal_static(__FUNCTION__, array()); diff --git a/includes/stream_wrappers.inc b/includes/stream_wrappers.inc index 48829388..232ff143 100755 --- a/includes/stream_wrappers.inc +++ b/includes/stream_wrappers.inc @@ -133,7 +133,7 @@ interface DrupalStreamWrapperInterface extends StreamWrapperInterface { * @param $uri * A string containing the URI that should be used for this instance. */ - function setUri($uri); + public function setUri($uri); /** * Returns the stream resource URI. @@ -219,7 +219,6 @@ interface DrupalStreamWrapperInterface extends StreamWrapperInterface { public function dirname($uri = NULL); } - /** * Drupal stream wrapper base class for local files. * @@ -549,6 +548,155 @@ abstract class DrupalLocalStreamWrapper implements DrupalStreamWrapperInterface return fclose($this->handle); } + /** + * Sets metadata on the stream. + * + * WARNING: Do not call this method directly! It will be called internally by + * PHP itself when one of the following functions is called on a stream URL: + * + * @param string $uri + * A string containing the URI to the file to set metadata on. + * @param int $option + * One of: + * - STREAM_META_TOUCH: The method was called in response to touch(). + * - STREAM_META_OWNER_NAME: The method was called in response to chown() + * with string parameter. + * - STREAM_META_OWNER: The method was called in response to chown(). + * - STREAM_META_GROUP_NAME: The method was called in response to chgrp(). + * - STREAM_META_GROUP: The method was called in response to chgrp(). + * - STREAM_META_ACCESS: The method was called in response to chmod(). + * @param mixed $value + * If option is: + * - STREAM_META_TOUCH: Array consisting of two arguments of the touch() + * function. + * - STREAM_META_OWNER_NAME or STREAM_META_GROUP_NAME: The name of the owner + * user/group as string. + * - STREAM_META_OWNER or STREAM_META_GROUP: The value of the owner + * user/group as integer. + * - STREAM_META_ACCESS: The argument of the chmod() as integer. + * + * @return bool + * Returns TRUE on success or FALSE on failure. If $option is not + * implemented, FALSE should be returned. + * + * @see touch() + * @see chmod() + * @see chown() + * @see chgrp() + * @link http://php.net/manual/streamwrapper.stream-metadata.php + */ + public function stream_metadata($uri, $option, $value) { + $target = $this->getLocalPath($uri); + $return = FALSE; + switch ($option) { + case STREAM_META_TOUCH: + if (!empty($value)) { + $return = touch($target, $value[0], $value[1]); + } + else { + $return = touch($target); + } + break; + + case STREAM_META_OWNER_NAME: + case STREAM_META_OWNER: + $return = chown($target, $value); + break; + + case STREAM_META_GROUP_NAME: + case STREAM_META_GROUP: + $return = chgrp($target, $value); + break; + + case STREAM_META_ACCESS: + $return = chmod($target, $value); + break; + } + if ($return) { + // For convenience clear the file status cache of the underlying file, + // since metadata operations are often followed by file status checks. + clearstatcache(TRUE, $target); + } + return $return; + } + + /** + * Truncate stream. + * + * Will respond to truncation; e.g., through ftruncate(). + * + * @param int $new_size + * The new size. + * + * @return bool + * TRUE on success, FALSE otherwise. + */ + public function stream_truncate($new_size) { + return ftruncate($this->handle, $new_size); + } + + /** + * Retrieve the underlying stream resource. + * + * This method is called in response to stream_select(). + * + * @param int $cast_as + * Can be STREAM_CAST_FOR_SELECT when stream_select() is calling + * stream_cast() or STREAM_CAST_AS_STREAM when stream_cast() is called for + * other uses. + * + * @return resource|false + * The underlying stream resource or FALSE if stream_select() is not + * supported. + * + * @see stream_select() + * @link http://php.net/manual/streamwrapper.stream-cast.php + */ + public function stream_cast($cast_as) { + return $this->handle ? $this->handle : FALSE; + } + + /** + * Change stream options. + * + * This method is called to set options on the stream. + * + * Since Windows systems do not allow it and it is not needed for most use + * cases anyway, this method is not supported on local files and will trigger + * an error and return false. If needed, custom subclasses can provide + * OS-specific implementations for advanced use cases. + * + * @param int $option + * One of: + * - STREAM_OPTION_BLOCKING: The method was called in response to + * stream_set_blocking(). + * - STREAM_OPTION_READ_TIMEOUT: The method was called in response to + * stream_set_timeout(). + * - STREAM_OPTION_WRITE_BUFFER: The method was called in response to + * stream_set_write_buffer(). + * @param int $arg1 + * If option is: + * - STREAM_OPTION_BLOCKING: The requested blocking mode: + * - 1 means blocking. + * - 0 means not blocking. + * - STREAM_OPTION_READ_TIMEOUT: The timeout in seconds. + * - STREAM_OPTION_WRITE_BUFFER: The buffer mode, STREAM_BUFFER_NONE or + * STREAM_BUFFER_FULL. + * @param int $arg2 + * If option is: + * - STREAM_OPTION_BLOCKING: This option is not set. + * - STREAM_OPTION_READ_TIMEOUT: The timeout in microseconds. + * - STREAM_OPTION_WRITE_BUFFER: The requested buffer size. + * + * @return bool + * TRUE on success, FALSE otherwise. If $option is not implemented, FALSE + * should be returned. + */ + public function stream_set_option($option, $arg1, $arg2) { + trigger_error('stream_set_option() not supported for local file based stream wrappers', E_USER_WARNING); + return FALSE; + } + /** * Support for unlink(). * diff --git a/modules/aggregator/aggregator.info b/modules/aggregator/aggregator.info index b7582352..67ebdc00 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/aggregator/tests/aggregator_test.info b/modules/aggregator/tests/aggregator_test.info index 8418e88b..49838960 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/block/block.info b/modules/block/block.info index 8ecff8ad..9e47f1ff 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/block/tests/block_test.info b/modules/block/tests/block_test.info index 514b33b1..ef1f7138 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" 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 8e6826cb..be82747e 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/blog/blog.info b/modules/blog/blog.info index a3989510..0302f22f 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/book/book.info b/modules/book/book.info index 9575ff64..396bd669 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/color/color.info b/modules/color/color.info index 3ecf3752..2b588106 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/color/color.test b/modules/color/color.test index 09043250..f29c0c26 100755 --- a/modules/color/color.test +++ b/modules/color/color.test @@ -122,7 +122,7 @@ class ColorTestCase extends DrupalWebTestCase { $edit['palette[bg]'] = $color; $this->drupalPost($settings_path, $edit, t('Save configuration')); - if($is_valid) { + if ($is_valid) { $this->assertText('The configuration options have been saved.'); } else { diff --git a/modules/comment/comment.info b/modules/comment/comment.info index 749da0d0..69885dbb 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/comment/comment.test b/modules/comment/comment.test index 534b2c13..e087a717 100755 --- a/modules/comment/comment.test +++ b/modules/comment/comment.test @@ -11,7 +11,13 @@ class CommentHelperCase extends DrupalWebTestCase { protected $node; function setUp() { - parent::setUp('comment', 'search'); + $modules = func_get_args(); + if (isset($modules[0]) && is_array($modules[0])) { + $modules = $modules[0]; + } + $modules[] = 'comment'; + parent::setUp($modules); + // Create users and test node. $this->admin_user = $this->drupalCreateUser(array('administer content types', 'administer comments', 'administer blocks', 'administer actions', 'administer fields')); $this->web_user = $this->drupalCreateUser(array('access comments', 'post comments', 'create article content', 'edit own comments')); @@ -1490,7 +1496,7 @@ class CommentNodeAccessTest extends CommentHelperCase { } function setUp() { - DrupalWebTestCase::setUp('comment', 'search', 'node_access_test'); + parent::setUp('search', 'node_access_test'); node_access_rebuild(); // Create users and test node. diff --git a/modules/contact/contact.info b/modules/contact/contact.info index 6279557a..464c2246 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/contextual/contextual.info b/modules/contextual/contextual.info index 3a670c0c..b57e9f67 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/dashboard/dashboard.info b/modules/dashboard/dashboard.info index ceb38247..d17a9740 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/dblog/dblog.admin.inc b/modules/dblog/dblog.admin.inc index 0d5780cb..f8a00c26 100755 --- a/modules/dblog/dblog.admin.inc +++ b/modules/dblog/dblog.admin.inc @@ -420,6 +420,6 @@ function dblog_clear_log_form($form) { */ function dblog_clear_log_submit() { $_SESSION['dblog_overview_filter'] = array(); - db_delete('watchdog')->execute(); + db_truncate('watchdog')->execute(); drupal_set_message(t('Database log cleared.')); } diff --git a/modules/dblog/dblog.info b/modules/dblog/dblog.info index e9edca59..89b66c11 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/field/field.info b/modules/field/field.info index 2157d242..d19c29d1 100755 --- a/modules/field/field.info +++ b/modules/field/field.info @@ -11,8 +11,8 @@ dependencies[] = field_sql_storage required = TRUE stylesheets[all][] = theme/field.css -; Information added by Drupal.org packaging script on 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" 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 13bf2640..a35372a8 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/field/modules/list/list.info b/modules/field/modules/list/list.info index 658433a4..0cd4939c 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/field/modules/list/tests/list_test.info b/modules/field/modules/list/tests/list_test.info index a15b62b1..4bd2dae2 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/field/modules/number/number.info b/modules/field/modules/number/number.info index 104e32a2..d3c995e5 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/field/modules/number/number.module b/modules/field/modules/number/number.module index 0b8660dc..2538bdd1 100755 --- a/modules/field/modules/number/number.module +++ b/modules/field/modules/number/number.module @@ -164,6 +164,15 @@ function number_field_presave($entity_type, $entity, $field, $instance, $langcod } } } + if ($field['type'] == 'number_float') { + // Remove the decimal point from float values with decimal + // point but no decimal numbers. + foreach ($items as $delta => $item) { + if (isset($item['value'])) { + $items[$delta]['value'] = floatval($item['value']); + } + } + } } /** diff --git a/modules/field/modules/number/number.test b/modules/field/modules/number/number.test index c88b4c18..839da36c 100755 --- a/modules/field/modules/number/number.test +++ b/modules/field/modules/number/number.test @@ -152,4 +152,50 @@ class NumberFieldTestCase extends DrupalWebTestCase { ); $this->drupalPost(NULL, $edit, t('Save')); } + + /** + * Test number_float field. + */ + function testNumberFloatField() { + $this->field = array( + 'field_name' => drupal_strtolower($this->randomName()), + 'type' => 'number_float', + 'settings' => array( + 'precision' => 8, 'scale' => 4, 'decimal_separator' => '.', + ) + ); + field_create_field($this->field); + $this->instance = array( + 'field_name' => $this->field['field_name'], + 'entity_type' => 'test_entity', + 'bundle' => 'test_bundle', + 'widget' => array( + 'type' => 'number', + ), + 'display' => array( + 'default' => array( + 'type' => 'number_float', + ), + ), + ); + field_create_instance($this->instance); + + $langcode = LANGUAGE_NONE; + $value = array( + '9.' => '9', + '.' => '0', + '123.55' => '123.55', + '.55' => '0.55', + '-0.55' => '-0.55', + ); + foreach($value as $key => $value) { + $edit = array( + "{$this->field['field_name']}[$langcode][0][value]" => $key, + ); + $this->drupalPost('test-entity/add/test-bundle', $edit, t('Save')); + $this->assertNoText("PDOException"); + $this->assertRaw($value, 'Correct value is displayed.'); + } + } + } diff --git a/modules/field/modules/options/options.info b/modules/field/modules/options/options.info index d3198a3a..d395377a 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/field/modules/options/options.test b/modules/field/modules/options/options.test index 1cbb3854..321c2a4b 100755 --- a/modules/field/modules/options/options.test +++ b/modules/field/modules/options/options.test @@ -23,8 +23,15 @@ class OptionsWidgetsTestCase extends FieldTestCase { 'type' => 'list_integer', 'cardinality' => 1, 'settings' => array( - // Make sure that 0 works as an option. - 'allowed_values' => array(0 => 'Zero', 1 => 'One', 2 => 'Some & unescaped markup', 3 => 'Some HTML encoded markup with < & >'), + 'allowed_values' => array( + // Make sure that 0 works as an option. + 0 => 'Zero', + 1 => 'One', + // Make sure that option text is properly sanitized. + 2 => 'Some & unescaped markup', + // Make sure that HTML entities in option text are not double-encoded. + 3 => 'Some HTML encoded markup with < & >', + ), ), ); $this->card_1 = field_create_field($this->card_1); @@ -35,8 +42,13 @@ class OptionsWidgetsTestCase extends FieldTestCase { 'type' => 'list_integer', 'cardinality' => 2, 'settings' => array( - // Make sure that 0 works as an option. - 'allowed_values' => array(0 => 'Zero', 1 => 'One', 2 => 'Some & unescaped markup'), + 'allowed_values' => array( + // Make sure that 0 works as an option. + 0 => 'Zero', + 1 => 'One', + // Make sure that option text is properly sanitized. + 2 => 'Some & unescaped markup', + ), ), ); $this->card_2 = field_create_field($this->card_2); @@ -47,8 +59,12 @@ class OptionsWidgetsTestCase extends FieldTestCase { 'type' => 'list_boolean', 'cardinality' => 1, 'settings' => array( - // Make sure that 0 works as a 'on' value'. - 'allowed_values' => array(1 => 'Zero', 0 => 'Some & unescaped markup'), + 'allowed_values' => array( + // Make sure that 1 works as a 'on' value'. + 1 => 'Zero', + // Make sure that option text is properly sanitized. + 0 => 'Some & unescaped markup', + ), ), ); $this->bool = field_create_field($this->bool); diff --git a/modules/field/modules/text/text.info b/modules/field/modules/text/text.info index 54cc28d6..678bdab3 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/field/tests/field_test.info b/modules/field/tests/field_test.info index 7c0e5b7d..07eed538 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/field_ui/field_ui.info b/modules/field_ui/field_ui.info index 5df082c9..7f2c4be3 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/file/file.info b/modules/file/file.info index 4bf08121..d15ad9e2 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/file/file.module b/modules/file/file.module index bf7b07d8..18ed2654 100755 --- a/modules/file/file.module +++ b/modules/file/file.module @@ -280,7 +280,8 @@ function file_ajax_upload() { $form['#suffix'] .= ''; } - $output = theme('status_messages') . drupal_render($form); + $form['#prefix'] .= theme('status_messages'); + $output = drupal_render($form); $js = drupal_add_js(); $settings = call_user_func_array('array_merge_recursive', $js['settings']['data']); diff --git a/modules/file/tests/file.test b/modules/file/tests/file.test index 1510a697..41e97cdf 100755 --- a/modules/file/tests/file.test +++ b/modules/file/tests/file.test @@ -596,6 +596,56 @@ class FileFieldWidgetTestCase extends FileFieldTestCase { $this->doTestTemporaryFileRemovalExploit($victim_uid, $attacker_uid); } + /** + * Tests validation with the Upload button. + */ + function testWidgetValidation() { + $type_name = 'article'; + $field_name = strtolower($this->randomName()); + $this->createFileField($field_name, $type_name); + $this->updateFileField($field_name, $type_name, array('file_extensions' => 'txt')); + + foreach (array('nojs', 'js') as $type) { + // Create node and prepare files for upload. + $node = $this->drupalCreateNode(array('type' => 'article')); + $nid = $node->nid; + $this->drupalGet("node/$nid/edit"); + $test_file_text = $this->getTestFile('text'); + $test_file_image = $this->getTestFile('image'); + $field = field_info_field($field_name); + $name = 'files[' . $field_name . '_' . LANGUAGE_NONE . '_0]'; + + // Upload file with incorrect extension, check for validation error. + $edit[$name] = drupal_realpath($test_file_image->uri); + switch ($type) { + case 'nojs': + $this->drupalPost(NULL, $edit, t('Upload')); + break; + + case 'js': + $button = $this->xpath('//input[@type="submit" and @value="' . t('Upload') . '"]'); + $this->drupalPostAJAX(NULL, $edit, array((string) $button[0]['name'] => (string) $button[0]['value'])); + break; + } + $error_message = t('Only files with the following extensions are allowed: %files-allowed.', array('%files-allowed' => 'txt')); + $this->assertRaw($error_message, t('Validation error when file with wrong extension uploaded (JSMode=%type).', array('%type' => $type))); + + // Upload file with correct extension, check that error message is removed. + $edit[$name] = drupal_realpath($test_file_text->uri); + switch ($type) { + case 'nojs': + $this->drupalPost(NULL, $edit, t('Upload')); + break; + + case 'js': + $button = $this->xpath('//input[@type="submit" and @value="' . t('Upload') . '"]'); + $this->drupalPostAJAX(NULL, $edit, array((string) $button[0]['name'] => (string) $button[0]['value'])); + break; + } + $this->assertNoRaw($error_message, t('Validation error removed when file with correct extension uploaded (JSMode=%type).', array('%type' => $type))); + } + } + /** * Helper for testing exploiting the temporary file removal using fid. * diff --git a/modules/file/tests/file_module_test.info b/modules/file/tests/file_module_test.info index a6ad129a..cd04aba8 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/filter/filter.info b/modules/filter/filter.info index a513f5fc..b2ddb26c 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/filter/filter.module b/modules/filter/filter.module index c710ee70..e9fd01d3 100755 --- a/modules/filter/filter.module +++ b/modules/filter/filter.module @@ -1638,7 +1638,7 @@ function _filter_url_escape_comments($match, $escape = NULL) { // Replace all HTML coments with a '' placeholder. if ($mode) { $content = $match[1]; - $hash = md5($content); + $hash = hash('sha256', $content); $comments[$hash] = $content; return ""; } diff --git a/modules/forum/forum.info b/modules/forum/forum.info index 74cc2d03..bbc9012c 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/help/help.info b/modules/help/help.info index 062b30e6..4812b883 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/image/image.info b/modules/image/image.info index 47fb5a5a..376d4611 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/image/tests/image_module_test.info b/modules/image/tests/image_module_test.info index f9f3f484..b18449ce 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/locale/locale.info b/modules/locale/locale.info index 520d4ecd..bb5cc735 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/locale/tests/locale_test.info b/modules/locale/tests/locale_test.info index b51de9f3..ea78ef1b 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/menu/menu.info b/modules/menu/menu.info index 9c6a8d19..9e2dfe55 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/node/node.info b/modules/node/node.info index a8c61fb3..e37828c2 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/node/tests/node_access_test.info b/modules/node/tests/node_access_test.info index 7ba4455b..21e4f41c 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/node/tests/node_test.info b/modules/node/tests/node_test.info index 67de1b36..3047c17d 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/node/tests/node_test_exception.info b/modules/node/tests/node_test_exception.info index 387ccde2..55928729 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/openid/openid.info b/modules/openid/openid.info index f1d0a5a5..4444ac81 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/openid/tests/openid_test.info b/modules/openid/tests/openid_test.info index 48520267..a69c60ad 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/overlay/overlay.info b/modules/overlay/overlay.info index dd1f3f4b..8f893e5b 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/path/path.info b/modules/path/path.info index f17fdaf1..9e6c3598 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/php/php.info b/modules/php/php.info index 0247be60..f008c113 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/poll/poll.info b/modules/poll/poll.info index c4734261..9cfaf544 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/profile/profile.info b/modules/profile/profile.info index dfa174c5..7ea0b262 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/rdf/rdf.info b/modules/rdf/rdf.info index 44f04bd0..85e4cd29 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/rdf/tests/rdf_test.info b/modules/rdf/tests/rdf_test.info index 8195c999..33ca1c44 100755 --- a/modules/rdf/tests/rdf_test.info +++ b/modules/rdf/tests/rdf_test.info @@ -6,8 +6,8 @@ core = 7.x hidden = TRUE dependencies[] = blog -; Information added by Drupal.org packaging script on 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/search/search.admin.inc b/modules/search/search.admin.inc index a609485a..a37d37b9 100755 --- a/modules/search/search.admin.inc +++ b/modules/search/search.admin.inc @@ -125,6 +125,16 @@ function search_admin_settings($form) { '#options' => $module_options, '#description' => t('Choose which search module is the default.') ); + $form['logging'] = array( + '#type' => 'fieldset', + '#title' => t('Logging') + ); + $form['logging']['search_logging'] = array( + '#type' => 'checkbox', + '#title' => t('Log searches'), + '#default_value' => variable_get('search_logging', 1), + '#description' => t('If checked, all searches will be logged. Uncheck to skip logging. Logging may affect performance.'), + ); $form['#validate'][] = 'search_admin_settings_validate'; $form['#submit'][] = 'search_admin_settings_submit'; diff --git a/modules/search/search.info b/modules/search/search.info index a092ea9e..c8844f25 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/search/search.install b/modules/search/search.install index f0113b3f..c91283c4 100755 --- a/modules/search/search.install +++ b/modules/search/search.install @@ -12,6 +12,7 @@ function search_uninstall() { variable_del('minimum_word_size'); variable_del('overlap_cjk'); variable_del('search_cron_limit'); + variable_del('search_logging'); } /** diff --git a/modules/search/search.pages.inc b/modules/search/search.pages.inc index 2123dd75..b24de8ed 100755 --- a/modules/search/search.pages.inc +++ b/modules/search/search.pages.inc @@ -57,9 +57,10 @@ function search_view($module = NULL, $keys = '') { } // Only search if there are keywords or non-empty conditions. if ($keys || !empty($conditions)) { - // Log the search keys. - watchdog('search', 'Searched %type for %keys.', array('%keys' => $keys, '%type' => $info['title']), WATCHDOG_NOTICE, l(t('results'), 'search/' . $info['path'] . '/' . $keys)); - + if (variable_get('search_logging', TRUE)) { + // Log the search keys. + watchdog('search', 'Searched %type for %keys.', array('%keys' => $keys, '%type' => $info['title']), WATCHDOG_NOTICE, l(t('results'), 'search/' . $info['path'] . '/' . $keys)); + } // Collect the search results. $results = search_data($keys, $info['module'], $conditions); } diff --git a/modules/search/search.test b/modules/search/search.test index 913d1989..d3a60b49 100755 --- a/modules/search/search.test +++ b/modules/search/search.test @@ -1453,7 +1453,7 @@ class SearchConfigSettingsForm extends DrupalWebTestCase { parent::setUp('search', 'search_extra_type'); // Login as a user that can create and search content. - $this->search_user = $this->drupalCreateUser(array('search content', 'administer search', 'administer nodes', 'bypass node access', 'access user profiles', 'administer users', 'administer blocks')); + $this->search_user = $this->drupalCreateUser(array('search content', 'administer search', 'administer nodes', 'bypass node access', 'access user profiles', 'administer users', 'administer blocks', 'access site reports')); $this->drupalLogin($this->search_user); // Add a single piece of content and index it. @@ -1502,6 +1502,19 @@ class SearchConfigSettingsForm extends DrupalWebTestCase { ); $this->drupalPost('admin/config/search/settings', $edit, t('Save configuration')); $this->assertNoText(t('The configuration options have been saved.'), 'Form does not save with an invalid word length.'); + + // Test logging setting. It should be on by default. + $text = $this->randomName(5); + $this->drupalPost('search/node', array('keys' => $text), t('Search')); + $this->drupalGet('admin/reports/dblog'); + $this->assertLink('Searched Content for ' . $text . '.', 0, 'Search was logged'); + + // Turn off logging. + variable_set('search_logging', FALSE); + $text = $this->randomName(5); + $this->drupalPost('search/node', array('keys' => $text), t('Search')); + $this->drupalGet('admin/reports/dblog'); + $this->assertNoLink('Searched Content for ' . $text . '.', 'Search was not logged'); } /** diff --git a/modules/search/tests/search_embedded_form.info b/modules/search/tests/search_embedded_form.info index 6423cef5..0618b032 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/search/tests/search_extra_type.info b/modules/search/tests/search_extra_type.info index 0ae00a58..bc911a48 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/search/tests/search_node_tags.info b/modules/search/tests/search_node_tags.info index b2cc66ab..138fda4b 100644 --- a/modules/search/tests/search_node_tags.info +++ b/modules/search/tests/search_node_tags.info @@ -5,8 +5,8 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/shortcut/shortcut.info b/modules/shortcut/shortcut.info index c12f11e4..e23210ac 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php index 08452f31..51407991 100755 --- a/modules/simpletest/drupal_web_test_case.php +++ b/modules/simpletest/drupal_web_test_case.php @@ -1374,10 +1374,11 @@ class DrupalWebTestCase extends DrupalTestCase { * @see DrupalWebTestCase::tearDown() */ protected function prepareEnvironment() { - global $user, $language, $conf; + global $user, $language, $language_url, $conf; // Store necessary current values before switching to prefixed database. $this->originalLanguage = $language; + $this->originalLanguageUrl = $language_url; $this->originalLanguageDefault = variable_get('language_default'); $this->originalFileDirectory = variable_get('file_public_path', conf_path() . '/files'); $this->originalProfile = drupal_get_profile(); @@ -1387,7 +1388,7 @@ class DrupalWebTestCase extends DrupalTestCase { // Set to English to prevent exceptions from utf8_truncate() from t() // during install if the current language is not 'en'. // The following array/object conversion is copied from language_default(). - $language = (object) array('language' => 'en', 'name' => 'English', 'native' => 'English', 'direction' => 0, 'enabled' => 1, 'plurals' => 0, 'formula' => '', 'domain' => '', 'prefix' => '', 'weight' => 0, 'javascript' => ''); + $language_url = $language = (object) array('language' => 'en', 'name' => 'English', 'native' => 'English', 'direction' => 0, 'enabled' => 1, 'plurals' => 0, 'formula' => '', 'domain' => '', 'prefix' => '', 'weight' => 0, 'javascript' => ''); // Save and clean the shutdown callbacks array because it is static cached // and will be changed by the test run. Otherwise it will contain callbacks @@ -1445,7 +1446,7 @@ class DrupalWebTestCase extends DrupalTestCase { * @see DrupalWebTestCase::prepareEnvironment() */ protected function setUp() { - global $user, $language, $conf; + global $user, $language, $language_url, $conf; // Create the database prefix for this test. $this->prepareDatabasePrefix(); @@ -1542,7 +1543,7 @@ class DrupalWebTestCase extends DrupalTestCase { // Set up English language. unset($conf['language_default']); - $language = language_default(); + $language_url = $language = language_default(); // Use the test mail class instead of the default mail handler class. variable_set('mail_system', array('default-system' => 'TestingMailSystem')); @@ -1636,7 +1637,7 @@ class DrupalWebTestCase extends DrupalTestCase { * and reset the database prefix. */ protected function tearDown() { - global $user, $language; + global $user, $language, $language_url; // In case a fatal error occurred that was not in the test process read the // log to pick up any fatal errors. @@ -1701,6 +1702,7 @@ class DrupalWebTestCase extends DrupalTestCase { // Reset language. $language = $this->originalLanguage; + $language_url = $this->originalLanguageUrl; if ($this->originalLanguageDefault) { $GLOBALS['conf']['language_default'] = $this->originalLanguageDefault; } diff --git a/modules/simpletest/simpletest.info b/modules/simpletest/simpletest.info index d613ff2d..b9468ff1 100755 --- a/modules/simpletest/simpletest.info +++ b/modules/simpletest/simpletest.info @@ -57,8 +57,8 @@ 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/actions_loop_test.info b/modules/simpletest/tests/actions_loop_test.info index 71cd14f3..d9460ea4 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/ajax_forms_test.info b/modules/simpletest/tests/ajax_forms_test.info index c9d9cb6d..2c2e56a8 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/ajax_test.info b/modules/simpletest/tests/ajax_test.info index f572a005..da8f4a73 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/batch_test.info b/modules/simpletest/tests/batch_test.info index dc2aae56..f768254e 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/boot_test_1.info b/modules/simpletest/tests/boot_test_1.info index 85a5ea65..f424504c 100644 --- a/modules/simpletest/tests/boot_test_1.info +++ b/modules/simpletest/tests/boot_test_1.info @@ -5,8 +5,8 @@ package = Testing version = VERSION hidden = TRUE -; Information added by Drupal.org packaging script on 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/boot_test_2.info b/modules/simpletest/tests/boot_test_2.info index 0bc815c7..83b05cb3 100644 --- a/modules/simpletest/tests/boot_test_2.info +++ b/modules/simpletest/tests/boot_test_2.info @@ -5,8 +5,8 @@ package = Testing version = VERSION hidden = TRUE -; Information added by Drupal.org packaging script on 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/common_test.info b/modules/simpletest/tests/common_test.info index 7d466800..7ed1bcb7 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/common_test_cron_helper.info b/modules/simpletest/tests/common_test_cron_helper.info index 55dbd67a..d64b41b0 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/database_test.info b/modules/simpletest/tests/database_test.info index 0e31a226..44666698 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/drupal_autoload_test/drupal_autoload_test.info b/modules/simpletest/tests/drupal_autoload_test/drupal_autoload_test.info index 18044661..86a9bd68 100644 --- a/modules/simpletest/tests/drupal_autoload_test/drupal_autoload_test.info +++ b/modules/simpletest/tests/drupal_autoload_test/drupal_autoload_test.info @@ -7,8 +7,8 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" 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 2b8c34c6..42049fcb 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" 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 ce9e1918..adec2c1e 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/entity_cache_test.info b/modules/simpletest/tests/entity_cache_test.info index eb38854e..29405ad9 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/entity_cache_test_dependency.info b/modules/simpletest/tests/entity_cache_test_dependency.info index 0c433546..de7dc01a 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/entity_crud_hook_test.info b/modules/simpletest/tests/entity_crud_hook_test.info index bb99125c..990f326f 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/entity_query_access_test.info b/modules/simpletest/tests/entity_query_access_test.info index 7ab70ddc..38432ab0 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/error_test.info b/modules/simpletest/tests/error_test.info index d01fea3f..b308e5e7 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/file_test.info b/modules/simpletest/tests/file_test.info index 6f8d7529..2ed5dc39 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/filter_test.info b/modules/simpletest/tests/filter_test.info index 315b0472..9b69cf85 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/form.test b/modules/simpletest/tests/form.test index 6bf2d9e8..a441ceeb 100755 --- a/modules/simpletest/tests/form.test +++ b/modules/simpletest/tests/form.test @@ -690,6 +690,14 @@ class FormValidationTestCase extends DrupalWebTestCase { $this->assertText('The form has become outdated. Copy any unsaved work in the form below'); } + /** + * Tests that a form with a disabled CSRF token can be validated. + */ + function testDisabledToken() { + $this->drupalPost('form-test/validate-no-token', array(), 'Save'); + $this->assertText('The form_test_validate_no_token form has been submitted successfully.'); + } + /** * Tests partial form validation through #limit_validation_errors. */ diff --git a/modules/simpletest/tests/form_test.info b/modules/simpletest/tests/form_test.info index c2b36e78..deaecc67 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/form_test.module b/modules/simpletest/tests/form_test.module index 4fd708f1..097e5884 100755 --- a/modules/simpletest/tests/form_test.module +++ b/modules/simpletest/tests/form_test.module @@ -37,6 +37,13 @@ function form_test_menu() { 'access callback' => TRUE, 'type' => MENU_CALLBACK, ); + $items['form-test/validate-no-token'] = array( + 'title' => 'Form validation without a CSRF token', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('form_test_validate_no_token'), + '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', @@ -454,6 +461,27 @@ 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.'); } +/** + * Form builder for testing submission of a form without a CSRF token. + */ +function form_test_validate_no_token($form, &$form_state) { + $form['submit'] = array( + '#type' => 'submit', + '#value' => 'Save', + ); + + $form['#token'] = FALSE; + + return $form; +} + +/** + * Form submission handler for form_test_validate_no_token(). + */ +function form_test_validate_no_token_submit($form, &$form_state) { + drupal_set_message('The form_test_validate_no_token form has been submitted successfully.'); +} + /** * Builds a simple form with a button triggering partial validation. */ diff --git a/modules/simpletest/tests/image_test.info b/modules/simpletest/tests/image_test.info index a6efccb6..b4ac873a 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/menu_test.info b/modules/simpletest/tests/menu_test.info index 92e04302..a55861a1 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/module_test.info b/modules/simpletest/tests/module_test.info index d8eeddfb..8b0f74c9 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/path_test.info b/modules/simpletest/tests/path_test.info index c2f07a0d..ef1a5525 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/psr_0_test/psr_0_test.info b/modules/simpletest/tests/psr_0_test/psr_0_test.info index 3f0ce970..34f914f2 100755 --- a/modules/simpletest/tests/psr_0_test/psr_0_test.info +++ b/modules/simpletest/tests/psr_0_test/psr_0_test.info @@ -5,8 +5,8 @@ core = 7.x hidden = TRUE package = Testing -; Information added by Drupal.org packaging script on 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/psr_4_test/psr_4_test.info b/modules/simpletest/tests/psr_4_test/psr_4_test.info index 53abc66f..0a64a28d 100644 --- a/modules/simpletest/tests/psr_4_test/psr_4_test.info +++ b/modules/simpletest/tests/psr_4_test/psr_4_test.info @@ -5,8 +5,8 @@ core = 7.x hidden = TRUE package = Testing -; Information added by Drupal.org packaging script on 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/requirements1_test.info b/modules/simpletest/tests/requirements1_test.info index 6a3a6f8e..8909f690 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/requirements2_test.info b/modules/simpletest/tests/requirements2_test.info index b9738f95..7b8630af 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/session_test.info b/modules/simpletest/tests/session_test.info index 20b846cf..3d3f0183 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/system_dependencies_test.info b/modules/simpletest/tests/system_dependencies_test.info index 1e74f9de..4a2891ad 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" 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 d918475f..b46bf515 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/system_incompatible_core_version_test.info b/modules/simpletest/tests/system_incompatible_core_version_test.info index 1a8adc4a..8f7abbab 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" 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 b081db4e..93958c01 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/system_incompatible_module_version_test.info b/modules/simpletest/tests/system_incompatible_module_version_test.info index 80440861..282695cf 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/system_project_namespace_test.info b/modules/simpletest/tests/system_project_namespace_test.info index d248a099..e8fcc2e2 100644 --- a/modules/simpletest/tests/system_project_namespace_test.info +++ b/modules/simpletest/tests/system_project_namespace_test.info @@ -6,8 +6,8 @@ core = 7.x hidden = TRUE dependencies[] = drupal:filter -; Information added by Drupal.org packaging script on 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/system_test.info b/modules/simpletest/tests/system_test.info index f99edb18..ec19e460 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/taxonomy_test.info b/modules/simpletest/tests/taxonomy_test.info index 1dffb58c..e18004c3 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/theme.test b/modules/simpletest/tests/theme.test index f5ddfa9b..5f095bd5 100755 --- a/modules/simpletest/tests/theme.test +++ b/modules/simpletest/tests/theme.test @@ -646,3 +646,34 @@ class ThemeDebugMarkupTestCase extends DrupalWebTestCase { } } + +/** + * Tests module-provided theme engines. + */ +class ModuleProvidedThemeEngineTestCase extends DrupalWebTestCase { + + public static function getInfo() { + return array( + 'name' => 'Theme engine test', + 'description' => 'Tests module-provided theme engines.', + 'group' => 'Theme', + ); + } + + function setUp() { + parent::setUp('theme_test'); + theme_enable(array('test_theme', 'test_theme_nyan_cat')); + } + + /** + * Ensures that the module provided theme engine is found and used by core. + */ + function testEngineIsFoundAndWorking() { + variable_set('theme_default', 'test_theme_nyan_cat'); + variable_set('admin_theme', 'test_theme_nyan_cat'); + + $this->drupalGet('theme-test/engine-info-test'); + $this->assertText('Miaou'); + } + +} diff --git a/modules/simpletest/tests/theme_test.info b/modules/simpletest/tests/theme_test.info index ab7d0b70..485af1af 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/theme_test.module b/modules/simpletest/tests/theme_test.module index 948d8175..1dbc3b95 100755 --- a/modules/simpletest/tests/theme_test.module +++ b/modules/simpletest/tests/theme_test.module @@ -27,9 +27,18 @@ function theme_test_system_theme_info() { $themes['test_theme'] = drupal_get_path('module', 'theme_test') . '/themes/test_theme/test_theme.info'; $themes['test_basetheme'] = drupal_get_path('module', 'theme_test') . '/themes/test_basetheme/test_basetheme.info'; $themes['test_subtheme'] = drupal_get_path('module', 'theme_test') . '/themes/test_subtheme/test_subtheme.info'; + $themes['test_theme_nyan_cat'] = drupal_get_path('module', 'theme_test') . '/themes/test_theme_nyan_cat/test_theme_nyan_cat.info'; return $themes; } +/** + * Implements hook_system_theme_engine_info(). + */ +function theme_test_system_theme_engine_info() { + $theme_engines['nyan_cat'] = drupal_get_path('module', 'theme_test') . '/themes/engines/nyan_cat/nyan_cat.engine'; + return $theme_engines; +} + /** * Implements hook_menu(). */ @@ -58,6 +67,12 @@ function theme_test_menu() { 'access callback' => TRUE, 'type' => MENU_CALLBACK, ); + $items['theme-test/engine-info-test'] = array( + 'description' => "Serves a simple page rendered using a Nyan Cat theme engine template.", + 'page callback' => '_theme_test_engine_info_test', + 'access callback' => TRUE, + 'type' => MENU_CALLBACK, + ); return $items; } @@ -139,6 +154,15 @@ function _theme_test_drupal_add_region_content() { return 'Hello'; } +/** + * Serves a simple page renderered using a Nyan Cat theme engine template. + */ +function _theme_test_engine_info_test() { + return array( + '#markup' => theme('theme_test_template_test'), + ); +} + /** * Theme function for testing theme('theme_test_foo'). */ diff --git a/modules/simpletest/tests/themes/engines/nyan_cat/nyan_cat.engine b/modules/simpletest/tests/themes/engines/nyan_cat/nyan_cat.engine new file mode 100644 index 00000000..1b8ffef8 --- /dev/null +++ b/modules/simpletest/tests/themes/engines/nyan_cat/nyan_cat.engine @@ -0,0 +1,53 @@ +filename) . '/template.theme'; + if (file_exists($file)) { + include_once DRUPAL_ROOT . '/' . $file; + } +} + +/** + * Implements hook_theme(). + */ +function nyan_cat_theme($existing, $type, $theme, $path) { + $templates = drupal_find_theme_functions($existing, array($theme)); + $templates += drupal_find_theme_templates($existing, '.nyan-cat.html', $path); + return $templates; +} + +/** + * Implements hook_extension(). + */ +function nyan_cat_extension() { + return '.nyan-cat.html'; +} + +/** + * Implements hook_render_template(). + * + * @param string $template_file + * The filename of the template to render. + * @param mixed[] $variables + * A keyed array of variables that will appear in the output. + * + * @return string + * The output generated by the template. + */ +function nyan_cat_render_template($template_file, $variables) { + $output = str_replace('div', 'nyancat', file_get_contents(DRUPAL_ROOT . '/' . $template_file)); + foreach ($variables as $key => $variable) { + if (strpos($output, '9' . $key) !== FALSE) { + $output = str_replace('9' . $key, $variable, $output); + } + } + return $output; +} diff --git a/modules/simpletest/tests/themes/test_basetheme/test_basetheme.info b/modules/simpletest/tests/themes/test_basetheme/test_basetheme.info index ea39d8e9..d5a40e18 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/themes/test_subtheme/test_subtheme.info b/modules/simpletest/tests/themes/test_subtheme/test_subtheme.info index 60bb4e5c..9ed77625 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/themes/test_theme/test_theme.info b/modules/simpletest/tests/themes/test_theme/test_theme.info index 0370bc6a..01ab6979 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/themes/test_theme_nyan_cat/templates/theme_test_template_test.nyan-cat.html b/modules/simpletest/tests/themes/test_theme_nyan_cat/templates/theme_test_template_test.nyan-cat.html new file mode 100644 index 00000000..7202dd48 --- /dev/null +++ b/modules/simpletest/tests/themes/test_theme_nyan_cat/templates/theme_test_template_test.nyan-cat.html @@ -0,0 +1 @@ +Miaou \ No newline at end of file diff --git a/modules/simpletest/tests/themes/test_theme_nyan_cat/test_theme_nyan_cat.info b/modules/simpletest/tests/themes/test_theme_nyan_cat/test_theme_nyan_cat.info new file mode 100644 index 00000000..c66cf730 --- /dev/null +++ b/modules/simpletest/tests/themes/test_theme_nyan_cat/test_theme_nyan_cat.info @@ -0,0 +1,11 @@ +name = Nyan cat engine based test theme +description = Theme for testing the module-provided theme engines. +core = 7.x +hidden = TRUE +engine = nyan_cat + +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" +project = "drupal" +datestamp = "1485986921" + diff --git a/modules/simpletest/tests/update_script_test.info b/modules/simpletest/tests/update_script_test.info index af18d119..9e027718 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/update_test_1.info b/modules/simpletest/tests/update_test_1.info index b64ad361..5534275a 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/update_test_2.info b/modules/simpletest/tests/update_test_2.info index b64ad361..5534275a 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/update_test_3.info b/modules/simpletest/tests/update_test_3.info index b64ad361..5534275a 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/url_alter_test.info b/modules/simpletest/tests/url_alter_test.info index f7924d30..b0c1216e 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/simpletest/tests/xmlrpc_test.info b/modules/simpletest/tests/xmlrpc_test.info index cbc93637..a7d0bf9a 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/statistics/statistics.info b/modules/statistics/statistics.info index 03d8a30f..4a601cad 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/syslog/syslog.info b/modules/syslog/syslog.info index 00ad4ff7..e0273e09 100755 --- a/modules/syslog/syslog.info +++ b/modules/syslog/syslog.info @@ -6,8 +6,8 @@ core = 7.x files[] = syslog.test configure = admin/config/development/logging -; Information added by Drupal.org packaging script on 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/system/system.api.php b/modules/system/system.api.php index 3152139a..f1855b96 100755 --- a/modules/system/system.api.php +++ b/modules/system/system.api.php @@ -2050,6 +2050,22 @@ function hook_system_theme_info() { return $themes; } +/** + * Return additional theme engines provided by modules. + * + * This hook is invoked from _system_rebuild_theme_data() and allows modules to + * register additional theme engines outside of the regular 'themes/engines' + * directories of a Drupal installation. + * + * @return + * An associative array. Each key is the system name of a theme engine and + * each value is the corresponding path to the theme engine's .engine file. + */ +function hook_system_theme_engine_info() { + $theme_engines['izumi'] = drupal_get_path('module', 'mymodule') . '/izumi/izumi.engine'; + return $theme_engines; +} + /** * Alter the information parsed from module and theme .info files * diff --git a/modules/system/system.info b/modules/system/system.info index 5aa40c95..cdc4ba37 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/system/system.module b/modules/system/system.module index ae7c4323..53844d87 100755 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -2521,6 +2521,16 @@ function _system_rebuild_theme_data() { // Find theme engines $engines = drupal_system_listing('/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\.engine$/', 'themes/engines'); + // Allow modules to add further theme engines. + if ($module_engines = module_invoke_all('system_theme_engine_info')) { + foreach ($module_engines as $name => $theme_engine_path) { + $engines[$name] = (object) array( + 'uri' => $theme_engine_path, + 'filename' => basename($theme_engine_path), + 'name' => $name, + ); + } + } // Set defaults for theme info. $defaults = array( diff --git a/modules/system/system.test b/modules/system/system.test index ec71093d..9eaf562b 100755 --- a/modules/system/system.test +++ b/modules/system/system.test @@ -1461,6 +1461,60 @@ class DateTimeFunctionalTest extends DrupalWebTestCase { } } +/** + * Tests date format configuration. + */ +class DateFormatTestCase extends DrupalWebTestCase { + public static function getInfo() { + return array( + 'name' => 'Date format', + 'description' => 'Test date format configuration and defaults.', + 'group' => 'System', + ); + } + + function setUp() { + parent::setUp(); + + // Create admin user and log in admin user. + $this->admin_user = $this->drupalCreateUser(array('administer site configuration')); + $this->drupalLogin($this->admin_user); + } + + /** + * Test the default date type formats are consistent. + */ + function testDefaultDateFormats() { + // These are the default format values from format_date(). + $default_formats = array( + 'short' => 'm/d/Y - H:i', + 'medium' => 'D, m/d/Y - H:i', + 'long' => 'l, F j, Y - H:i', + ); + + // Clear the date format variables. + variable_del('date_format_short'); + variable_del('date_format_medium'); + variable_del('date_format_long'); + + $this->drupalGet('admin/config/regional/date-time'); + + foreach ($default_formats as $format_name => $format_value) { + $id = 'edit-date-format-' . $format_name; + // Check that the configuration fields match the default format. + $this->assertOptionSelected( + $id, + $format_value, + format_string('The @type format type matches the expected format @format.', + array( + '@type' => $format_name, + '@format' => $format_value, + ) + )); + } + } +} + class PageTitleFiltering extends DrupalWebTestCase { protected $content_user; protected $saved_title; diff --git a/modules/system/tests/cron_queue_test.info b/modules/system/tests/cron_queue_test.info index 13fefda3..896f53ed 100644 --- a/modules/system/tests/cron_queue_test.info +++ b/modules/system/tests/cron_queue_test.info @@ -5,8 +5,8 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/system/tests/system_cron_test.info b/modules/system/tests/system_cron_test.info index ed37d109..be1c9ac7 100644 --- a/modules/system/tests/system_cron_test.info +++ b/modules/system/tests/system_cron_test.info @@ -5,8 +5,8 @@ version = VERSION core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/taxonomy/taxonomy.info b/modules/taxonomy/taxonomy.info index bd613c4b..e8861c92 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/toolbar/toolbar.info b/modules/toolbar/toolbar.info index 3b0675fa..b6548208 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/tracker/tracker.info b/modules/tracker/tracker.info index 2b643cda..861949f7 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/translation/tests/translation_test.info b/modules/translation/tests/translation_test.info index 1976f1c1..1c8f63e3 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/translation/translation.info b/modules/translation/translation.info index 6b3a2f17..2b947da6 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/trigger/tests/trigger_test.info b/modules/trigger/tests/trigger_test.info index 8ee06149..759b642f 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/trigger/trigger.info b/modules/trigger/trigger.info index 517536de..425e1545 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/update/tests/aaa_update_test.info b/modules/update/tests/aaa_update_test.info index 9c69bde6..eccae6fa 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/update/tests/bbb_update_test.info b/modules/update/tests/bbb_update_test.info index 7327e7f0..2346781e 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/update/tests/ccc_update_test.info b/modules/update/tests/ccc_update_test.info index 3a876fc3..d93e640d 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/update/tests/themes/update_test_admintheme/update_test_admintheme.info b/modules/update/tests/themes/update_test_admintheme/update_test_admintheme.info index 00c1dd6b..7ceefdaf 100644 --- a/modules/update/tests/themes/update_test_admintheme/update_test_admintheme.info +++ b/modules/update/tests/themes/update_test_admintheme/update_test_admintheme.info @@ -3,8 +3,8 @@ description = Test theme which is used as admin theme. core = 7.x hidden = TRUE -; Information added by Drupal.org packaging script on 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" 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 6a858fd9..b8036c85 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" 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 b579bb51..3df44583 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/update/tests/update_test.info b/modules/update/tests/update_test.info index 657b2c1c..7f9dd93a 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/update/update.info b/modules/update/update.info index 1efa370b..30305573 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/user/tests/user_form_test.info b/modules/user/tests/user_form_test.info index 921bd89e..32c8f45c 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/user/user.info b/modules/user/user.info index 2136902b..4a760ecc 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/modules/user/user.module b/modules/user/user.module index 460adae5..b818d79a 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -2356,26 +2356,14 @@ function user_external_login_register($name, $module) { * following properties: * - uid: The user ID number. * - login: The UNIX timestamp of the user's last login. - * @param array $options - * (optional) A keyed array of settings. Supported options are: - * - langcode: A language code to be used when generating locale-sensitive - * urls. If langcode is NULL the users preferred language is used. * * @return * A unique URL that provides a one-time log in for the user, from which * they can change their password. */ -function user_pass_reset_url($account, $options = array()) { +function user_pass_reset_url($account) { $timestamp = REQUEST_TIME; - $url_options = array('absolute' => TRUE); - if (isset($options['langcode'])) { - $languages = language_list(); - $url_options['language'] = $languages[$options['langcode']]; - } - else { - $url_options['language'] = user_preferred_language($account); - } - return url("user/reset/$account->uid/$timestamp/" . user_pass_rehash($account->pass, $timestamp, $account->login, $account->uid), $url_options); + return url("user/reset/$account->uid/$timestamp/" . user_pass_rehash($account->pass, $timestamp, $account->login, $account->uid), array('absolute' => TRUE)); } /** @@ -2387,10 +2375,6 @@ function user_pass_reset_url($account, $options = array()) { * - uid: The user ID number. * - pass: The hashed user password string. * - login: The UNIX timestamp of the user's last login. - * @param array $options - * (optional) A keyed array of settings. Supported options are: - * - langcode: A language code to be used when generating locale-sensitive - * urls. If langcode is NULL the users preferred language is used. * * @return * A unique URL that may be used to confirm the cancellation of the user @@ -2399,17 +2383,9 @@ function user_pass_reset_url($account, $options = array()) { * @see user_mail_tokens() * @see user_cancel_confirm() */ -function user_cancel_url($account, $options = array()) { +function user_cancel_url($account) { $timestamp = REQUEST_TIME; - $url_options = array('absolute' => TRUE); - if (isset($options['langcode'])) { - $languages = language_list(); - $url_options['language'] = $languages[$options['langcode']]; - } - else { - $url_options['language'] = user_preferred_language($account); - } - return url("user/$account->uid/cancel/confirm/$timestamp/" . user_pass_rehash($account->pass, $timestamp, $account->login, $account->uid), $url_options); + return url("user/$account->uid/cancel/confirm/$timestamp/" . user_pass_rehash($account->pass, $timestamp, $account->login, $account->uid), array('absolute' => TRUE)); } /** @@ -2899,7 +2875,7 @@ Your account on [site:name] has been canceled. if ($replace) { // We do not sanitize the token replacement, since the output of this // replacement is intended for an e-mail message, not a web browser. - return token_replace($text, $variables, array('language' => $language, 'langcode' => $langcode, 'callback' => 'user_mail_tokens', 'sanitize' => FALSE, 'clear' => TRUE)); + return token_replace($text, $variables, array('language' => $language, 'callback' => 'user_mail_tokens', 'sanitize' => FALSE, 'clear' => TRUE)); } return $text; @@ -2926,8 +2902,8 @@ Your account on [site:name] has been canceled. */ function user_mail_tokens(&$replacements, $data, $options) { if (isset($data['user'])) { - $replacements['[user:one-time-login-url]'] = user_pass_reset_url($data['user'], $options); - $replacements['[user:cancel-url]'] = user_cancel_url($data['user'], $options); + $replacements['[user:one-time-login-url]'] = user_pass_reset_url($data['user']); + $replacements['[user:cancel-url]'] = user_cancel_url($data['user']); } } diff --git a/modules/user/user.test b/modules/user/user.test index c06e1c6d..63143c3c 100644 --- a/modules/user/user.test +++ b/modules/user/user.test @@ -2258,26 +2258,6 @@ class UserTokenReplaceTestCase extends DrupalWebTestCase { ); } - public function setUp() { - parent::setUp('locale'); - - $account = $this->drupalCreateUser(array('access administration pages', 'administer languages')); - $this->drupalLogin($account); - - // Add language. - $edit = array('langcode' => 'de'); - $this->drupalPost('admin/config/regional/language/add', $edit, t('Add language')); - - // Enable URL language detection and selection. - $edit = array('language[enabled][locale-url]' => 1); - $this->drupalPost('admin/config/regional/language/configure', $edit, t('Save settings')); - - // Reset static caching. - drupal_static_reset('language_list'); - drupal_static_reset('locale_url_outbound_alter'); - drupal_static_reset('locale_language_url_rewrite_url'); - } - /** * Creates a user, then tests the tokens generated from it. */ @@ -2328,39 +2308,6 @@ class UserTokenReplaceTestCase extends DrupalWebTestCase { $output = token_replace($input, array('user' => $account), array('language' => $language, 'sanitize' => FALSE)); $this->assertEqual($output, $expected, format_string('Unsanitized user token %token replaced.', array('%token' => $input))); } - - $languages = language_list(); - - // Generate login and cancel link. - $tests = array(); - $tests['[user:one-time-login-url]'] = user_pass_reset_url($account); - $tests['[user:cancel-url]'] = user_cancel_url($account); - - // Generate tokens with interface language. - $link = url('user', array('absolute' => TRUE)); - foreach ($tests as $input => $expected) { - $output = token_replace($input, array('user' => $account), array('langcode' => $language->language, 'callback' => 'user_mail_tokens', 'sanitize' => FALSE, 'clear' => TRUE)); - $this->assertTrue(strpos($output, $link) === 0, 'Generated URL is in interface language.'); - } - - // Generate tokens with the user's preferred language. - $edit['language'] = 'de'; - $account = user_save($account, $edit); - $link = url('user', array('language' => $languages[$account->language], 'absolute' => TRUE)); - foreach ($tests as $input => $expected) { - $output = token_replace($input, array('user' => $account), array('callback' => 'user_mail_tokens', 'sanitize' => FALSE, 'clear' => TRUE)); - $this->assertTrue(strpos($output, $link) === 0, "Generated URL is in the user's preferred language."); - } - - // Generate tokens with one specific language. - $link = url('user', array('language' => $languages['de'], 'absolute' => TRUE)); - foreach ($tests as $input => $expected) { - foreach (array($user1, $user2) as $account) { - $output = token_replace($input, array('user' => $account), array('langcode' => 'de', 'callback' => 'user_mail_tokens', 'sanitize' => FALSE, 'clear' => TRUE)); - $this->assertTrue(strpos($output, $link) === 0, "Generated URL in in the requested language."); - } - } - } } diff --git a/profiles/minimal/minimal.info b/profiles/minimal/minimal.info index ebc9f129..ff2ae9cc 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/profiles/standard/standard.info b/profiles/standard/standard.info index bc743d50..aa7654c0 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" 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 f0f43f33..8097aac1 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" 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 17434350..c59eecda 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/profiles/testing/testing.info b/profiles/testing/testing.info index 020330eb..7a9e217f 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/themes/bartik/bartik.info b/themes/bartik/bartik.info index 007d0a53..e2cff220 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/themes/garland/garland.info b/themes/garland/garland.info index 00920141..c573f6a6 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/themes/seven/seven.info b/themes/seven/seven.info index 85e22afd..a7878569 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921" diff --git a/themes/stark/stark.info b/themes/stark/stark.info index 651c4fa7..bd8cdae2 100755 --- 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 2016-12-07 -version = "7.53" +; Information added by Drupal.org packaging script on 2017-02-01 +version = "7.54" project = "drupal" -datestamp = "1481152423" +datestamp = "1485986921"