diff --git a/misc/admin.css b/misc/admin.css
index b6d2c923866..d99f234a202 100644
--- a/misc/admin.css
+++ b/misc/admin.css
@@ -112,3 +112,6 @@ hr {
padding: 1em 1em 1em 0;
z-index: 2;
}
+#update {
+ padding: 1em 1em 1em 1em;
+}
diff --git a/update.php b/update.php
index ed2565ce75a..c949e2bbfff 100644
--- a/update.php
+++ b/update.php
@@ -771,6 +771,24 @@ function update_data($start) {
}
}
+function update_page_header($title) {
+ $output = "
$title";
+ $output .= <<
+
+EOF;
+ $output .= "";
+ $output .= "
";
+ $output .= "$title
";
+ return $output;
+}
+
+function update_page_footer() {
+ return "";
+}
+
function update_page() {
global $user, $mysql_updates;
@@ -779,7 +797,7 @@ function update_page() {
switch ($_POST["op"]) {
case "Update":
// make sure we have updates to run.
- print "Drupal database update
";
+ print update_page_header("Drupal database update");
print "» main page
\n";
print "» administration pages
\n";
// NOTE: we can't use l() here because the URL would point to 'update.php?q=admin'.
@@ -791,11 +809,11 @@ function update_page() {
}
print "
Updates were attempted. If you see no failures above, you may proceed happily to the administration pages.";
print " Otherwise, you may need to update your database manually.";
- print "";
+ print update_page_footer();
break;
case "upgrade3":
// make sure we have updates to run.
- print "Drupal upgrade
";
+ print update_page_header("Drupal upgrade");
print "» home
\n";
print "» ". l("admin pages", "admin"). "
\n";
if ($edit["start"] == -1) {
@@ -807,7 +825,7 @@ function update_page() {
print "\n";
update_upgrade3();
print "
\n";
- print "";
+ print update_page_footer();
break;
case "upgrade4":
variable_set("update_start", "2002-05-15");
@@ -825,12 +843,12 @@ function update_page() {
$dates[$i] = "No updates available";
// make update form and output it.
- $form .= form_select("Perform updates since", "start", (isset($selected) ? $selected : -1), $dates);
+ $form .= form_select("Perform updates from", "start", (isset($selected) ? $selected : -1), $dates, "This defaults to the first available update since the last update you peformed.");
$form .= form_select("Stop on errors", "bail", 0, array("Disabled", "Enabled"), "Don't forget to backup your database before performing an update.");
$form .= form_submit("Update");
- print "Drupal database update
";
+ print update_page_header("Drupal database update");
print form($form);
- print "";
+ print update_page_footer();
break;
}
}
@@ -848,7 +866,7 @@ function update_content($pattern) {
}
function update_info() {
- print "Drupal database update
";
+ print update_page_header("Drupal database update");
print "\n";
print "- Use this script to upgrade an existing Drupal installation. You don't need this script when installing Drupal from scratch.
";
print "- Before doing anything, backup your database. This process will change your database and its values, and some things might get lost.
\n";
@@ -874,7 +892,7 @@ function update_info() {
print "";
print "- Go through the various administration pages to change the existing and new settings to your liking.
\n";
print "
";
- print "";
+ print update_page_footer();
}
if (isset($_GET["op"])) {
@@ -885,7 +903,9 @@ if (isset($_GET["op"])) {
update_page();
}
else {
+ print update_page_header("Access denied");
print "Access denied. You are not authorized to access to this page. Please log in as the user with user ID #1 or edit update.php
to by-pass this access check; search for \$user->uid == 1
near the bottom of the file.";
+ print update_page_footer();
}
}
else {