From e5ad13e3f8a95b9add11f181e50e96003a597ebf Mon Sep 17 00:00:00 2001
From: Steven Wittens Updates were attempted. If you see no failures above, you may proceed happily to the administration pages. Otherwise, you may need to update your database manually. Reminder: don't forget to set the
\n\n";
+ $output .= '
\n";
}
db_query('DELETE FROM {cache}');
-}
-
-function update_page_header($title) {
- $output = "'. $date .'
';
$ret = $func();
foreach ($ret as $return) {
- print $return[1];
- print $return[2];
+ $output .= $return[1];
}
variable_set("update_start", $date);
- print "
\n";
+ $output .= "$title
";
return $output;
}
-function update_page_footer() {
- return "
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 update_page_footer();
+ $output .= '\$access_check
value at the top of update.php
back to TRUE
.";
+ }
+ print theme('maintenance_page', $output);
break;
+
default:
// NOTE: We need the following five lines in order to fix a bug with
// database.mysql (issue #15337). We should be able to remove
@@ -96,7 +82,6 @@ function update_page() {
}
$start = variable_get("update_start", 0);
- $dates[] = "All";
$i = 1;
foreach ($sql_updates as $date => $sql) {
$dates[$i++] = $date;
@@ -109,26 +94,25 @@ function update_page() {
// make update form and output it.
$form = form_select("Perform updates from", "start", (isset($selected) ? $selected : -1), $dates, "This defaults to the first available update since the last update you performed.");
$form .= form_submit("Update");
- print update_page_header("Drupal database update");
- print form($form);
- print update_page_footer();
+ drupal_set_title('Drupal database update');
+ print theme('maintenance_page', form($form));
break;
}
}
function update_info() {
- print update_page_header("Drupal database update");
- print "\n";
- print "
users_roles
and locales_meta
tables manually before upgrading. To create these tables, issue the following SQL commands:
-
- MySQL specific example: + drupal_set_title('Drupal database update'); + $output = "
users_roles
and locales_meta
tables manually before upgrading. To create these tables, issue the following SQL commands:
+
+ MySQL specific example:
CREATE TABLE users_roles ( uid int(10) unsigned NOT NULL default '0', @@ -145,9 +129,8 @@ function update_info() { PRIMARY KEY (locale) );- -
PostgreSQL specific example: +
PostgreSQL specific example:
CREATE TABLE users_roles ( uid integer NOT NULL default '0', @@ -164,18 +147,16 @@ function update_info() { PRIMARY KEY (locale) );-
bootstrap
and throttle
fields to the system
table manually before upgrading. To add the required fields, issue the following SQL commands:
+ $output .= " bootstrap
and throttle
fields to the system
table manually before upgrading. To add the required fields, issue the following SQL commands:
- MySQL specific example: +
MySQL specific example:
ALTER TABLE system ADD throttle tinyint(1) NOT NULL DEFAULT '0'; ALTER TABLE system ADD bootstrap int(2);- -
PostgreSQL specific example: +
PostgreSQL specific example:
ALTER TABLE system ADD throttle smallint; ALTER TABLE system ALTER COLUMN throttle SET DEFAULT '0'; @@ -183,11 +164,10 @@ function update_info() { ALTER TABLE system ALTER COLUMN throttle SET NOT NULL; ALTER TABLE system ADD bootstrap integer;-
sessions
table manually before upgrading. After creating the table, you will want to log in and immediately continue the upgrade. To create the sessions
table, issue the following SQL command:
+ $output .= " sessions
table manually before upgrading. After creating the table, you will want to log in and immediately continue the upgrade. To create the sessions
table, issue the following SQL command:
- MySQL specific example: +
MySQL specific example:
CREATE TABLE sessions ( uid int(10) unsigned NOT NULL, @@ -199,14 +179,15 @@ function update_info() { KEY sid (sid(4)), KEY timestamp (timestamp));-
For more help, see the Installation and upgrading handbook. If you are unsure what these terms mean you should probably contact your hosting provider.
'; + $output .= "Access denied. You are not authorized to access this page. Please log in as the admin user (the first user you created). If you cannot log in, you will have to edit update.php
to bypass this access check. To do this:
\$access_check = TRUE;
. Change it to \$access_check = FALSE;
.\$access_check = TRUE;
.Access denied. You are not authorized to access this page. Please log in as the admin user (the first user you created). If you cannot log in, you will have to edit update.php
to bypass this access check. To do this:
$access_check = TRUE;
. Change it to $access_check = FALSE;
.$access_check = TRUE;
.