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
6c23ae8c
Commit
6c23ae8c
authored
12 years ago
by
Kurund Jalmi
Browse files
Options
Downloads
Plain Diff
Merge pull request
#423
from dlobo/NoticeFixes
fix notices on save
parents
8812b376
43291913
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CRM/Contact/BAO/Relationship.php
+3
-3
3 additions, 3 deletions
CRM/Contact/BAO/Relationship.php
CRM/Contact/Form/Relationship.php
+3
-2
3 additions, 2 deletions
CRM/Contact/Form/Relationship.php
with
6 additions
and
5 deletions
CRM/Contact/BAO/Relationship.php
+
3
−
3
View file @
6c23ae8c
...
...
@@ -67,7 +67,7 @@ class CRM_Contact_BAO_Relationship extends CRM_Contact_DAO_Relationship {
// creating a new relationship
$dataExists
=
self
::
dataExists
(
$params
);
if
(
!
$dataExists
)
{
return
NULL
;
return
array
(
FALSE
,
TRUE
,
FALSE
,
FALSE
,
NULL
)
;
}
$relationshipIds
=
array
();
foreach
(
$params
[
'contact_check'
]
as
$key
=>
$value
)
{
...
...
@@ -114,7 +114,7 @@ class CRM_Contact_BAO_Relationship extends CRM_Contact_DAO_Relationship {
)
)
{
$duplicate
++
;
return
array
(
$valid
,
$invalid
,
$duplicate
);
return
array
(
$valid
,
$invalid
,
$duplicate
,
$saved
,
NULL
);
}
$validContacts
=
TRUE
;
...
...
@@ -1297,7 +1297,7 @@ SELECT count(*)
AND is_current_member = 1"
;
$result
=
CRM_Core_DAO
::
singleValueQuery
(
$query
);
if
(
$result
<
CRM_Utils_Array
::
value
(
'max_related'
,
$membershipValues
,
PHP_INT_MAX
))
{
CRM_Member_BAO_Membership
::
create
(
$membershipValues
,
CRM_Core_DAO
::
$_nullArray
);
CRM_Member_BAO_Membership
::
create
(
$membershipValues
,
CRM_Core_DAO
::
$_nullArray
);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
CRM/Contact/Form/Relationship.php
+
3
−
2
View file @
6c23ae8c
...
...
@@ -530,7 +530,7 @@ class CRM_Contact_Form_Relationship extends CRM_Core_Form {
if
(
$employerId
&&
(
$isDisabled
||
$relChanged
))
{
CRM_Contact_BAO_Contact_Utils
::
clearCurrentEmployer
(
$this
->
_values
[
'current_employee_id'
]);
}
//if field key doesn't exists in params that means the user has unchecked checkbox,
//hence fill FALSE to params
$params
[
'is_active'
]
=
$isDisabled
?
FALSE
:
TRUE
;
...
...
@@ -561,7 +561,8 @@ class CRM_Contact_Form_Relationship extends CRM_Core_Form {
//special case to handle if all checkboxes are unchecked
$customFields
=
CRM_Core_BAO_CustomField
::
getFields
(
'Relationship'
,
FALSE
,
FALSE
,
$relationshipTypeId
);
$params
[
'custom'
]
=
CRM_Core_BAO_CustomField
::
postProcess
(
$params
,
$params
[
'custom'
]
=
CRM_Core_BAO_CustomField
::
postProcess
(
$params
,
$customFields
,
$this
->
_relationshipId
,
'Relationship'
...
...
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