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