Changeset 4084 for trunk/VotePlugin/lib/Foswiki/Plugins/VotePlugin.pm
- Timestamp:
- 06/10/09 16:37:46 (3 years ago)
- Location:
- trunk/VotePlugin/lib/Foswiki
- Files:
-
- 1 edited
- 1 moved
-
. (moved) (moved from trunk/VotePlugin/lib/TWiki)
-
Plugins/VotePlugin.pm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/VotePlugin/lib/Foswiki/Plugins/VotePlugin.pm
r1340 r4084 11 11 # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 # GNU General Public License for more details, published at 13 # GNU General Public License for more details, published at 14 14 # http://www.gnu.org/copyleft/gpl.html 15 15 16 16 ############################################################################### 17 package TWiki::Plugins::VotePlugin;17 package Foswiki::Plugins::VotePlugin; 18 18 use strict; 19 19 … … 24 24 ); 25 25 26 $VERSION = '$Rev$';27 $RELEASE = '1.33';26 $VERSION = '$Rev$'; 27 $RELEASE = '1.33'; 28 28 $NO_PREFS_IN_TOPIC = 1; 29 $SHORTDESCRIPTION = 'Simple way to count votes';29 $SHORTDESCRIPTION = 'Simple way to count votes'; 30 30 31 31 ############################################################################### 32 32 sub initPlugin { 33 my ( $topic, $web) = @_;33 my ( $topic, $web ) = @_; 34 34 $isInitialized = 0; 35 require TWiki::Func;36 TWiki::Func::registerTagHandler('VOTE', \&handleVote);35 require Foswiki::Func; 36 Foswiki::Func::registerTagHandler( 'VOTE', \&handleVote ); 37 37 return 1; 38 38 } … … 40 40 ############################################################################### 41 41 sub handleVote { 42 42 43 #my ($session, $params, $topic, $web) = @_; 43 44 44 45 unless ($isInitialized) { 45 eval 'use TWiki::Plugins::VotePlugin::Core;';46 eval 'use Foswiki::Plugins::VotePlugin::Core;'; 46 47 die $@ if $@; 47 48 $isInitialized = 1; 49 48 50 # Register vote now so we only get it done once per topic. It doesn't 49 51 # matter which %VOTE triggers this, as the query carries all the info 50 52 # about where to save the data, the id etc. 51 TWiki::Plugins::VotePlugin::Core::registerVote();53 Foswiki::Plugins::VotePlugin::Core::registerVote(); 52 54 } 53 55 54 return TWiki::Plugins::VotePlugin::Core::handleVote(@_);56 return Foswiki::Plugins::VotePlugin::Core::handleVote(@_); 55 57 } 56 58
Note: See TracChangeset
for help on using the changeset viewer.
