Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
CiviCRM Core
Commits
63155d32
Unverified
Commit
63155d32
authored
4 years ago
by
Eileen McNaughton
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #17523 from mattwire/customsearchzipcode
Zip code range search only supports numeric zip codes
parents
18252270
2fda4535
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Contact/Form/Search/Custom/ZipCodeRange.php
+9
-3
9 additions, 3 deletions
CRM/Contact/Form/Search/Custom/ZipCodeRange.php
with
9 additions
and
3 deletions
CRM/Contact/Form/Search/Custom/ZipCodeRange.php
+
9
−
3
View file @
63155d32
...
...
@@ -146,16 +146,22 @@ LEFT JOIN civicrm_email email ON ( email.contact_id = contact_a.id AND
* @return string
*/
public
function
where
(
$includeContactIDs
=
FALSE
)
{
$params
=
[];
$low
=
CRM_Utils_Array
::
value
(
'postal_code_low'
,
$this
->
_formValues
);
$high
=
CRM_Utils_Array
::
value
(
'postal_code_high'
,
$this
->
_formValues
);
$errorMessage
=
NULL
;
if
(
$low
==
NULL
||
$high
==
NULL
)
{
CRM_Core_Error
::
statusBounce
(
ts
(
'Please provide start and end postal codes'
),
$errorMessage
=
ts
(
'Please provide start and end postal codes.'
);
}
if
(
!
is_numeric
(
$low
)
||
!
is_numeric
(
$high
))
{
$errorMessage
=
ts
(
'This search only supports numeric postal codes.'
);
}
if
(
$errorMessage
)
{
CRM_Core_Error
::
statusBounce
(
$errorMessage
,
CRM_Utils_System
::
url
(
'civicrm/contact/search/custom'
,
"reset=1&csid=
{
$this
->
_formValues
[
'customSearchID'
]
}
"
,
FALSE
,
NULL
,
FALSE
,
TRUE
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment