summaryrefslogtreecommitdiff
path: root/update.php
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-01-15 23:01:42 +0000
committerDries Buytaert <dries@buytaert.net>2003-01-15 23:01:42 +0000
commitf6da12ca19f5dff391a025b33889b34e42b692c3 (patch)
treeb6adbbe16bae9a2fa9e074bd6bfd064887aeccaf /update.php
parent045f92d2b7eb443a044a66abd65706fb2569ea8e (diff)
downloadbrdo-f6da12ca19f5dff391a025b33889b34e42b692c3.tar.gz
brdo-f6da12ca19f5dff391a025b33889b34e42b692c3.tar.bz2
Patch by Marco:
- forum: fixed link to new topic - forum: new topic shows default forum correctly - forum: first_new is back; the anchor didn't consider multiple pages - forum: use standard pager, needed some changes/fixes to pager.inc - forum: some cleanup - forum: taxonomy hook - renamed first_new to simply new - added an optional parameter to pager_query for the count query - used the optional count param for paging forum topics - internal change: moving a topic doesn't duplicate the node anymore but just changes the forum (term); no change in functionality, and shadow still works (suggested by Dries). This probably also made some queries somewhat lighter. - bug fixed: anonymous users always saw "n (n new)" in the replies column - updated pager help and moved from _help to phpdoc
Diffstat (limited to 'update.php')
-rw-r--r--update.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/update.php b/update.php
index 6b7eb5712..7918d7387 100644
--- a/update.php
+++ b/update.php
@@ -62,7 +62,8 @@ $mysql_updates = array(
"2002-12-22" => "update_47",
"2002-12-29" => "update_48",
"2003-01-03" => "update_49",
- "2003-01-05" => "update_50"
+ "2003-01-05" => "update_50",
+ "2003-01-15" => "update_51"
);
// Update functions
@@ -673,6 +674,15 @@ function update_50() {
update_content("%node.php%");
}
+function update_51() {
+ update_sql("ALTER TABLE form ADD tid INT UNSIGNED NOT NULL");
+ $result = db_queryd("SELECT n.nid, t.tid FROM node n, term_node t WHERE n.nid = t.nid AND type = 'forum'");
+ while ($node = db_fetch_object($result)) {
+ db_queryd("UPDATE forum SET tid = '%d' WHERE nid = '%d'", $node->tid, $node->nid);
+ }
+ update_sql("ALTER TABLE forum ADD INDEX (tid)");
+}
+
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)");