]> git.mjollnir.org Git - moodle.git/commitdiff
Fix one error in SetFetchMode() + minor clean. MDL-14879
authorstronk7 <stronk7>
Sat, 17 May 2008 00:04:53 +0000 (00:04 +0000)
committerstronk7 <stronk7>
Sat, 17 May 2008 00:04:53 +0000 (00:04 +0000)
lib/dml/mssql_adodb_moodle_database.php
lib/dml/mssql_n_adodb_moodle_database.php
lib/dml/mysql_adodb_moodle_database.php
lib/dml/mysqli_adodb_moodle_database.php
lib/dml/oci8po_adodb_moodle_database.php
lib/dml/odbc_mssql_adodb_moodle_database.php
lib/dml/postgres7_adodb_moodle_database.php

index c45eadc59742a92f32a57d79b9f8d6f69b8a6021..f6f22122736be607826ceed56a1e78d3077a78ec 100644 (file)
@@ -20,7 +20,7 @@ class mssql_adodb_moodle_database extends adodb_moodle_database {
         if (!defined('ADODB_ASSOC_CASE')) {
             define ('ADODB_ASSOC_CASE', 2);
         }
-        $this->db->SetFetchMode(ADODB_ASSOC_CASE);
+        $this->db->SetFetchMode(ADODB_FETCH_ASSOC);
 
         /// No need to set charset. It must be specified in the driver conf
         /// Allow quoted identifiers
index 1e296daf603e29c2dc24be3bbf104e17ab6333c1..17bf52e0929496303ee64b95e25ff4a151e529cc 100644 (file)
@@ -5,7 +5,7 @@ require_once($CFG->libdir.'/dml/adodb_moodle_database.php');
 require_once($CFG->libdir.'/dml/mssql_adodb_moodle_database.php');
 
 /**
- * MSSQL database class using adodb backend
+ * MSSQL_N database class using adodb backend
  * @package dmlib
  */
 class mssql_n_adodb_moodle_database extends mssql_adodb_moodle_database {
@@ -21,25 +21,4 @@ class mssql_n_adodb_moodle_database extends mssql_adodb_moodle_database {
         return 'mssql_n';
     }
 
-    protected function configure_dbconnection() {
-        if (!defined('ADODB_ASSOC_CASE')) {
-            define ('ADODB_ASSOC_CASE', 0);
-        }
-        $this->db->SetFetchMode(ADODB_ASSOC_CASE);
-
-        /// No need to set charset. It must be specified in the driver conf
-        /// Allow quoted identifiers
-            $this->db->Execute('SET QUOTED_IDENTIFIER ON');
-        /// Force ANSI nulls so the NULL check was done by IS NULL and NOT IS NULL
-        /// instead of equal(=) and distinct(<>) simbols
-            $this->db->Execute('SET ANSI_NULLS ON');
-        /// Enable sybase quotes, so addslashes and stripslashes will use "'"
-            ini_set('magic_quotes_sybase', '1');
-        /// NOTE: Not 100% useful because GPC has been addslashed with the setting off
-        ///       so IT'S MANDATORY TO CHANGE THIS UNDER php.ini or .htaccess for this DB
-        ///       or to turn off magic_quotes to allow Moodle to do it properly
-
-        return true;
-    }
-
 }
index 7adf87c2a360c10fd7f11a6e636480328591701e..4edab7f69717b826167c91929f9dc9bc1146ba8e 100644 (file)
@@ -9,8 +9,6 @@ require_once($CFG->libdir.'/dml/mysqli_adodb_moodle_database.php');
  * @package dmlib
  */
 class mysql_adodb_moodle_database extends mysqli_adodb_moodle_database {
-    protected $columns = array();
-
     function __construct ($dbhost, $dbuser, $dbpass, $dbname, $dbpersist, $prefix) {
         parent::__construct($dbhost, $dbuser, $dbpass, $dbname, $dbpersist, $prefix);
     }
index 08809719e3014da10f35b9c54884d461f52e8049..72501dbf188375adf4d5e63f001290d99a23016a 100644 (file)
@@ -16,7 +16,7 @@ class mysqli_adodb_moodle_database extends adodb_moodle_database {
         if (!defined('ADODB_ASSOC_CASE')) {
             define ('ADODB_ASSOC_CASE', 2);
         }
-        $this->db->SetFetchMode(ADODB_ASSOC_CASE);
+        $this->db->SetFetchMode(ADODB_FETCH_ASSOC);
         $this->db->Execute("SET NAMES 'utf8'");
         return true;
     }
index e8d86c1cb37bcf9af1e7701e9b1a50698abb4715..88d74f4d87f49756faa4e51ad304fd1ae47e371d 100644 (file)
@@ -32,7 +32,7 @@ class oci8_adodb_moodle_database extends adodb_moodle_database {
         if (!defined('ADODB_PREFETCH_ROWS')) {
             define ('ADODB_PREFETCH_ROWS', 1000);
         }
-        $this->db->SetFetchMode(ADODB_ASSOC_CASE);
+        $this->db->SetFetchMode(ADODB_FETCH_ASSOC);
 
         /// No need to set charset. It must be specified by the NLS_LANG env. variable
         /// Enable sybase quotes, so addslashes and stripslashes will use "'"
index f626331325c6d9a1b8568feeb39c71cf407a360e..2129e24d38a04a305d18e6abfd75fc7c581e0097 100644 (file)
@@ -21,25 +21,4 @@ class odbc_mssql_adodb_moodle_database extends mssql_adodb_moodle_database {
         return 'odbc_mssql';
     }
 
-    protected function configure_dbconnection() {
-        if (!defined('ADODB_ASSOC_CASE')) {
-            define ('ADODB_ASSOC_CASE', 0);
-        }
-        $this->db->SetFetchMode(ADODB_ASSOC_CASE);
-
-        /// No need to set charset. It must be specified in the driver conf
-        /// Allow quoted identifiers
-            $this->db->Execute('SET QUOTED_IDENTIFIER ON');
-        /// Force ANSI nulls so the NULL check was done by IS NULL and NOT IS NULL
-        /// instead of equal(=) and distinct(<>) simbols
-            $this->db->Execute('SET ANSI_NULLS ON');
-        /// Enable sybase quotes, so addslashes and stripslashes will use "'"
-            ini_set('magic_quotes_sybase', '1');
-        /// NOTE: Not 100% useful because GPC has been addslashed with the setting off
-        ///       so IT'S MANDATORY TO CHANGE THIS UNDER php.ini or .htaccess for this DB
-        ///       or to turn off magic_quotes to allow Moodle to do it properly
-
-        return true;
-    }
-
 }
index c6da6a9652d494b24e0ea24823c91ef056de66db..f0251867c7bc04f84f6c259165933f4edce5459b 100644 (file)
@@ -75,7 +75,7 @@ class postgres7_adodb_moodle_database extends adodb_moodle_database {
             define ('ADODB_ASSOC_CASE', 2);
         }
 
-        $this->db->SetFetchMode(ADODB_ASSOC_CASE);
+        $this->db->SetFetchMode(ADODB_FETCH_ASSOC);
         $this->db->Execute("SET NAMES 'utf8'");
 
         return true;