summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxjm2017-10-31 14:43:35 -0500
committerxjm2017-10-31 14:43:35 -0500
commit8d2a2ec23022f4f950af05ba9aef22f6c782906e (patch)
treeb494f0d1c6474195dbe4d66eeef91123e6473f81
parentb4291de299f6f3a8121ff36fb03ec41945f96e24 (diff)
Issue #2545520 by sdstyles, BarisW, David_Rothstein, owenpm3, mgifford, xjm, rovo, xlin, lukas.fischer, Anicky, tar_inet, a11y.matters, hussainweb, benjifisher, NikitaJain, steverossnyc, shwetaneelsharma, mradcliffe, rosschive, jhodgdon, yoroy, drnikki, YesCT, Gábor Hojtsy, edorsini: The same link "available updates" links to two different pages in the same paragraph when there is a problem checking available updates
-rw-r--r--core/modules/update/update.install19
1 files changed, 11 insertions, 8 deletions
diff --git a/core/modules/update/update.install b/core/modules/update/update.install
index c616412..4cff44c 100644
--- a/core/modules/update/update.install
+++ b/core/modules/update/update.install
@@ -108,15 +108,17 @@ function _update_requirement_check($project, $type) {
if ($status != UPDATE_CURRENT) {
$requirement['reason'] = $status;
$requirement['severity'] = REQUIREMENT_ERROR;
- // Append the available updates link to the message from
- // _update_message_text(), and format the two translated strings together in
- // a single paragraph.
+ // When updates are available, append the available updates link to the
+ // message from _update_message_text(), and format the two translated
+ // strings together in a single paragraph.
$requirement['description'][] = ['#markup' => _update_message_text($type, $status)];
- if (_update_manager_access()) {
- $requirement['description'][] = ['#prefix' => ' ', '#markup' => t('See the <a href=":available_updates">available updates</a> page for more information and to install your missing updates.', [':available_updates' => \Drupal::url('update.report_update')])];
- }
- else {
- $requirement['description'][] = ['#prefix' => ' ', '#markup' => t('See the <a href=":available_updates">available updates</a> page for more information.', [':available_updates' => \Drupal::url('update.status')])];
+ if (!in_array($status, [UPDATE_UNKNOWN, UPDATE_NOT_CHECKED, UPDATE_NOT_FETCHED, UPDATE_FETCH_PENDING])) {
+ if (_update_manager_access()) {
+ $requirement['description'][] = ['#prefix' => ' ', '#markup' => t('See the <a href=":available_updates">available updates</a> page for more information and to install your missing updates.', [':available_updates' => \Drupal::url('update.report_update')])];
+ }
+ else {
+ $requirement['description'][] = ['#prefix' => ' ', '#markup' => t('See the <a href=":available_updates">available updates</a> page for more information.', [':available_updates' => \Drupal::url('update.status')])];
+ }
}
}
switch ($status) {
@@ -136,6 +138,7 @@ function _update_requirement_check($project, $type) {
case UPDATE_UNKNOWN:
case UPDATE_NOT_CHECKED:
case UPDATE_NOT_FETCHED:
+ case UPDATE_FETCH_PENDING:
$requirement_label = isset($project['reason']) ? $project['reason'] : t('Can not determine status');
$requirement['severity'] = REQUIREMENT_WARNING;
break;