extractPassthroughParameters() - Last ditch hack to salvage this misbegotten function...
authorTim Otten <totten@civicrm.org>
Wed, 13 May 2020 08:10:12 +0000 (01:10 -0700)
committerTim Otten <totten@civicrm.org>
Wed, 13 May 2020 08:10:49 +0000 (01:10 -0700)
CRM/Mailing/Page/Url.php

index ece6a55990d6cd033c9bc588f00e5919efa89762..29be68c661101efbe3f9f91ec9563c3c7e30256c 100644 (file)
@@ -85,9 +85,18 @@ class CRM_Mailing_Page_Url extends CRM_Core_Page {
    * @link https://issues.civicrm.org/jira/browse/CRM-7103
    */
   protected function extractPassthroughParameters():string {
+    $config = CRM_Core_Config::singleton();
+
     $query_param = $_GET;
-    unset($query_param['qid'], $query_param['u']);
-    unset($query_param[CRM_Core_Config::singleton()->userFrameworkURLVar]);
+    unset($query_param['qid']);
+    unset($query_param['u']);
+    unset($query_param[$config->userFrameworkURLVar]);
+    if ($config->userFramework === 'WordPress') {
+      // Ugh
+      unset($query_param['page']);
+      unset($query_param['noheader']);
+    }
+
     $query_string = http_build_query($query_param);
     return $query_string;
   }