Many many changes lumped in here ... not finished yet either.

Basically all the Database functions are in lib/datalib.php
and the web functions are all in lib/weblib.php, so
moodlelib.php is much thinner than it was.

Data functions have been extended ... most old calls will
still work, but now many more SQL commands can be performed
using the datalib functions rather than using SQL.  I'm
currently moving through the whole tree replacing SQL
calls or at least concentrating them in one section of
mod/xxx/lib.php

Still working on forums, quizzes, surveys, resources.

The tree is currently not full working ... some things are
half-completed ... will resume tomorrow.
This commit is contained in:
moodler
2002-12-20 14:44:14 +00:00
parent 03f13d2207
commit 9fa49e22ab
43 changed files with 1534 additions and 1776 deletions
+8 -5
View File
@@ -26,8 +26,9 @@
/// Load up standard libraries
require("$CFG->libdir/weblib.php"); // Standard web page functions
require("$CFG->libdir/moodlelib.php"); // Various Moodle functions
require("$CFG->libdir/weblib.php"); // Functions for producing HTML
require("$CFG->libdir/datalib.php"); // Functions for accessing databases
require("$CFG->libdir/moodlelib.php"); // Other general-purpose functions
/// Set error reporting back to normal
@@ -36,7 +37,7 @@
/// Load up any configuration from the config table
if ($configs = get_records_sql("SELECT * FROM config")) {
if ($configs = get_records("config")) {
$CFG = (array)$CFG;
foreach ($configs as $config) {
$CFG[$config->name] = $config->value;
@@ -112,8 +113,10 @@
if (! isset($_SESSION["USER"])) { $_SESSION["USER"] = new object; }
extract($_SESSION); // Makes $SESSION and $USER available for read-only access
$FULLME = qualified_me();
$ME = strip_querystring($FULLME);
if (!$FULLME) {
$FULLME = qualified_me();
}
$ME = strip_querystring($FULLME);
/// Set language/locale of printed times. If user has chosen a language that