' . ts('A new permission, "%1", has been added. This permission is now used to control access to the Manage Tags screen.', array(1 => ts('manage tags'))) . '
';
// }
}
/**
* Compute any messages which should be displayed after upgrade.
*
* @param string $postUpgradeMessage
* alterable.
* @param string $rev
* an intermediate version; note that setPostUpgradeMessage is called repeatedly with different $revs.
*/
public function setPostUpgradeMessage(&$postUpgradeMessage, $rev) {
// Example: Generate a post-upgrade message.
// if ($rev == '5.12.34') {
// $postUpgradeMessage .= '
' . ts("By default, CiviCRM now disables the ability to import directly from SQL. To use this feature, you must explicitly grant permission 'import SQL datasource'.");
// }
}
/*
* Important! All upgrade functions MUST add a 'runSql' task.
* Uncomment and use the following template for a new upgrade version
* (change the x in the function name):
*/
// /**
// * Upgrade function.
// *
// * @param string $rev
// */
// public function upgrade_5_0_x($rev) {
// $this->addTask(ts('Upgrade DB to %1: SQL', array(1 => $rev)), 'runSql', $rev);
// $this->addTask('Do the foo change', 'taskFoo', ...);
// // Additional tasks here...
// // Note: do not use ts() in the addTask description because it adds unnecessary strings to transifex.
// // The above is an exception because 'Upgrade DB to %1: SQL' is generic & reusable.
// }
// public static function taskFoo(CRM_Queue_TaskContext $ctx, ...) {
// return TRUE;
// }
/**
* Upgrade function.
*
* @param string $rev
*/
public function upgrade_5_17_alpha1($rev) {
$this->addTask(ts('Upgrade DB to %1: SQL', [1 => $rev]), 'runSql', $rev);
$this->addTask('Update smart groups where jcalendar fields have been converted to datepicker', 'updateSmartGroups', [
'datepickerConversion' => [
'contribution_recur_start_date',
'contribution_recur_next_sched_contribution_date',
'contribution_recur_cancel_date',
'contribution_recur_end_date',
'contribution_recur_create_date',
'contribution_recur_modified_date',
'contribution_recur_failure_retry_date',
],
]);
$this->addTask(ts('Add pptx to accepted attachment file types'), 'updateFileTypes');
}
/**
* Upgrade function.
*
* @param string $rev
*/
public function upgrade_5_17_1($rev) {
// Need to do this again because the alpha1 version had a typo and so didn't do anything.
$this->addTask(ts('Add pptx to accepted attachment file types'), 'updateFileTypes');
}
/**
* Update safe file types.
*/
public function updateFileTypes() {
CRM_Core_BAO_OptionValue::ensureOptionValueExists([
'option_group_id' => 'safe_file_extension',
'label' => 'pptx',
'name' => 'pptx',
]);
return TRUE;
}
}