MDL-19058 xmldb editor & enums - detect used/unused enums when loading XML files

This commit is contained in:
stronk7 2009-05-26 18:45:02 +00:00
parent 3316fe24d5
commit 16454b0f1c

View File

@ -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;