]> git.mjollnir.org Git - moodle.git/commitdiff
Merged from MOODLE_14_STABLE: Update log_display to use postgres friendly concat...
authormjollnir_ <mjollnir_>
Tue, 23 Nov 2004 03:53:41 +0000 (03:53 +0000)
committermjollnir_ <mjollnir_>
Tue, 23 Nov 2004 03:53:41 +0000 (03:53 +0000)
lib/db/postgres7.php
lib/db/postgres7.sql
version.php

index bb4c43146d8a7e3c2cf92099c80abcda97fd004a..3cc2ad5145452a0ec0be871a42fb1989597c5a92 100644 (file)
@@ -716,6 +716,12 @@ function main_upgrade($oldversion=0) {
         modify_database("","CREATE INDEX {$CFG->prefix}user_students_enrol_idx ON {$CFG->prefix}user_students (enrol);");
         modify_database("","CREATE INDEX {$CFG->prefix}user_teachers_enrol_idx ON {$CFG->prefix}user_teachers (enrol);");
     } 
+
+    if ($oldversion < 2004112300) { // update log display to use correct postgres friendly sql
+        execute_sql("UPDATE {$CFG->prefix}log_display SET field='firstname||\' \'||lastname' WHERE module='user' AND action='view' AND mtable='user'");
+        execute_sql("UPDATE {$CFG->prefix}log_display SET field='firstname||\' \'||lastname' WHERE module='course' AND action='user report' AND mtable='user'");
+    }
+
     return $result;
 }
 
index 6418669f83a0bedf8a818acec30fca5694105a15..05da57a471557590cff1ba5bdf950fe527a617d9 100644 (file)
@@ -324,8 +324,8 @@ CREATE TABLE prefix_user_coursecreators (
    userid int8  NOT NULL default '0'
 );
 
-INSERT INTO prefix_log_display VALUES ('user', 'view', 'user', 'CONCAT(firstname," ",lastname)');
-INSERT INTO prefix_log_display VALUES ('course', 'user report', 'user', 'CONCAT(firstname," ",lastname)');
+INSERT INTO prefix_log_display VALUES ('user', 'view', 'user', 'firstname||\' \'||lastname');
+INSERT INTO prefix_log_display VALUES ('course', 'user report', 'user', 'firstname||\' \'||lastname');
 INSERT INTO prefix_log_display VALUES ('course', 'view', 'course', 'fullname');
 INSERT INTO prefix_log_display VALUES ('course', 'update', 'course', 'fullname');
 INSERT INTO prefix_log_display VALUES ('course', 'enrol', 'course', 'fullname');
index 6590a19c78c072c4a4c78a7298da376616f95220..15e517693c9a0dd38bc40865521a75052e47ed39 100644 (file)
@@ -6,7 +6,7 @@
 // This is compared against the values stored in the database to determine 
 // whether upgrades should be performed (see lib/db/*.php)
 
-   $version = 2004112200;  // YYYYMMDD = date of first major branch release 1.4
+   $version = 2004112300;  // YYYYMMDD = date of first major branch release 1.4
                            //       XY = increments within a single day
 
    $release = '1.5 UNSTABLE DEVELOPMENT';    // Human-friendly version name