vtenext/modules/Update/changes/1792_1793.php
2021-04-28 20:10:26 +02:00

8 lines
534 B
PHP

<?php
global $adb, $table_prefix;
$moduleInstanceD = Vtiger_Module::getInstance('Documents');
$moduleInstanceE = Vtiger_Module::getInstance('Employees');
$result = $adb->pquery("select relation_id from {$table_prefix}_relatedlists where tabid = ? and related_tabid = ? and name = ?", array($moduleInstanceD->id,$moduleInstanceE->id,'get_documents_dependents_list'));
if ($result && $adb->num_rows($result) == 0) {
$moduleInstanceD->setRelatedList($moduleInstanceE,'Employees',array('select','add'),'get_documents_dependents_list');
}