From: <de...@de...> - 2011-05-03 07:16:10
|
Author: PeterThoeny Date: 2011-05-03 02:15:57 -0500 (Tue, 03 May 2011) New Revision: 21140 Trac url: http://develop.twiki.org/trac/changeset/21140 Added: twiki/trunk/AccessStatsPlugin/lib/TWiki/Plugins/AccessStatsPlugin/Config.spec Modified: twiki/trunk/AccessStatsPlugin/lib/TWiki/Plugins/AccessStatsPlugin.pm twiki/trunk/AccessStatsPlugin/lib/TWiki/Plugins/AccessStatsPlugin/MANIFEST Log: Item6701: Adding Config.spec so that the plugin can be easily configured in configure Added: twiki/trunk/AccessStatsPlugin/lib/TWiki/Plugins/AccessStatsPlugin/Config.spec =================================================================== --- twiki/trunk/AccessStatsPlugin/lib/TWiki/Plugins/AccessStatsPlugin/Config.spec (rev 0) +++ twiki/trunk/AccessStatsPlugin/lib/TWiki/Plugins/AccessStatsPlugin/Config.spec 2011-05-03 07:15:57 UTC (rev 21140) @@ -0,0 +1,15 @@ +# ---+ Extensions +# ---++ AccessStatsPlugin +# **BOOLEAN** +# Debug plugin. See output in data/debug.txt +$TWiki::cfg{Plugins}{AccessStatsPlugin}{Debug} = 0; +# **STRING 50** +# Apache log directory +$TWiki::cfg{Plugins}{AccessStatsPlugin}{LogDirectory} = '/var/logs/httpd'; +# **STRING 50** +# Name of log file +$TWiki::cfg{Plugins}{AccessStatsPlugin}{LogFileName} = 'access_log'; +# **BOOLEAN** +# Enable regular expression search +$TWiki::cfg{Plugins}{AccessStatsPlugin}{EnableRegexSearch} = 0; +1; Modified: twiki/trunk/AccessStatsPlugin/lib/TWiki/Plugins/AccessStatsPlugin/MANIFEST =================================================================== --- twiki/trunk/AccessStatsPlugin/lib/TWiki/Plugins/AccessStatsPlugin/MANIFEST 2011-05-03 06:52:25 UTC (rev 21139) +++ twiki/trunk/AccessStatsPlugin/lib/TWiki/Plugins/AccessStatsPlugin/MANIFEST 2011-05-03 07:15:57 UTC (rev 21140) @@ -1,2 +1,3 @@ -data/TWiki/AccessStatsPlugin.txt 0664 -lib/TWiki/Plugins/AccessStatsPlugin.pm 0664 +data/TWiki/AccessStatsPlugin.txt 0644 +lib/TWiki/Plugins/AccessStatsPlugin.pm 0644 +lib/TWiki/Plugins/AccessStatsPlugin/Config.spec 0644 Modified: twiki/trunk/AccessStatsPlugin/lib/TWiki/Plugins/AccessStatsPlugin.pm =================================================================== --- twiki/trunk/AccessStatsPlugin/lib/TWiki/Plugins/AccessStatsPlugin.pm 2011-05-03 06:52:25 UTC (rev 21139) +++ twiki/trunk/AccessStatsPlugin/lib/TWiki/Plugins/AccessStatsPlugin.pm 2011-05-03 07:15:57 UTC (rev 21140) @@ -1,5 +1,6 @@ # Plugin for TWiki Enterprise Collaboration Platform, http://TWiki.org/ # +# Copyright (C) 2006-2007 TWiki:Main.StephaneLenclud # Copyright (C) 2000-2003 Andrea Sterbini, a.s...@fl... # Copyright (C) 2001-2011 Peter Thoeny, pe...@th... # and TWiki Contributors. All Rights Reserved. TWiki Contributors @@ -41,11 +42,13 @@ ); $VERSION = '$Rev: 8713$'; -$RELEASE = '2011-05-02'; +$RELEASE = '2011-05-03'; # Name of this Plugin, only used in this module $pluginName = 'AccessStatsPlugin'; +# Debug the plugin +$debug = $TWiki::cfg{Plugins}{AccessStatsPlugin}{Debug} || 0; # The Apache access log file name $accessLogFileName = $TWiki::cfg{Plugins}{AccessStatsPlugin}{LogFileName} || "access_log"; # The Apache access log directory @@ -70,10 +73,6 @@ return 0; } - # Get plugin preferences, variables defined by: - $debug = TWiki::Func::getPreferencesValue( "\U$pluginName\E_DEBUG" ); - $debug ||= 0; # make sure it has a value - # register ACCESSSTATS tag TWiki::Func::registerTagHandler( 'ACCESSSTATS', \&_ACCESSSTATS ); |