diff options
author | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2003-05-19 15:30:12 +0000 |
---|---|---|
committer | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2003-05-19 15:30:12 +0000 |
commit | 7c364f89351bb861e5ddbf340e7821772943cdb5 (patch) | |
tree | 99dca0c36c5582cc2dbe6f32f952755ab9b8d59e | |
parent | 8bc39e9083040e841aca57e6a224b71b67ccd180 (diff) | |
download | brdo-7c364f89351bb861e5ddbf340e7821772943cdb5.tar.gz brdo-7c364f89351bb861e5ddbf340e7821772943cdb5.tar.bz2 |
- Fixing to work with register_globals off.
-rw-r--r-- | update.php | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/update.php b/update.php index 0915618c0..ed2565ce7 100644 --- a/update.php +++ b/update.php @@ -774,10 +774,9 @@ function update_data($start) { function update_page() { global $user, $mysql_updates; - $op = $_POST["op"]; $edit = $_POST["edit"]; - switch ($op) { + switch ($_POST["op"]) { case "Update": // make sure we have updates to run. print "<html><h1>Drupal database update</h1>"; @@ -837,7 +836,6 @@ function update_page() { } function update_content($pattern) { - $result = db_query("SELECT n.nid, c.cid, c.subject FROM node n LEFT JOIN comments c ON n.nid = c.nid WHERE c.comment LIKE '%s'", $pattern); while ($comment = db_fetch_object($result)) { watchdog("special", "upgrade possibly affects comment '$comment->subject'", "<a href=\"node.php?id=$comment->nid&cid=$comment->cid#$comment->cid\">view post</a>"); @@ -850,7 +848,6 @@ function update_content($pattern) { } function update_info() { - print "<html><h1>Drupal database update</h1>"; print "<ol>\n"; print "<li>Use this script to <b>upgrade an existing Drupal installation</b>. You don't need this script when installing Drupal from scratch.</li>"; @@ -880,12 +877,11 @@ function update_info() { print "</html>"; } -if (isset($op)) { +if (isset($_GET["op"])) { include_once "includes/common.inc"; // Access check: if ($user->uid == 1) { - update_page(); } else { |