Skip to content

Commit

Permalink
MDL-15246 moving all remaining ddl function to adminlib, keeping old …
Browse files Browse the repository at this point in the history
…lib/ddllib.php only for BC withexisting code; fixed inline docs related to ddl
  • Loading branch information
skodak committed Jun 15, 2008
1 parent e81ebb9 commit b1f93b1
Show file tree
Hide file tree
Showing 61 changed files with 406 additions and 420 deletions.
1 change: 0 additions & 1 deletion admin/blocks.php
Expand Up @@ -6,7 +6,6 @@
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/blocklib.php');
require_once($CFG->libdir.'/tablelib.php');
require_once($CFG->libdir.'/ddllib.php');

admin_externalpage_setup('manageblocks');

Expand Down
1 change: 0 additions & 1 deletion admin/cliupgrade.php
Expand Up @@ -717,7 +717,6 @@

require_once(dirname(dirname(__FILE__)) . '/config.php');
require_once($CFG->libdir.'/adminlib.php'); // Contains various admin-only functions
require_once($CFG->libdir.'/ddllib.php'); // Install/upgrade related db functions

/**
* @todo check upgrade status, if upgrader is running already, notify user and exit.
Expand Down
1 change: 0 additions & 1 deletion admin/index.php
Expand Up @@ -23,7 +23,6 @@

require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php'); // Contains various admin-only functions
require_once($CFG->libdir.'/ddllib.php'); // Install/upgrade related db functions
require_once($CFG->libdir.'/db/upgradelib.php'); // Upgrade-related functions

$id = optional_param('id', '', PARAM_TEXT);
Expand Down
1 change: 0 additions & 1 deletion admin/modules.php
Expand Up @@ -5,7 +5,6 @@
require_once('../course/lib.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/tablelib.php');
require_once($CFG->libdir.'/ddllib.php');

// defines
define('MODULE_TABLE','module_administration_table');
Expand Down
3 changes: 0 additions & 3 deletions admin/xmldb/actions/check_bigints/check_bigints.class.php
Expand Up @@ -81,9 +81,6 @@ function invoke() {
$dbman = $DB->get_manager();
$dbfamily = $DB->get_dbfamily();

/// And we nedd some ddl suff
require_once ($CFG->libdir . '/ddllib.php');

/// Here we'll acummulate all the wrong fields found
$wrong_fields = array();

Expand Down
Expand Up @@ -79,7 +79,6 @@ function invoke() {
global $CFG, $XMLDB, $DB;

/// And we nedd some ddl suff
require_once ($CFG->libdir . '/ddllib.php');
$dbman = $DB->get_manager();

/// Here we'll acummulate all the wrong fields found
Expand Down
3 changes: 0 additions & 3 deletions admin/xmldb/actions/check_indexes/check_indexes.class.php
Expand Up @@ -78,9 +78,6 @@ function invoke() {

$dbman = $DB->get_manager();

/// And we nedd some ddl suff
require_once ($CFG->libdir . '/ddllib.php');

/// Here we'll acummulate all the missing indexes found
$missing_indexes = array();

Expand Down
1 change: 0 additions & 1 deletion admin/xmldb/index.php
Expand Up @@ -50,7 +50,6 @@
/// getting "incomplete" objects
require_once('../../config.php');
require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->libdir.'/ddllib.php'); // Install/upgrade related db functions

admin_externalpage_setup('xmldbeditor');

Expand Down
4 changes: 2 additions & 2 deletions backup/db/upgrade.php
Expand Up @@ -15,7 +15,7 @@
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
// using the methods of database_manager class

function xmldb_backup_upgrade($oldversion=0) {

Expand All @@ -29,7 +29,7 @@ function xmldb_backup_upgrade($oldversion=0) {
/// upgrade code.

/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
/// $result = result of "/lib/ddllib.php" function calls
/// $result = result of database_manager methods
/// }

return $result;
Expand Down
4 changes: 2 additions & 2 deletions blocks/activity_modules/db/upgrade.php
Expand Up @@ -15,7 +15,7 @@
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
// using the methods of database_manager class

function xmldb_block_activity_modules_upgrade($oldversion=0) {

Expand All @@ -29,7 +29,7 @@ function xmldb_block_activity_modules_upgrade($oldversion=0) {
/// upgrade code.

/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
/// $result = result of "/lib/ddllib.php" function calls
/// $result = result of database_manager methods
/// }

return $result;
Expand Down
4 changes: 2 additions & 2 deletions blocks/admin/db/upgrade.php
Expand Up @@ -15,7 +15,7 @@
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
// using the methods of database_manager class

function xmldb_block_admin_upgrade($oldversion=0) {

Expand All @@ -29,7 +29,7 @@ function xmldb_block_admin_upgrade($oldversion=0) {
/// upgrade code.

/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
/// $result = result of "/lib/ddllib.php" function calls
/// $result = result of database_manager methods
/// }

return $result;
Expand Down
4 changes: 2 additions & 2 deletions blocks/calendar_month/db/upgrade.php
Expand Up @@ -15,7 +15,7 @@
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
// using the methods of database_manager class

function xmldb_block_calendar_month_upgrade($oldversion=0) {

Expand All @@ -29,7 +29,7 @@ function xmldb_block_calendar_month_upgrade($oldversion=0) {
/// upgrade code.

/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
/// $result = result of "/lib/ddllib.php" function calls
/// $result = result of database_manager methods
/// }

return $result;
Expand Down
4 changes: 2 additions & 2 deletions blocks/calendar_upcoming/db/upgrade.php
Expand Up @@ -15,7 +15,7 @@
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
// using the methods of database_manager class

function xmldb_block_calendar_upcoming_upgrade($oldversion=0) {

Expand All @@ -29,7 +29,7 @@ function xmldb_block_calendar_upcoming_upgrade($oldversion=0) {
/// upgrade code.

/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
/// $result = result of "/lib/ddllib.php" function calls
/// $result = result of database_manager methods
/// }

return $result;
Expand Down
4 changes: 2 additions & 2 deletions blocks/course_list/db/upgrade.php
Expand Up @@ -15,7 +15,7 @@
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
// using the methods of database_manager class

function xmldb_block_course_list_upgrade($oldversion=0) {

Expand All @@ -29,7 +29,7 @@ function xmldb_block_course_list_upgrade($oldversion=0) {
/// upgrade code.

/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
/// $result = result of "/lib/ddllib.php" function calls
/// $result = result of database_manager methods
/// }

return $result;
Expand Down
4 changes: 2 additions & 2 deletions blocks/course_summary/db/upgrade.php
Expand Up @@ -15,7 +15,7 @@
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
// using the methods of database_manager class

function xmldb_block_course_summary_upgrade($oldversion=0) {

Expand All @@ -29,7 +29,7 @@ function xmldb_block_course_summary_upgrade($oldversion=0) {
/// upgrade code.

/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
/// $result = result of "/lib/ddllib.php" function calls
/// $result = result of database_manager methods
/// }

return $result;
Expand Down
4 changes: 2 additions & 2 deletions blocks/db/upgrade.php
Expand Up @@ -15,7 +15,7 @@
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
// using the methods of database_manager class

function xmldb_blocks_upgrade($oldversion=0) {

Expand All @@ -31,7 +31,7 @@ function xmldb_blocks_upgrade($oldversion=0) {
/// upgrade code.

/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
/// $result = result of "/lib/ddllib.php" function calls
/// $result = result of database_manager methods
/// }

if ($result && $oldversion < 2007081300) {
Expand Down
4 changes: 2 additions & 2 deletions blocks/news_items/db/upgrade.php
Expand Up @@ -15,7 +15,7 @@
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
// using the methods of database_manager class

function xmldb_block_news_items_upgrade($oldversion=0) {

Expand All @@ -29,7 +29,7 @@ function xmldb_block_news_items_upgrade($oldversion=0) {
/// upgrade code.

/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
/// $result = result of "/lib/ddllib.php" function calls
/// $result = result of database_manager methods
/// }

return $result;
Expand Down
4 changes: 2 additions & 2 deletions blocks/online_users/db/upgrade.php
Expand Up @@ -15,7 +15,7 @@
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
// using the methods of database_manager class

function xmldb_block_online_users_upgrade($oldversion=0) {

Expand All @@ -29,7 +29,7 @@ function xmldb_block_online_users_upgrade($oldversion=0) {
/// upgrade code.

/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
/// $result = result of "/lib/ddllib.php" function calls
/// $result = result of database_manager methods
/// }

return $result;
Expand Down
4 changes: 2 additions & 2 deletions blocks/participants/db/upgrade.php
Expand Up @@ -15,7 +15,7 @@
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
// using the methods of database_manager class

function xmldb_block_participants_upgrade($oldversion=0) {

Expand All @@ -29,7 +29,7 @@ function xmldb_block_participants_upgrade($oldversion=0) {
/// upgrade code.

/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
/// $result = result of "/lib/ddllib.php" function calls
/// $result = result of database_manager methods
/// }

return $result;
Expand Down
4 changes: 2 additions & 2 deletions blocks/recent_activity/db/upgrade.php
Expand Up @@ -15,7 +15,7 @@
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
// using the methods of database_manager class

function xmldb_block_recent_activity_upgrade($oldversion=0) {

Expand All @@ -29,7 +29,7 @@ function xmldb_block_recent_activity_upgrade($oldversion=0) {
/// upgrade code.

/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
/// $result = result of "/lib/ddllib.php" function calls
/// $result = result of database_manager methods
/// }

return $result;
Expand Down
2 changes: 1 addition & 1 deletion blocks/rss_client/db/upgrade.php
Expand Up @@ -15,7 +15,7 @@
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
// using the methods of database_manager class

function xmldb_block_rss_client_upgrade($oldversion=0) {

Expand Down
4 changes: 2 additions & 2 deletions blocks/search/db/upgrade.php
Expand Up @@ -15,7 +15,7 @@
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
// using the methods of database_manager class

function xmldb_block_search_upgrade($oldversion=0) {

Expand All @@ -29,7 +29,7 @@ function xmldb_block_search_upgrade($oldversion=0) {
/// upgrade code.

/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
/// $result = result of "/lib/ddllib.php" function calls
/// $result = result of database_manager methods
/// }

//===== 1.9.0 upgrade line ======//
Expand Down
4 changes: 2 additions & 2 deletions blocks/search_forums/db/upgrade.php
Expand Up @@ -15,7 +15,7 @@
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
// using the methods of database_manager class

function xmldb_block_search_forums_upgrade($oldversion=0) {

Expand All @@ -29,7 +29,7 @@ function xmldb_block_search_forums_upgrade($oldversion=0) {
/// upgrade code.

/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
/// $result = result of "/lib/ddllib.php" function calls
/// $result = result of database_manager methods
/// }

return $result;
Expand Down
4 changes: 2 additions & 2 deletions blocks/section_links/db/upgrade.php
Expand Up @@ -15,7 +15,7 @@
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
// using the methods of database_manager class

function xmldb_block_section_links_upgrade($oldversion=0) {

Expand All @@ -29,7 +29,7 @@ function xmldb_block_section_links_upgrade($oldversion=0) {
/// upgrade code.

/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
/// $result = result of "/lib/ddllib.php" function calls
/// $result = result of database_manager methods
/// }

return $result;
Expand Down
4 changes: 2 additions & 2 deletions blocks/social_activities/db/upgrade.php
Expand Up @@ -15,7 +15,7 @@
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
// using the methods of database_manager class

function xmldb_block_social_activities_upgrade($oldversion=0) {

Expand All @@ -29,7 +29,7 @@ function xmldb_block_social_activities_upgrade($oldversion=0) {
/// upgrade code.

/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
/// $result = result of "/lib/ddllib.php" function calls
/// $result = result of database_manager methods
/// }

return $result;
Expand Down
2 changes: 1 addition & 1 deletion enrol/authorize/db/upgrade.php
Expand Up @@ -15,7 +15,7 @@
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
// using the methods of database_manager class

function xmldb_enrol_authorize_upgrade($oldversion=0) {

Expand Down
4 changes: 2 additions & 2 deletions enrol/paypal/db/upgrade.php
Expand Up @@ -15,7 +15,7 @@
// will tell you what you need to do.
//
// The commands in here will all be database-neutral,
// using the functions defined in lib/ddllib.php
// using the methods of database_manager class

function xmldb_enrol_paypal_upgrade($oldversion=0) {

Expand All @@ -29,7 +29,7 @@ function xmldb_enrol_paypal_upgrade($oldversion=0) {
/// upgrade code.

/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
/// $result = result of "/lib/ddllib.php" function calls
/// $result = result of database_manager methods
/// }

return $result;
Expand Down
1 change: 0 additions & 1 deletion lib/accesslib.php
Expand Up @@ -5125,7 +5125,6 @@ function component_level_changed($cap, $comp, $contextlevel) {
*/
function build_context_path($force=false) {
global $CFG, $DB;
require_once($CFG->libdir.'/ddllib.php');

// System context
$sitectx = get_system_context(!$force);
Expand Down

0 comments on commit b1f93b1

Please sign in to comment.