Commit d1b31051 authored by webchick's avatar webchick
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
...@@ -125,7 +125,8 @@ function update_script_selection_form($form, &$form_state) { ...@@ -125,7 +125,8 @@ function update_script_selection_form($form, &$form_state) {
drupal_set_message(t('No pending updates.')); drupal_set_message(t('No pending updates.'));
unset($form); unset($form);
$form['links'] = array( $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. // 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) { ...@@ -157,18 +158,21 @@ function update_script_selection_form($form, &$form_state) {
} }
function update_helpful_links() { function update_helpful_links() {
// NOTE: we can't use l() here because the URL would point to $links['front'] = array(
// 'core/update.php?q=admin'. 'title' => t('Front page'),
$links[] = '<a href="' . base_path() . '">Front page</a>'; 'href' => '<front>',
);
if (user_access('access administration pages')) { 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; return $links;
} }
function update_results_page() { function update_results_page() {
drupal_set_title('Drupal database update'); drupal_set_title('Drupal database update');
$links = update_helpful_links();
update_task_list(); update_task_list();
// Report end result. // Report end result.
...@@ -195,7 +199,7 @@ function update_results_page() { ...@@ -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 .= "<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. // Output a list of queries executed.
if (!empty($_SESSION['update_results'])) { if (!empty($_SESSION['update_results'])) {
......
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