summaryrefslogtreecommitdiff
path: root/update.php
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-09-07 15:43:55 +0000
committerDries Buytaert <dries@buytaert.net>2009-09-07 15:43:55 +0000
commit95e95bfbf20e993c1aaeeeb580649075f2619e5c (patch)
treee4ef04c8e52ae35fe713e6187d682afc771042b7 /update.php
parentf73040e18b1bde3421e9971d99b39ee3fa39abe5 (diff)
downloadbrdo-95e95bfbf20e993c1aaeeeb580649075f2619e5c.tar.gz
brdo-95e95bfbf20e993c1aaeeeb580649075f2619e5c.tar.bz2
- Patch #394268 by Crell, sun, yched: changed DIE update_sql() DIE!.
Diffstat (limited to 'update.php')
-rw-r--r--update.php19
1 files changed, 12 insertions, 7 deletions
diff --git a/update.php b/update.php
index 52521d04b..856fa5d0c 100644
--- a/update.php
+++ b/update.php
@@ -140,23 +140,28 @@ function update_results_page() {
// Output a list of queries executed
if (!empty($_SESSION['update_results'])) {
$output .= '<div id="update-results">';
- $output .= '<h2>The following queries were executed</h2>';
+ $output .= '<h2>The following updates returned messages</h2>';
foreach ($_SESSION['update_results'] as $module => $updates) {
$output .= '<h3>' . $module . ' module</h3>';
foreach ($updates as $number => $queries) {
if ($number != '#abort') {
- $output .= '<h4>Update #' . $number . '</h4>';
- $output .= '<ul>';
+ $messages = array();
foreach ($queries as $query) {
+ // If there is no message for this update, don't show anything.
+ if (empty($query['query'])) {
+ continue;
+ }
if ($query['success']) {
- $output .= '<li class="success">' . $query['query'] . '</li>';
+ $messages[] = '<li class="success">' . $query['query'] . '</li>';
}
else {
- $output .= '<li class="failure"><strong>Failed:</strong> ' . $query['query'] . '</li>';
+ $messages[] = '<li class="failure"><strong>Failed:</strong> ' . $query['query'] . '</li>';
}
}
- if (!count($queries)) {
- $output .= '<li class="none">No queries</li>';
+
+ if ($messages) {
+ $output .= '<h4>Update #' . $number . "</h4>\n";
+ $output .= '<ul>' . implode("\n", $messages) . "</ul>\n";
}
}
$output .= '</ul>';