View source
<?php
define('UPGRADE_STATUS_CORE_VERSION', '8.x');
define('UPGRADE_STATUS_DEVELOPMENT', 1000);
define('UPGRADE_STATUS_STABLE', 5);
define('UPGRADE_STATUS_CORE', 5000);
define('UPGRADE_STATUS_OBSOLETE', 3000);
function upgrade_status_help($path, $arg) {
switch ($path) {
case 'admin/help#module':
$file = drupal_get_path('module', 'upgrade_status') . '/README.txt';
if (file_exists($file)) {
return _filter_autop(file_get_contents($file));
}
break;
}
}
function upgrade_status_menu() {
$items['admin/reports/updates/upgrade'] = array(
'title' => 'Upgrade status',
'page callback' => 'upgrade_status_status',
'access arguments' => array(
'administer site configuration',
),
'type' => MENU_LOCAL_TASK,
'weight' => 10,
'file' => 'upgrade_status.report.inc',
);
$items['admin/reports/updates/upgrade/check'] = array(
'page callback' => 'upgrade_status_manual_status',
'access arguments' => array(
'administer site configuration',
),
'type' => MENU_CALLBACK,
'file' => 'upgrade_status.fetch.inc',
);
return $items;
}
function upgrade_status_theme() {
return array(
'upgrade_status_last_check' => array(
'variables' => array(
'last' => NULL,
),
),
'upgrade_status_report' => array(
'variables' => array(
'data' => NULL,
),
'file' => 'upgrade_status.report.inc',
),
'upgrade_status_status_label' => array(
'variables' => array(
'status' => NULL,
'project' => NULL,
),
),
);
}
function upgrade_status_get_available($refresh = FALSE) {
module_load_include('inc', 'upgrade_status', 'upgrade_status.compare');
$needs_refresh = FALSE;
$available = _upgrade_status_get_cached_available_releases();
$num_avail = count($available);
$projects = update_get_projects();
foreach ($projects as $key => $project) {
if (empty($available[$key])) {
upgrade_status_create_fetch_task($project);
$needs_refresh = TRUE;
continue;
}
if ($project['info']['_info_file_ctime'] > $available[$key]['last_fetch']) {
$available[$key]['fetch_status'] = UPDATE_FETCH_PENDING;
}
if (empty($available[$key]['releases'])) {
$available[$key]['fetch_status'] = UPDATE_FETCH_PENDING;
}
if (!empty($available[$key]['fetch_status']) && $available[$key]['fetch_status'] == UPDATE_FETCH_PENDING) {
upgrade_status_create_fetch_task($project);
$needs_refresh = TRUE;
}
}
if ($needs_refresh && $refresh) {
upgrade_status_fetch_data();
$available = _upgrade_status_get_cached_available_releases();
}
return $available;
}
function upgrade_status_create_fetch_task($project) {
module_load_include('inc', 'upgrade_status', 'upgrade_status.fetch');
return _upgrade_status_create_fetch_task($project);
}
function upgrade_status_refresh() {
module_load_include('inc', 'upgrade_status', 'upgrade_status.fetch');
return _upgrade_status_refresh();
}
function upgrade_status_fetch_data() {
module_load_include('inc', 'upgrade_status', 'upgrade_status.fetch');
return _upgrade_status_fetch_data();
}
function _upgrade_status_get_cached_available_releases() {
$data = array();
$cache_items = _update_get_cache_multiple('upgrade_status_available_releases');
foreach ($cache_items as $cid => $cache) {
$cache->data['last_fetch'] = $cache->created;
if ($cache->expire < REQUEST_TIME) {
$cache->data['fetch_status'] = UPDATE_FETCH_PENDING;
}
$parts = explode('::', $cid, 2);
$data[$parts[1]] = $cache->data;
}
return $data;
}
function theme_upgrade_status_last_check($variables) {
$last = $variables['last'];
$output = '<div class="update checked">';
$output .= $last ? t('Last checked: @time ago', array(
'@time' => format_interval(REQUEST_TIME - $last),
)) : t('Last checked: never');
$output .= ' <span class="check-manually">(' . l(t('Check manually'), 'admin/reports/updates/upgrade/check', array(
'query' => drupal_get_destination(),
)) . ')</span>';
$output .= "</div>\n";
return $output;
}
function upgrade_status_moved_into_core(&$projects, $project) {
$core_version = variable_get('upgrade_status_core_version', UPGRADE_STATUS_CORE_VERSION);
switch ($core_version) {
case '7.x':
$core = _upgrade_status_d7_core($projects, $project);
break;
case '8.x':
$d7_core = _upgrade_status_d7_core($projects, $project);
$d8_core = _upgrade_status_d8_core($projects, $project);
$core = $d7_core || $d8_core;
break;
}
return $core;
}
function _upgrade_status_d8_core(&$projects, $project) {
$core = TRUE;
switch ($project) {
case 'admin_language':
case 'entity_translation':
case 'fallback_language_negotiation':
case 'i18n':
case 'i18nviews':
case 'l10n_install':
case 'l10n_update':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_note'] = t('Replaced by core localization functionality, the core Language module, and the core Configuration, Content, and Interface Translation modules.');
break;
case 'admin_views':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_note'] = t('Integrated with the core Views module. No comment admin view in 8.0.x.');
break;
case 'bean':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_note'] = t('Replaced by the core Custom Block module.');
break;
case 'breakpoint':
case 'breakpoints':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'cachetags':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_note'] = t('Replaced by core APIs.');
break;
case 'caption_filter':
case 'float_filter':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_note'] = t('Replaced by functionality in the core Editor module.');
break;
case 'ckeditor':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'ctools':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_note'] = t('Mostly replaced by core APIs, including modal dialogs, exportables, and plugins. Excludes <a href="@url">Page Manager</a> and Form Wizard.', array(
'@url' => 'https://www.drupal.org/project/page_manager',
));
break;
case 'date':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_note'] = t('No recurring dates support. See <a href="@extras">Datetime Extras: Provide a field for repeating / recuring dates</a> and <a href="@field">Recurring Dates Field</a>', array(
'@extras' => 'https://www.drupal.org/project/datetime_extras/issues/2775249',
'@field' => 'https://www.drupal.org/project/date_recur',
));
break;
case 'date_popup_authored':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'edit':
case 'quickedit':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'email':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_note'] = t('E-mail address contact forms are not supported by core.');
break;
case 'entityreference':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'entity':
case 'entity_view_mode':
case 'file_entity':
case 'title':
case 'user_picture_field':
case 'uuid':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_note'] = t('Replaced by core Entity system functionality.');
break;
case 'features':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_note'] = t('The original intended functionality of the Features module is not provided by core, but the core Configuration system provides support for importing, exporting, and overriding site configuration.');
break;
case 'field_extrawidgets':
case 'hidden_field':
case 'field_hidden':
case 'hidden_widget':
case 'formfilter':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_note'] = t('Fields can be hidden natively from the Form Display configuration. To make fields read-only, use the <a href="@url">Read-only Field Widget</a> module.', array(
'@url' => 'https://www.drupal.org/project/readonly_field_widget',
));
break;
case 'field_formatter_settings':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'fieldable_panels_panes':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_note'] = t('Custom block types provide all of the functionality that is necessary.');
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'link':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_note'] = t('No support for internal links.');
break;
case 'migrate':
case 'migrate_d2d':
case 'migrate_drupal':
$projects[$project]['in_core_since'] = '8.x';
break;
case 'module_filter':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_note'] = t('A search functionality is included on the core modules page. The re-designed modules page in the 2.x branch is not in core.');
break;
case 'navbar':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_note'] = t('Replaced by the updated core Toolbar module.');
break;
case 'options_element':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_note'] = t('Taxonomy Term Reference fields have much better usability with fewer drawbacks.');
break;
case 'panels':
case 'panelizer':
$projects[$project]['in_core_since'] = '8.5';
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_note'] = t('Use the <a href="@url">Layout Builder</a> module.', array(
'@url' => 'https://www.drupal.org/node/2924128',
));
break;
case 'phone':
case 'telephone':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'picture':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_note'] = t('Replaced by the core Responsive Image module.');
break;
case 'elements':
case 'placeholder':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_note'] = t('Replaced by HTML5 form API functionality.');
break;
case 'references':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'restws':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_note'] = t('Replaced by the core REST module.');
break;
case 'schemaorg':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_note'] = t('The default RDF mappings of Drupal core have been updated to include schema.org in Drupal 8. Also, a lot of the backend code of this module was ported into Drupal 8 core. The user interface that allows one to set the mappings now lives in the <a href="@url">RDF UI</a> module.', array(
'@url' => 'https://www.drupal.org/project/rdfui',
));
break;
case 'services':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_note'] = t('The core REST module provides most of the functionality from previous versions of the Services module.');
break;
case 'stringoverrides':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_note'] = t('The core Interface Translation module allows custom translations to be provided for strings in any language, including English.');
break;
case 'transliteration':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_note'] = t('Replaced by core APIs. No direct support for transliterating path aliases or file names.');
break;
case 'variable':
case 'defaultconfig':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_note'] = t('Replaced by the core Configuration system.');
break;
case 'views':
case 'extra_columns':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'views_bulk_operations':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_note'] = t('The core Views module provides bulk operations on simple actions only. No support for batch operations or configurable actions.');
break;
case 'views_datasource':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_note'] = t('The basic functionality is in core, but some advanced features (such as outputting a Views attachment as JSON) are not.');
break;
case 'views_between_dates_filter':
$projects[$project]['in_core_since'] = '8.6';
$projects[$project]['in_core_note'] = t('While <a href="@change_record">Views integration for the Datetime Range module</a> is now in core, <a href="@granularity">Views Date Filter Datetime Granularity Option</a> is still missing, but will hopefully land in core soon.', array(
'@change_record' => 'https://www.drupal.org/node/2857691',
'@granularity' => 'https://www.drupal.org/project/drupal/issues/2868014',
));
break;
case 'views_filters_populate':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_note'] = t('When adding a filter, select Combine Fields Filter from the Global category.');
break;
case 'views_responsive_grid':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_note'] = t('This module will not be ported for Drupal 8. Views grids in core have been replaced with DIVs.');
break;
case 'wysiwyg':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_note'] = t('API support added to the core "Editor" module. No support for multiple text editors per text format.');
break;
case 'cck':
$projects[$project]['in_core_note'] = '';
$projects[$project]['in_core_complete'] = TRUE;
break;
default:
$core = FALSE;
}
return $core;
}
function _upgrade_status_d7_core(&$projects, $project) {
$core = TRUE;
switch ($project) {
case 'ahah_helper':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_note'] = t('Allows Drupal modules to implement AHAH/AJAX functionality without touching JavaScript. Entirely covered by the new AJAX framework in Drupal 7, which is based on <a href="@ctools-url">CTools</a>.', array(
'@ctools-url' => 'http://drupal.org/project/ctools',
));
break;
case 'autoload':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_note'] = t('Allows Drupal modules to lazy-load any class that has not been loaded yet. A major performance improvement in Drupal 7, and the only part of the <a href="@issue-url">Registry</a> that was introduced earlier, but later removed from Drupal 7.', array(
'@issue-url' => 'http://drupal.org/node/221964',
));
break;
case 'auto_menutitle':
case 'automaticmenu':
case 'automenu':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_note'] = t('When creating new content, Drupal 7 automatically takes over the title of the content as menu link title, while still allowing you to alter it.');
break;
case 'admin_hover':
case 'block_edit':
case 'contextual':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_note'] = t('The new <a href="@issue-url">Contextual links</a> module in Drupal 7 allows you to manage page elements from the page you are looking at, i.e., you have direct access to "Edit" and "Delete" pages for content, or "Configure" pages for blocks, "List links" for menu blocks, etc. Every module can integrate with Contextual module.', array(
'@issue-url' => 'http://drupal.org/node/473268',
));
break;
case 'adminrole':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_note'] = t('The <a href="@issue-url">administration role</a> is based on regular Drupal user roles and every user role can be configured to be the administration role. All new permissions (and only new) are automatically granted to the configured administration role. Permissions can still be removed from the role.', array(
'@issue-url' => 'http://drupal.org/node/480660',
));
break;
case 'advuser':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'block_node_visibility':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'blocks404':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'button_style':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'canonical_url':
case 'shortlink':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'cck':
case 'content':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_note'] = t('You still need <a href="@cck-url">CCK</a> for the Nodereference and Userreference field types, and to upgrade your fields to Drupal 7. There is an overall CCK to field <a href="@upgrade-issue-url">upgrade path discussion</a>. Contributed modules may use <a href="@field-convert-url">Field converter</a> as dependency to properly upgrade their non-field data to fields. Custom programmed field type modules, which may be obsolete now, might be easier to upgrade using <a href="@migrate-url">Migrate</a> module.', array(
'@upgrade-issue-url' => 'http://drupal.org/node/366364',
'@cck-url' => 'http://drupal.org/project/cck',
'@field-convert-url' => 'http://drupal.org/project/field_convert',
'@migrate-url' => 'http://drupal.org/project/migrate',
));
break;
case 'checkbox_validate':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'comment_display':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'config_perms':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'content_dependency':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_note'] = t('Use the Relationship feature in Views.');
break;
case 'content_taxonomy':
case 'field_taxonomy':
case 'term_fields':
case 'taxidermy':
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_since'] = '7.x';
break;
case 'date_timezone':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'dbtng':
case 'transaction':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_note'] = t('Drupal 7 implements an entirely new <a href="@issue-url">database layer</a>, which allows Drupal to work with any database. Modules are able to alter most database queries and there is support for transactions.', array(
'@issue-url' => 'http://drupal.org/node/225450',
));
break;
case 'dragndrop_upload':
$projects[$project]['in_core_since'] = 'TBD';
$projects[$project]['in_core_note'] = t('In development for addition to Drupal core. See <a href="@issue-url">File Field design update</a> for details. In the meantime, <a href="@contrib1">Plupload integration</a> and/or <a href="@contrib2">PlUPload File Widget</a> can be used.', array(
'@issue-url' => 'https://www.drupal.org/node/2113931',
'@contrib1' => 'https://www.drupal.org/project/plupload',
'@contrib2' => 'https://www.drupal.org/project/plupload_widget',
));
break;
case 'edit_term':
case 'taxonomy_intro':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'elements':
case 'element_themehook':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_note'] = t('In Drupal 7, almost all content is generated as "renderable array", which allows to consider any element on a page as atomic, alterable, and themeable element that can be still be altered until it is rendered into a string.');
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'hook_file':
case 'storage_api':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_note'] = t('Drupal 7 natively uses PHP 5 stream wrappers, which allow to store and access files in almost any location, even remotely. There is also a clean separation between the public and private filesystem, and both can be used at the same time.');
break;
case 'filefield':
case 'upload':
case 'upload_element':
case 'upload_preview':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_note'] = t('<a href="@issue-url">Upload</a> module has been replaced with File field.', array(
'@issue-url' => 'http://drupal.org/node/563000',
));
break;
case 'filter_default':
case 'input_format_permissions':
case 'user_default_filter':
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_since'] = '7.x';
break;
case 'ife':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_note'] = t('See <a href="@url">the documentation</a>.', array(
'@url' => 'https://www.drupal.org/docs/8/core/modules/inline-form-errors/inline-form-errors-module-overview',
));
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'image':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_note'] = t('The most common use-case of <a href="@image-url">Image</a> module, an image field type, is contained in Drupal core. The Image project is required to <a href="@upgrade-issue-url">upgrade</a> existing data, and its main image module has been renamed to image_node module, since Drupal core took over the namespace. Image Node module is required for use-cases like restricting access, direct image access through a URL, attached data like comments, votes, or geo coordinates.', array(
'@image-url' => 'http://drupal.org/project/image',
'@upgrade-issue-url' => 'http://drupal.org/node/513096',
));
break;
case 'imageapi':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_note'] = t('The <a href="@imageapi-url">ImageAPI</a> module for Drupal 7 only provides the ImageMagick toolkit and an unsharpen mask action. Everything else has been moved into Drupal core.', array(
'@imageapi-url' => 'http://drupal.org/project/imageapi',
));
break;
case 'imagecache':
case 'imagefield':
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_since'] = '7.x';
break;
case 'jq':
case 'jqp':
case 'plugins':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_note'] = t('Drupal 7 allows modules to register custom libraries, consisting of JavaScript and CSS files, which can then be loaded at once. External libraries, i.e., code that is not shipped with a module, is not supported by Drupal core and requires the <a href="@libraries-url">Libraries API</a> module.', array(
'@libraries-url' => 'http://drupal.org/project/libraries',
));
break;
case 'jquery_cookie':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'jquery_form_update':
case 'jsalter':
case 'wysiwygcck':
case 'tinymce_ahah':
case 'tinymce_dragdrop':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'jquery_ui':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_note'] = t('Advanced jQuery UI features (like Theme Roller support) are not in Drupal core.');
break;
case 'jquery_update':
case 'jqmulti':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_note'] = t('No longer needed in Drupal 8, which ships with the latest version of the library. The plan is to continue increasing the shipped version, with backwards compatibility, in minor releases.');
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'login_security':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_note'] = t('Drupal core provides no UI. If required, the internal variables may be configured using the <a href="@flood-control-url">Flood control</a> module.', array(
'@flood-control-url' => 'http://drupal.org/project/flood_control',
));
break;
case 'media':
$projects[$project]['in_core_since'] = '8.4';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'menuless_nodetype':
case 'ctm':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'multiupload_filefield_widget':
$projects[$project]['in_core_since'] = '8.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'nodepreview_by_type':
case 'preview':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'permissions_api':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'phpass':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_note'] = t('All stored user passwords will be additionally salted');
break;
case 'plugin_manager':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'poormanscron':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'protect_critical_users':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'drupal_queue':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'rdf':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'seven':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'simplecdn':
case 'abssrc':
case 'parallel':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_note'] = t('The new File API and handling of JavaScript and CSS in Drupal 7 allows modules to alter the URLs of all files. Everyone is encouraged to switch to the joined community effort, the <a href="@cdn-url">CDN</a> project.', array(
'@cdn-url' => 'http://drupal.org/project/cdn',
));
break;
case 'simpletest':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'tar':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'taxonomy_delegate':
case 'vocabperms':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'token':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_note'] = t('Drupal core does not provide a user interface to browse tokens (in forms).');
break;
case 'url_alter':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'user_cancellation':
case 'user_delete':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'vertical_tabs':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'view_unpublished':
$projects[$project]['in_core_since'] = '7.x';
$projects[$project]['in_core_complete'] = TRUE;
break;
case 'workflow':
case 'revisioning':
case 'workbench_files':
case 'workbench_media':
case 'workbench_moderation':
$projects[$project]['in_core_since'] = '8.5';
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_note'] = t('See the <a href="@url">Content Moderation documentation</a>.', array(
'@url' => 'https://www.drupal.org/docs/8/core/modules/content-moderation/overview',
));
break;
case 'workspace':
$projects[$project]['in_core_since'] = '8.6';
$projects[$project]['in_core_note'] = t('Renamed to <a href="@workspaces">Workspaces</a>.', array(
'@workspaces' => 'https://www.drupal.org/node/2968491',
));
break;
case 'wysiwyg_filter':
$projects[$project]['in_core_since'] = '8.0';
$projects[$project]['in_core_complete'] = TRUE;
$projects[$project]['in_core_note'] = t('See the <a href="@url">Text Editor documentation</a>.', array(
'@url' => 'https://www.drupal.org/docs/8/core/modules/editor/overview',
));
break;
default:
$core = FALSE;
}
return $core;
}
function upgrade_status_core_version_form($form, &$form_state) {
$form['upgrade_status_core_version'] = array(
'#type' => 'select',
'#title' => t('Target version of Drupal core'),
'#options' => drupal_map_assoc(array(
'7.x',
'8.x',
)),
'#default_value' => variable_get('upgrade_status_core_version', UPGRADE_STATUS_CORE_VERSION),
'#description' => t('Select the version of Drupal core you wish to check for project status.'),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Change'),
);
return $form;
}
function upgrade_status_core_version_form_submit($form, &$form_state) {
if ($form_state['values']['upgrade_status_core_version'] != UPGRADE_STATUS_CORE_VERSION) {
variable_set('upgrade_status_core_version', $form_state['values']['upgrade_status_core_version']);
upgrade_status_refresh();
}
else {
if (variable_get('upgrade_status_core_version', UPGRADE_STATUS_CORE_VERSION) != UPGRADE_STATUS_CORE_VERSION) {
variable_del('upgrade_status_core_version');
upgrade_status_refresh();
}
else {
variable_del('upgrade_status_core_version');
}
}
drupal_set_message(t('The configuration options have been saved.'));
}