From: <de...@de...> - 2008-10-14 19:56:25
|
Author: ColasNahaboo Date: 2008-10-14 14:56:18 -0500 (Tue, 14 Oct 2008) New Revision: 17635 Trac url: http://develop.twiki.org/trac/changeset/17635 Modified: twiki/trunk/VotePlugin/lib/TWiki/Plugins/VotePlugin/Core.pm Log: Item6070: VotePlugin breaks with hierarchical webs Fixed by replacing / by . in web name when using it to store the vote data in work_area/VotePlugin/WEB_TOPIC_ I chose to replace by . instead of _ as web names can contain _ Modified: twiki/trunk/VotePlugin/lib/TWiki/Plugins/VotePlugin/Core.pm =================================================================== --- twiki/trunk/VotePlugin/lib/TWiki/Plugins/VotePlugin/Core.pm 2008-10-14 16:51:55 UTC (rev 17634) +++ twiki/trunk/VotePlugin/lib/TWiki/Plugins/VotePlugin/Core.pm 2008-10-14 19:56:18 UTC (rev 17635) @@ -463,8 +463,10 @@ my ($web, $topic, $id, $global) = @_; my $path = TWiki::Func::getWorkArea('VotePlugin'); + my $flatweb = $web; + $flatweb =~ s/\//./g; my $votesFile = $path.'/'. - ($global ? '' : "${web}_${topic}_"). + ($global ? '' : "${flatweb}_${topic}_"). ($id ? "_$id" : ''); $votesFile = normalizeFileName($votesFile); |