Skip to content

Commit

Permalink
Item9693: Item12864: Item13423: Bump version, update copyrights,
Browse files Browse the repository at this point in the history
And escape use of { in regexes for Perl 5.22 compatibiltiy.
  • Loading branch information
gac410 committed Jun 15, 2015
1 parent 9b20474 commit 0d475c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions PreferencesPlugin/data/System/PreferencesPlugin.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1426439233" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1434327981" format="1.1" version="1"}%
%META:TOPICPARENT{name="Plugins"}%
---+!! <nop>%TOPIC%

Expand Down Expand Up @@ -34,6 +34,7 @@ In edit mode, the edit button is replaced by Save and Cancel buttons, with their
---++ Plugin Info

| Change History: | <!-- versions below in reverse order -->&nbsp; |
| 14 Jun 2015 (1.16) | Foswikitask:Item13423: Perl 5.22 deprecations. Foswikitask:Item12864: Change to simple decimal versions. |
| 23 Oct 2013 (1.1.5) | Foswikitask:Item12607: Document EDITBOX* settings ignored when cookie set |
| 28 Nov 2012 (1.1.4) | Foswikitask:Item11267: Convert to perl version strings |
| 06 Apr 2012 (1.1.3) | Foswikitask:Item11445: Use %<nop>SANDBOXWEB% macro. |
Expand All @@ -58,7 +59,7 @@ In edit mode, the edit button is replaced by Save and Cancel buttons, with their

%META:FORM{name="PackageForm"}%
%META:FIELD{name="Author" title="Author" value="ProjectContributor"}%
%META:FIELD{name="Copyright" title="Copyright" value="Copyright (C) Foswiki:Main.ThomasWeigert and Foswiki Contributors"}%
%META:FIELD{name="Copyright" title="Copyright" value="Copyright (C) 2008-2015 Foswiki:Main.ThomasWeigert and Foswiki Contributors"}%
%META:FIELD{name="Home" title="Home" value="http://foswiki.org/Extensions/%$ROOTMODULE%"}%
%META:FIELD{name="License" title="License" value="GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]])"}%
%META:FIELD{name="Release" title="Release" value="%$RELEASE%"}%
Expand Down
10 changes: 5 additions & 5 deletions PreferencesPlugin/lib/Foswiki/Plugins/PreferencesPlugin.pm
Expand Up @@ -15,8 +15,8 @@ use Foswiki::Plugins (); # For the API version

use vars qw( @shelter );

our $VERSION = '1.15';
our $RELEASE = '1.15';
our $VERSION = '1.16';
our $RELEASE = '1.16';
our $SHORTDESCRIPTION =
'Allows editing of preferences using fields predefined in a form';
our $NO_PREFS_IN_TOPIC = 1;
Expand Down Expand Up @@ -44,7 +44,7 @@ sub beforeCommonTagsHandler {
### my ( $text, $topic, $web ) = @_;
my $topic = $_[1];
my $web = $_[2];
return unless ( $_[0] =~ m/%EDITPREFERENCES(?:{(.*?)})?%/ );
return unless ( $_[0] =~ m/%EDITPREFERENCES(?:\{(.*?)\})?%/ );

require CGI;
require Foswiki::Attrs;
Expand Down Expand Up @@ -96,7 +96,7 @@ s/^($Foswiki::regex{setRegex})($Foswiki::regex{tagNameRegex})\s*\=(.*$(?:\n[ \t]
}
$_[0] = $outtext;

$_[0] =~ s/%EDITPREFERENCES({.*?})?%/
$_[0] =~ s/%EDITPREFERENCES(\{.*?\})?%/
_generateControlButtons($web, $topic)/ge;
my $viewUrl = Foswiki::Func::getScriptUrl( $web, $topic, 'viewauth' );
my $startForm = CGI::start_form(
Expand Down Expand Up @@ -142,7 +142,7 @@ s/^($Foswiki::regex{setRegex})($Foswiki::regex{tagNameRegex})\s*\=(.*$(?:\n[ \t]
}

# implicit action="view", or drop through from "save" or "cancel"
$_[0] =~ s/%EDITPREFERENCES({.*?})?%/_generateEditButton($web, $topic)/ge;
$_[0] =~ s/%EDITPREFERENCES(\{.*?\})?%/_generateEditButton($web, $topic)/ge;
}

# Use the post-rendering handler to plug our formatted editor units
Expand Down

0 comments on commit 0d475c5

Please sign in to comment.