-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deduper - Pass arrays rather than strings to construct URLs #11671
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -142,7 +142,7 @@ public function run() { | |
$urlQry['selected'] = 1; | ||
} | ||
|
||
$this->assign('sourceUrl', CRM_Utils_System::url('civicrm/ajax/dedupefind', $urlQry, FALSE, NULL, FALSE)); | ||
$this->assign('sourceUrl', CRM_Utils_System::url('civicrm/ajax/dedupefind', $urlQry)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FALSE not needed if $urlQuery was passed as an array as keys etc are url encoded There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to understand a little here, why could be necessary the "FALSE, NULL; FALSE" attributes? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So the first 2 params - FALSE & NULL are the defaults for CRM_Utils_System::url() but the 3rd one (FALSE) is for $htmlize and we see
I'm pretty confident that FALSE was added to compensate for a time in the past when $urlQuery was being passed as a string. When passing $urlQuery as a string any special characters are preserved & then they get kinda mangled (from a url POV) later when htmlentities happens. However, when passed as an array both the key & the value are passed through url_encode - which means that something odd like a " is already converted to %22 when it hits the htmlentities function & not further converted. In general url_encode makes sense for handling urls & html_entities for things to be displayed via html. The presence of htmlentities in that function is a bit odd really |
||
|
||
//reload from cache table | ||
$cacheKeyString = CRM_Dedupe_Merger::getMergeCacheKeyString($rgid, $gid, $criteria); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I note that in the original there is no limit but using array_merge suggests we will get a limit. probably not the worst thing