Update to Drupal 8.0.0 beta 14. For more information, see https://drupal.org/node/2544542
This commit is contained in:
parent
3b2511d96d
commit
81ccda77eb
2155 changed files with 54307 additions and 46870 deletions
|
@ -11,6 +11,7 @@
|
|||
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
use Drupal\Core\Routing\RouteMatchInterface;
|
||||
use Drupal\Core\StringTranslation\TranslationWrapper;
|
||||
|
||||
/**
|
||||
* Implements hook_help().
|
||||
|
@ -41,9 +42,9 @@ function dblog_help($route_name, RouteMatchInterface $route_match) {
|
|||
function dblog_menu_links_discovered_alter(&$links) {
|
||||
if (\Drupal::moduleHandler()->moduleExists('search')) {
|
||||
$links['dblog.search'] = array(
|
||||
'title' => 'Top search phrases',
|
||||
'title' => new TranslationWrapper('Top search phrases'),
|
||||
'route_name' => 'dblog.search',
|
||||
'description' => 'View most popular search phrases.',
|
||||
'description' => new TranslationWrapper('View most popular search phrases.'),
|
||||
'parent' => 'system.admin_reports',
|
||||
);
|
||||
}
|
||||
|
|
13
core/modules/dblog/migration_templates/d6_dblog_settings.yml
Normal file
13
core/modules/dblog/migration_templates/d6_dblog_settings.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
id: d6_dblog_settings
|
||||
label: Drupal 6 database logging configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- dblog_row_limit
|
||||
process:
|
||||
row_limit: dblog_row_limit
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: dblog.settings
|
13
core/modules/dblog/migration_templates/d7_dblog_settings.yml
Normal file
13
core/modules/dblog/migration_templates/d7_dblog_settings.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
id: d7_dblog_settings
|
||||
label: Drupal 7 database logging configuration
|
||||
migration_tags:
|
||||
- Drupal 7
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- dblog_row_limit
|
||||
process:
|
||||
row_limit: dblog_row_limit
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: dblog.settings
|
|
@ -207,7 +207,7 @@ class DbLogController extends ControllerBase {
|
|||
$this->dateFormatter->format($dblog->timestamp, 'short'),
|
||||
$message,
|
||||
array('data' => $username),
|
||||
Xss::filter($dblog->link),
|
||||
SafeMarkup::xssFilter($dblog->link),
|
||||
),
|
||||
// Attributes for table row.
|
||||
'class' => array(Html::getClass('dblog-' . $dblog->type), $classes[$dblog->severity]),
|
||||
|
@ -285,7 +285,7 @@ class DbLogController extends ControllerBase {
|
|||
),
|
||||
array(
|
||||
array('data' => $this->t('Operations'), 'header' => TRUE),
|
||||
SafeMarkup::checkAdminXss($dblog->link),
|
||||
array('data' => array('#markup' => $dblog->link)),
|
||||
),
|
||||
);
|
||||
$build['dblog_table'] = array(
|
||||
|
|
|
@ -99,6 +99,9 @@ class DbLogFormInjectionTest extends KernelTestBase implements FormInterface {
|
|||
*/
|
||||
public function testLoggerSerialization() {
|
||||
$form_state = new FormState();
|
||||
|
||||
// Forms are only serialized during POST requests.
|
||||
$form_state->setRequestMethod('POST');
|
||||
$form_state->setCached();
|
||||
$form_builder = $this->container->get('form_builder');
|
||||
$form_id = $form_builder->getFormId($this, $form_state);
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\dblog\Tests\Migrate\d6\MigrateDblogConfigsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\dblog\Tests\Migrate\d6;
|
||||
|
||||
use Drupal\config\Tests\SchemaCheckTestTrait;
|
||||
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
|
||||
|
||||
/**
|
||||
* Upgrade variables to dblog.settings.yml.
|
||||
*
|
||||
* @group dblog
|
||||
*/
|
||||
class MigrateDblogConfigsTest extends MigrateDrupal6TestBase {
|
||||
|
||||
use SchemaCheckTestTrait;
|
||||
|
||||
/**
|
||||
* Modules to enable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public static $modules = array('dblog');
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp() {
|
||||
parent::setUp();
|
||||
$this->loadDumps(['Variable.php']);
|
||||
$this->executeMigration('d6_dblog_settings');
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of dblog variables to dblog.settings.yml.
|
||||
*/
|
||||
public function testBookSettings() {
|
||||
$config = $this->config('dblog.settings');
|
||||
$this->assertIdentical(1000, $config->get('row_limit'));
|
||||
$this->assertConfigSchema(\Drupal::service('config.typed'), 'dblog.settings', $config->get());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\dblog\Tests\Migrate\d7\MigrateDblogConfigsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\dblog\Tests\Migrate\d7;
|
||||
|
||||
use Drupal\migrate_drupal\Tests\d7\MigrateDrupal7TestBase;
|
||||
|
||||
/**
|
||||
* Upgrade variables to dblog.settings.yml.
|
||||
*
|
||||
* @group dblog
|
||||
*/
|
||||
class MigrateDblogConfigsTest extends MigrateDrupal7TestBase {
|
||||
|
||||
/**
|
||||
* Modules to enable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public static $modules = ['dblog'];
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp() {
|
||||
parent::setUp();
|
||||
$this->installConfig(static::$modules);
|
||||
$this->loadDumps(['Variable.php']);
|
||||
$this->executeMigration('d7_dblog_settings');
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of dblog variables to dblog.settings.yml.
|
||||
*/
|
||||
public function testDblogSettings() {
|
||||
$config = $this->config('dblog.settings');
|
||||
$this->assertIdentical(1000, $config->get('row_limit'));
|
||||
}
|
||||
|
||||
}
|
|
@ -34,7 +34,7 @@ class ViewsIntegrationTest extends ViewUnitTestBase {
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
public static $modules = array('dblog', 'dblog_test_views');
|
||||
public static $modules = array('dblog', 'dblog_test_views', 'user');
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
|
|
Reference in a new issue