Commit 085a24e0 authored by catch's avatar catch

Issue #2067017 by damiankloip: Remove usage of DRUPAL_CORE_COMPATIBILITY/VERSION constants.

parent fb38555e
......@@ -28,16 +28,6 @@
* Functions that need to be loaded on every Drupal request.
*/
/**
* The current system version.
*/
const VERSION = '8.0-dev';
/**
* Core API compatibility.
*/
const DRUPAL_CORE_COMPATIBILITY = '8.x';
/**
* Minimum supported version of PHP.
*/
......
......@@ -354,7 +354,7 @@ function _drupal_default_html_head() {
);
// Show Drupal and the major version number in the META GENERATOR tag.
// Get the major version.
list($version, ) = explode('.', VERSION);
list($version, ) = explode('.', Drupal::VERSION);
$elements['system_meta_generator'] = array(
'#type' => 'html_tag',
'#tag' => 'meta',
......@@ -4614,7 +4614,7 @@ function drupal_parse_info_file($filename) {
$parser = new Parser();
$info[$filename] = $parser->parse(file_get_contents($filename));
if (isset($info[$filename]['version']) && $info[$filename]['version'] === 'VERSION') {
$info[$filename]['version'] = VERSION;
$info[$filename]['version'] = Drupal::VERSION;
}
}
}
......
......@@ -1689,8 +1689,8 @@ function install_check_localization_server($uri) {
* Associative array containing 'core' and 'version' of the release.
*/
function install_get_localization_release() {
if (strpos(VERSION, 'dev')) {
list($version, ) = explode('-', VERSION);
if (strpos(Drupal::VERSION, 'dev')) {
list($version, ) = explode('-', Drupal::VERSION);
list($major, $minor) = explode('.', $version);
// Calculate the major and minor release numbers to fall back to.
......@@ -1704,7 +1704,7 @@ function install_get_localization_release() {
$release = "$major.$minor";
}
else {
$release = VERSION;
$release = Drupal::VERSION;
}
return array(
......
......@@ -72,7 +72,7 @@ function update_check_incompatibility($name, $type = 'module') {
}
if (!isset($file)
|| !isset($file->info['core'])
|| $file->info['core'] != DRUPAL_CORE_COMPATIBILITY
|| $file->info['core'] != Drupal::CORE_COMPATIBILITY
|| version_compare(phpversion(), $file->info['php']) < 0) {
return TRUE;
}
......
......@@ -76,6 +76,16 @@
*/
class Drupal {
/**
* The current system version.
*/
const VERSION = '8.0-dev';
/**
* Core API compatibility.
*/
const CORE_COMPATIBILITY = '8.x';
/**
* The currently active container object.
*
......
......@@ -464,7 +464,7 @@ public static function parseDependency($dependency) {
// supports. Also, op is optional and defaults to equals.
$p_op = '(?<operation>!=|==|=|<|<=|>|>=|<>)?';
// Core version is always optional: 8.x-2.x and 2.x is treated the same.
$p_core = '(?:' . preg_quote(DRUPAL_CORE_COMPATIBILITY) . '-)?';
$p_core = '(?:' . preg_quote(\Drupal::CORE_COMPATIBILITY) . '-)?';
$p_major = '(?<major>\d+)';
// By setting the minor version to x, branches can be matched.
$p_minor = '(?<minor>(?:\d+|x)(?:-[A-Za-z]+\d+)?)';
......
......@@ -61,7 +61,7 @@ protected function process(array $files, array $files_to_add) {
// If the module or theme is incompatible with Drupal core, remove it
// from the array for the current search directory, so it is not
// overwritten when merged with the $files array.
if (isset($info['core']) && $info['core'] != DRUPAL_CORE_COMPATIBILITY) {
if (isset($info['core']) && $info['core'] != \Drupal::CORE_COMPATIBILITY) {
unset($files_to_add[$file_key]);
}
}
......
......@@ -626,7 +626,7 @@ function block_language_delete($language) {
function block_library_info() {
$libraries['drupal.block'] = array(
'title' => 'Block',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
drupal_get_path('module', 'block') . '/block.js' => array(),
),
......@@ -637,7 +637,7 @@ function block_library_info() {
);
$libraries['drupal.block.admin'] = array(
'title' => 'Block admin',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
drupal_get_path('module', 'block') . '/js/block.admin.js' => array(),
),
......
......@@ -1281,7 +1281,7 @@ function book_menu_subtree_data($link) {
function book_library_info() {
$libraries['drupal.book'] = array(
'title' => 'Book',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
drupal_get_path('module', 'book') . '/book.js' => array(),
),
......
......@@ -42,7 +42,7 @@ function ckeditor_library_info() {
);
$libraries['drupal.ckeditor'] = array(
'title' => 'Drupal behavior to enable CKEditor on textareas.',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
$module_path . '/js/ckeditor.js' => array(),
array('data' => $settings, 'type' => 'setting'),
......@@ -58,7 +58,7 @@ function ckeditor_library_info() {
);
$libraries['drupal.ckeditor.admin'] = array(
'title' => 'Drupal behavior for drag-and-drop CKEditor toolbar builder UI.',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
$module_path . '/js/ckeditor.admin.js' => array(),
),
......@@ -81,7 +81,7 @@ function ckeditor_library_info() {
);
$libraries['drupal.ckeditor.drupalimage.admin'] = array(
'title' => 'Only show the "drupalimage" plugin settings when its button is enabled.',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
$module_path . '/js/ckeditor.drupalimage.admin.js' => array(),
),
......@@ -95,7 +95,7 @@ function ckeditor_library_info() {
);
$libraries['drupal.ckeditor.stylescombo.admin'] = array(
'title' => 'Only show the "stylescombo" plugin settings when its button is enabled.',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
$module_path . '/js/ckeditor.stylescombo.admin.js' => array(),
),
......
......@@ -740,7 +740,7 @@ function _color_rgb2hsl($rgb) {
function color_library_info() {
$libraries['drupal.color'] = array(
'title' => 'Color',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
drupal_get_path('module', 'color') . '/color.js' => array(),
),
......@@ -754,7 +754,7 @@ function color_library_info() {
);
$libraries['drupal.color.preview'] = array(
'title' => 'Color preview',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
drupal_get_path('module', 'color') . '/preview.js' => array(),
),
......
......@@ -1782,7 +1782,7 @@ function comment_file_download_access($field, EntityInterface $entity, File $fil
function comment_library_info() {
$libraries['drupal.comment'] = array(
'title' => 'Comment',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
drupal_get_path('module', 'comment') . '/comment-node-form.js' => array(),
),
......
......@@ -356,7 +356,7 @@ function content_translation_library_info() {
$path = drupal_get_path('module', 'content_translation');
$libraries['drupal.content_translation.admin'] = array(
'title' => 'Content translation UI',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
$path . '/content_translation.admin.js' => array(),
),
......
......@@ -109,7 +109,7 @@ function contextual_library_info() {
$libraries['drupal.contextual-links'] = array(
'title' => 'Contextual Links',
'website' => 'http://drupal.org/node/473268',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
// Add the JavaScript, with a group and weight such that it will run
// before modules/contextual/js/contextual.toolbar.js.
......@@ -131,7 +131,7 @@ function contextual_library_info() {
);
$libraries['drupal.contextual-toolbar'] = array(
'title' => 'Contextual Links Toolbar Tab',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
// Add the JavaScript, with a group and weight such that it will run
// before modules/overlay/overlay-parent.js.
......
......@@ -79,7 +79,7 @@ function edit_library_info() {
);
$libraries['edit'] = array(
'title' => 'Edit: in-place editing',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
// Core.
$path . '/js/edit.js' => $options,
......@@ -121,7 +121,7 @@ function edit_library_info() {
);
$libraries['edit.editorWidget.form'] = array(
'title' => 'Form in-place editor',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
$path . '/js/editors/formEditor.js' => $options,
),
......@@ -131,7 +131,7 @@ function edit_library_info() {
);
$libraries['edit.editorWidget.direct'] = array(
'title' => 'Direct in-place editor',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
$path . '/js/editors/directEditor.js' => $options,
),
......
......@@ -165,7 +165,7 @@ function testUserWithPermission() {
$this->assertIdentical('settings', $ajax_commands[0]['command'], 'The first AJAX command is a settings command.');
// Second command: insert libraries into DOM.
$this->assertIdentical('insert', $ajax_commands[1]['command'], 'The second AJAX command is an append command.');
$command = new AppendCommand('body', '<script src="' . file_create_url('core/modules/edit/js/editors/formEditor.js') . '?v=' . VERSION . '"></script>' . "\n");
$command = new AppendCommand('body', '<script src="' . file_create_url('core/modules/edit/js/editors/formEditor.js') . '?v=' . \Drupal::VERSION . '"></script>' . "\n");
$this->assertIdentical($command->render(), $ajax_commands[1], 'The append command contains the expected data.');
// Retrieving the form for this field should result in a 200 response,
......
......@@ -71,7 +71,7 @@ function editor_library_info() {
$libraries['drupal.editor.admin'] = array(
'title' => 'Text Editor',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
$path . '/js/editor.admin.js' => array(),
),
......@@ -82,7 +82,7 @@ function editor_library_info() {
);
$libraries['drupal.editor'] = array(
'title' => 'Text Editor',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
$path . '/js/editor.js' => array(),
),
......@@ -99,7 +99,7 @@ function editor_library_info() {
$libraries['drupal.editor.dialog'] = array(
'title' => 'Text Editor Dialog',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
$path . '/js/editor.dialog.js' => array('weight' => 2),
),
......@@ -113,7 +113,7 @@ function editor_library_info() {
$libraries['edit.formattedTextEditor.editor'] = array(
'title' => 'Formatted text editor',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
$path . '/js/editor.formattedTextEditor.js' => array(
'scope' => 'footer',
......
......@@ -349,7 +349,7 @@ function field_ui_form_node_type_form_submit($form, &$form_state) {
function field_ui_library_info() {
$libraries['drupal.field_ui'] = array(
'title' => 'Field UI',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
drupal_get_path('module', 'field_ui') . '/field_ui.js' => array(),
),
......
......@@ -1922,7 +1922,7 @@ function file_get_file_references(File $file, $field = NULL, $age = EntityStorag
function file_library_info() {
$libraries['drupal.file'] = array(
'title' => 'File',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
drupal_get_path('module', 'file') . '/file.js' => array(),
),
......
......@@ -1456,7 +1456,7 @@ function filter_library_info() {
$libraries['drupal.filter.admin'] = array(
'title' => 'Filter',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
$path . '/filter.admin.js' => array(),
),
......@@ -1472,7 +1472,7 @@ function filter_library_info() {
);
$libraries['drupal.filter.filter_html.admin'] = array(
'title' => 'Automatic "Limit allowed HTML tags" filter setting updating.',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
$path . '/filter.filter_html.admin.js' => array(),
),
......@@ -1484,7 +1484,7 @@ function filter_library_info() {
);
$libraries['drupal.filter'] = array(
'title' => 'Filter',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
$path . '/filter.js' => array(),
),
......@@ -1499,7 +1499,7 @@ function filter_library_info() {
);
$libraries['caption'] = array(
'title' => 'Captions for images and alignments',
'version' => VERSION,
'version' => Drupal::VERSION,
'css' => array(
$path . '/css/filter.caption.css',
),
......
......@@ -584,7 +584,7 @@ function language_delete($langcode) {
function language_library_info() {
$libraries['language.admin'] = array(
'title' => 'Language detection admin',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
drupal_get_path('module', 'language') . '/language.admin.js' => array(),
),
......
......@@ -97,7 +97,7 @@ protected function resolveCacheMiss($offset) {
$this->stringStorage->createString(array(
'source' => $offset,
'context' => $this->context,
'version' => VERSION
'version' => \Drupal::VERSION
))->addLocation('path', request_uri())->save();
$value = TRUE;
}
......
......@@ -83,7 +83,7 @@ public function findTranslation(array $conditions) {
if (!empty($values)) {
$string = new TranslationString($values);
$this->checkVersion($string, VERSION);
$this->checkVersion($string, \Drupal::VERSION);
$string->setStorage($this);
return $string;
}
......@@ -156,7 +156,7 @@ protected function updateLocation($string) {
// This is a new location to add, take care not to duplicate.
$this->connection->merge('locales_location', $this->options)
->key(array('sid' => $string->getId(), 'type' => $type, 'name' => $name))
->fields(array('version' => VERSION))
->fields(array('version' => \Drupal::VERSION))
->execute();
$created = TRUE;
}
......@@ -165,7 +165,7 @@ protected function updateLocation($string) {
}
if ($created) {
// As we've set a new location, check string version too.
$this->checkVersion($string, VERSION);
$this->checkVersion($string, \Drupal::VERSION);
}
}
}
......
......@@ -73,7 +73,7 @@ function testStringCRUDAPI() {
// Check version handling and updating.
$this->assertEqual($source->version, 'none', 'String originally created without version.');
$string = $this->storage->findTranslation(array('lid' => $source->lid));
$this->assertEqual($string->version, VERSION, 'Checked and updated string version to Drupal version.');
$this->assertEqual($string->version, \Drupal::VERSION, 'Checked and updated string version to Drupal version.');
// Create translation and find it by lid and source.
$langcode = 'es';
......
......@@ -92,7 +92,7 @@ function locale_translation_build_projects() {
// For every project store information.
$data += array(
'version' => isset($data['info']['version']) ? $data['info']['version'] : '',
'core' => isset($data['info']['core']) ? $data['info']['core'] : DRUPAL_CORE_COMPATIBILITY,
'core' => isset($data['info']['core']) ? $data['info']['core'] : Drupal::CORE_COMPATIBILITY,
// A project can provide the path and filename pattern to download the
// gettext file. Use the default if not.
'server_pattern' => isset($data['info']['interface translation server pattern']) && $data['info']['interface translation server pattern'] ? $data['info']['interface translation server pattern'] : $default_server['pattern'],
......
......@@ -652,7 +652,7 @@ function locale_js_alter(&$javascript) {
function locale_library_info() {
$libraries['drupal.locale.admin'] = array(
'title' => 'Locale',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
drupal_get_path('module', 'locale') . '/locale.admin.js' => array(),
),
......@@ -664,7 +664,7 @@ function locale_library_info() {
);
$libraries['drupal.locale.datepicker'] = array(
'title' => 'Locale Datepicker UI',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
drupal_get_path('module', 'locale') . '/locale.datepicker.js' => array(),
),
......
......@@ -711,7 +711,7 @@ function menu_preprocess_block(&$variables) {
function menu_library_info() {
$libraries['drupal.menu'] = array(
'title' => 'Menu',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
drupal_get_path('module', 'menu') . '/menu.js' => array(),
),
......@@ -723,7 +723,7 @@ function menu_library_info() {
);
$libraries['drupal.menu.admin'] = array(
'title' => 'Menu admin',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
drupal_get_path('module', 'menu') . '/menu.admin.js' => array(),
),
......
......@@ -2505,7 +2505,7 @@ function node_language_delete($language) {
function node_library_info() {
$libraries['drupal.node'] = array(
'title' => 'Node',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
drupal_get_path('module', 'node') . '/node.js' => array(),
),
......@@ -2518,7 +2518,7 @@ function node_library_info() {
);
$libraries['drupal.node.preview'] = array(
'title' => 'Node preview',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
drupal_get_path('module', 'node') . '/node.preview.js' => array(),
),
......@@ -2529,7 +2529,7 @@ function node_library_info() {
);
$libraries['drupal.content_types'] = array(
'title' => 'Content types',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
drupal_get_path('module', 'node') . '/content_types.js' => array(),
),
......
......@@ -288,7 +288,7 @@ function path_entity_predelete(EntityInterface $entity) {
function path_library_info() {
$libraries['drupal.path'] = array(
'title' => 'Path',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
drupal_get_path('module', 'path') . '/path.js' => array(),
),
......
......@@ -87,7 +87,7 @@ function picture_library_info() {
$libraries['picturefill'] = array(
'title' => t('Picturefill'),
'website' => 'http://drupal.org/node/1775530',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
drupal_get_path('module', 'picture') . '/picturefill/picturefill.js' => array('type' => 'file', 'weight' => -10, 'group' => JS_DEFAULT),
),
......
......@@ -564,7 +564,7 @@ function shortcut_library_info() {
$path = drupal_get_path('module', 'shortcut');
$libraries['drupal.shortcut.admin'] = array(
'title' => 'Shortcut configuration',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
$path . '/shortcut.admin.js' => array(),
),
......@@ -575,7 +575,7 @@ function shortcut_library_info() {
);
$libraries['drupal.shortcut'] = array(
'title' => 'Shortcut UI',
'version' => VERSION,
'version' => Drupal::VERSION,
'css' => array(
$path . '/css/shortcut.module.css' => array(),
$path . '/css/shortcut.theme.css' => array(),
......
......@@ -686,7 +686,7 @@ function simpletest_mail_alter(&$message) {
function simpletest_library_info() {
$libraries['drupal.simpletest'] = array(
'title' => 'Simpletest',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
drupal_get_path('module', 'simpletest') . '/simpletest.js' => array(),
),
......
......@@ -251,7 +251,7 @@ function statistics_preprocess_block(&$variables) {
function statistics_library_info() {
$libraries['drupal.statistics'] = array(
'title' => 'Statistics',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
drupal_get_path('module', 'statistics') . '/statistics.js' => array(
'scope' => 'footer'
......
......@@ -222,10 +222,10 @@ protected function buildRow(array $modules, $module, $distribution) {
$status = '';
// Check the core compatibility.
if ($module->info['core'] != DRUPAL_CORE_COMPATIBILITY) {
if ($module->info['core'] != \Drupal::CORE_COMPATIBILITY) {
$compatible = FALSE;
$status .= $this->t('This version is not compatible with Drupal !core_version and should be replaced.', array(
'!core_version' => DRUPAL_CORE_COMPATIBILITY,
'!core_version' => \Drupal::CORE_COMPATIBILITY,
));
}
......@@ -259,7 +259,7 @@ protected function buildRow(array $modules, $module, $distribution) {
$name = $modules[$dependency]->info['name'];
// Disable the module's checkbox if it is incompatible with the
// dependency's version.
if ($incompatible_version = drupal_check_incompatibility($version, str_replace(DRUPAL_CORE_COMPATIBILITY . '-', '', $modules[$dependency]->info['version']))) {
if ($incompatible_version = drupal_check_incompatibility($version, str_replace(\Drupal::CORE_COMPATIBILITY . '-', '', $modules[$dependency]->info['version']))) {
$row['#requires'][$dependency] = $this->t('@module (<span class="admin-missing">incompatible with</span> version @version)', array(
'@module' => $name . $incompatible_version,
'@version' => $modules[$dependency]->info['version'],
......@@ -268,7 +268,7 @@ protected function buildRow(array $modules, $module, $distribution) {
}
// Disable the checkbox if the dependency is incompatible with this
// version of Drupal core.
elseif ($modules[$dependency]->info['core'] != DRUPAL_CORE_COMPATIBILITY) {
elseif ($modules[$dependency]->info['core'] != \Drupal::CORE_COMPATIBILITY) {
$row['#requires'][$dependency] = $this->t('@module (<span class="admin-missing">incompatible with</span> this version of Drupal core)', array(
'@module' => $name,
));
......
......@@ -27,7 +27,7 @@ public static function getInfo() {
function testParseInfoFile() {
$info_values = drupal_parse_info_file(drupal_get_path('module', 'system') . '/tests/common_test_info.txt');
$this->assertEqual($info_values['simple_string'], 'A simple string', 'Simple string value was parsed correctly.', 'System');
$this->assertEqual($info_values['version'], VERSION, 'Constant value was parsed correctly.', 'System');
$this->assertEqual($info_values['version'], \Drupal::VERSION, 'Constant value was parsed correctly.', 'System');
$this->assertEqual($info_values['double_colon'], 'dummyClassName::', 'Value containing double-colon was parsed correctly.', 'System');
}
}
......@@ -25,7 +25,7 @@ public static function getInfo() {
* Verify that the meta tag HTML is generated correctly.
*/
public function testMetaTag() {
list($version, ) = explode('.', VERSION);
list($version, ) = explode('.', \Drupal::VERSION);
$string = '<meta name="Generator" content="Drupal ' . $version . ' (http://drupal.org)" />';
$this->drupalGet('node');
$this->assertRaw($string, 'Fingerprinting meta tag generated correctly.', 'System');
......
......@@ -55,7 +55,7 @@ function system_themes_page() {
// Ensure this theme is compatible with this version of core.
// Require the 'content' region to make sure the main page
// content has a common place in all themes.
$theme->incompatible_core = !isset($theme->info['core']) || ($theme->info['core'] != DRUPAL_CORE_COMPATIBILITY) || (!isset($theme->info['regions']['content']));
$theme->incompatible_core = !isset($theme->info['core']) || ($theme->info['core'] != Drupal::CORE_COMPATIBILITY) || (!isset($theme->info['regions']['content']));
$theme->incompatible_php = version_compare(phpversion(), $theme->info['php']) < 0;
// Confirmed that the base theme is available.
$theme->incompatible_base = (isset($theme->info['base theme']) && !isset($themes[$theme->info['base theme']]));
......@@ -714,7 +714,7 @@ function theme_system_themes_page($variables) {
// Make sure to provide feedback on compatibility.
if (!empty($theme->incompatible_core)) {
$output .= '<div class="incompatible">' . t('This version is not compatible with Drupal !core_version and should be replaced.', array('!core_version' => DRUPAL_CORE_COMPATIBILITY)) . '</div>';
$output .= '<div class="incompatible">' . t('This version is not compatible with Drupal !core_version and should be replaced.', array('!core_version' => Drupal::CORE_COMPATIBILITY)) . '</div>';
}
elseif (!empty($theme->incompatible_php)) {
if (substr_count($theme->info['php'], '.') < 2) {
......
......@@ -2277,7 +2277,7 @@ function hook_requirements($phase) {
if ($phase == 'runtime') {
$requirements['drupal'] = array(
'title' => t('Drupal'),
'value' => VERSION,
'value' => Drupal::VERSION,
'severity' => REQUIREMENT_INFO
);
}
......
......@@ -22,7 +22,7 @@ function system_requirements($phase) {
if ($phase == 'runtime') {
$requirements['drupal'] = array(
'title' => t('Drupal'),
'value' => VERSION,
'value' => Drupal::VERSION,
'severity' => REQUIREMENT_INFO,
'weight' => -10,
);
......@@ -476,7 +476,7 @@ function system_requirements($phase) {
// Check for an incompatible version.
$required_file = $files[$required_module];
$required_name = $required_file->info['name'];
$version = str_replace(DRUPAL_CORE_COMPATIBILITY . '-', '', $required_file->info['version']);
$version = str_replace(Drupal::CORE_COMPATIBILITY . '-', '', $required_file->info['version']);
$compatibility = drupal_check_incompatibility($requirement, $version);
if ($compatibility) {
$compatibility = rtrim(substr($compatibility, 2), ')');
......
......@@ -950,7 +950,7 @@ function system_library_info() {
// Drupal-specific JavaScript.
$libraries['drupal'] = array(
'title' => 'Drupal',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
'core/misc/drupal.js' => array('group' => JS_LIBRARY, 'weight' => -18),
),
......@@ -962,7 +962,7 @@ function system_library_info() {
// Drupal settings.
$libraries['drupalSettings'] = array(
'title' => 'Drupal Settings',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
array('type' => 'setting', 'data' => array()),
),
......@@ -972,7 +972,7 @@ function system_library_info() {
$libraries['drupal.ajax'] = array(
'title' => 'Drupal AJAX',
'website' => 'http://api.drupal.org/api/group/ajax/8',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
'core/misc/ajax.js' => array('group' => JS_LIBRARY, 'weight' => 2),
),
......@@ -988,7 +988,7 @@ function system_library_info() {
// Drupal's Screen Reader change announcement utility.
$libraries['drupal.announce'] = array(
'title' => 'Drupal announce',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
'core/misc/announce.js' => array('group' => JS_LIBRARY),
),
......@@ -1001,7 +1001,7 @@ function system_library_info() {
// Drupal's batch API.
$libraries['drupal.batch'] = array(
'title' => 'Drupal batch API',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
'core/misc/batch.js' => array('group' => JS_DEFAULT, 'cache' => FALSE),
),
......@@ -1018,7 +1018,7 @@ function system_library_info() {
// Drupal's progress indicator.
$libraries['drupal.progress'] = array(
'title' => 'Drupal progress indicator',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
'core/misc/progress.js' => array('group' => JS_DEFAULT),
),
......@@ -1032,7 +1032,7 @@ function system_library_info() {
// Drupal's form library.
$libraries['drupal.form'] = array(
'title' => 'Drupal form library',
'version' => VERSION,
'version' => Drupal::VERSION,
'js' => array(
'core/misc/form.js' => array('group' => JS_LIBRARY, 'weight' => 1),
),
......@@ -1047,7 +1047,7 @@ function system_library_info() {
// Drupal's dialog component.