Ignore:
Timestamp:
06/10/09 16:37:46 (3 years ago)
Author:
CrawfordCurrie
Message:

Item8010: ported to Foswiki

Location:
trunk/VotePlugin/lib/Foswiki
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/VotePlugin/lib/Foswiki/Plugins/VotePlugin.pm

    r1340 r4084  
    1111# but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1212# 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 
    1414# http://www.gnu.org/copyleft/gpl.html 
    1515 
    1616############################################################################### 
    17 package TWiki::Plugins::VotePlugin; 
     17package Foswiki::Plugins::VotePlugin; 
    1818use strict; 
    1919 
     
    2424); 
    2525 
    26 $VERSION = '$Rev$'; 
    27 $RELEASE = '1.33'; 
     26$VERSION           = '$Rev$'; 
     27$RELEASE           = '1.33'; 
    2828$NO_PREFS_IN_TOPIC = 1; 
    29 $SHORTDESCRIPTION = 'Simple way to count votes'; 
     29$SHORTDESCRIPTION  = 'Simple way to count votes'; 
    3030 
    3131############################################################################### 
    3232sub initPlugin { 
    33     my ($topic, $web) = @_; 
     33    my ( $topic, $web ) = @_; 
    3434    $isInitialized = 0; 
    35     require TWiki::Func; 
    36     TWiki::Func::registerTagHandler('VOTE', \&handleVote); 
     35    require Foswiki::Func; 
     36    Foswiki::Func::registerTagHandler( 'VOTE', \&handleVote ); 
    3737    return 1; 
    3838} 
     
    4040############################################################################### 
    4141sub handleVote { 
     42 
    4243    #my ($session, $params, $topic, $web) = @_; 
    4344 
    4445    unless ($isInitialized) { 
    45         eval 'use TWiki::Plugins::VotePlugin::Core;'; 
     46        eval 'use Foswiki::Plugins::VotePlugin::Core;'; 
    4647        die $@ if $@; 
    4748        $isInitialized = 1; 
     49 
    4850        # Register vote now so we only get it done once per topic. It doesn't 
    4951        # matter which %VOTE triggers this, as the query carries all the info 
    5052        # about where to save the data, the id etc. 
    51         TWiki::Plugins::VotePlugin::Core::registerVote(); 
     53        Foswiki::Plugins::VotePlugin::Core::registerVote(); 
    5254    } 
    5355 
    54     return TWiki::Plugins::VotePlugin::Core::handleVote(@_); 
     56    return Foswiki::Plugins::VotePlugin::Core::handleVote(@_); 
    5557} 
    5658 
Note: See TracChangeset for help on using the changeset viewer.