Commit fdca37f8 authored by webchick's avatar webchick

Issue #2160117 by sun: Remove/convert remaining calls to variable_get/_set/_del().

parent 7f7c379c
......@@ -323,7 +323,7 @@ function update_prepare_d8_bootstrap() {
// Required to run before drupal_install_config_directories(), since that
// triggers a call into system_stream_wrappers(), which calls t(), which
// calls into language_default().
$language_default = variable_get('language_default');
$language_default = update_variable_get('language_default');
if (!empty($language_default) && (isset($language_default->id) || isset($language_default->language))) {
if (!isset($language_default->id)) {
$language_default->id = $language_default->language;
......@@ -332,7 +332,7 @@ function update_prepare_d8_bootstrap() {
// In D8, the 'language_default' is not anymore an object, but an array,
// so make sure that the new value that is saved into this variable is an
// array.
variable_set('language_default', (array) $language_default);
update_variable_set('language_default', (array) $language_default);
}
$module_config = \Drupal::config('system.module');
......@@ -570,7 +570,7 @@ function update_prepare_d8_language() {
}
// Update the 'language_default' system variable with the langcode change.
$language_default = variable_get('language_default');
$language_default = update_variable_get('language_default');
if (!empty($language_default)) {
if (isset($language_default->language)) {
$language_default->id = $language_default->language;
......@@ -582,7 +582,7 @@ function update_prepare_d8_language() {
// array.
$language_default = (array) $language_default;
$language_default['langcode'] = 'en';
variable_set('language_default', $language_default);
update_variable_set('language_default', $language_default);
}
// Convert languages to config entities.
......
......@@ -458,7 +458,6 @@ function node_uninstall() {
// Delete remaining general module variables.
\Drupal::state()->delete('node.node_access_needs_rebuild');
variable_del('node_recent_block_count');
// Delete any stored state.
\Drupal::state()->delete('node.cron_last');
......
......@@ -282,10 +282,6 @@ protected function doArticleRdfaTests() {
* displayed in teaser view, so it is tested in the front page tests.
*/
protected function doPageRdfaTests() {
// The standard profile hides the created date on pages. Revert display to
// true for testing.
variable_set('node_submitted_page', TRUE);
// Feed the HTML into the parser.
$uri_info = $this->page->uri();
$path = $uri_info['path'];
......
......@@ -27,6 +27,6 @@ public static function getInfo() {
function setUp() {
parent::setUp();
variable_set('file_default_scheme', 'dummy-remote');
\Drupal::config('system.file')->set('default_scheme', 'dummy-remote')->save();
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment