From 4a28077f468f0a688cd70f3b43e5ffc242bcb49a Mon Sep 17 00:00:00 2001 From: Kjartan Mannes Date: Sat, 1 Jun 2002 21:57:29 +0000 Subject: - adding descriptions to modules (thanks Joe + Scott). - fixed comment flat list view missing 1 comment. - changed update.php around a bit. * security check isn't in effect if the db hasn't been updated. * instructions re-organized. * fixed some minor updates. - updated database.mysql done by UnConeD. - changelog update. --- update.php | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'update.php') diff --git a/update.php b/update.php index 8f80729de..134c6e641 100644 --- a/update.php +++ b/update.php @@ -82,7 +82,7 @@ function update_2() { $output .= "$name ..."; db_query("DROP TABLE IF EXISTS ". $name ."_seq"); db_query("CREATE TABLE ". $name ."_seq (id INTEGER UNSIGNED AUTO_INCREMENT NOT NULL, PRIMARY KEY(id))"); - $result = db_query("SELECT MAX(". ($name == "node" ? "nid" : "lid") .") FROM $name", 1); + $result = db_query("SELECT MAX(". ($name == "node" ? "nid" : "lid") .") FROM $name"); $count = $result ? db_result($result, 0) : 0; db_query("INSERT INTO ". $name ."_seq (id) VALUES ('$count')"); $output .= "done ($count)
"; @@ -333,7 +333,7 @@ function update_24() { update_sql("ALTER TABLE site ADD refresh int(11) NOT NULL;"); update_sql("ALTER TABLE site ADD threshold int(11) NOT NULL;"); update_sql("UPDATE site SET refresh = '7200';"); - update_sql("UPDATE site SET threshold = '50';"); + update_sql("UPDATE site SET threshold = '60';"); } function update_25() { @@ -471,9 +471,9 @@ function update_31() { } // Clean up meta tag system -/* update_sql("DROP TABLE collection"); + update_sql("DROP TABLE collection"); update_sql("DROP TABLE tag"); - update_sql("ALTER TABLE node DROP attributes");*/ + update_sql("ALTER TABLE node DROP attributes"); } function update_upgrade3() { @@ -605,8 +605,7 @@ function update_info() { print "
    \n"; print "
  1. Before doing anything backup your database. This process will change your database and its values, and some things might get lost.

  2. \n"; print "
  3. Don't run this script twice as it will cause some serious problems!

  4. \n"; - print "
  5. Backup your database. If you haven't done it by now don't blame anyone if by some statistical anomaly things blow up and you loose all data.

  6. \n"; - print "
  7. These queries have to be run manually:
    \n"; + print "
  8. Before doing anything else these queries have to be run manually:
    \n"; print "
    \n";
       print "ALTER TABLE watchdog CHANGE user uid int(10) DEFAULT '0' NOT NULL;\n";
       print "ALTER TABLE watchdog CHANGE id wid int(5) DEFAULT '0' NOT NULL auto_increment;\n";
    @@ -620,21 +619,24 @@ function update_info() {
       print "ALTER TABLE users ADD rid INT UNSIGNED NOT NULL;\n";
       print "
  9. \n"; print "
  10. You might have to by-pass the access check near the bottom of the file called update.php such that you can gain access to the updates: search for user_access().

  11. "; - print "
  12. Choose one of the links below to either upgrade from Drupal 3.x or update from a CVS checkout.
    » upgrading will by default enable the standard Drupal themes and modules as well as setting some default values.
    » updating will require modules and themes enabled manually under Administer | Site configuration | modules.

  13. "; + print "
  14. "; + print "Choose one of the links below to either upgrade from Drupal 3.x or update from a CVS checkout.
    "; + print "» upgrading will by default enable the standard Drupal themes and modules as well as setting some default values.
    "; + print "» updating will require modules and themes enabled manually under Administer | Site configuration | modules.
    "; + print "

    » Upgrade 3.x to 4.0.0

    \n"; + print "

    » Update CVS database

    \n"; + print "

    Once you are done remove or disable access to update.php so nobody else can tamper with the database.

    \n"; + print "

  15. "; print "
  16. Go through the various administration pages to change the existing and new settings to your liking.

  17. \n"; - print "
  18. Remove or disable access to update.php so nobody else can tamper with the database.

  19. \n"; print "
  20. Thanks for using Drupal!

  21. \n"; print "
"; - print "

» Upgrade 3.x to 4.0.0

\n"; - print "

» Update CVS database

\n"; print ""; } -// Security check: - if ($op) { include_once "includes/common.inc"; - if (user_access(NULL)) { + // Security check: + if (user_access(NULL) || variable_get("update_start", 0) == 0) { update_page(); } else { -- cgit v1.2.3