summaryrefslogtreecommitdiff
path: root/update.php
diff options
context:
space:
mode:
authorDries <dries@buytaert.net>2012-02-02 13:10:22 -0500
committerDries <dries@buytaert.net>2012-02-02 13:10:22 -0500
commitcffbd988245017d0ca098dbcee5c5de831b0c6a1 (patch)
tree0b56ae830a1f21ab57a1f778ccb687dc64e02cce /update.php
parenta5f9c98543c14623193d017e0c2ab66bf8154a6a (diff)
downloadbrdo-cffbd988245017d0ca098dbcee5c5de831b0c6a1.tar.gz
brdo-cffbd988245017d0ca098dbcee5c5de831b0c6a1.tar.bz2
- Patch #598414 by Tor Arne Thune, Dave Reid: Fixed Links in the update results page lead to 403s.
Diffstat (limited to 'update.php')
-rw-r--r--update.php8
1 files changed, 5 insertions, 3 deletions
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[] = '<a href="' . base_path() . '">Front page</a>';
- $links[] = '<a href="' . base_path() . '?q=admin">Administration pages</a>';
+ if (user_access('access administration pages')) {
+ $links[] = '<a href="' . base_path() . '?q=admin">Administration pages</a>';
+ }
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 <a href="' . base_path() . '?q=admin/reports/dblog">logged</a>.';
}
else {
@@ -163,7 +165,7 @@ function update_results_page() {
}
if ($_SESSION['update_success']) {
- $output = '<p>Updates were attempted. If you see no failures below, you may proceed happily to the <a href="' . base_path() . '?q=admin">administration pages</a>. Otherwise, you may need to update your database manually.' . $log_message . '</p>';
+ $output = '<p>Updates were attempted. If you see no failures below, you may proceed happily back to your <a href="' . base_path() . '">site</a>. Otherwise, you may need to update your database manually.' . $log_message . '</p>';
}
else {
list($module, $version) = array_pop(reset($_SESSION['updates_remaining']));