From 93642edd6aeb6fea7337dd7f5045b90b59d08540 Mon Sep 17 00:00:00 2001 From: vyshane Date: Mon, 24 Apr 2006 08:38:03 +0000 Subject: [PATCH] Fixed inserts for log_display. --- mod/assignment/db/mysql.sql | 10 +++++----- mod/assignment/db/postgres7.sql | 10 +++++----- mod/choice/db/mysql.php | 4 ++-- mod/choice/db/oci8po.sql | 8 ++++---- mod/choice/db/postgres7.php | 4 ++-- mod/resource/db/mysql.php | 4 ++-- mod/resource/db/postgres7.php | 4 ++-- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/mod/assignment/db/mysql.sql b/mod/assignment/db/mysql.sql index 088990261d..cac154c50b 100644 --- a/mod/assignment/db/mysql.sql +++ b/mod/assignment/db/mysql.sql @@ -55,9 +55,9 @@ CREATE TABLE `prefix_assignment_submissions` ( # -------------------------------------------------------- -INSERT INTO prefix_log_display VALUES ('assignment', 'view', 'assignment', 'name'); -INSERT INTO prefix_log_display VALUES ('assignment', 'add', 'assignment', 'name'); -INSERT INTO prefix_log_display VALUES ('assignment', 'update', 'assignment', 'name'); -INSERT INTO prefix_log_display VALUES ('assignment', 'view submission', 'assignment', 'name'); -INSERT INTO prefix_log_display VALUES ('assignment', 'upload', 'assignment', 'name'); +INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('assignment', 'view', 'assignment', 'name'); +INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('assignment', 'add', 'assignment', 'name'); +INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('assignment', 'update', 'assignment', 'name'); +INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('assignment', 'view submission', 'assignment', 'name'); +INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('assignment', 'upload', 'assignment', 'name'); diff --git a/mod/assignment/db/postgres7.sql b/mod/assignment/db/postgres7.sql index cf147fbe3f..de2001e8db 100644 --- a/mod/assignment/db/postgres7.sql +++ b/mod/assignment/db/postgres7.sql @@ -58,9 +58,9 @@ CREATE INDEX prefix_assignment_submissions_timemarked_idx ON prefix_assignment_s # -------------------------------------------------------- -INSERT INTO prefix_log_display VALUES ('assignment', 'view', 'assignment', 'name'); -INSERT INTO prefix_log_display VALUES ('assignment', 'add', 'assignment', 'name'); -INSERT INTO prefix_log_display VALUES ('assignment', 'update', 'assignment', 'name'); -INSERT INTO prefix_log_display VALUES ('assignment', 'view submission', 'assignment', 'name'); -INSERT INTO prefix_log_display VALUES ('assignment', 'upload', 'assignment', 'name'); +INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('assignment', 'view', 'assignment', 'name'); +INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('assignment', 'add', 'assignment', 'name'); +INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('assignment', 'update', 'assignment', 'name'); +INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('assignment', 'view submission', 'assignment', 'name'); +INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('assignment', 'upload', 'assignment', 'name'); diff --git a/mod/choice/db/mysql.php b/mod/choice/db/mysql.php index cab7ce54ca..46d0aca0b6 100644 --- a/mod/choice/db/mysql.php +++ b/mod/choice/db/mysql.php @@ -29,8 +29,8 @@ function choice_upgrade($oldversion) { table_column("choice", "", "showunanswered", "integer", "4", "unsigned", "0", "", "publish"); } if ($oldversion < 2004021700) { - modify_database("", "INSERT INTO prefix_log_display VALUES ('choice', 'choose', 'choice', 'name');"); - modify_database("", "INSERT INTO prefix_log_display VALUES ('choice', 'choose again', 'choice', 'name');"); + modify_database("", "INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('choice', 'choose', 'choice', 'name');"); + modify_database("", "INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('choice', 'choose again', 'choice', 'name');"); } if ($oldversion < 2004070100) { table_column("choice", "", "timeclose", "integer", "10", "unsigned", "0", "", "showunanswered"); diff --git a/mod/choice/db/oci8po.sql b/mod/choice/db/oci8po.sql index 7f41d4ef90..658cb6b35d 100755 --- a/mod/choice/db/oci8po.sql +++ b/mod/choice/db/oci8po.sql @@ -83,10 +83,10 @@ rem Dumping data for table log_display rem delete from prefix_log_display where module = 'choice'; -INSERT INTO prefix_log_display VALUES ('choice', 'view', 'choice', 'name'); -INSERT INTO prefix_log_display VALUES ('choice', 'update', 'choice', 'name'); -INSERT INTO prefix_log_display VALUES ('choice', 'add', 'choice', 'name'); -INSERT INTO prefix_log_display VALUES ('choice', 'report', 'choice', 'name'); +INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('choice', 'view', 'choice', 'name'); +INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('choice', 'update', 'choice', 'name'); +INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('choice', 'add', 'choice', 'name'); +INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('choice', 'report', 'choice', 'name'); diff --git a/mod/choice/db/postgres7.php b/mod/choice/db/postgres7.php index 5722044335..041b80e13a 100644 --- a/mod/choice/db/postgres7.php +++ b/mod/choice/db/postgres7.php @@ -15,8 +15,8 @@ function choice_upgrade($oldversion) { table_column("choice", "", "showunanswered", "integer", "4", "unsigned", "0", "", "publish"); } if ($oldversion < 2004021700) { - modify_database("", "INSERT INTO prefix_log_display VALUES ('choice', 'choose', 'choice', 'name');"); - modify_database("", "INSERT INTO prefix_log_display VALUES ('choice', 'choose again', 'choice', 'name');"); + modify_database("", "INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('choice', 'choose', 'choice', 'name');"); + modify_database("", "INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('choice', 'choose again', 'choice', 'name');"); } if ($oldversion < 2004070100) { table_column("choice", "", "timeclose", "integer", "10", "unsigned", "0", "", "showunanswered"); diff --git a/mod/resource/db/mysql.php b/mod/resource/db/mysql.php index 17e17a59d4..9eb0d0ebd9 100644 --- a/mod/resource/db/mysql.php +++ b/mod/resource/db/mysql.php @@ -11,8 +11,8 @@ function resource_upgrade($oldversion) { } if ($oldversion < 2004013101) { - modify_database("", "INSERT INTO prefix_log_display VALUES ('resource', 'update', 'resource', 'name');"); - modify_database("", "INSERT INTO prefix_log_display VALUES ('resource', 'add', 'resource', 'name');"); + modify_database("", "INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('resource', 'update', 'resource', 'name');"); + modify_database("", "INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('resource', 'add', 'resource', 'name');"); } if ($oldversion < 2004071000) { diff --git a/mod/resource/db/postgres7.php b/mod/resource/db/postgres7.php index d0e940f648..19e0e0154b 100644 --- a/mod/resource/db/postgres7.php +++ b/mod/resource/db/postgres7.php @@ -7,8 +7,8 @@ function resource_upgrade($oldversion) { global $CFG ; if ($oldversion < 2004013101) { - modify_database("", "INSERT INTO prefix_log_display VALUES ('resource', 'update', 'resource', 'name');"); - modify_database("", "INSERT INTO prefix_log_display VALUES ('resource', 'add', 'resource', 'name');"); + modify_database("", "INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('resource', 'update', 'resource', 'name');"); + modify_database("", "INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('resource', 'add', 'resource', 'name');"); } if ($oldversion < 2004071000) { -- 2.39.5