Commit 1b59b311 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Fixes #5254 Trying to fix foreignKey problems

parent 41ccf13b
......@@ -1395,7 +1395,7 @@ class simplePlugin extends plugin
// For each tab concerned
foreach ($tabRefs['refs'] as $tab => $fieldRefs) {
// If the tab is activated on this object
if (isset($tabobject->by_object[$tab])) {
if (isset($tabobject->by_object[$tab]) && ($tabobject->by_object[$tab]->is_account || $tabobject->by_object[$tab]->ignore_account)) {
// For each field
foreach ($fieldRefs as $ofield => $field) {
// call plugin::foreignKeyUpdate(ldapname, oldvalue, newvalue, source) on the object
......@@ -1412,9 +1412,9 @@ class simplePlugin extends plugin
);
}
$tabobject->by_object[$tab]->save_object();
$tabobject->by_object[$tab]->save();
}
}
$tabobject->save();
} elseif ($mode == 'references') {
// For each tab concerned
foreach ($tabRefs['refs'] as $tab => $tab_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