Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Item13483: fixed compatibility with Foswiki-2.0
  • Loading branch information
MichaelDaum committed Jul 17, 2015
1 parent 7fcc4aa commit f55f1fe
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 15 deletions.
9 changes: 9 additions & 0 deletions .gitignore
@@ -0,0 +1,9 @@
*.swp
*,v
FilterPlugin.md5
FilterPlugin.sha1
FilterPlugin.tgz
FilterPlugin.txt
FilterPlugin.zip
FilterPlugin_installer
FilterPlugin_installer.pl
5 changes: 3 additions & 2 deletions data/System/FilterPlugin.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" comment="reprev" date="1275898567" format="1.1" reprev="3" version="3"}%
%META:TOPICINFO{author="ProjectContributor" comment="" date="1437150509" format="1.1" version="1"}%
---+!! %TOPIC%
%TOC%

Expand Down Expand Up @@ -247,11 +247,12 @@ compare with [[http://en.wikipedia.org/wiki/Category:Philosophy_articles_needing
* Set SHORTDESCRIPTION = Substitute and extract information from content by using regular expressions
-->
| Plugin Author: | Michael Daum |
| Copyright ©: | 2005-2014, Michael Daum http://michaeldaumconsulting.com |
| Copyright ©: | 2005-2015, Michael Daum http://michaeldaumconsulting.com |
| License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) |
| Release: | %$RELEASE% |
| Version: | %$VERSION% |
| Change History: | <!-- versions below in reverse order -->&nbsp; |
| 17 Jul 2015: | fixed compatibility with Foswiki-2.x |
| 10 Apr 2014: | transliterate/normalize unicode strings before sorting them in MAKETEXT |
| 19 Jun 2012: | added =lastseparator= (by Foswiki:Main/OliverKrueger);\
fixed paging when using together with =include= and =exclude= parameters |
Expand Down
6 changes: 3 additions & 3 deletions lib/Foswiki/Plugins/FilterPlugin.pm
@@ -1,6 +1,6 @@
# Plugin for Foswiki - The Free and Open Source Wiki, http://foswiki.org/
#
# Copyright (C) 2005-2014 Michael Daum http://michaeldaumconsulting.com
# Copyright (C) 2005-2015 Michael Daum http://michaeldaumconsulting.com
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -21,8 +21,8 @@ use warnings;

use Foswiki::Func();

our $VERSION = '4.01';
our $RELEASE = '4.01';
our $VERSION = '4.10';
our $RELEASE = '17 Jul 2015';
our $NO_PREFS_IN_TOPIC = 1;
our $SHORTDESCRIPTION = 'Substitute and extract information from content by using regular expressions';
our $core;
Expand Down
14 changes: 4 additions & 10 deletions lib/Foswiki/Plugins/FilterPlugin/Core.pm
@@ -1,6 +1,6 @@
# Plugin for Foswiki - The Free and Open Source Wiki, http://foswiki.org/
#
# Copyright (C) 2005-2014 Michael Daum http://michaeldaumconsulting.com
# Copyright (C) 2005-2015 Michael Daum http://michaeldaumconsulting.com
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -23,7 +23,7 @@ use warnings;
use POSIX qw(ceil);
use Foswiki::Plugins();
use Foswiki::Func();
use Text::Unidecode;
use Text::Unidecode();

use constant TRACE => 0; # toggle me

Expand Down Expand Up @@ -187,6 +187,7 @@ sub handleFilter {
my $arg9 = $10;
my $arg10 = $11;

$prefix = '' unless defined $prefix;
$arg1 = '' unless defined $arg1;
$arg2 = '' unless defined $arg2;
$arg3 = '' unless defined $arg3;
Expand Down Expand Up @@ -284,11 +285,6 @@ sub handleMakeIndex {
$theList = Foswiki::Func::expandCommonVariables($theList, $theTopic, $theWeb)
if expandVariables($theList);

my $charset = $Foswiki::cfg{Site}{CharSet};
$theList = Encode::decode($charset, $theList);

#writeDebug("theList=$theList");

# create the item descriptors for each list item
my @theList = ();
my %seen = ();
Expand All @@ -308,7 +304,7 @@ sub handleMakeIndex {
$seen{$item} = 1;
}

my $crit = unidecode($item);
my $crit = Text::Unidecode::unidecode($item);
if ($crit =~ /\((.*?)\)/) {
$crit = $1;
}
Expand Down Expand Up @@ -503,8 +499,6 @@ sub handleMakeIndex {
# count MAKEINDEX calls
$this->{makeIndexCounter}++;

$result = Encode::encode($charset, $result);

return $result;
}

Expand Down
1 change: 1 addition & 0 deletions lib/Foswiki/Plugins/FilterPlugin/MANIFEST
Expand Up @@ -180,5 +180,6 @@ lib/CPAN/lib/Text/Unidecode/xfc.pm 0644
lib/CPAN/lib/Text/Unidecode/xfd.pm 0644
lib/CPAN/lib/Text/Unidecode/xfe.pm 0644
lib/CPAN/lib/Text/Unidecode/xff.pm 0644
lib/Foswiki/Plugins/FilterPlugin/DEPENDENCIES 0644
lib/Foswiki/Plugins/FilterPlugin/Core.pm 0644
lib/Foswiki/Plugins/FilterPlugin.pm 0644

0 comments on commit f55f1fe

Please sign in to comment.