[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 <?php 2 // This file keeps track of upgrades to 3 // the glossary module 4 // 5 // Sometimes, changes between versions involve 6 // alterations to database structures and other 7 // major things that may break installations. 8 // 9 // The upgrade function in this file will attempt 10 // to perform all the necessary actions to upgrade 11 // your older installation to the current version. 12 // 13 // If there's something it cannot do itself, it 14 // will tell you what you need to do. 15 // 16 // The commands in here will all be database-neutral, 17 // using the methods of database_manager class 18 // 19 // Please do not forget to use upgrade_set_timeout() 20 // before any action that may take longer time to finish. 21 22 function xmldb_glossary_upgrade($oldversion) { 23 global $CFG, $DB; 24 25 $dbman = $DB->get_manager(); 26 27 // Moodle v2.8.0 release upgrade line. 28 // Put any upgrade step following this. 29 30 // Moodle v2.9.0 release upgrade line. 31 // Put any upgrade step following this. 32 33 if ($oldversion < 2015060200) { 34 35 // Define field showtabs to be added to glossary_formats. 36 $table = new xmldb_table('glossary_formats'); 37 $field = new xmldb_field('showtabs', XMLDB_TYPE_CHAR, '100', null, null, null, null, 'showgroup'); 38 39 // Conditionally launch add field showtabs. 40 if (!$dbman->field_exists($table, $field)) { 41 $dbman->add_field($table, $field); 42 } 43 44 // Glossary savepoint reached. 45 upgrade_mod_savepoint(true, 2015060200, 'glossary'); 46 } 47 48 // Moodle v3.0.0 release upgrade line. 49 // Put any upgrade step following this. 50 51 // Moodle v3.1.0 release upgrade line. 52 // Put any upgrade step following this. 53 54 return true; 55 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |