X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=extern%2Furl.php;h=4b5ed69974eca8b3e4d2db1c72a90798874f0f1c;hb=ce945da59ff8a9adc2088275689a615945e3015e;hp=bb06f1eb2b7419fff6f38a39bcd8b5d6b9295996;hpb=414b3228db09432f1e389a89f9fb9e3f22d0f2da;p=civicrm-core.git diff --git a/extern/url.php b/extern/url.php index bb06f1eb2b..4b5ed69974 100644 --- a/extern/url.php +++ b/extern/url.php @@ -4,17 +4,13 @@ require_once 'CRM/Core/Config.php'; require_once 'CRM/Core/Error.php'; require_once 'CRM/Utils/Array.php'; -$config = CRM_Core_Config::singleton(); +CRM_Core_Config::singleton(); // To keep backward compatibility for URLs generated // by CiviCRM < 1.7, we check for the q variable as well. -if (isset($_GET['qid'])) { - $queue_id = CRM_Utils_Array::value('qid', $_GET); -} -else { - $queue_id = CRM_Utils_Array::value('q', $_GET); -} -$url_id = CRM_Utils_Array::value('u', $_GET); +$queue_id = $_GET['qid'] ?? $_GET['q'] ?? NULL; + +$url_id = $_GET['u'] ?? NULL; if (!$url_id) { echo "Missing input parameters\n"; @@ -54,4 +50,9 @@ if (strlen($query_string) > 0) { } } -CRM_Utils_System::redirect($url); +// CRM-18320 - Fix encoded ampersands (see CRM_Utils_System::redirect) +$url = str_replace('&', '&', $url); + +// CRM-17953 - The CMS is not bootstrapped so cannot use CRM_Utils_System::redirect +header('Location: ' . $url); +CRM_Utils_System::civiExit();