mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Updated logging support. Added version upgrade.
This commit is contained in:
parent
0a09100ff7
commit
6977f32079
@ -29,6 +29,16 @@ function data_upgrade($oldversion) {
|
||||
table_column("data_comments", "", "modified", "integer", "10");
|
||||
}
|
||||
|
||||
if ($oldversion < 2006030700) {
|
||||
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'add', 'data', 'name')");
|
||||
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'update', 'data', 'name')");
|
||||
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'record delete', 'data', 'name')");
|
||||
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'fields add', 'data_fields', 'name')");
|
||||
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'fields update', 'data_fields', 'name')");
|
||||
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'templates saved', 'data', 'name')");
|
||||
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'templates defaults', 'data', 'name')");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -106,3 +106,10 @@ CREATE TABLE prefix_data_ratings (
|
||||
|
||||
|
||||
INSERT INTO prefix_log_display VALUES ('data', 'view', 'data', 'name');
|
||||
INSERT INTO prefix_log_display VALUES ('data', 'add', 'data', 'name');
|
||||
INSERT INTO prefix_log_display VALUES ('data', 'update', 'data', 'name');
|
||||
INSERT INTO prefix_log_display VALUES ('data', 'record delete', 'data', 'name');
|
||||
INSERT INTO prefix_log_display VALUES ('data', 'fields add', 'data_fields', 'name');
|
||||
INSERT INTO prefix_log_display VALUES ('data', 'fields update', 'data_fields', 'name');
|
||||
INSERT INTO prefix_log_display VALUES ('data', 'templates saved', 'data', 'name');
|
||||
INSERT INTO prefix_log_display VALUES ('data', 'templates defaults', 'data', 'name');
|
@ -28,7 +28,18 @@ function data_upgrade($oldversion) {
|
||||
table_column("data_comments", "", "created", "integer");
|
||||
table_column("data_comments", "", "modified", "integer");
|
||||
}
|
||||
|
||||
|
||||
if ($oldversion < 2006030700) {
|
||||
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'view', 'data', 'name');");
|
||||
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'add', 'data', 'name')");
|
||||
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'update', 'data', 'name')");
|
||||
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'record delete', 'data', 'name')");
|
||||
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'fields add', 'data_fields', 'name')");
|
||||
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'fields update', 'data_fields', 'name')");
|
||||
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'templates saved', 'data', 'name')");
|
||||
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'templates defaults', 'data', 'name')");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -85,4 +85,11 @@ CREATE TABLE prefix_data_ratings (
|
||||
rating int4 NOT NULL default '0'
|
||||
);
|
||||
|
||||
|
||||
INSERT INTO prefix_log_display VALUES ('data', 'view', 'data', 'name');
|
||||
INSERT INTO prefix_log_display VALUES ('data', 'add', 'data', 'name');
|
||||
INSERT INTO prefix_log_display VALUES ('data', 'update', 'data', 'name');
|
||||
INSERT INTO prefix_log_display VALUES ('data', 'record delete', 'data', 'name');
|
||||
INSERT INTO prefix_log_display VALUES ('data', 'fields add', 'data_fields', 'name');
|
||||
INSERT INTO prefix_log_display VALUES ('data', 'fields update', 'data_fields', 'name');
|
||||
INSERT INTO prefix_log_display VALUES ('data', 'templates saved', 'data', 'name');
|
||||
INSERT INTO prefix_log_display VALUES ('data', 'templates defaults', 'data', 'name');
|
Loading…
x
Reference in New Issue
Block a user