From: stronk7 Date: Mon, 9 Jun 2008 15:32:25 +0000 (+0000) Subject: Minor recordset cleanup X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c45ea1dadb1b50613487689e37adb02980f8e4f6;p=moodle.git Minor recordset cleanup --- diff --git a/lib/dml/adodb_moodle_recordset.php b/lib/dml/adodb_moodle_recordset.php index 54af15ce3d..7a55b17626 100644 --- a/lib/dml/adodb_moodle_recordset.php +++ b/lib/dml/adodb_moodle_recordset.php @@ -7,7 +7,8 @@ require_once($CFG->libdir.'/dml/moodle_recordset.php'); * @package dmlib */ class adodb_moodle_recordset extends moodle_recordset { - private $rs; + + protected $rs; ///ADOdb recordset public function __construct($rs) { $this->rs = $rs; diff --git a/lib/dml/oci8po_adodb_moodle_recordset.php b/lib/dml/oci8po_adodb_moodle_recordset.php index 5e56dfca32..14a58d9a5d 100644 --- a/lib/dml/oci8po_adodb_moodle_recordset.php +++ b/lib/dml/oci8po_adodb_moodle_recordset.php @@ -7,39 +7,12 @@ require_once($CFG->libdir.'/dml/adodb_moodle_recordset.php'); * @package dmlib */ class oci8po_adodb_moodle_recordset extends adodb_moodle_recordset { - private $rs; - - public function __construct($rs) { - $this->rs = $rs; - } public function current() { /// Really DIRTY HACK for Oracle - needed because it can not see difference from NULL and '' - /// this can not be removed even if we chane db defaults :-( + /// this can not be removed even if we change db defaults :-( $fields = $this->rs->fields; array_walk($fields, array('oci8po_adodb_moodle_database', 'onespace2empty')); return (object)$fields; } - - public function key() { - return $this->rs->_currentRow; - } - - public function next() { - $this->rs->MoveNext(); - } - - public function rewind() { - //TODO - this does not work in Oracle :-( - error('Implement rewind in oracle by doing query again'); - $this->rs->MoveFirst(); - } - - public function valid() { - return !$this->rs->EOF; - } - - public function close() { - $this->rs->Close(); - } } diff --git a/lib/dml/pdo_moodle_recordset.php b/lib/dml/pdo_moodle_recordset.php index 1a4e24c4c8..3bc45d1c72 100644 --- a/lib/dml/pdo_moodle_recordset.php +++ b/lib/dml/pdo_moodle_recordset.php @@ -7,6 +7,7 @@ require_once($CFG->libdir.'/dml/moodle_recordset.php'); * @package dmlib */ class pdo_moodle_recordset extends moodle_recordset { + private $sht; public function __construct($sth) {