]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14679 removed all instances of recordset_to_menu()
authorskodak <skodak>
Sun, 1 Jun 2008 16:10:20 +0000 (16:10 +0000)
committerskodak <skodak>
Sun, 1 Jun 2008 16:10:20 +0000 (16:10 +0000)
lib/dmllib.php
lib/dmllib_todo.php

index 71e7b34cdc032670a91f91acb42e2c4793503ccb..d6e19e62bd41f24ec7e1372a220e7d141ff96f47 100644 (file)
@@ -443,3 +443,8 @@ function get_records_sql_menu($sql, $limitfrom='', $limitnum='') {
 function column_type($table, $column) {
     error('column_type() removed');
 }
+
+function recordset_to_menu($rs) {
+    error('recordset_to_menu() removed');
+}
+
index 352094918e8a2b2818c0c85fb3d9c637c4df2476..03808932b09987c384c5da77c54e4abe55f12ec5 100644 (file)
@@ -611,35 +611,6 @@ function get_records_sql($sql, $limitfrom='', $limitnum='') {
     return recordset_to_array($rs);
 }
 
-/**
- * Utility function used by the following 3 methods.
- *
- * @param object an ADODB RecordSet object with two columns.
- * @return mixed an associative array, or false if an error occured or the RecordSet was empty.
- */
-function recordset_to_menu($rs) {
-    global $CFG;
-    $menu = array();
-    if ($rs && !rs_EOF($rs)) {
-        $keys = array_keys($rs->fields);
-        $key0=$keys[0];
-        $key1=$keys[1];
-        while (!$rs->EOF) {
-            $menu[$rs->fields[$key0]] = $rs->fields[$key1];
-            $rs->MoveNext();
-        }
-        /// Really DIRTY HACK for Oracle, but it's the only way to make it work
-        /// until we got all those NOT NULL DEFAULT '' out from Moodle
-        if ($CFG->dbfamily == 'oracle') {
-            array_walk($menu, 'onespace2empty');
-        }
-        /// End of DIRTY HACK
-        return $menu;
-    } else {
-        return false;
-    }
-}
-
 /**
  * Utility function
  * Similar to recordset_to_menu