Permalink
Browse files

Updates for log_display stuff

  • Loading branch information...
1 parent 30d6173 commit 14e4a496b4d029b24f7db4f60de71e7e451ca8f4 moodler committed Jan 1, 2003
Showing with 21 additions and 3 deletions.
  1. +17 −1 lib/db/mysql.php
  2. +2 −0 lib/db/mysql.sql
  3. +2 −2 version.php
View
18 lib/db/mysql.php
@@ -230,7 +230,23 @@ function main_upgrade($oldversion=0) {
execute_sql("INSERT INTO {$CFG->prefix}log_display VALUES ('user', 'view', 'user', 'CONCAT(firstname,' ',lastname)') ");
}
}
-
+ if ($oldversion < 2003010100) {
+ delete_records("log_display", "module", "user");
+ $new->module = "user";
+ $new->action = "view";
+ $new->mtable = "user";
+ $new->field = "CONCAT(firstname,\' \',lastname)";
+ insert_record("log_display", $new);
+
+ delete_records("log_display", "module", "course");
+ $new->module = "course";
+ $new->action = "view";
+ $new->mtable = "course";
+ $new->field = "fullname";
+ insert_record("log_display", $new);
+ $new->action = "update";
+ insert_record("log_display", $new);
+ }
return true;
}
View
2 lib/db/mysql.sql
@@ -228,3 +228,5 @@ CREATE TABLE `prefix_user_teachers` (
) TYPE=MyISAM COMMENT='One record per teacher per course';
INSERT INTO prefix_log_display VALUES ('user', 'view', 'user', 'CONCAT(firstname,' ',lastname)');
+INSERT INTO prefix_log_display VALUES ('course', 'view', 'course', 'fullname');
+INSERT INTO prefix_log_display VALUES ('course', 'update', 'course', 'fullname');
View
4 version.php
@@ -5,7 +5,7 @@
// database to determine whether upgrades should
// be performed (see lib/db/*.php)
-$version = 2002123000; // The current version is a date (YYYYMMDDXX)
+$version = 2003010100; // The current version is a date (YYYYMMDDXX)
-$release = "1.0.8 dev"; // User-friendly version number
+$release = "1.0.8 alpha"; // User-friendly version number

0 comments on commit 14e4a49

Please sign in to comment.