Use currentPath method to build QuickForm post URL
authorChristian Wach <needle@haystack.co.uk>
Tue, 21 Nov 2023 14:22:28 +0000 (14:22 +0000)
committerChristian Wach <needle@haystack.co.uk>
Tue, 21 Nov 2023 14:22:28 +0000 (14:22 +0000)
CRM/Utils/System/Base.php

index 4f213081468b4890a8769f244f42fc17ce6fe9fb..1be54baed20ebed8c6cb975d47e57057b387b819 100644 (file)
@@ -108,12 +108,12 @@ abstract class CRM_Utils_System_Base {
    *   The url to post the form.
    */
   public function postURL($action) {
-    $config = CRM_Core_Config::singleton();
     if (!empty($action)) {
       return $action;
     }
 
-    return $this->url(CRM_Utils_Array::value($config->userFrameworkURLVar, $_GET),
+    $current_path = CRM_Utils_System::currentPath();
+    return $this->url($current_path,
       NULL, TRUE, NULL, FALSE
     );
   }