Skip to content

Commit

Permalink
Item8500: Initialise sites table on each initPlugin() for mod_perl, fcgi
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/branches/Release01x00@8105 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
PaulHarvey authored and PaulHarvey committed Jul 10, 2010
1 parent 44ef4a9 commit 10d9a01
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion InterwikiPlugin/data/System/InterwikiPlugin.txt
Expand Up @@ -51,7 +51,7 @@ The =INTERWIKIPLUGIN_INTERLINKFORMAT= supports a number of formatting tokens:
| Version: | %$VERSION% |
| Release: | %$RELEASE% |
| Change History: | <!-- versions below in reverse order -->&nbsp; |
| 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 |
Expand Down
5 changes: 4 additions & 1 deletion InterwikiPlugin/lib/Foswiki/Plugins/InterwikiPlugin.pm
Expand Up @@ -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';
Expand All @@ -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" . '\.\/\+\_\,\&\;\:\=\!\?\%\#\@\-]*?)';

Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 10d9a01

Please sign in to comment.