Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michael Iseard
Kudos-Donations
Commits
2dc81b7a
Commit
2dc81b7a
authored
Oct 16, 2020
by
Michael Iseard
Browse files
Add check for versions less than 2.0.4 to migrate campaign labels from transactions
parent
41eb20e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Service/ActivatorService.php
View file @
2dc81b7a
...
...
@@ -26,9 +26,12 @@ class ActivatorService {
/**
* Runs all activation functions
*
* @param $old_version
* @since 1.0.0
*/
public
static
function
activate
()
{
public
static
function
activate
(
$old_version
=
null
)
{
$logger
=
new
LoggerService
();
LoggerService
::
init
();
TwigService
::
initCache
();
...
...
@@ -37,7 +40,12 @@ class ActivatorService {
self
::
create_subscriptions_table
();
self
::
set_defaults
();
$logger
=
new
LoggerService
();
if
(
$old_version
&&
version_compare
(
$old_version
,
'2.0.4'
,
'<'
)
)
{
$logger
->
info
(
'Upgrading to version 2.0.4'
,
[
'previous_version'
=>
$old_version
]);
$result
=
UpdateService
::
sync_campaign_labels
();
if
(
$result
)
$logger
->
info
(
'Updated campaign labels from transactions'
);
}
$logger
->
info
(
'Kudos Donations plugin activated'
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment