updated core to 7.73
This commit is contained in:
@@ -7,7 +7,7 @@ files[] = aggregator.test
|
||||
configure = admin/config/services/aggregator/settings
|
||||
stylesheets[all][] = aggregator.css
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -6,7 +6,7 @@ core = 7.x
|
||||
files[] = block.test
|
||||
configure = admin/structure/block
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -263,7 +263,7 @@ function block_page_build(&$page) {
|
||||
$all_regions = system_region_list($theme);
|
||||
|
||||
$item = menu_get_item();
|
||||
if ($item['path'] != 'admin/structure/block/demo/' . $theme) {
|
||||
if ($item === FALSE || $item['path'] != 'admin/structure/block/demo/' . $theme) {
|
||||
// Load all region content assigned via blocks.
|
||||
foreach (array_keys($all_regions) as $region) {
|
||||
// Assign blocks to region.
|
||||
@@ -283,7 +283,6 @@ function block_page_build(&$page) {
|
||||
}
|
||||
else {
|
||||
// Append region description if we are rendering the regions demo page.
|
||||
$item = menu_get_item();
|
||||
if ($item['path'] == 'admin/structure/block/demo/' . $theme) {
|
||||
foreach (system_region_list($theme, REGIONS_VISIBLE, FALSE) as $region) {
|
||||
$description = '<div class="block-region">' . $all_regions[$region] . '</div>';
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -13,7 +13,7 @@ regions[footer] = Footer
|
||||
regions[highlighted] = Highlighted
|
||||
regions[help] = Help
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
files[] = blog.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -7,7 +7,7 @@ files[] = book.test
|
||||
configure = admin/content/book/settings
|
||||
stylesheets[all][] = book.css
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
files[] = color.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -734,8 +734,9 @@ function _color_blend($img, $hex1, $hex2, $alpha) {
|
||||
* Converts a hex color into an RGB triplet.
|
||||
*/
|
||||
function _color_unpack($hex, $normalize = FALSE) {
|
||||
if (strlen($hex) == 4) {
|
||||
$hex = $hex[1] . $hex[1] . $hex[2] . $hex[2] . $hex[3] . $hex[3];
|
||||
$hex = substr($hex, 1);
|
||||
if (strlen($hex) == 3) {
|
||||
$hex = $hex[0] . $hex[0] . $hex[1] . $hex[1] . $hex[2] . $hex[2];
|
||||
}
|
||||
$c = hexdec($hex);
|
||||
for ($i = 16; $i >= 0; $i -= 8) {
|
||||
|
@@ -9,7 +9,7 @@ files[] = comment.test
|
||||
configure = admin/content/comment
|
||||
stylesheets[all][] = comment.css
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -9,9 +9,6 @@
|
||||
* Implements hook_uninstall().
|
||||
*/
|
||||
function comment_uninstall() {
|
||||
// Delete comment_body field.
|
||||
field_delete_field('comment_body');
|
||||
|
||||
// Remove variables.
|
||||
variable_del('comment_block_count');
|
||||
$node_types = array_keys(node_type_get_types());
|
||||
|
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
class CommentHelperCase extends DrupalWebTestCase {
|
||||
protected $super_user;
|
||||
protected $admin_user;
|
||||
protected $web_user;
|
||||
protected $node;
|
||||
@@ -19,6 +20,7 @@ class CommentHelperCase extends DrupalWebTestCase {
|
||||
parent::setUp($modules);
|
||||
|
||||
// Create users and test node.
|
||||
$this->super_user = $this->drupalCreateUser(array('access administration pages', 'administer modules'));
|
||||
$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'));
|
||||
$this->node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'uid' => $this->web_user->uid));
|
||||
@@ -2264,3 +2266,56 @@ class CommentNodeChangesTestCase extends CommentHelperCase {
|
||||
$this->assertFalse(comment_load($comment->id), 'The comment could not be loaded after the node was deleted.');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests uninstalling the comment module.
|
||||
*/
|
||||
class CommentUninstallTestCase extends CommentHelperCase {
|
||||
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Comment module uninstallation',
|
||||
'description' => 'Tests that the comments module can be properly uninstalled.',
|
||||
'group' => 'Comment',
|
||||
);
|
||||
}
|
||||
|
||||
function testCommentUninstall() {
|
||||
$this->drupalLogin($this->super_user);
|
||||
|
||||
// Disable comment module.
|
||||
$edit['modules[Core][comment][enable]'] = FALSE;
|
||||
$this->drupalPost('admin/modules', $edit, t('Save configuration'));
|
||||
$this->assertText(t('The configuration options have been saved.'), 'Comment module was disabled.');
|
||||
|
||||
// Uninstall comment module.
|
||||
$edit = array('uninstall[comment]' => 'comment');
|
||||
$this->drupalPost('admin/modules/uninstall', $edit, t('Uninstall'));
|
||||
$this->drupalPost(NULL, NULL, t('Uninstall'));
|
||||
$this->assertText(t('The selected modules have been uninstalled.'), 'Comment module was uninstalled.');
|
||||
|
||||
// Run cron and clear field cache so that comment fields and instances
|
||||
// marked for deletion are actually removed.
|
||||
$this->cronRun();
|
||||
field_cache_clear();
|
||||
|
||||
// Verify that comment fields have been removed.
|
||||
$all_fields = array_keys(field_info_field_map());
|
||||
$this->assertFalse(in_array('comment_body', $all_fields), 'Comment fields were removed by uninstall.');
|
||||
|
||||
// Verify that comment field instances have been removed (or at least marked
|
||||
// for deletion).
|
||||
// N.B. field_read_instances does an INNER JOIN on field_config so if the
|
||||
// comment_body row has been removed successfully from there no instances
|
||||
// will be returned, but that does not guarantee that no rows are left over
|
||||
// in the field_config_instance table.
|
||||
$count = db_select('field_config_instance', 'fci')
|
||||
->condition('entity_type', 'comment')
|
||||
->condition('field_name', 'comment_body')
|
||||
->condition('deleted', 0)
|
||||
->countQuery()
|
||||
->execute()
|
||||
->fetchField();
|
||||
$this->assertTrue($count == 0, 'Comment field instances were removed by uninstall.');
|
||||
}
|
||||
}
|
||||
|
@@ -6,7 +6,7 @@ core = 7.x
|
||||
files[] = contact.test
|
||||
configure = admin/structure/contact
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
files[] = contextual.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -7,7 +7,7 @@ files[] = dashboard.test
|
||||
dependencies[] = block
|
||||
configure = admin/dashboard/customize
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
files[] = dblog.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -11,7 +11,7 @@ dependencies[] = field_sql_storage
|
||||
required = TRUE
|
||||
stylesheets[all][] = theme/field.css
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -7,7 +7,7 @@ dependencies[] = field
|
||||
files[] = field_sql_storage.test
|
||||
required = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -7,7 +7,7 @@ dependencies[] = field
|
||||
dependencies[] = options
|
||||
files[] = tests/list.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ package = Testing
|
||||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -6,7 +6,7 @@ core = 7.x
|
||||
dependencies[] = field
|
||||
files[] = number.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -174,7 +174,7 @@ class NumberFieldTestCase extends DrupalWebTestCase {
|
||||
),
|
||||
'display' => array(
|
||||
'default' => array(
|
||||
'type' => 'number_float',
|
||||
'type' => 'number_decimal',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@@ -6,7 +6,7 @@ core = 7.x
|
||||
dependencies[] = field
|
||||
files[] = options.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -7,7 +7,7 @@ dependencies[] = field
|
||||
files[] = text.test
|
||||
required = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -6,7 +6,7 @@ files[] = field_test.entity.inc
|
||||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -455,13 +455,13 @@ function field_test_field_attach_rename_bundle($bundle_old, $bundle_new) {
|
||||
function field_test_field_attach_delete_bundle($entity_type, $bundle, $instances) {
|
||||
$data = _field_test_storage_data();
|
||||
|
||||
foreach ($instances as $field_name => $instance) {
|
||||
$field = field_info_field($field_name);
|
||||
foreach ($instances as $instance) {
|
||||
$field = field_info_field_by_id($instance['field_id']);
|
||||
if ($field['storage']['type'] == 'field_test_storage') {
|
||||
$field_data = &$data[$field['id']];
|
||||
foreach (array('current', 'revisions') as $sub_table) {
|
||||
foreach ($field_data[$sub_table] as &$row) {
|
||||
if ($row->bundle == $bundle_old) {
|
||||
if ($row->bundle == $bundle) {
|
||||
$row->deleted = TRUE;
|
||||
}
|
||||
}
|
||||
|
@@ -1026,6 +1026,10 @@ function field_ui_display_overview_form($form, &$form_state, $entity_type, $bund
|
||||
|
||||
$instance['display'][$view_mode]['type'] = $formatter_type;
|
||||
$formatter = field_info_formatter_types($formatter_type);
|
||||
// For hidden fields, $formatter will be NULL, but we expect an array later.
|
||||
// To maintain BC, but avoid PHP 7.4 Notices, ensure $formatter is an array
|
||||
// with a 'module' element.
|
||||
$formatter['module'] = isset($formatter['module']) ? $formatter['module'] : '';
|
||||
$instance['display'][$view_mode]['module'] = $formatter['module'];
|
||||
$instance['display'][$view_mode]['settings'] = $settings;
|
||||
|
||||
|
@@ -6,7 +6,7 @@ core = 7.x
|
||||
dependencies[] = field
|
||||
files[] = field_ui.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -265,6 +265,12 @@ function field_ui_menu_title($instance) {
|
||||
* Menu access callback for the 'view mode display settings' pages.
|
||||
*/
|
||||
function _field_ui_view_mode_menu_access($entity_type, $bundle, $view_mode, $access_callback) {
|
||||
// It's good practice to call func_get_args() at the beginning of a function
|
||||
// to avoid problems with function parameters being modified later. The
|
||||
// behavior of func_get_args() changed in PHP7.
|
||||
// @see https://www.php.net/manual/en/migration70.incompatible.php#migration70.incompatible.other.func-parameter-modified
|
||||
$all_args = func_get_args();
|
||||
|
||||
// First, determine visibility according to the 'use custom display'
|
||||
// setting for the view mode.
|
||||
$bundle = field_extract_bundle($entity_type, $bundle);
|
||||
@@ -275,7 +281,6 @@ function _field_ui_view_mode_menu_access($entity_type, $bundle, $view_mode, $acc
|
||||
// part of _menu_check_access().
|
||||
if ($visibility) {
|
||||
// Grab the variable 'access arguments' part.
|
||||
$all_args = func_get_args();
|
||||
$args = array_slice($all_args, 4);
|
||||
$callback = empty($access_callback) ? 0 : trim($access_callback);
|
||||
if (is_numeric($callback)) {
|
||||
|
@@ -6,7 +6,7 @@ core = 7.x
|
||||
dependencies[] = field
|
||||
files[] = tests/file.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -409,7 +409,7 @@ class FileManagedFileElementTestCase extends FileFieldTestCase {
|
||||
'form_token' => 'invalid token',
|
||||
);
|
||||
$this->drupalPost($path, $edit, t('Save'));
|
||||
$this->assertText('The form has become outdated. Copy any unsaved work in the form below');
|
||||
$this->assertText('The form has become outdated.');
|
||||
$last_fid = $this->getLastFileId();
|
||||
$this->assertEqual($last_fid_prior, $last_fid, 'File was not saved when uploaded with an invalid form token.');
|
||||
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -202,7 +202,7 @@ function callback_filter_settings($form, &$form_state, $filter, $format, $defaul
|
||||
*/
|
||||
function callback_filter_prepare($text, $filter, $format, $langcode, $cache, $cache_id) {
|
||||
// Escape <code> and </code> tags.
|
||||
$text = preg_replace('|<code>(.+?)</code>|se', "[codefilter_code]$1[/codefilter_code]", $text);
|
||||
$text = preg_replace('|<code>(.+?)</code>|s', "[codefilter_code]$1[/codefilter_code]", $text);
|
||||
return $text;
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ function callback_filter_prepare($text, $filter, $format, $langcode, $cache, $ca
|
||||
* @ingroup callbacks
|
||||
*/
|
||||
function callback_filter_process($text, $filter, $format, $langcode, $cache, $cache_id) {
|
||||
$text = preg_replace('|\[codefilter_code\](.+?)\[/codefilter_code\]|se', "<pre>$1</pre>", $text);
|
||||
$text = preg_replace('|\[codefilter_code\](.+?)\[/codefilter_code\]|s', "<pre>$1</pre>", $text);
|
||||
|
||||
return $text;
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@ files[] = filter.test
|
||||
required = TRUE
|
||||
configure = admin/config/content/formats
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -9,7 +9,7 @@ files[] = forum.test
|
||||
configure = admin/structure/forum
|
||||
stylesheets[all][] = forum.css
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -922,7 +922,8 @@ function forum_get_topics($tid, $sortby, $forum_per_page) {
|
||||
);
|
||||
|
||||
$order = _forum_get_topic_order($sortby);
|
||||
for ($i = 0; $i < count($forum_topic_list_header); $i++) {
|
||||
// Skip element with index 0 which is NULL.
|
||||
for ($i = 1; $i < count($forum_topic_list_header); $i++) {
|
||||
if ($forum_topic_list_header[$i]['field'] == $order['field']) {
|
||||
$forum_topic_list_header[$i]['sort'] = $order['sort'];
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
files[] = help.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -7,7 +7,7 @@ dependencies[] = file
|
||||
files[] = image.test
|
||||
configure = admin/config/media/image-styles
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -6,7 +6,7 @@ core = 7.x
|
||||
files[] = image_module_test.module
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -6,7 +6,7 @@ core = 7.x
|
||||
files[] = locale.test
|
||||
configure = admin/config/regional/language
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ package = Testing
|
||||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -6,7 +6,7 @@ core = 7.x
|
||||
files[] = menu.test
|
||||
configure = admin/structure/menu
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -9,7 +9,7 @@ required = TRUE
|
||||
configure = admin/structure/types
|
||||
stylesheets[all][] = node.css
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ package = Core
|
||||
core = 7.x
|
||||
files[] = openid.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -6,7 +6,7 @@ core = 7.x
|
||||
dependencies[] = openid
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -4,7 +4,7 @@ package = Core
|
||||
version = VERSION
|
||||
core = 7.x
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -6,7 +6,7 @@ core = 7.x
|
||||
files[] = path.test
|
||||
configure = admin/config/search/path
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
files[] = php.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -6,7 +6,7 @@ core = 7.x
|
||||
files[] = poll.test
|
||||
stylesheets[all][] = poll.css
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -11,7 +11,7 @@ configure = admin/config/people/profile
|
||||
; See user_system_info_alter().
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
files[] = rdf.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -6,7 +6,7 @@ core = 7.x
|
||||
hidden = TRUE
|
||||
dependencies[] = blog
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -219,7 +219,7 @@ class SearchQuery extends SelectQueryExtender {
|
||||
}
|
||||
$phrase = FALSE;
|
||||
// Strip off phrase quotes.
|
||||
if ($match[2]{0} == '"') {
|
||||
if ($match[2][0] == '"') {
|
||||
$match[2] = substr($match[2], 1, -1);
|
||||
$phrase = TRUE;
|
||||
$this->simple = FALSE;
|
||||
|
@@ -8,7 +8,7 @@ files[] = search.test
|
||||
configure = admin/config/search/settings
|
||||
stylesheets[all][] = search.css
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -1172,7 +1172,7 @@ function search_excerpt($keys, $text) {
|
||||
}
|
||||
else {
|
||||
$info = search_simplify_excerpt_match($key, $text, $included[$key], $boundary);
|
||||
if ($info['where']) {
|
||||
if (isset($info['where'])) {
|
||||
$p = $info['where'];
|
||||
if ($info['keyword']) {
|
||||
$foundkeys[] = $info['keyword'];
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -6,7 +6,7 @@ core = 7.x
|
||||
files[] = shortcut.test
|
||||
configure = admin/config/user-interface/shortcut
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -33,6 +33,7 @@ files[] = tests/pager.test
|
||||
files[] = tests/password.test
|
||||
files[] = tests/path.test
|
||||
files[] = tests/registry.test
|
||||
files[] = tests/request_sanitizer.test
|
||||
files[] = tests/schema.test
|
||||
files[] = tests/session.test
|
||||
files[] = tests/tablesort.test
|
||||
@@ -57,7 +58,7 @@ 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 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ package = Testing
|
||||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ package = Testing
|
||||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ package = Testing
|
||||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -7,7 +7,7 @@ stylesheets[all][] = common_test.css
|
||||
stylesheets[print][] = common_test.print.css
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ package = Testing
|
||||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -7,7 +7,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -6,7 +6,7 @@ core = 7.x
|
||||
dependencies[] = entity_cache_test_dependency
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ package = Testing
|
||||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -6,7 +6,7 @@ core = 7.x
|
||||
files[] = file_test.module
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -521,6 +521,9 @@ class FormsTestCase extends DrupalWebTestCase {
|
||||
$form_state['values'] = array();
|
||||
drupal_prepare_form($form_id, $form, $form_state);
|
||||
|
||||
// Set the CSRF token in the user-provided input.
|
||||
$form_state['input']['form_token'] = $form['form_token']['#default_value'];
|
||||
|
||||
// This is the main function we want to test: it is responsible for
|
||||
// populating user supplied $form_state['input'] to sanitized
|
||||
// $form_state['values'].
|
||||
@@ -687,7 +690,7 @@ class FormValidationTestCase extends DrupalWebTestCase {
|
||||
$this->drupalPost(NULL, $edit, 'Save');
|
||||
$this->assertNoFieldByName('name', '#value changed by #validate', 'Form element #value was not altered.');
|
||||
$this->assertNoText('Name value: value changed by form_set_value() in #validate', 'Form element value in $form_state was not altered.');
|
||||
$this->assertText('The form has become outdated. Copy any unsaved work in the form below');
|
||||
$this->assertText('The form has become outdated.');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ core = 7.x
|
||||
hidden = TRUE
|
||||
package = Testing
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ core = 7.x
|
||||
hidden = TRUE
|
||||
package = Testing
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
354
modules/simpletest/tests/request_sanitizer.test
Normal file
354
modules/simpletest/tests/request_sanitizer.test
Normal file
@@ -0,0 +1,354 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Tests for the RequestSanitizer class.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Tests DrupalRequestSanitizer class.
|
||||
*/
|
||||
class RequestSanitizerTest extends DrupalUnitTestCase {
|
||||
|
||||
/**
|
||||
* Log of errors triggered during sanitization.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $errors;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'DrupalRequestSanitizer',
|
||||
'description' => 'Test the DrupalRequestSanitizer class',
|
||||
'group' => 'System',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp() {
|
||||
require_once DRUPAL_ROOT . '/includes/request-sanitizer.inc';
|
||||
parent::setUp();
|
||||
set_error_handler(array($this, "sanitizerTestErrorHandler"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Iterate through all the RequestSanitizerTests.
|
||||
*/
|
||||
public function testRequestSanitization() {
|
||||
foreach ($this->requestSanitizerTests() as $label => $data) {
|
||||
$this->errors = array();
|
||||
// Normalize the test parameters.
|
||||
$test = array(
|
||||
'request' => $data[0],
|
||||
'expected' => isset($data[1]) ? $data[1] : array(),
|
||||
'expected_errors' => isset($data[2]) ? $data[2] : NULL,
|
||||
'whitelist' => isset($data[3]) ? $data[3] : array(),
|
||||
);
|
||||
$this->requestSanitizationTest($test['request'], $test['expected'], $test['expected_errors'], $test['whitelist'], $label);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests RequestSanitizer class.
|
||||
*
|
||||
* @param \SanitizerTestRequest $request
|
||||
* The request to sanitize.
|
||||
* @param array $expected
|
||||
* An array of expected request parameters after sanitization.
|
||||
* @param array|null $expected_errors
|
||||
* An array of expected errors. If set to NULL then error logging is
|
||||
* disabled.
|
||||
* @param array $whitelist
|
||||
* An array of keys to whitelist and not sanitize.
|
||||
* @param string $label
|
||||
* A descriptive name for each test / group of assertions.
|
||||
*
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
public function requestSanitizationTest(SanitizerTestRequest $request, array $expected = array(), array $expected_errors = NULL, array $whitelist = array(), $label = NULL) {
|
||||
// Set up globals.
|
||||
$_GET = $request->getQuery();
|
||||
$_POST = $request->getRequest();
|
||||
$_COOKIE = $request->getCookies();
|
||||
$_REQUEST = array_merge($request->getQuery(), $request->getRequest());
|
||||
|
||||
$GLOBALS['conf']['sanitize_input_whitelist'] = $whitelist;
|
||||
$GLOBALS['conf']['sanitize_input_logging'] = is_null($expected_errors) ? FALSE : TRUE;
|
||||
if ($label !== 'already sanitized request') {
|
||||
$reflection = new \ReflectionProperty('DrupalRequestSanitizer', 'sanitized');
|
||||
$reflection->setAccessible(TRUE);
|
||||
$reflection->setValue(NULL, FALSE);
|
||||
}
|
||||
DrupalRequestSanitizer::sanitize();
|
||||
if (isset($_GET['destination'])) {
|
||||
DrupalRequestSanitizer::cleanDestination();
|
||||
}
|
||||
|
||||
// Normalise the expected data.
|
||||
$expected += array(
|
||||
'cookies' => array(),
|
||||
'query' => array(),
|
||||
'request' => array(),
|
||||
);
|
||||
|
||||
// Test PHP globals.
|
||||
$this->assertEqualLabelled($expected['cookies'], $_COOKIE, NULL, 'Other', $label . ' (COOKIE)');
|
||||
$this->assertEqualLabelled($expected['query'], $_GET, NULL, 'Other', $label . ' (GET)');
|
||||
$this->assertEqualLabelled($expected['request'], $_POST, NULL, 'Other', $label . ' (POST)');
|
||||
$expected_request = array_merge($expected['query'], $expected['request']);
|
||||
$this->assertEqualLabelled($expected_request, $_REQUEST, NULL, 'Other', $label . ' (REQUEST)');
|
||||
|
||||
// Ensure any expected errors have been triggered.
|
||||
if (!empty($expected_errors)) {
|
||||
foreach ($expected_errors as $expected_error) {
|
||||
$this->assertError($expected_error, E_USER_NOTICE, $label . ' (errors)');
|
||||
}
|
||||
}
|
||||
else {
|
||||
$this->assertEqualLabelled(array(), $this->errors, NULL, 'Other', $label . ' (errors)');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Data provider for testRequestSanitization.
|
||||
*
|
||||
* @return array
|
||||
* A list of tests to carry out.
|
||||
*/
|
||||
public function requestSanitizerTests() {
|
||||
$tests = array();
|
||||
|
||||
$request = new SanitizerTestRequest(array('q' => 'index.php'));
|
||||
$tests['no sanitization GET'] = array($request, array('query' => array('q' => 'index.php')));
|
||||
|
||||
$request = new SanitizerTestRequest(array(), array('field' => 'value'));
|
||||
$tests['no sanitization POST'] = array($request, array('request' => array('field' => 'value')));
|
||||
|
||||
$request = new SanitizerTestRequest(array(), array(), array(), array('key' => 'value'));
|
||||
$tests['no sanitization COOKIE'] = array($request, array('cookies' => array('key' => 'value')));
|
||||
|
||||
$request = new SanitizerTestRequest(array('q' => 'index.php'), array('field' => 'value'), array(), array('key' => 'value'));
|
||||
$tests['no sanitization GET, POST, COOKIE'] = array($request, array('query' => array('q' => 'index.php'), 'request' => array('field' => 'value'), 'cookies' => array('key' => 'value')));
|
||||
|
||||
$request = new SanitizerTestRequest(array('q' => 'index.php'));
|
||||
$tests['no sanitization GET log'] = array($request, array('query' => array('q' => 'index.php')), array());
|
||||
|
||||
$request = new SanitizerTestRequest(array(), array('field' => 'value'));
|
||||
$tests['no sanitization POST log'] = array($request, array('request' => array('field' => 'value')), array());
|
||||
|
||||
$request = new SanitizerTestRequest(array(), array(), array(), array('key' => 'value'));
|
||||
$tests['no sanitization COOKIE log'] = array($request, array('cookies' => array('key' => 'value')), array());
|
||||
|
||||
$request = new SanitizerTestRequest(array('#q' => 'index.php'));
|
||||
$tests['sanitization GET'] = array($request);
|
||||
|
||||
$request = new SanitizerTestRequest(array(), array('#field' => 'value'));
|
||||
$tests['sanitization POST'] = array($request);
|
||||
|
||||
$request = new SanitizerTestRequest(array(), array(), array(), array('#key' => 'value'));
|
||||
$tests['sanitization COOKIE'] = array($request);
|
||||
|
||||
$request = new SanitizerTestRequest(array('#q' => 'index.php'), array('#field' => 'value'), array(), array('#key' => 'value'));
|
||||
$tests['sanitization GET, POST, COOKIE'] = array($request);
|
||||
|
||||
$request = new SanitizerTestRequest(array('#q' => 'index.php'));
|
||||
$tests['sanitization GET log'] = array($request, array(), array('Potentially unsafe keys removed from query string parameters (GET): #q'));
|
||||
|
||||
$request = new SanitizerTestRequest(array(), array('#field' => 'value'));
|
||||
$tests['sanitization POST log'] = array($request, array(), array('Potentially unsafe keys removed from request body parameters (POST): #field'));
|
||||
|
||||
$request = new SanitizerTestRequest(array(), array(), array(), array('#key' => 'value'));
|
||||
$tests['sanitization COOKIE log'] = array($request, array(), array('Potentially unsafe keys removed from cookie parameters (COOKIE): #key'));
|
||||
|
||||
$request = new SanitizerTestRequest(array('#q' => 'index.php'), array('#field' => 'value'), array(), array('#key' => 'value'));
|
||||
$tests['sanitization GET, POST, COOKIE log'] = array($request, array(), array('Potentially unsafe keys removed from query string parameters (GET): #q', 'Potentially unsafe keys removed from request body parameters (POST): #field', 'Potentially unsafe keys removed from cookie parameters (COOKIE): #key'));
|
||||
|
||||
$request = new SanitizerTestRequest(array('q' => 'index.php', 'foo' => array('#bar' => 'foo')));
|
||||
$tests['recursive sanitization log'] = array($request, array('query' => array('q' => 'index.php', 'foo' => array())), array('Potentially unsafe keys removed from query string parameters (GET): #bar'));
|
||||
|
||||
$request = new SanitizerTestRequest(array('q' => 'index.php', 'foo' => array('#bar' => 'foo')));
|
||||
$tests['recursive no sanitization whitelist'] = array($request, array('query' => array('q' => 'index.php', 'foo' => array('#bar' => 'foo'))), array(), array('#bar'));
|
||||
|
||||
$request = new SanitizerTestRequest(array(), array('#field' => 'value'));
|
||||
$tests['no sanitization POST whitelist'] = array($request, array('request' => array('#field' => 'value')), array(), array('#field'));
|
||||
|
||||
$request = new SanitizerTestRequest(array('q' => 'index.php', 'foo' => array('#bar' => 'foo', '#foo' => 'bar')));
|
||||
$tests['recursive multiple sanitization log'] = array($request, array('query' => array('q' => 'index.php', 'foo' => array())), array('Potentially unsafe keys removed from query string parameters (GET): #bar, #foo'));
|
||||
|
||||
$request = new SanitizerTestRequest(array('#q' => 'index.php'));
|
||||
$tests['already sanitized request'] = array($request, array('query' => array('#q' => 'index.php')));
|
||||
|
||||
$request = new SanitizerTestRequest(array('destination' => 'whatever?%23test=value'));
|
||||
$tests['destination removal GET'] = array($request);
|
||||
|
||||
$request = new SanitizerTestRequest(array('destination' => 'whatever?%23test=value'));
|
||||
$tests['destination removal GET log'] = array($request, array(), array('Potentially unsafe destination removed from query string parameters (GET) because it contained the following keys: #test'));
|
||||
|
||||
$request = new SanitizerTestRequest(array('destination' => 'whatever?q[%23test]=value'));
|
||||
$tests['destination removal subkey'] = array($request);
|
||||
|
||||
$request = new SanitizerTestRequest(array('destination' => 'whatever?q[%23test]=value'));
|
||||
$tests['destination whitelist'] = array($request, array('query' => array('destination' => 'whatever?q[%23test]=value')), array(), array('#test'));
|
||||
|
||||
$request = new SanitizerTestRequest(array('destination' => "whatever?\x00bar=base&%23test=value"));
|
||||
$tests['destination removal zero byte'] = array($request);
|
||||
|
||||
$request = new SanitizerTestRequest(array('destination' => 'whatever?q=value'));
|
||||
$tests['destination kept'] = array($request, array('query' => array('destination' => 'whatever?q=value')));
|
||||
|
||||
$request = new SanitizerTestRequest(array('destination' => 'whatever'));
|
||||
$tests['destination no query'] = array($request, array('query' => array('destination' => 'whatever')));
|
||||
|
||||
return $tests;
|
||||
}
|
||||
|
||||
/**
|
||||
* Catches and logs errors to $this->errors.
|
||||
*
|
||||
* @param int $errno
|
||||
* The severity level of the error.
|
||||
* @param string $errstr
|
||||
* The error message.
|
||||
*/
|
||||
public function sanitizerTestErrorHandler($errno, $errstr) {
|
||||
$this->errors[] = compact('errno', 'errstr');
|
||||
}
|
||||
|
||||
/**
|
||||
* Asserts that the expected error has been logged.
|
||||
*
|
||||
* @param string $errstr
|
||||
* The error message.
|
||||
* @param int $errno
|
||||
* The severity level of the error.
|
||||
* @param string $label
|
||||
* The label to include with the message.
|
||||
*
|
||||
* @return bool
|
||||
* TRUE if the assertion succeeded, FALSE otherwise.
|
||||
*/
|
||||
protected function assertError($errstr, $errno, $label) {
|
||||
$label = (empty($label)) ? '' : $label . ': ';
|
||||
foreach ($this->errors as $error) {
|
||||
if ($error['errstr'] === $errstr && $error['errno'] === $errno) {
|
||||
return $this->pass($label . "Error with level $errno and message '$errstr' found");
|
||||
}
|
||||
}
|
||||
return $this->fail($label . "Error with level $errno and message '$errstr' not found in " . var_export($this->errors, TRUE));
|
||||
}
|
||||
|
||||
/**
|
||||
* Asserts two values are equal, includes a label.
|
||||
*
|
||||
* @param mixed $first
|
||||
* The first value to check.
|
||||
* @param mixed $second
|
||||
* The second value to check.
|
||||
* @param string $message
|
||||
* The message to display along with the assertion.
|
||||
* @param string $group
|
||||
* The type of assertion - examples are "Browser", "PHP".
|
||||
* @param string $label
|
||||
* The label to include with the message.
|
||||
*
|
||||
* @return bool
|
||||
* TRUE if the assertion succeeded, FALSE otherwise.
|
||||
*/
|
||||
protected function assertEqualLabelled($first, $second, $message = '', $group = 'Other', $label = '') {
|
||||
$label = (empty($label)) ? '' : $label . ': ';
|
||||
$message = $message ? $message : t('Value @first is equal to value @second.', array(
|
||||
'@first' => var_export($first, TRUE),
|
||||
'@second' => var_export($second, TRUE),
|
||||
));
|
||||
return $this->assert($first == $second, $label . $message, $group);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Basic HTTP Request class.
|
||||
*/
|
||||
class SanitizerTestRequest {
|
||||
|
||||
/**
|
||||
* The query (GET).
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $query;
|
||||
|
||||
/**
|
||||
* The request (POST).
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $request;
|
||||
|
||||
/**
|
||||
* The request attributes.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $attributes;
|
||||
|
||||
/**
|
||||
* The request cookies.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $cookies;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $query
|
||||
* The GET parameters.
|
||||
* @param array $request
|
||||
* The POST parameters.
|
||||
* @param array $attributes
|
||||
* The request attributes.
|
||||
* @param array $cookies
|
||||
* The COOKIE parameters.
|
||||
*/
|
||||
public function __construct(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array()) {
|
||||
$this->query = $query;
|
||||
$this->request = $request;
|
||||
$this->attributes = $attributes;
|
||||
$this->cookies = $cookies;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for $query.
|
||||
*/
|
||||
public function getQuery() {
|
||||
return $this->query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for $request.
|
||||
*/
|
||||
public function getRequest() {
|
||||
return $this->request;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for $attributes.
|
||||
*/
|
||||
public function getAttributes() {
|
||||
return $this->attributes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for $cookies.
|
||||
*/
|
||||
public function getCookies() {
|
||||
return $this->cookies;
|
||||
}
|
||||
|
||||
}
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -7,7 +7,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -6,7 +6,7 @@ core = 7.x
|
||||
hidden = TRUE
|
||||
dependencies[] = _missing_dependency
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -6,7 +6,7 @@ core = 7.x
|
||||
hidden = TRUE
|
||||
dependencies[] = system_incompatible_core_version_test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = VERSION
|
||||
core = 5.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -7,7 +7,7 @@ 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 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
@@ -5,7 +5,7 @@ version = 1.0
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2019-12-18
|
||||
version = "7.69"
|
||||
; Information added by Drupal.org packaging script on 2020-09-16
|
||||
version = "7.73"
|
||||
project = "drupal"
|
||||
datestamp = "1576696221"
|
||||
datestamp = "1600272641"
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user