From 628e2264b1824703e80bf40b6655baadb58cda68 Mon Sep 17 00:00:00 2001 From: vyshane Date: Thu, 10 Aug 2006 05:57:34 +0000 Subject: [PATCH] Adding back lines that mysteriously disapeared. --- mod/forum/db/mysql.php | 9 +++++++-- mod/forum/db/mysql.sql | 1 + mod/forum/db/postgres7.php | 11 ++++++++++- mod/forum/db/postgres7.sql | 2 +- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/mod/forum/db/mysql.php b/mod/forum/db/mysql.php index 304ef776e7..6eadb137b0 100644 --- a/mod/forum/db/mysql.php +++ b/mod/forum/db/mysql.php @@ -224,9 +224,14 @@ function forum_upgrade($oldversion) { table_column('forum_posts','','mailnow','integer'); } + if ($oldversion < 2006011702) { + execute_sql("INSERT INTO {$CFG->prefix}log_display (module, action, mtable, field) VALUES ('forum', 'user report', 'user', 'CONCAT(firstname,\' \',lastname)')"); + } + + /* // Upgrades for new roles and capabilities support. - if ($oldversion < 2006011701) { + if ($oldversion < 2006080800) { // forum.open defines what students can do: // 0 = No discussions, no replies @@ -253,7 +258,7 @@ function forum_upgrade($oldversion) { // Delete column forum.assesspublic } - + */ return true; diff --git a/mod/forum/db/mysql.sql b/mod/forum/db/mysql.sql index 50861ebc86..44ea4d7178 100644 --- a/mod/forum/db/mysql.sql +++ b/mod/forum/db/mysql.sql @@ -163,6 +163,7 @@ INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'add discussion', 'forum_discussions', 'name'); INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'add post', 'forum_posts', 'subject'); INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'update post', 'forum_posts', 'subject'); +INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'user report', 'user', 'CONCAT(firstname,\' \',lastname)'); INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'move discussion', 'forum_discussions', 'name'); INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'view subscribers', 'forum', 'name'); INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'view discussion', 'forum_discussions', 'name'); diff --git a/mod/forum/db/postgres7.php b/mod/forum/db/postgres7.php index ff5c1851be..8e2435b399 100644 --- a/mod/forum/db/postgres7.php +++ b/mod/forum/db/postgres7.php @@ -156,6 +156,7 @@ function forum_upgrade($oldversion) { } if ($oldversion < 2006011600) { + notify('forum_type does not exists, you can ignore and this will properly removed'); execute_sql("ALTER TABLE {$CFG->prefix}forum DROP CONSTRAINT {$CFG->prefix}forum_type"); execute_sql("ALTER TABLE {$CFG->prefix}forum ADD CONSTRAINT {$CFG->prefix}forum_type CHECK (type IN ('single','news','general','social','eachuser','teacher','qanda')) "); } @@ -170,9 +171,17 @@ function forum_upgrade($oldversion) { table_column('forum_posts','','mailnow','integer'); } + if ($oldversion < 2006011701) { + execute_sql("ALTER TABLE {$CFG->prefix}forum DROP CONSTRAINT {$CFG->prefix}forum_type_check"); + } + + if ($oldversion < 2006011702) { + execute_sql("INSERT INTO {$CFG->prefix}log_display (module, action, mtable, field) VALUES ('forum', 'user report', 'user', 'firstname||\' \'||lastname')"); + } + return true; } -?> +?> \ No newline at end of file diff --git a/mod/forum/db/postgres7.sql b/mod/forum/db/postgres7.sql index 96820bfc55..a88b18a62a 100644 --- a/mod/forum/db/postgres7.sql +++ b/mod/forum/db/postgres7.sql @@ -175,10 +175,10 @@ INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'add discussion', 'forum_discussions', 'name'); INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'add post', 'forum_posts', 'subject'); INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'update post', 'forum_posts', 'subject'); +INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'user report', 'user', 'firstname||\' \'||lastname'); INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'move discussion', 'forum_discussions', 'name'); INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'view subscribers', 'forum', 'name'); INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'view discussion', 'forum_discussions', 'name'); INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'view forum', 'forum', 'name'); INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'subscribe', 'forum', 'name'); INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'unsubscribe', 'forum', 'name'); - -- 2.39.5