updated core to 7.54

This commit is contained in:
Bachir Soussi Chiadmi
2017-05-24 19:27:14 +02:00
parent 9acef9d37e
commit 728f8e6d31
163 changed files with 1022 additions and 513 deletions

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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 {

View File

@@ -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"

View File

@@ -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.

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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.'));
}

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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']);
}
}
}
}
/**

View File

@@ -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.');
}
}
}

View File

@@ -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"

View File

@@ -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 <script>dangerous</script> & unescaped <strong>markup</strong>', 3 => 'Some HTML encoded markup with &lt; &amp; &gt;'),
'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 <script>dangerous</script> & unescaped <strong>markup</strong>',
// Make sure that HTML entities in option text are not double-encoded.
3 => 'Some HTML encoded markup with &lt; &amp; &gt;',
),
),
);
$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 <script>dangerous</script> & unescaped <strong>markup</strong>'),
'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 <script>dangerous</script> & unescaped <strong>markup</strong>',
),
),
);
$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 <script>dangerous</script> & unescaped <strong>markup</strong>'),
'allowed_values' => array(
// Make sure that 1 works as a 'on' value'.
1 => 'Zero',
// Make sure that option text is properly sanitized.
0 => 'Some <script>dangerous</script> & unescaped <strong>markup</strong>',
),
),
);
$this->bool = field_create_field($this->bool);

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -280,7 +280,8 @@ function file_ajax_upload() {
$form['#suffix'] .= '<span class="ajax-new-content"></span>';
}
$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']);

View File

@@ -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.
*

View File

@@ -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"

View File

@@ -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"

View File

@@ -1638,7 +1638,7 @@ function _filter_url_escape_comments($match, $escape = NULL) {
// Replace all HTML coments with a '<!-- [hash] -->' placeholder.
if ($mode) {
$content = $match[1];
$hash = md5($content);
$hash = hash('sha256', $content);
$comments[$hash] = $content;
return "<!-- $hash -->";
}

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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';

View File

@@ -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"

View File

@@ -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');
}
/**

View File

@@ -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);
}

View File

@@ -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');
}
/**

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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;
}

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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.
*/

View File

@@ -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"

View File

@@ -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.
*/

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

Some files were not shown because too many files have changed in this diff Show More