X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FPagerAToZ.php;h=650dd715e35cc3175eea05658729bd4d27daa9a8;hb=076fe09aa31cb92fa9e254b06a32e17ce5c76e4b;hp=c9e15a636acb3f916ccaa53e95eb801e2f16bcd3;hpb=8ca9526d01f4021d048061006184a5fc79338e10;p=civicrm-core.git diff --git a/CRM/Utils/PagerAToZ.php b/CRM/Utils/PagerAToZ.php index c9e15a636a..650dd715e3 100644 --- a/CRM/Utils/PagerAToZ.php +++ b/CRM/Utils/PagerAToZ.php @@ -114,6 +114,7 @@ class CRM_Utils_PagerAToZ { * * @return array * with links + * @throws \CRM_Core_Exception */ public static function createLinks(&$query, $sortByCharacter, $isDAO) { $AToZBar = self::getStaticCharacters(); @@ -135,9 +136,7 @@ class CRM_Utils_PagerAToZ { $qfKey = $query->_formValues['qfKey'] ?? NULL; } if (empty($qfKey)) { - // CRM-20943 Can only pass variables by reference and also cannot use $this so using $empty setting to NULL which is default. - $emptyVariable = NULL; - $qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $emptyVariable, FALSE, NULL, $_REQUEST); + $qfKey = CRM_Utils_Request::retrieve('qfKey', 'String'); } $aToZBar = []; @@ -153,7 +152,17 @@ class CRM_Utils_PagerAToZ { $element['class'] = "active"; $klass = 'class="active"'; } - $url = CRM_Utils_System::url($path, "force=1&qfKey=$qfKey&sortByCharacter="); + $urlParams = [ + 'force' => 1, + 'qfKey' => $qfKey, + ]; + if (($query->_context ?? '') === 'amtg') { + // See https://lab.civicrm.org/dev/core/-/issues/2333 + // Seems to be needed in add to group flow. + $urlParams['_qf_Basic_display'] = 1; + } + $urlParams['sortByCharacter'] = ''; + $url = CRM_Utils_System::url($path, $urlParams); // we do it this way since we want the url to be encoded but not the link character // since that seems to mess up drupal utf-8 encoding etc $url .= urlencode($link);