Refactored out of CRM_Core_PseudoConstant: ufGroup(), currencySymbols(). CRM-12464
[civicrm-core.git] / CRM / UF / Page / Group.php
index 60de77c1de2b775190740875c0a811f3dec83f04..2c559e34ad56d04132cdf1348410e91db0306e94 100644 (file)
@@ -235,21 +235,18 @@ class CRM_UF_Page_Group extends CRM_Core_Page {
     }
     $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) {
@@ -301,7 +298,7 @@ class CRM_UF_Page_Group extends CRM_Core_Page {
       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) {