First model of new upgrade.php scripts and comments in old ones.
Need validation before extending them everywhere across core. MDL-7214 Merged from MOODLE_17_STABLE
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
<?php // $Id$
|
||||
|
||||
|
||||
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
|
||||
//
|
||||
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
|
||||
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
|
||||
|
||||
function glossary_upgrade($oldversion) {
|
||||
/// This function does anything necessary to upgrade
|
||||
@@ -440,6 +443,8 @@ function glossary_upgrade($oldversion) {
|
||||
table_column('glossary_comments', 'comment', 'entrycomment', 'text', '', '', '');
|
||||
}
|
||||
|
||||
////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
<?php // $Id$
|
||||
|
||||
// THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
|
||||
//
|
||||
// IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
|
||||
// LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
|
||||
|
||||
function glossary_upgrade($oldversion) {
|
||||
/// This function does anything necessary to upgrade
|
||||
/// older versions to match current functionality
|
||||
@@ -204,6 +209,8 @@ function glossary_upgrade($oldversion) {
|
||||
table_column('glossary_comments', 'comment', 'entrycomment', 'text', '', '', '');
|
||||
}
|
||||
|
||||
////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<?PHP //$Id$
|
||||
|
||||
// This file keeps track of upgrades to
|
||||
// the glossary module
|
||||
//
|
||||
// Sometimes, changes between versions involve
|
||||
// alterations to database structures and other
|
||||
// major things that may break installations.
|
||||
//
|
||||
// The upgrade function in this file will attempt
|
||||
// to perform all the necessary actions to upgrade
|
||||
// your older installtion to the current version.
|
||||
//
|
||||
// If there's something it cannot do itself, it
|
||||
// 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
|
||||
|
||||
function xmldb_glossary_upgrade($oldversion=0) {
|
||||
|
||||
global $CFG, $THEME, $db;
|
||||
|
||||
$result = true;
|
||||
|
||||
/// And upgrade begins here. For each one, you'll need on block of code similar to the
|
||||
/// next one. Please, delete this comment lines once this file start handling proper
|
||||
/// upgrade code.
|
||||
/// if ($oldversion < YYYYMMDDII) { // Version we are upgrading to (match version.php)
|
||||
///
|
||||
/// }
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user