Skip to content

Commit d3b574d

Browse files
committedJan 3, 2012
Dump WebGUI Statistics.
1 parent d31137c commit d3b574d

File tree

6 files changed

+21
-410
lines changed

6 files changed

+21
-410
lines changed
 

‎docs/changelog/8.x.x.txt

+1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
- Replaced the existing caching mechanism with memcached, which results in a 400% improvement to cache speed. See migration.txt for API changes and gotcha.txt for prereq changes.
33
- Added "hot sessions" so sessions interact with the database less.
44
- Added Facebook Auth and FacebookLogin macro.
5+
- Removed the WebGUI statistics program and code.
56

‎etc/WebGUI.conf.original

-7
Original file line numberDiff line numberDiff line change
@@ -278,13 +278,6 @@
278278
"url" : "^PageUrl(\"\",func=manageClipboard);",
279279
"title" : "^International(948,WebGUI);"
280280
},
281-
"statistics" : {
282-
"icon" : "statistics.gif",
283-
"uiLevel" : 1,
284-
"url" : "^PageUrl(\"\",op=viewStatistics);",
285-
"title" : "^International(437,WebGUI);",
286-
"groupSetting" : "groupIdAdminStatistics"
287-
},
288281
"users" : {
289282
"icon" : "users.gif",
290283
"uiLevel" : 5,

‎lib/WebGUI/Operation/Statistics.pm

-242
This file was deleted.

‎lib/WebGUI/Wizard/Setup.pm

-53
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ sub _get_steps {
2222
return [qw(
2323
adminAccount
2424
companyInformation
25-
siteStats
2625
defaultStyle
2726
)];
2827
}
@@ -296,58 +295,6 @@ sub www_companyInformationSave {
296295

297296
#----------------------------------------------------------------------------
298297

299-
=head2 www_siteStats ( )
300-
301-
Opt-in to the global WebGUI statistics
302-
303-
=cut
304-
305-
sub www_siteStats {
306-
my ( $self ) = @_;
307-
my $session = $self->session;
308-
my $form = $session->form;
309-
$session->response->setCacheControl("none");
310-
my $i18n = WebGUI::International->new( $session, "WebGUI" );
311-
312-
my $enableForm = $self->getForm;
313-
$enableForm->addField( "hidden", name => "enableStats", value => 1 );
314-
$enableForm->addField( "submit", name => 'send', value => $i18n->get( 'enable', 'Activity_SendWebguiStats' ) );
315-
316-
my $disableForm = $self->getForm;
317-
$disableForm->addField( "hidden", name => "enableStats", value => 0 );
318-
$disableForm->addField( "submit", name => 'send', value => $i18n->get( 'disable', 'Activity_SendWebguiStats' ) );
319-
320-
my $output = '<h1>' . $i18n->get( 'topicName', 'Activity_SendWebguiStats' ) . '</h1>';
321-
$output .= ' <p>' . $i18n->get( 'why to send', 'Activity_SendWebguiStats' ) . '</p>
322-
<p>' . $i18n->get( 'would you participate', 'Activity_SendWebguiStats' ) . '</p>
323-
<div style="float: left">' . $enableForm->toHtml . '</div><div style="float: left">'
324-
. $disableForm->toHtml
325-
. '</div>'
326-
. '<div style="clear: both;">&nbsp;</div>'
327-
;
328-
329-
return $output;
330-
}
331-
332-
#----------------------------------------------------------------------------
333-
334-
=head2 www_siteStatsSave ( )
335-
336-
Opt-in to the global WebGUI statistics
337-
338-
=cut
339-
340-
sub www_siteStatsSave {
341-
my ( $self ) = @_;
342-
my $session = $self->session;
343-
my $form = $session->form;
344-
use WebGUI::Operation::Statistics;
345-
WebGUI::Operation::Statistics::www_enableSendWebguiStats($session) if ( $form->get("enableStats") );
346-
return;
347-
}
348-
349-
#----------------------------------------------------------------------------
350-
351298
=head2 www_defaultStyle ( )
352299
353300
Choose the default site style

‎lib/WebGUI/Workflow/Activity/SendWebguiStats.pm

-108
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
use WebGUI::Upgrade::Script;
2+
use File::Spec;
3+
use WebGUI::Paths;
4+
use Cwd qw(realpath);
5+
6+
start_step "Removing WebGUI statistics workflows and code";
7+
8+
config->deleteFromHash( 'adminConsole', 'statistics' );
9+
10+
my $workflow = WebGUI::Workflow->new(session, 'send_webgui_statistics');
11+
$workflow->delete;
12+
##This may not be in there if it is not enabled.
13+
my $task = WebGUI::Workflow::Cron->new(session, 'send_webgui_statistics');
14+
$task && $task->delete;
15+
16+
my $webgui_root = realpath( File::Spec->catdir( WebGUI::Paths->configBase, (File::Spec->updir) x 1 ) );
17+
unlink File::Spec->catfile($webgui_root, 'lib', 'WebGUI', 'Operation', 'Statistics.pm');
18+
unlink File::Spec->catfile($webgui_root, 'lib', 'WebGUI', 'Workflow', 'Activity', 'SendWebguiStats.pm');
19+
20+
done;

0 commit comments

Comments
 (0)
Please sign in to comment.