From 10d9a01766b5c9d6ba7a0303e48e68dd3cde0006 Mon Sep 17 00:00:00 2001 From: PaulHarvey Date: Sat, 10 Jul 2010 04:16:04 +0000 Subject: [PATCH] Item8500: Initialise sites table on each initPlugin() for mod_perl, fcgi git-svn-id: http://svn.foswiki.org/branches/Release01x00@8105 0b4bb1d4-4e5a-0410-9cc4-b2b747904278 --- InterwikiPlugin/data/System/InterwikiPlugin.txt | 2 +- InterwikiPlugin/lib/Foswiki/Plugins/InterwikiPlugin.pm | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/InterwikiPlugin/data/System/InterwikiPlugin.txt b/InterwikiPlugin/data/System/InterwikiPlugin.txt index 5cac9ebfb6..22f26dbf9e 100644 --- a/InterwikiPlugin/data/System/InterwikiPlugin.txt +++ b/InterwikiPlugin/data/System/InterwikiPlugin.txt @@ -51,7 +51,7 @@ The =INTERWIKIPLUGIN_INTERLINKFORMAT= supports a number of formatting tokens: | Version: | %$VERSION% | | Release: | %$RELEASE% | | Change History: |   | -| 10 Mar 2010: | =mod_perl= and =FastCGI= compatible | +| 10 Jul 2010: | =mod_perl= and =FastCGI= compatible | | 20 Sep 2009: | Version from 15 Apr now included with Foswiki 1.0.7. | | 15 Apr 2009: | Foswiki:Main.CrawfordCurrie - removed plugin preferences from this topic | | 16 Dec 2008: | Foswiki:Main.KennethLavrsen - Foswiki version - no features changed | diff --git a/InterwikiPlugin/lib/Foswiki/Plugins/InterwikiPlugin.pm b/InterwikiPlugin/lib/Foswiki/Plugins/InterwikiPlugin.pm index 8f6de96e19..f8129c91b0 100644 --- a/InterwikiPlugin/lib/Foswiki/Plugins/InterwikiPlugin.pm +++ b/InterwikiPlugin/lib/Foswiki/Plugins/InterwikiPlugin.pm @@ -42,7 +42,7 @@ use Foswiki::Func (); # The plugins API use Foswiki::Plugins (); # For the API version our $VERSION = '$Rev$'; -our $RELEASE = '10 Mar 2010'; +our $RELEASE = '10 Jul 2010'; our $NO_PREFS_IN_TOPIC = 1; our $SHORTDESCRIPTION = 'Link ExternalSite:Page text to external sites based on aliases defined in a rules topic'; @@ -68,6 +68,7 @@ sub initPlugin { # Regexes for the Site:page format InterWiki reference my $man = Foswiki::Func::getRegularExpression('mixedAlphaNum'); my $ua = Foswiki::Func::getRegularExpression('upperAlpha'); + %interSiteTable = (); $sitePattern = "([$ua][$man]+)"; $pagePattern = "([${man}_\/][$man" . '\.\/\+\_\,\&\;\:\=\!\?\%\#\@\-]*?)'; @@ -110,6 +111,8 @@ s/(\[\[)$sitePattern:$pagePattern(\]\]|\]\[[^\]]+\]\])/_link($1,$2,$3,$4)/geo; # ref in text $_[0] =~ s/(^|[\s\-\*\(])$sitePattern:$pagePattern(?=[\s\.\,\;\:\!\?\)\|]*(\s|$))/_link($1,$2,$3)/geo; + + return; } sub _link {