function check_record_access(WT_GedcomRecord $object = null) { global $controller; if (!$object || !$object->canShow() || !$object->canEdit()) { $controller->pageHeader()->addInlineJavascript('closePopupAndReloadParent();'); exit; } }