diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-01-06 19:51:01 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-01-06 19:51:01 +0000 |
commit | 89b2069e4dcc160835eefa0ba11da550c31bdafc (patch) | |
tree | 773450f8397097adf4c186eabb8bc0ff53c0ea77 /update.php | |
parent | 97858f9b2ebf7f32f00ab7688dc2eb6b3371207b (diff) | |
download | brdo-89b2069e4dcc160835eefa0ba11da550c31bdafc.tar.gz brdo-89b2069e4dcc160835eefa0ba11da550c31bdafc.tar.bz2 |
- Clean URL patch.
Diffstat (limited to 'update.php')
-rw-r--r-- | update.php | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/update.php b/update.php index a07f641a7..43e36f17d 100644 --- a/update.php +++ b/update.php @@ -61,7 +61,8 @@ $mysql_updates = array( "2002-12-10" => "update_46", "2002-12-22" => "update_47", "2002-12-29" => "update_48", - "2003-01-03" => "update_49" + "2003-01-03" => "update_49", + "2003-01-05" => "update_50" ); // Update functions @@ -667,6 +668,12 @@ function update_49() { update_sql("ALTER TABLE watchdog ADD link varchar(255) DEFAULT '' NULL"); } +function update_50() { + update_content("%admin.php%"); + update_content("%module.php%"); + update_content("%node.php%"); +} + function update_upgrade3() { update_sql("INSERT INTO system VALUES ('archive.module','archive','module','',1)"); update_sql("INSERT INTO system VALUES ('block.module','block','module','',1)"); @@ -788,6 +795,19 @@ 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>"); + } + + $result = db_query("SELECT nid, title FROM node WHERE teaser LIKE '%s' OR body LIKE '%s'", $pattern, $pattern); + while ($node = db_fetch_object($result)) { + watchdog("special", "upgrade possibly affects node '$node->title'", "<a href=\"node.php?id=$node->nid\">view post</a>"); + } +} + function update_info() { print "<html><h1>Drupal database update</h1>"; |