updated core to 8.6.1 via composer

This commit is contained in:
2018-09-12 13:58:26 +02:00
parent a9a219f2ed
commit ea56b9fba3
4443 changed files with 112098 additions and 40708 deletions
@@ -113,7 +113,8 @@ class DbLogController extends ControllerBase {
* Full-length messages can be viewed on the message details page.
*
* @return array
* A render array as expected by drupal_render().
* A render array as expected by
* \Drupal\Core\Render\RendererInterface::render().
*
* @see Drupal\dblog\Form\DblogClearLogConfirmForm
* @see Drupal\dblog\Controller\DbLogController::eventDetails()
@@ -237,7 +238,7 @@ class DbLogController extends ControllerBase {
*
* @return array
* If the ID is located in the Database Logging table, a build array in the
* format expected by drupal_render();
* format expected by \Drupal\Core\Render\RendererInterface::render().
*/
public function eventDetails($event_id) {
$build = [];
@@ -378,7 +379,8 @@ class DbLogController extends ControllerBase {
* Type of database log events to display (e.g., 'search').
*
* @return array
* A build array in the format expected by drupal_render().
* A build array in the format expected by
* \Drupal\Core\Render\RendererInterface::render().
*/
public function topLogMessages($type) {
$header = [
@@ -411,7 +413,7 @@ class DbLogController extends ControllerBase {
}
}
$build['dblog_top_table'] = [
$build['dblog_top_table'] = [
'#type' => 'table',
'#header' => $header,
'#rows' => $rows,
@@ -68,7 +68,7 @@ class DblogClearLogConfirmForm extends ConfirmFormBase {
public function submitForm(array &$form, FormStateInterface $form_state) {
$_SESSION['dblog_overview_filter'] = [];
$this->connection->truncate('watchdog')->execute();
drupal_set_message($this->t('Database log cleared.'));
$this->messenger()->addStatus($this->t('Database log cleared.'));
$form_state->setRedirectUrl($this->getCancelUrl());
}
+4 -5
View File
@@ -2,7 +2,6 @@
namespace Drupal\dblog\Logger;
use Drupal\Component\Utility\Unicode;
use Drupal\Core\Database\Connection;
use Drupal\Core\Database\Database;
use Drupal\Core\Database\DatabaseException;
@@ -57,8 +56,8 @@ class DbLog implements LoggerInterface {
// Remove any backtraces since they may contain an unserializable variable.
unset($context['backtrace']);
// Convert PSR3-style messages to SafeMarkup::format() style, so they can be
// translated too in runtime.
// Convert PSR3-style messages to \Drupal\Component\Render\FormattableMarkup
// style, so they can be translated too in runtime.
$message_placeholders = $this->parser->parseMessagePlaceholders($message, $context);
try {
@@ -66,14 +65,14 @@ class DbLog implements LoggerInterface {
->insert('watchdog')
->fields([
'uid' => $context['uid'],
'type' => Unicode::substr($context['channel'], 0, 64),
'type' => mb_substr($context['channel'], 0, 64),
'message' => $message,
'variables' => serialize($message_placeholders),
'severity' => $level,
'link' => $context['link'],
'location' => $context['request_uri'],
'referer' => $context['referer'],
'hostname' => Unicode::substr($context['ip'], 0, 128),
'hostname' => mb_substr($context['ip'], 0, 128),
'timestamp' => $context['timestamp'],
])
->execute();
@@ -2,7 +2,7 @@
namespace Drupal\dblog\Plugin\views\field;
use Drupal\Component\Utility\SafeMarkup;
use Drupal\Component\Render\FormattableMarkup;
use Drupal\Core\Form\FormStateInterface;
use Drupal\views\Plugin\views\field\FieldPluginBase;
use Drupal\views\ResultRow;
@@ -60,7 +60,7 @@ class DblogMessage extends FieldPluginBase {
if ($this->options['replace_variables']) {
$variables = unserialize($this->getvalue($values, 'variables'));
return SafeMarkup::format($value, (array) $variables);
return new FormattableMarkup($value, (array) $variables);
}
else {
return $this->sanitizeValue($value);