Update core 8.3.0
This commit is contained in:
parent
da7a7918f8
commit
cd7a898e66
6144 changed files with 132297 additions and 87747 deletions
|
|
@ -21,13 +21,13 @@ function dblog_help($route_name, RouteMatchInterface $route_match) {
|
|||
case 'help.page.dblog':
|
||||
$output = '';
|
||||
$output .= '<h3>' . t('About') . '</h3>';
|
||||
$output .= '<p>' . t('The Database Logging module logs system events in the Drupal database. For more information, see the <a href=":dblog">online documentation for the Database Logging module</a>.', array(':dblog' => 'https://www.drupal.org/documentation/modules/dblog')) . '</p>';
|
||||
$output .= '<p>' . t('The Database Logging module logs system events in the Drupal database. For more information, see the <a href=":dblog">online documentation for the Database Logging module</a>.', [':dblog' => 'https://www.drupal.org/documentation/modules/dblog']) . '</p>';
|
||||
$output .= '<h3>' . t('Uses') . '</h3>';
|
||||
$output .= '<dl>';
|
||||
$output .= '<dt>' . t('Monitoring your site') . '</dt>';
|
||||
$output .= '<dd>' . t('The Database Logging module allows you to view an event log on the <a href=":dblog">Recent log messages</a> page. The log is a chronological list of recorded events containing usage data, performance data, errors, warnings and operational information. Administrators should check the log on a regular basis to ensure their site is working properly.', array(':dblog' => \Drupal::url('dblog.overview'))) . '</dd>';
|
||||
$output .= '<dd>' . t('The Database Logging module allows you to view an event log on the <a href=":dblog">Recent log messages</a> page. The log is a chronological list of recorded events containing usage data, performance data, errors, warnings and operational information. Administrators should check the log on a regular basis to ensure their site is working properly.', [':dblog' => \Drupal::url('dblog.overview')]) . '</dd>';
|
||||
$output .= '<dt>' . t('Debugging site problems') . '</dt>';
|
||||
$output .= '<dd>' . t('In case of errors or problems with the site, the <a href=":dblog">Recent log messages</a> page can be useful for debugging, since it shows the sequence of events. The log messages include usage information, warnings, and errors.', array(':dblog' => \Drupal::url('dblog.overview'))) . '</dd>';
|
||||
$output .= '<dd>' . t('In case of errors or problems with the site, the <a href=":dblog">Recent log messages</a> page can be useful for debugging, since it shows the sequence of events. The log messages include usage information, warnings, and errors.', [':dblog' => \Drupal::url('dblog.overview')]) . '</dd>';
|
||||
$output .= '</dl>';
|
||||
return $output;
|
||||
|
||||
|
|
@ -41,12 +41,12 @@ function dblog_help($route_name, RouteMatchInterface $route_match) {
|
|||
*/
|
||||
function dblog_menu_links_discovered_alter(&$links) {
|
||||
if (\Drupal::moduleHandler()->moduleExists('search')) {
|
||||
$links['dblog.search'] = array(
|
||||
$links['dblog.search'] = [
|
||||
'title' => new TranslatableMarkup('Top search phrases'),
|
||||
'route_name' => 'dblog.search',
|
||||
'description' => new TranslatableMarkup('View most popular search phrases.'),
|
||||
'parent' => 'system.admin_reports',
|
||||
);
|
||||
];
|
||||
}
|
||||
|
||||
return $links;
|
||||
|
|
@ -66,7 +66,7 @@ function dblog_cron() {
|
|||
// e.g. auto_increment value > 1 or rows deleted directly from the table.
|
||||
if ($row_limit > 0) {
|
||||
$min_row = db_select('watchdog', 'w')
|
||||
->fields('w', array('wid'))
|
||||
->fields('w', ['wid'])
|
||||
->orderBy('wid', 'DESC')
|
||||
->range($row_limit - 1, 1)
|
||||
->execute()->fetchField();
|
||||
|
|
@ -95,14 +95,14 @@ function _dblog_get_message_types() {
|
|||
* Implements hook_form_FORM_ID_alter() for system_logging_settings().
|
||||
*/
|
||||
function dblog_form_system_logging_settings_alter(&$form, FormStateInterface $form_state) {
|
||||
$row_limits = array(100, 1000, 10000, 100000, 1000000);
|
||||
$form['dblog_row_limit'] = array(
|
||||
$row_limits = [100, 1000, 10000, 100000, 1000000];
|
||||
$form['dblog_row_limit'] = [
|
||||
'#type' => 'select',
|
||||
'#title' => t('Database log messages to keep'),
|
||||
'#default_value' => \Drupal::configFactory()->getEditable('dblog.settings')->get('row_limit'),
|
||||
'#options' => array(0 => t('All')) + array_combine($row_limits, $row_limits),
|
||||
'#description' => t('The maximum number of messages to keep in the database log. Requires a <a href=":cron">cron maintenance task</a>.', array(':cron' => \Drupal::url('system.status')))
|
||||
);
|
||||
'#options' => [0 => t('All')] + array_combine($row_limits, $row_limits),
|
||||
'#description' => t('The maximum number of messages to keep in the database log. Requires a <a href=":cron">cron maintenance task</a>.', [':cron' => \Drupal::url('system.status')])
|
||||
];
|
||||
|
||||
$form['#submit'][] = 'dblog_logging_settings_submit';
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue