Changeset 4099


Ignore:
Timestamp:
06/11/09 08:34:58 (3 years ago)
Author:
DanielRohde
Message:

Item1652: fixed wrong web/topic context bug

File:
1 edited

Legend:

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

    r4080 r4099  
    4848    ); 
    4949 
    50 # This should always be $Rev: 18097 $ so that TWiki can determine the checked-in 
     50# This should always be $Rev: 18100 $ so that TWiki can determine the checked-in 
    5151# status of the plugin. It is used by the build automation tools, so 
    5252# you should leave it alone. 
    53 $VERSION = '$Rev: 18097 $'; 
     53$VERSION = '$Rev: 18100 $'; 
    5454 
    5555# This is a free-form string you can use to "name" your own plugin version. 
     
    15431543        } 
    15441544 
    1545         $text =~ s/%INCLUDE{(.*?)}%/&expandIncludedEvents($1, \@processedTopics)/geo; 
     1545        $text =~ s/%INCLUDE{(.*?)}%/&expandIncludedEvents($1, \@processedTopics, $web, $topic)/geo; 
    15461546        $text =~s/\%HOLIDAYLIST({(.*?)})?%//sg; 
    15471547        $text = Foswiki::Func::expandCommonVariables($text,$web,$topic); 
     
    15671567sub expandIncludedEvents 
    15681568{ 
    1569         my( $theAttributes, $theProcessedTopicsRef ) = @_; 
    1570  
    1571         my ($theWeb, $theTopic) = ($web, $topic); 
    1572  
    1573         my $webTopic = Foswiki::Func::expandCommonVariables( Foswiki::Func::extractNameValuePair( $theAttributes ) ); 
    1574         my $section = Foswiki::Func::expandCommonVariables( Foswiki::Func::extractNameValuePair( $theAttributes, 'section') ); 
    1575         my $pattern = Foswiki::Func::expandCommonVariables( Foswiki::Func::extractNameValuePair( $theAttributes, 'pattern') ); 
     1569        my( $theAttributes, $theProcessedTopicsRef, $theWeb, $theTopic ) = @_; 
     1570 
     1571        my $webTopic = Foswiki::Func::expandCommonVariables( Foswiki::Func::extractNameValuePair( $theAttributes ), $theTopic, $theWeb ); 
     1572        my $section = Foswiki::Func::expandCommonVariables( Foswiki::Func::extractNameValuePair( $theAttributes, 'section'), $theTopic, $theWeb ); 
     1573        my $pattern = Foswiki::Func::expandCommonVariables( Foswiki::Func::extractNameValuePair( $theAttributes, 'pattern'), $theTopic, $theWeb ); 
    15761574 
    15771575         
     
    15971595 
    15981596        # recursively expand includes: 
    1599         $text =~ s/%INCLUDE{(.*?)}%/&expandIncludedEvents( $1, $theProcessedTopicsRef )/geo; 
     1597        $text =~ s/%INCLUDE{(.*?)}%/&expandIncludedEvents( $1, $theProcessedTopicsRef, $theWeb, $theTopic )/geo; 
    16001598 
    16011599        # expand common variables: 
Note: See TracChangeset for help on using the changeset viewer.