Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
justinfreeman (Agileware)
Core
Commits
c6ff5b0d
Commit
c6ff5b0d
authored
11 years ago
by
Kurund Jalmi
Browse files
Options
Downloads
Patches
Plain Diff
fixes notes display for search builder CRM-11790
parent
f06c4974
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CRM/Contact/BAO/Query.php
+15
-4
15 additions, 4 deletions
CRM/Contact/BAO/Query.php
CRM/Contact/Selector.php
+7
-0
7 additions, 0 deletions
CRM/Contact/Selector.php
with
22 additions
and
4 deletions
CRM/Contact/BAO/Query.php
+
15
−
4
View file @
c6ff5b0d
...
...
@@ -578,12 +578,10 @@ class CRM_Contact_BAO_Query {
* @access public
*/
function
selectClause
()
{
$properties
=
array
();
$this
->
addSpecialFields
();
foreach
(
$this
->
_fields
as
$name
=>
$field
)
{
// skip component fields
// there are done by the alter query below
// and need not be done on every field
...
...
@@ -607,14 +605,27 @@ class CRM_Contact_BAO_Query {
continue
;
}
//
special handling for groups/tags
//
make an exception for special cases, to add the field in select clause
$makeException
=
FALSE
;
if
(
in_array
(
$name
,
array
(
'groups'
,
'tags'
))
//special handling for groups/tags
if
(
in_array
(
$name
,
array
(
'groups'
,
'tags'
,
'notes'
))
&&
isset
(
$this
->
_returnProperties
[
substr
(
$name
,
0
,
-
1
)])
)
{
$makeException
=
TRUE
;
}
// since note has 3 different options we need special handling
// note / note_subject / note_body
if
(
$name
==
'notes'
)
{
foreach
(
array
(
'note'
,
'note_subject'
,
'note_body'
)
as
$noteField
)
{
if
(
isset
(
$this
->
_returnProperties
[
$noteField
]))
{
$makeException
=
TRUE
;
break
;
}
}
}
$cfID
=
CRM_Core_BAO_CustomField
::
getKeyID
(
$name
);
if
(
CRM_Utils_Array
::
value
(
$name
,
$this
->
_paramLookup
)
||
...
...
This diff is collapsed.
Click to expand it.
CRM/Contact/Selector.php
+
7
−
0
View file @
c6ff5b0d
...
...
@@ -1073,9 +1073,16 @@ SELECT 'civicrm_contact', contact_a.id, contact_a.id, '$cacheKey', contact_a.dis
$properties
=
array
();
foreach
(
$returnProperties
as
$name
=>
$value
)
{
if
(
$name
!=
'location'
)
{
// special handling for group and tag
if
(
in_array
(
$name
,
array
(
'group'
,
'tag'
)))
{
$name
=
"
{
$name
}
s"
;
}
// special handling for notes
if
(
in_array
(
$name
,
array
(
'note'
,
'note_subject'
,
'note_body'
)))
{
$name
=
"notes"
;
}
$properties
[]
=
$name
;
}
else
{
...
...
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