Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
extensions
cc.tadpole.petitionemail
Commits
78e5630f
Commit
78e5630f
authored
Dec 02, 2014
by
Jamie McClelland
Browse files
handle upgrade errors by reporting them to the user.
parent
458eabc1
Changes
2
Hide whitespace changes
Inline
Side-by-side
CRM/Petitionemail/Upgrader.php
View file @
78e5630f
...
...
@@ -85,10 +85,10 @@ class CRM_Petitionemail_Upgrader extends CRM_Petitionemail_Upgrader_Base {
*/
function
upgrade_1003
()
{
// These are indempotent.
petitionemail_create_custom_fields
();
petitionemail_get_profile_id
(
'petitionemail_profile_matching_fields'
);
petitionemail_get_profile_id
(
'petitionemail_profile_default_contact'
);
petitionemail_get_profile_id
(
'petitionemail_profile_default_activity'
);
if
(
FALSE
===
petitionemail_create_custom_fields
()
)
return
FALSE
;
if
(
FALSE
===
petitionemail_get_profile_id
(
'petitionemail_profile_matching_fields'
)
)
return
FALSE
;
if
(
FALSE
===
petitionemail_get_profile_id
(
'petitionemail_profile_default_contact'
)
)
return
FALSE
;
if
(
FALSE
===
petitionemail_get_profile_id
(
'petitionemail_profile_default_activity'
)
)
return
FALSE
;
return
TRUE
;
}
...
...
petitionemail.php
View file @
78e5630f
...
...
@@ -1503,7 +1503,10 @@ function petitionemail_create_custom_fields() {
// but specifying that we want to force the re-fecthing of fields to unset
// yet another static variable.
CRM_Core_BAO_UFField
::
getAvailableFieldsFlat
(
TRUE
);
return
$id
;
}
return
FALSE
;
}
/**
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment