Commit 5f875068 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(objectTypes) Make sure objectTypes are stored in uppercase

This avoids small efficiency issues in References tab and foreign key
 handling. Might also impact other parts of FD.

issue #5809
Showing with 14 additions and 0 deletions
+14 -0
......@@ -139,6 +139,20 @@ class pluglist {
if (!isset($infos['plTitle']) && isset($infos['plShortName'])) {
$infos['plTitle'] = $infos['plShortName'];
}
if (isset($infos['plObjectType'])) {
/* Convert object types to uppercase */
foreach(array_keys($infos['plObjectType']) as $key) {
if (is_numeric($key)) {
$infos['plObjectType'][$key] = strtoupper($infos['plObjectType'][$key]);
} else {
$newkey = strtoupper($key);
if ($newkey != $key) {
$infos['plObjectType'][$newkey] = $infos['plObjectType'][$key];
unset($infos['plObjectType'][$key]);
}
}
}
}
$infos['plForeignRefs'] = array();
$infos['INDEX'] = $index;
$this->info[$cname] = $infos;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment