remove never-used option value
[civicrm-core.git] / CRM / Upgrade / Incremental / php / FiveZero.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
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 +--------------------------------------------------------------------+
10 */
11
12 /**
13 * Upgrade logic for 5.0
14 */
15 class CRM_Upgrade_Incremental_php_FiveZero extends CRM_Upgrade_Incremental_Base {
16
17 /**
18 * Compute any messages which should be displayed beforeupgrade.
19 *
20 * Note: This function is called iteratively for each upcoming
21 * revision to the database.
22 *
23 * @param string $preUpgradeMessage
24 * @param string $rev
25 * a version number, e.g. '4.4.alpha1', '4.4.beta3', '4.4.0'.
26 * @param null $currentVer
27 */
28 public function setPreUpgradeMessage(&$preUpgradeMessage, $rev, $currentVer = NULL) {
29 // Example: Generate a pre-upgrade message.
30 //if ($rev == '5.12.34') {
31 // $preUpgradeMessage .= '<p>' . 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'))) . '</p>';
32 //}
33 }
34
35 /**
36 * Compute any messages which should be displayed after upgrade.
37 *
38 * @param string $postUpgradeMessage
39 * alterable.
40 * @param string $rev
41 * an intermediate version; note that setPostUpgradeMessage is called repeatedly with different $revs.
42 */
43 public function setPostUpgradeMessage(&$postUpgradeMessage, $rev) {
44 // Example: Generate a post-upgrade message.
45 //if ($rev == '5.12.34') {
46 // $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'.");
47 //}
48 }
49
50 /**
51 * Upgrade function.
52 *
53 * @param string $rev
54 */
55 public function upgrade_5_0_0($rev) {
56 $this->addTask(ts('Upgrade DB to %1: SQL', [1 => $rev]), 'runSql', $rev);
57 }
58
59 /*
60 * Important! All upgrade functions MUST add a 'runSql' task.
61 * Uncomment and use the following template for a new upgrade version
62 * (change the x in the function name):
63 */
64
65 // /**
66 // * Upgrade function.
67 // *
68 // * @param string $rev
69 // */
70 // public function upgrade_4_7_x($rev) {
71 // $this->addTask(ts('Upgrade DB to %1: SQL', array(1 => $rev)), 'runSql', $rev);
72 // $this->addTask(ts('Do the foo change'), 'taskFoo', ...);
73 // // Additional tasks here...
74 // // Note: do not use ts() in the addTask description because it adds unnecessary strings to transifex.
75 // // The above is an exception because 'Upgrade DB to %1: SQL' is generic & reusable.
76 // }
77
78 // public static function taskFoo(CRM_Queue_TaskContext $ctx, ...) {
79 // return TRUE;
80 // }
81
82 }