Skip to content
Snippets Groups Projects
Commit d1b31051 authored by Angie Byron's avatar Angie Byron
Browse files

Issue #1648004 by Devin Carlson, Rob Loach: Fixed Helpful links use...

Issue #1648004 by Devin Carlson, Rob Loach: Fixed Helpful links use base_path() when they don't have to.
parent b75c3af1
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -125,7 +125,8 @@ function update_script_selection_form($form, &$form_state) {
drupal_set_message(t('No pending updates.'));
unset($form);
$form['links'] = array(
'#markup' => theme('item_list', array('items' => update_helpful_links())),
'#theme' => 'links',
'#links' => update_helpful_links(),
);
// No updates to run, so caches won't get flushed later. Clear them now.
......@@ -157,18 +158,21 @@ function update_script_selection_form($form, &$form_state) {
}
function update_helpful_links() {
// NOTE: we can't use l() here because the URL would point to
// 'core/update.php?q=admin'.
$links[] = '<a href="' . base_path() . '">Front page</a>';
$links['front'] = array(
'title' => t('Front page'),
'href' => '<front>',
);
if (user_access('access administration pages')) {
$links[] = '<a href="' . base_path() . '?q=admin">Administration pages</a>';
$links['admin-pages'] = array(
'title' => t('Administration pages'),
'href' => 'admin',
);
}
return $links;
}
function update_results_page() {
drupal_set_title('Drupal database update');
$links = update_helpful_links();
update_task_list();
// Report end result.
......@@ -195,7 +199,7 @@ function update_results_page() {
$output .= "<p><strong>Reminder: don't forget to set the <code>\$update_free_access</code> value in your <code>settings.php</code> file back to <code>FALSE</code>.</strong></p>";
}
$output .= theme('item_list', array('items' => $links));
$output .= theme('links', array('links' => update_helpful_links()));
// Output a list of queries executed.
if (!empty($_SESSION['update_results'])) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment