]> git.mjollnir.org Git - moodle.git/commitdiff
Adding support for MSSQL and Oracle in this select. Not really sure why we need one...
authorstronk7 <stronk7>
Tue, 5 Sep 2006 22:31:13 +0000 (22:31 +0000)
committerstronk7 <stronk7>
Tue, 5 Sep 2006 22:31:13 +0000 (22:31 +0000)
join there, if every discussion has one usermodified but.....not time now.

mod/forum/lib.php

index 13bd5c49427da4f19936fa2b1c59021e5b33946c..ef7e19f6b1e6d3e81beeb23643c9c8228cfc9408 100644 (file)
@@ -1475,7 +1475,7 @@ function forum_get_discussions($forum="0", $forumsort="d.timemodified DESC",
     }
 
     //TODO: there must be a nice way to do this that keeps both postgres and mysql 3.2x happy but I can't find it right now.
-    if ($CFG->dbtype == 'postgres7') {
+    if ($CFG->dbtype == 'postgres7' || $CFG->dbtype == 'mssql' || $CFG->dbtype == 'oci8po') {
         return get_records_sql("SELECT $postdata, d.name, d.timemodified, d.usermodified, d.groupid,
                                    u.firstname, u.lastname, u.email, u.picture $umfields
                               FROM {$CFG->prefix}forum_discussions d