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
fa1f7018
Commit
fa1f7018
authored
3 years ago
by
Eileen McNaughton
Browse files
Options
Downloads
Patches
Plain Diff
[REF] Fix form to call this->setTitle()
parent
3b943db7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Profile/Form/Edit.php
+10
-10
10 additions, 10 deletions
CRM/Profile/Form/Edit.php
with
10 additions
and
10 deletions
CRM/Profile/Form/Edit.php
+
10
−
10
View file @
fa1f7018
...
...
@@ -104,23 +104,23 @@ class CRM_Profile_Form_Edit extends CRM_Profile_Form {
parent
::
preProcess
();
// and also the profile is of type 'Profile'
$query
=
"
$query
=
'
SELECT module,is_reserved
FROM civicrm_uf_group
LEFT JOIN civicrm_uf_join ON uf_group_id = civicrm_uf_group.id
WHERE civicrm_uf_group.id = %1
"
;
'
;
$params
=
[
1
=>
[
$this
->
_gid
,
'Integer'
]];
$dao
=
CRM_Core_DAO
::
executeQuery
(
$query
,
$params
);
$isProfile
=
FALSE
;
while
(
$dao
->
fetch
())
{
$isProfile
=
(
$isProfile
||
(
$dao
->
module
==
"
Profile
"
));
$isProfile
=
(
$isProfile
||
(
$dao
->
module
==
=
'
Profile
'
));
}
//Check that the user has the "add contacts" Permission
$canAdd
=
CRM_Core_Permission
::
check
(
"
add contacts
"
);
$canAdd
=
CRM_Core_Permission
::
check
(
'
add contacts
'
);
//Remove need for Profile module type when using reserved profiles [CRM-14488]
if
(
!
$dao
->
N
||
(
!
$isProfile
&&
!
(
$dao
->
is_reserved
&&
$canAdd
)))
{
...
...
@@ -141,16 +141,16 @@ SELECT module,is_reserved
// set the title
if
(
$this
->
_multiRecord
&&
$this
->
_customGroupTitle
)
{
$
group
Title
=
(
$this
->
_multiRecord
&
CRM_Core_Action
::
UPDATE
)
?
'Edit '
.
$this
->
_customGroupTitle
.
' Record'
:
$this
->
_customGroupTitle
;
$
this
->
set
Title
(
(
$this
->
_multiRecord
&
CRM_Core_Action
::
UPDATE
)
?
'Edit '
.
$this
->
_customGroupTitle
.
' Record'
:
$this
->
_customGroupTitle
)
;
}
else
{
$
group
Title
=
CRM_Core_BAO_UFGroup
::
getFrontEndTitle
(
$this
->
_ufGroup
[
'id'
]);
$
this
->
set
Title
(
CRM_Core_BAO_UFGroup
::
getFrontEndTitle
(
$this
->
_ufGroup
[
'id'
])
)
;
}
CRM_Utils_System
::
setTitle
(
$groupTitle
);
$this
->
assign
(
'recentlyViewed'
,
FALSE
);
if
(
$this
->
_context
!=
'dialog'
)
{
if
(
$this
->
_context
!=
=
'dialog'
)
{
$this
->
_postURL
=
$this
->
_ufGroup
[
'post_URL'
];
$this
->
_cancelURL
=
$this
->
_ufGroup
[
'cancel_URL'
];
...
...
@@ -160,7 +160,7 @@ SELECT module,is_reserved
}
if
(
!
$this
->
_postURL
)
{
if
(
$this
->
_context
==
'Search'
)
{
if
(
$this
->
_context
==
=
'Search'
)
{
$this
->
_postURL
=
CRM_Utils_System
::
url
(
'civicrm/contact/search'
);
}
elseif
(
$this
->
_id
&&
$this
->
_gid
)
{
...
...
@@ -260,7 +260,7 @@ SELECT module,is_reserved
}
// When saving (not deleting) and not in an ajax popup
if
(
empty
(
$_POST
[
$this
->
_deleteButtonName
])
&&
$this
->
_context
!=
'dialog'
)
{
if
(
empty
(
$_POST
[
$this
->
_deleteButtonName
])
&&
$this
->
_context
!=
=
'dialog'
)
{
CRM_Core_Session
::
setStatus
(
ts
(
'Your information has been saved.'
),
ts
(
'Thank you.'
),
'success'
);
}
...
...
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