$currentPage = max((int ) @$_POST[self::PAGE_ID], 1);
}
elseif (isset($_POST[self::PAGE_ID_BOTTOM])) {
- $currentPage = max((int ) @$_POST[self::PAGE_ID_BOTTOM]);
+ $currentPage = max((int ) @$_POST[self::PAGE_ID_BOTTOM], 1);
}
}
elseif (isset($_GET[self::PAGE_ID])) {
* @return string
*/
public function getCurrentLocation() {
- $config = CRM_Core_Config::singleton();
- $path = $_GET[$config->userFrameworkURLVar] ?? NULL;
+ $path = CRM_Utils_System::currentPath();
return CRM_Utils_System::url($path, CRM_Utils_System::getLinksUrl(self::PAGE_ID, FALSE, TRUE), FALSE, NULL, FALSE) . $this->getCurrentPageID();
}