Fix function declaration to ensure that passing in frontend variable doesn't cause...
authorSeamus Lee <seamuslee001@gmail.com>
Mon, 6 Jul 2020 02:39:15 +0000 (12:39 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Mon, 6 Jul 2020 03:45:12 +0000 (13:45 +1000)
CRM/Utils/System.php
CRM/Utils/System/Base.php
CRM/Utils/System/Drupal8.php
CRM/Utils/System/DrupalBase.php
CRM/Utils/System/Joomla.php
CRM/Utils/System/Soap.php
CRM/Utils/System/UnitTests.php
CRM/Utils/System/WordPress.php

index 16ad53f92113e0f0c1b2100269ae06e243659393..9a7d12db038acd719f18bc9d3c03a0b8cb71db5c 100644 (file)
@@ -272,7 +272,7 @@ class CRM_Utils_System {
     }
 
     $config = CRM_Core_Config::singleton();
-    $url = $config->userSystem->url($path, $query, $absolute, $fragment, $frontend, $forceBackend);
+    $url = $config->userSystem->url($path, $query, $absolute, $fragment, $frontend, $forceBackend, $htmlize);
 
     if ($htmlize) {
       $url = htmlentities($url);
index 3fad89433aabc8cc1b1bcb214a42099c476077ba..5c4f1d58bb14f9de4cb275da75b166b15a45dca3 100644 (file)
@@ -124,6 +124,8 @@ abstract class CRM_Utils_System_Base {
    *   This link should be to the CMS front end (applies to WP & Joomla).
    * @param bool $forceBackend
    *   This link should be to the CMS back end (applies to WP & Joomla).
+   * @param bool $htmlize
+   *   Whether to encode special html characters such as &.
    *
    * @return string
    */
@@ -133,7 +135,8 @@ abstract class CRM_Utils_System_Base {
     $absolute = FALSE,
     $fragment = NULL,
     $frontend = FALSE,
-    $forceBackend = FALSE
+    $forceBackend = FALSE,
+    $htmlize = TRUE
   ) {
     return NULL;
   }
index fad974b80d680a4232307d2a2a20ad79d229b887..53e2a67dea34288231577164dc1f9bd4eebe686f 100644 (file)
@@ -280,7 +280,8 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase {
     $absolute = FALSE,
     $fragment = NULL,
     $frontend = FALSE,
-    $forceBackend = FALSE
+    $forceBackend = FALSE,
+    $htmlize = TRUE
   ) {
     $query = html_entity_decode($query);
 
index 4aa3b97808b5fe682fe0130e07cae68c81ba6fe4..aeef820d20fde883262d4ed4d11e9cd1bf3c47bc 100644 (file)
@@ -153,7 +153,8 @@ abstract class CRM_Utils_System_DrupalBase extends CRM_Utils_System_Base {
     $absolute = FALSE,
     $fragment = NULL,
     $frontend = FALSE,
-    $forceBackend = FALSE
+    $forceBackend = FALSE,
+    $htmlize = TRUE
   ) {
     $config = CRM_Core_Config::singleton();
     $script = 'index.php';
index bea96efdaf3a79e4e70cace8b9fd766dfdaf74a6..f7b4b6821310ea6c85de2dbf11ff3ee94e219c14 100644 (file)
@@ -239,7 +239,8 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base {
     $absolute = FALSE,
     $fragment = NULL,
     $frontend = FALSE,
-    $forceBackend = FALSE
+    $forceBackend = FALSE,
+    $htmlize = TRUE
   ) {
     $config = CRM_Core_Config::singleton();
     $separator = '&';
index 0881ecb81813472b87d24f0b5d5d2cda4fa8e8ca..90a04c6686bfe15f9572a95a179215d59936b160 100644 (file)
@@ -43,7 +43,7 @@ class CRM_Utils_System_Soap extends CRM_Utils_System_Base {
   /**
    * @inheritDoc
    */
-  public function url($path = NULL, $query = NULL, $absolute = TRUE, $fragment = NULL) {
+  public function url($path = NULL, $query = NULL, $absolute = TRUE, $fragment = NULL, $frontend = FALSE, $forceBackend = FALSE, $htmlize = TRUE) {
     if (isset(self::$ufClass)) {
       $className = self::$ufClass;
       $url = $className::url($path, $query, $absolute, $fragment);
index f1d3ce640a1ee991cd17caa41ae22842b519bf5d..14762fff7f1f3e9f360bf051aa471f66ca48b578 100644 (file)
@@ -75,9 +75,9 @@ class CRM_Utils_System_UnitTests extends CRM_Utils_System_Base {
     $query = NULL,
     $absolute = FALSE,
     $fragment = NULL,
-    $htmlize = TRUE,
     $frontend = FALSE,
-    $forceBackend = FALSE
+    $forceBackend = FALSE,
+    $htmlize = TRUE
   ) {
     $config = CRM_Core_Config::singleton();
     static $script = 'index.php';
index d844e98b45aa880c8cf8c244224ff6da5698ed93..a4c79c71933ad8658094395ed31545d07b969b3a 100644 (file)
@@ -265,7 +265,8 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base {
     $absolute = FALSE,
     $fragment = NULL,
     $frontend = FALSE,
-    $forceBackend = FALSE
+    $forceBackend = FALSE,
+    $htmlize = TRUE
   ) {
     $config = CRM_Core_Config::singleton();
     $script = '';