mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
Now upgrade and restore processes enable editalways for old
secondary glossaries. Smooth transition. Thanks, Martin! :-) Bug 1445 (http://moodle.org/bugs/bug.php?op=show&bugid=1445)
This commit is contained in:
parent
f8559be0fc
commit
cd2bf3309c
4 changed files with 19 additions and 1 deletions
|
@ -100,6 +100,14 @@
|
|||
$glossary->displayformat = 'dictionary';
|
||||
}
|
||||
|
||||
//If the backup file doesn't include the editalways field, activate it
|
||||
//in secondary glossaries (old behaviour, pre 1.4)
|
||||
if (! isset($info['MOD']['#']['EDITALWAYS']['0']['#'])) { //It's a pre-14 backup file
|
||||
if ($glossary->mainglossary == '0') {
|
||||
$glossary->editalways = '1';
|
||||
}
|
||||
}
|
||||
|
||||
//The structure is equal to the db, so insert the glossary
|
||||
$newid = insert_record ("glossary",$glossary);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue