mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 08:55:15 +02:00
MDL-19058 xmldb editor & enums - detect used/unused enums when loading XML files
This commit is contained in:
parent
3316fe24d5
commit
16454b0f1c
@ -358,6 +358,15 @@ class xmldb_field extends xmldb_object {
|
||||
$this->next = trim($xmlarr['@']['NEXT']);
|
||||
}
|
||||
|
||||
/// TODO: Drop this check in Moodle 2.1
|
||||
/// Detect if there is old enum information in the XML file
|
||||
if (isset($xmlarr['@']['ENUM']) && isset($xmlarr['@']['ENUMVALUES'])) {
|
||||
$this->hasenums = true;
|
||||
if ($xmlarr['@']['ENUM'] == 'true') {
|
||||
$this->hasenumsenabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// Set some attributes
|
||||
if ($result) {
|
||||
$this->loaded = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user