function getGroupName($mixedId) { if ('m' == $mixedId[0]) { require_once BX_DIRECTORY_PATH_INC . 'membership_levels.inc.php'; $a = getMembershipInfo(substr($mixedId, 1)); return $a && isset($a['Name']) ? $a['Name'] : 'undefined'; } else { bx_import('BxDolPrivacyQuery'); $oPrivacyQuery = new BxDolPrivacyQuery(); $a = $oPrivacyQuery->getGroupsBy(array('type' => 'id', 'id' => $mixedId)); return $a && (int) $a['owner_id'] == 0 ? _t('_ps_group_' . $a['id'] . '_title') : $a['title']; } }