Commit 78e5630f authored by Jamie McClelland's avatar Jamie McClelland

handle upgrade errors by reporting them to the user.

parent 458eabc1
......@@ -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;
}
......
......@@ -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;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment