summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-10-02 08:41:13 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-10-02 08:41:13 +0000
commit6cc4cc21e0eb76041c64a609d2b889eb9bf37625 (patch)
tree3572e9357ae9a3e4031c6c18925195c887c4899c
parent8e027a8b58ceedd9c58e3ad96ab70274e44d57c0 (diff)
downloadbrdo-6cc4cc21e0eb76041c64a609d2b889eb9bf37625.tar.gz
brdo-6cc4cc21e0eb76041c64a609d2b889eb9bf37625.tar.bz2
#176805 by dww: conditional linking to dblog pages in update.php, so if the module is not enabled, we don't get broken links
-rw-r--r--update.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/update.php b/update.php
index 476d8c77f..315175caa 100644
--- a/update.php
+++ b/update.php
@@ -415,12 +415,23 @@ function update_results_page() {
update_task_list();
// Report end result
+ if (module_exists('dblog')) {
+ $log_message = ' All errors have been <a href="'. base_path() .'?q=admin/logs/dblog">logged</a>.';
+ }
+ else {
+ $log_message = ' All errors have been logged.';
+ }
+
if ($_SESSION['update_success']) {
- $output = '<p>Updates were attempted. If you see no failures below, you may proceed happily to the <a href="index.php?q=admin">administration pages</a>. Otherwise, you may need to update your database manually. All errors have been <a href="index.php?q=admin/logs/watchdog">logged</a>.</p>';
+ $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>';
}
else {
list($module, $version) = array_pop(reset($_SESSION['updates_remaining']));
- $output = '<p class="error">The update process was aborted prematurely while running <strong>update #'. $version .' in '. $module .'.module</strong>. All other errors have been <a href="index.php?q=admin/logs/watchdog">logged</a>. You may need to check the <code>watchdog</code> database table manually.</p>';
+ $output = '<p class="error">The update process was aborted prematurely while running <strong>update #'. $version .' in '. $module .'.module</strong>.'. $log_message;
+ if (module_exists('dblog')) {
+ $output .= ' You may need to check the <code>watchdog</code> database table manually.';
+ }
+ $output .= '</p>';
}
if (!empty($GLOBALS['update_free_access'])) {