Skip to content

Commit 0da6ffa

Browse files
committedJan 3, 2012
Refactor upgrade scripts to better delete files and workflow activities.
1 parent d3b574d commit 0da6ffa

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed
 

‎share/upgrades/7.10.23-8.0.0/removeAdminBar.pl

+1-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242

4343
start_step "Removing Admin Bar module";
4444

45-
my $webgui_root = realpath( File::Spec->catdir( WebGUI::Paths->configBase, (File::Spec->updir) x 1) );
46-
unlink File::Spec->catfile($webgui_root, 'lib', 'WebGUI', 'Macro', 'AdminBar.pm');
45+
rm_lib('WebGUI::Macro::AdminBar');
4746

4847
done;

‎share/upgrades/7.10.23-8.0.0/removeFilePile.pl

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
start_step "Removing FilePile asset module";
1313

14-
my $webgui_root = realpath( File::Spec->catdir( WebGUI::Paths->configBase, (File::Spec->updir) x 1 ) );
15-
unlink File::Spec->catfile($webgui_root, 'lib', 'WebGUI', 'Asset', 'FilePile.pm');
14+
rm_lib('WebGUI::Asset::FilePile');
1615

1716
done;

‎share/upgrades/7.10.23-8.0.0/removeWebGUIStatistics.pl

+5
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,17 @@
77

88
config->deleteFromHash( 'adminConsole', 'statistics' );
99

10+
report "Deleting Workflow Activities";
11+
my $activity = dbh->write(q|delete from WorkflowActivity where className='WebGUI::Workflow::Activity::SendWebguiStats'|);
12+
13+
report "Deleting Workflow and Cron";
1014
my $workflow = WebGUI::Workflow->new(session, 'send_webgui_statistics');
1115
$workflow->delete;
1216
##This may not be in there if it is not enabled.
1317
my $task = WebGUI::Workflow::Cron->new(session, 'send_webgui_statistics');
1418
$task && $task->delete;
1519

20+
report "Deleting files";
1621
my $webgui_root = realpath( File::Spec->catdir( WebGUI::Paths->configBase, (File::Spec->updir) x 1 ) );
1722
unlink File::Spec->catfile($webgui_root, 'lib', 'WebGUI', 'Operation', 'Statistics.pm');
1823
unlink File::Spec->catfile($webgui_root, 'lib', 'WebGUI', 'Workflow', 'Activity', 'SendWebguiStats.pm');

0 commit comments

Comments
 (0)
Please sign in to comment.