From cffbd988245017d0ca098dbcee5c5de831b0c6a1 Mon Sep 17 00:00:00 2001 From: Dries Date: Thu, 2 Feb 2012 13:10:22 -0500 Subject: - Patch #598414 by Tor Arne Thune, Dave Reid: Fixed Links in the update results page lead to 403s. --- update.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'update.php') diff --git a/update.php b/update.php index 2b5d2218b..0c2aaf850 100644 --- a/update.php +++ b/update.php @@ -145,7 +145,9 @@ function update_helpful_links() { // NOTE: we can't use l() here because the URL would point to // 'update.php?q=admin'. $links[] = 'Front page'; - $links[] = 'Administration pages'; + if (user_access('access administration pages')) { + $links[] = 'Administration pages'; + } return $links; } @@ -155,7 +157,7 @@ function update_results_page() { update_task_list(); // Report end result. - if (module_exists('dblog')) { + if (module_exists('dblog') && user_access('access site reports')) { $log_message = ' All errors have been logged.'; } else { @@ -163,7 +165,7 @@ function update_results_page() { } if ($_SESSION['update_success']) { - $output = '

Updates were attempted. If you see no failures below, you may proceed happily to the administration pages. Otherwise, you may need to update your database manually.' . $log_message . '

'; + $output = '

Updates were attempted. If you see no failures below, you may proceed happily back to your site. Otherwise, you may need to update your database manually.' . $log_message . '

'; } else { list($module, $version) = array_pop(reset($_SESSION['updates_remaining'])); -- cgit v1.2.3