Index: trunk/core/units/relationship/relationship_event_handler.php =================================================================== diff -u -N -r4689 -r4722 --- trunk/core/units/relationship/relationship_event_handler.php (.../relationship_event_handler.php) (revision 4689) +++ trunk/core/units/relationship/relationship_event_handler.php (.../relationship_event_handler.php) (revision 4722) @@ -160,12 +160,11 @@ */ function extractModulesInfo() { - // 1. get installed modules & their config info - $db =& $this->Application->GetADODBConnection(); - $prefixes = $db->GetCol('SELECT Var FROM '.TABLE_PREFIX.'Modules'); + // get installed modules & their config info + // maybe we should leave only prefixes, that have "view" permission $configs = Array(); - foreach($prefixes as $prefix) - { + foreach ($this->Application->ModuleInfo as $module_name => $module_data) { + $prefix = $module_data['Var']; $configs[$prefix] = $this->Application->getUnitOptions($prefix); if($configs[$prefix] === false) unset($configs[$prefix]); }