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
4d1d7b66
Unverified
Commit
4d1d7b66
authored
3 years ago
by
DaveD
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #21334 from eileenmcnaughton/pdf_tokens
[REF]
#2790
deprecate preProcessSingle
parents
0572f599
972171bb
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/Form/Task/PDF.php
+7
-4
7 additions, 4 deletions
CRM/Contact/Form/Task/PDF.php
CRM/Contact/Form/Task/PDFLetterCommon.php
+2
-0
2 additions, 0 deletions
CRM/Contact/Form/Task/PDFLetterCommon.php
with
9 additions
and
4 deletions
CRM/Contact/Form/Task/PDF.php
+
7
−
4
View file @
4d1d7b66
...
...
@@ -58,10 +58,11 @@ class CRM_Contact_Form_Task_PDF extends CRM_Contact_Form_Task {
// in search context 'id' is the default profile id for search display
// CRM-11227
$this
->
_activityId
=
CRM_Utils_Request
::
retrieve
(
'id'
,
'Positive'
,
$this
,
FALSE
);
}
if
(
$cid
)
{
CRM_Contact_Form_Task_PDFLetterCommon
::
preProcessSingle
(
$this
,
$cid
);
$this
->
_contactIds
=
explode
(
','
,
$cid
);
// put contact display name in title for single contact mode
if
(
count
(
$this
->
_contactIds
)
===
1
)
{
CRM_Utils_System
::
setTitle
(
ts
(
'Print/Merge Document for %1'
,
[
1
=>
CRM_Core_DAO
::
getFieldValue
(
'CRM_Contact_DAO_Contact'
,
$cid
,
'display_name'
)]));
}
$this
->
_single
=
TRUE
;
}
else
{
...
...
@@ -85,6 +86,8 @@ class CRM_Contact_Form_Task_PDF extends CRM_Contact_Form_Task {
/**
* Build the form object.
*
* @throws \CRM_Core_Exception
*/
public
function
buildQuickForm
()
{
//enable form element
...
...
This diff is collapsed.
Click to expand it.
CRM/Contact/Form/Task/PDFLetterCommon.php
+
2
−
0
View file @
4d1d7b66
...
...
@@ -59,10 +59,12 @@ class CRM_Contact_Form_Task_PDFLetterCommon extends CRM_Core_Form_Task_PDFLetter
}
/**
* @deprecated
* @param CRM_Core_Form $form
* @param int $cid
*/
public
static
function
preProcessSingle
(
&
$form
,
$cid
)
{
CRM_Core_Error
::
deprecatedFunctionWarning
(
'no alternative'
);
$form
->
_contactIds
=
explode
(
','
,
$cid
);
// put contact display name in title for single contact mode
if
(
count
(
$form
->
_contactIds
)
===
1
)
{
...
...
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