]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed ServerInfo() behaviour for odbc_mssql. We need this working properly NOW!
authorstronk7 <stronk7>
Mon, 9 Oct 2006 23:36:27 +0000 (23:36 +0000)
committerstronk7 <stronk7>
Mon, 9 Oct 2006 23:36:27 +0000 (23:36 +0000)
(will be back once ADOdb code supports it properly)

lib/adodb/drivers/adodb-odbc_mssql.inc.php

index 5aa8c52d81aa08da819fd18fbbb7b1e466c61f32..bcfcd849a7742d53d957ddf29b1e7b018b22be96 100644 (file)
@@ -49,15 +49,13 @@ class  ADODB_odbc_mssql extends ADODB_odbc {
        }
 
        // crashes php...
+    //Note replaced by some different code to allow it to work properly
+    //for Moode environmental checks
        function ServerInfo()
        {
-       global $ADODB_FETCH_MODE;
-               $save = $ADODB_FETCH_MODE;
-               $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
                $row = $this->GetRow("execute sp_server_info 2");
-               $ADODB_FETCH_MODE = $save;
-               if (!is_array($row)) return false;
-               $arr['description'] = $row[2];
+
+               $arr['description'] = $row['attribute_value'];
                $arr['version'] = ADOConnection::_findvers($arr['description']);
                return $arr;
        }
@@ -77,7 +75,6 @@ class  ADODB_odbc_mssql extends ADODB_odbc {
                        return $this->GetOne($this->identitySQL);
        }
        
-       
        function MetaForeignKeys($table, $owner=false, $upper=false)
        {
        global $ADODB_FETCH_MODE;