updated core to 7.54
This commit is contained in:
@@ -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';
|
||||
|
||||
|
@@ -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-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@@ -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');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-10-05
|
||||
version = "7.51"
|
||||
; Information added by Drupal.org packaging script on 2017-02-01
|
||||
version = "7.54"
|
||||
project = "drupal"
|
||||
datestamp = "1475694174"
|
||||
datestamp = "1485986921"
|
||||
|
||||
|
Reference in New Issue
Block a user