MDL-14679 towards adodb separation

This commit is contained in:
skodak
2008-06-09 18:48:28 +00:00
parent 294ce9870f
commit 96d1387809
7 changed files with 3 additions and 43 deletions
-16
View File
@@ -27,19 +27,3 @@ error('TODO: rewrite db perf code'); // TODO: rewrite
print_header("$site->shortname: $strdatabaseperformance", "$site->fullname", $navigation);
exit;
}
if (!empty($bottomframe) or !empty($do)) {
$perf =&NewPerfMonitor($db);
$perf->UI($pollsecs=5);
exit;
}
?>
<head>
<title><?php echo "$site->shortname: $strdatabaseperformance" ?></title>
</head>
<frameset rows="80,*">
<frame src="dbperformance.php?topframe=true">
<frame src="dbperformance.php?bottomframe=true">
</frameset>
+1 -1
View File
@@ -173,7 +173,7 @@ function setup_enrolments(&$user) {
* used.
*/
function sync_enrolments($role = null) {
global $CFG, $db, $DB;
global $CFG, $DB;
error_reporting(E_ALL);
// Connect to the external database
-17
View File
@@ -218,7 +218,6 @@ class database_manager {
* to 1 "enum-like" constraint. So, if more than one is returned, only the first one will be
* retrieved by this funcion.
*
* @uses, $db
* @param xmldb_table the table to be searched
* @param xmldb_field the field to be searched
* @return string check constraint name or false
@@ -257,7 +256,6 @@ class database_manager {
/**
* Given one xmldb_field, check if it has a check constraint in DB
*
* @uses, $db
* @param xmldb_table the table
* @param xmldb_field the field to be searched for any existing constraint
* @return boolean true/false
@@ -273,7 +271,6 @@ class database_manager {
* Given one xmldb_key, the function returns the name of the key in DB (if exists)
* of false if it doesn't exist
*
* @uses, $db
* @param xmldb_table the table to be searched
* @param xmldb_key the key to be searched
* @return string key name of false
@@ -633,7 +630,6 @@ class database_manager {
/**
* This function will add the field to the table passed as arguments
*
* @uses $CFG, $db
* @param xmldb_table table object (just the name is mandatory)
* @param xmldb_field field object (full specs are required)
* @param boolean continue to specify if must continue on error (true) or stop (false)
@@ -675,7 +671,6 @@ class database_manager {
/**
* This function will drop the field from the table passed as arguments
*
* @uses $CFG, $db
* @param xmldb_table table object (just the name is mandatory)
* @param xmldb_field field object (just the name is mandatory)
* @param boolean continue to specify if must continue on error (true) or stop (false)
@@ -710,7 +705,6 @@ class database_manager {
/**
* This function will change the type of the field in the table passed as arguments
*
* @uses $CFG, $db
* @param xmldb_table table object (just the name is mandatory)
* @param xmldb_field field object (full specs are required)
* @param boolean continue to specify if must continue on error (true) or stop (false)
@@ -745,7 +739,6 @@ class database_manager {
/**
* This function will change the precision of the field in the table passed as arguments
*
* @uses $CFG, $db
* @param xmldb_table table object (just the name is mandatory)
* @param xmldb_field field object (full specs are required)
* @param boolean continue to specify if must continue on error (true) or stop (false)
@@ -761,7 +754,6 @@ class database_manager {
/**
* This function will change the unsigned/signed of the field in the table passed as arguments
*
* @uses $CFG, $db
* @param xmldb_table table object (just the name is mandatory)
* @param xmldb_field field object (full specs are required)
* @param boolean continue to specify if must continue on error (true) or stop (false)
@@ -777,7 +769,6 @@ class database_manager {
/**
* This function will change the nullability of the field in the table passed as arguments
*
* @uses $CFG, $db
* @param xmldb_table table object (just the name is mandatory)
* @param xmldb_field field object (full specs are required)
* @param boolean continue to specify if must continue on error (true) or stop (false)
@@ -843,7 +834,6 @@ class database_manager {
* This function will change the default of the field in the table passed as arguments
* One null value in the default field means delete the default
*
* @uses $CFG, $db
* @param xmldb_table table object (just the name is mandatory)
* @param xmldb_field field object (full specs are required)
* @param boolean continue to specify if must continue on error (true) or stop (false)
@@ -879,7 +869,6 @@ class database_manager {
* This function will rename the field in the table passed as arguments
* Before renaming the field, the function will check it exists
*
* @uses $CFG, $db
* @param xmldb_table table object (just the name is mandatory)
* @param xmldb_field index object (full specs are required)
* @param string new name of the field
@@ -948,7 +937,6 @@ class database_manager {
/**
* This function will create the key in the table passed as arguments
*
* @uses $CFG, $db
* @param xmldb_table table object (just the name is mandatory)
* @param xmldb_key index object (full specs are required)
* @param boolean continue to specify if must continue on error (true) or stop (false)
@@ -981,7 +969,6 @@ class database_manager {
/**
* This function will drop the key in the table passed as arguments
*
* @uses $CFG, $db
* @param xmldb_table table object (just the name is mandatory)
* @param xmldb_key key object (full specs are required)
* @param boolean continue to specify if must continue on error (true) or stop (false)
@@ -1015,7 +1002,6 @@ class database_manager {
* This function will rename the key in the table passed as arguments
* Experimental. Shouldn't be used at all in normal installation/upgrade!
*
* @uses $CFG, $db
* @param xmldb_table table object (just the name is mandatory)
* @param xmldb_key key object (full specs are required)
* @param string new name of the key
@@ -1055,7 +1041,6 @@ class database_manager {
* This function will create the index in the table passed as arguments
* Before creating the index, the function will check it doesn't exists
*
* @uses $CFG, $db
* @param xmldb_table table object (just the name is mandatory)
* @param xmldb_index index object (full specs are required)
* @param boolean continue to specify if must continue on error (true) or stop (false)
@@ -1091,7 +1076,6 @@ class database_manager {
* This function will drop the index in the table passed as arguments
* Before dropping the index, the function will check it exists
*
* @uses $CFG, $db
* @param xmldb_table table object (just the name is mandatory)
* @param xmldb_index index object (full specs are required)
* @param boolean continue to specify if must continue on error (true) or stop (false)
@@ -1128,7 +1112,6 @@ class database_manager {
* Before renaming the index, the function will check it exists
* Experimental. Shouldn't be used at all!
*
* @uses $CFG, $db
* @param xmldb_table table object (just the name is mandatory)
* @param xmldb_index index object (full specs are required)
* @param string new name of the index
-3
View File
@@ -188,9 +188,6 @@ class mssql_sql_generator extends sql_generator {
* check constraints
*/
public function getDropFieldSQL($xmldb_table, $xmldb_field) {
global $db;
$results = array();
/// Get the quoted name of the table and field
-3
View File
@@ -236,9 +236,6 @@ class postgres_sql_generator extends sql_generator {
* - Changes in default require the SET/DROP DEFAULT clause
*/
public function getAlterFieldSQL($xmldb_table, $xmldb_field) {
global $db;
$results = array(); /// To store all the needed SQL commands
/// Get the normla names of the table and field
+1 -2
View File
@@ -1159,7 +1159,7 @@ abstract class moodle_database {
/**
* Returns the proper SQL to do CONCAT between the elements passed
* Can take many parameters - just a passthrough to $db->Concat()
* Can take many parameters
*
* @param string $element
* @return string
@@ -1170,7 +1170,6 @@ abstract class moodle_database {
* Returns the proper SQL to do CONCAT between the elements passed
* with a given separator
*
* @uses $db
* @param string $separator
* @param array $elements
* @return string
+1 -1
View File
@@ -52,7 +52,7 @@
$chat->timemodified = backup_todb($info['MOD']['#']['TIMEMODIFIED']['0']['#']);
//The structure is equal to the db, so insert the chat
$newid = $db->insert_record ("chat",$chat);
$newid = $DB->insert_record ("chat",$chat);
//Do some output
if (!defined('RESTORE_SILENTLY')) {