]> git.mjollnir.org Git - moodle.git/commitdiff
Add odbc_msql dbtype to a bunch of places.
authorstronk7 <stronk7>
Mon, 9 Oct 2006 22:55:55 +0000 (22:55 +0000)
committerstronk7 <stronk7>
Mon, 9 Oct 2006 22:55:55 +0000 (22:55 +0000)
admin/environment.xml
lib/dmllib.php
lib/setuplib.php
mod/forum/lib.php

index 36f41e67b3ea85faa72193bfbf43a7eae9072fc8..90f4dc0de28b2d358e65a18beb5d906b02933da8 100644 (file)
@@ -44,6 +44,7 @@
       </VENDOR>
       <VENDOR name="postgres" version="7.4" />
       <VENDOR name="mssql" version="9.0" />
+      <VENDOR name="odbc_mssql" version="9.0" />
       <VENDOR name="oracle" version="9.0" />
     </DATABASE>
     <PHP version="4.3.0" level="required">
index d8d06a41f7b5feca322ae70359059e12713c91e4..b1709ff0d13bbd66a63400a0a01e2113e02bb4ae 100644 (file)
@@ -1424,6 +1424,7 @@ function sql_order_by_text($fieldname, $numchars=32) {
 
     switch ($CFG->dbtype) {
         case 'mssql':
+        case 'odbc_mssql':
             return 'CONVERT(varchar, ' . $fieldname . ', ' . $numchars . ')';
             break;
         case 'oci8po':
@@ -1574,6 +1575,7 @@ function configure_dbconnection() {
             }
             break;
         case 'mssql':
+        case 'odbc_mssql':
         /// No need to set charset. It must be specified in the driver conf
         /// Allow quoted identifiers
             $db->Execute('SET QUOTED_IDENTIFIER ON');
index 4ac9ef33af9195618ece31ad0cdabb1170d79e22..5820ebf26e06a0520ba8c1c192d56683f8407ecb 100644 (file)
@@ -118,6 +118,7 @@ function setup_is_unicodedb() {
             }
             break;
         case 'mssql':
+        case 'odbc_mssql':
         /// MSSQL only runs under UTF8 + the proper ODBTP driver (both for Unix and Win32)
             $unicodedb = true;
             break;
index 722b83c56ad31c14262e0612bd0c561550b0b135..5f3507f9e3c425472298fffb879d86030470c85c 100644 (file)
@@ -1577,7 +1577,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' || $CFG->dbtype == 'mssql' || $CFG->dbtype == 'oci8po') {
+    if ($CFG->dbtype == 'postgres7' || $CFG->dbtype == 'mssql' || $CFG->dbtype == 'odbc_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