3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
13 * Upgrade logic for FiveSix */
14 class CRM_Upgrade_Incremental_php_FiveSix
extends CRM_Upgrade_Incremental_Base
{
17 * Compute any messages which should be displayed beforeupgrade.
19 * Note: This function is called iteratively for each upcoming
20 * revision to the database.
22 * @param string $preUpgradeMessage
24 * a version number, e.g. '4.4.alpha1', '4.4.beta3', '4.4.0'.
25 * @param null $currentVer
27 public function setPreUpgradeMessage(&$preUpgradeMessage, $rev, $currentVer = NULL) {
28 // Example: Generate a pre-upgrade message.
29 // if ($rev == '5.12.34') {
30 // $preUpgradeMessage .= '<p>' . ts('A new permission has been added called %1 This Permission is now used to control access to the Manage Tags screen', array(1 => 'manage tags')) . '</p>';
35 * Compute any messages which should be displayed after upgrade.
37 * @param string $postUpgradeMessage
40 * an intermediate version; note that setPostUpgradeMessage is called repeatedly with different $revs.
42 public function setPostUpgradeMessage(&$postUpgradeMessage, $rev) {
43 // Example: Generate a post-upgrade message.
44 // if ($rev == '5.12.34') {
45 // $postUpgradeMessage .= '<br /><br />' . 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'.");
50 * Important! All upgrade functions MUST add a 'runSql' task.
51 * Uncomment and use the following template for a new upgrade version
52 * (change the x in the function name):
60 public function upgrade_5_6_beta2($rev) {
61 $this->addTask(ts('Upgrade DB to %1: SQL', [1 => $rev]), 'runSql', $rev);
62 $this->addTask('dev/core#107 - Add Activity\'s default assignee options', 'addActivityDefaultAssigneeOptions');
65 public static function addActivityDefaultAssigneeOptions() {
66 // This data was originally added via upgrader in 5.4.alpha1. However, it was omitted from the
67 // default data for new installations. Re-running the upgrader should fix sites initialized
68 // between 5.4.alpha1-5.6.beta1.
69 return CRM_Upgrade_Incremental_php_FiveFour
::addActivityDefaultAssigneeOptions();