}
$profile = str_replace('civicrm/admin/uf/group', $urlReplaceWith, $profile);
- // FIXME: (CRM-3587) hack to make standalone profile in joomla work
- // without administrator login
+ // FIXME: (CRM-3587) hack to make standalone profile work
+ // in wordpress and joomla without administrator login
if ($config->userFramework == 'Joomla') {
$profile = str_replace('/administrator/', '/index.php', $profile);
}
- else {
- if ($config->userFramework == 'WordPress') {
- $profile = str_replace('/wp-admin/admin.php', '/index.php', $profile);
- }
+ elseif ($config->userFramework == 'WordPress') {
+ $profile = str_replace('/wp-admin/admin.php', '/index.php', $profile);
}
// add jquery files
$profile = CRM_Utils_String::addJqueryFiles($profile);
- // prevent jquery conflict
$this->assign('profile', htmlentities($profile, ENT_NOQUOTES, 'UTF-8'));
//get the title of uf group
if ($gid) {
return;
}
- $ufGroups = CRM_Core_PseudoConstant::ufGroup();
+ $ufGroups = CRM_Core_PseudoConstant::get('CRM_Core_DAO_UFGroup', 'uf_group_id');
CRM_Utils_Hook::aclGroup(CRM_Core_Permission::ADMIN, NULL, 'civicrm_uf_group', $ufGroups, $allUFGroups);
foreach ($allUFGroups as $id => $value) {