Skip to content

Commit

Permalink
Merge branch 'Release02x01'
Browse files Browse the repository at this point in the history
  • Loading branch information
gac410 committed Jan 22, 2018
2 parents aa92a8e + 25c6435 commit c8a9cbb
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 20 deletions.
4 changes: 2 additions & 2 deletions CommentPlugin/lib/Foswiki/Plugins/CommentPlugin/Comment.pm
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ sub comment {
# Position relative to index'th comment
my $idx = 0;
unless (
$text =~ s((%COMMENT({.*?})?%.*\n))
$text =~ s((%COMMENT(\{.*?\})?%.*\n))
(&_nth($1,\$idx,$position,$index,$output))eg
)
{
Expand All @@ -360,7 +360,7 @@ sub comment {

# remove the index'th comment box
my $idx = 0;
$text =~ s/(%COMMENT({.*?})?%)/_remove_nth($1,\$idx,$remove)/eg;
$text =~ s/(%COMMENT(\{.*?\})?%)/_remove_nth($1,\$idx,$remove)/eg;
}

return ( $meta, $text, $position, $output );
Expand Down
12 changes: 6 additions & 6 deletions HistoryPlugin/lib/Foswiki/Plugins/HistoryPlugin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,10 @@ sub _handleHeadFoot {
my ( $text, $rev1, $rev2, $nrev, $maxrev ) = @_;

if ( $rev2 >= $maxrev ) {
$text =~ s/\$next({.*?})//g;
$text =~ s/\$next(\{.*?\})//g;
}
else {
while ( $text =~ m/\$next({(.*?)})/ ) {
while ( $text =~ m/\$next(\{(.*?)\})/ ) {
my $args = $2 || '';

my $newrev1 = $rev2 < $maxrev ? $rev2 + 1 : $rev2;
Expand All @@ -211,15 +211,15 @@ sub _handleHeadFoot {
$url
? "<a href='$url' class='foswikiButton'>$newtext</a>"
: $newtext;
$text =~ s/\$next({.*?})/$replace/;
$text =~ s/\$next(\{.*?\})/$replace/;
}
}

if ( $rev1 <= 1 ) {
$text =~ s/\$previous({.*?})//g;
$text =~ s/\$previous(\{.*?\})//g;
}
else {
while ( $text =~ m/\$previous({(.*?)})/ ) {
while ( $text =~ m/\$previous(\{(.*?)\})/ ) {
my $args = $2 || '';

my $newrev2 = $rev1 > 1 ? $rev1 - 1 : 1;
Expand All @@ -238,7 +238,7 @@ sub _handleHeadFoot {
$url
? "<a href='$url' class='foswikiButton'>$newtext</a>"
: $newtext;
$text =~ s/\$previous({.*?})/$replace/;
$text =~ s/\$previous(\{.*?\})/$replace/;
}
}

Expand Down
7 changes: 4 additions & 3 deletions UpdatesPlugin/lib/Foswiki/Plugins/UpdatesPlugin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ sub initPlugin {
my $outdatedPlugins;
$outdatedPlugins = $request->cookie("FOSWIKI_UPDATESPLUGIN") unless TRACE;

return 1
if defined($outdatedPlugins)
&& scalar( split( /\s*,\s*/, $outdatedPlugins ) ) <= 0; # 0: DoNothing
if ( defined $outdatedPlugins ) {
my @staleplugins = split( /\s*,\s*/, $outdatedPlugins );
return 1 if scalar(@staleplugins) <= 0;
}

Foswiki::Func::readTemplate("updatesplugin");

Expand Down
3 changes: 2 additions & 1 deletion core/data/System/SystemRequirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1510027045" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1516511288" format="1.1" version="1"}%
%META:TOPICPARENT{name="AdminDocumentationCategory"}%
---+ System Requirements

Expand Down Expand Up @@ -361,6 +361,7 @@ Install as needed.
| Crypt::SMIME | | Optional, used for S/MIME email signing |
| Crypt::X509 | | Optional, used for S/MIME email signing |
| Convert::PEM | | Optional, used for S/MIME email signing |
| Locale::Language | Optional, =Locale::Language= will be removed from the Perl core distribution in 5.28. |

---++++!! Installation using =cpanminus=

Expand Down
2 changes: 1 addition & 1 deletion core/lib/Foswiki/Configure/Checkers/AccessibleCFG.pm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ sub check_current_value {
if ( ref($v) ) {
$reporter->ERROR("Was expecting entry $ec to be a scalar");
}
if ( $v !~ /^({\w+})+$/ ) {
if ( $v !~ /^(\{\w+\})+$/ ) {
$reporter->ERROR("Was expecting '$v' to be a cfg key");
}
$ec++;
Expand Down
6 changes: 3 additions & 3 deletions core/lib/Foswiki/Configure/Checkers/WorkingDir.pm
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ If compression is enabled, it also compresses the language file.
sub onSave {
my ( $this, $reporter, $key, $d, $old_dir ) = @_;

$d =~ s/\$Foswiki::cfg({\w+})+/eval( "\$Foswiki::cfg$1")/ge;
$old_dir =~ s/\$Foswiki::cfg({\w+})+/eval( "\$Foswiki::cfg$1")/ge;
$d =~ s/\$Foswiki::cfg(\{\w+\})+/eval( "\$Foswiki::cfg$1")/ge;
$old_dir =~ s/\$Foswiki::cfg(\{\w+\})+/eval( "\$Foswiki::cfg$1")/ge;

return if ( $d eq $old_dir );

Expand Down Expand Up @@ -109,7 +109,7 @@ sub onSave {

# Automatic upgrade of work_areas
my $existing = $old_dir || $Foswiki::cfg{Store}{WorkAreaDir} || '';
$existing =~ s/\$Foswiki::cfg({\w+})+/eval( "$Foswiki::cfg$1")/ge;
$existing =~ s/\$Foswiki::cfg(\{\w+\})+/eval( "$Foswiki::cfg$1")/ge;
if ( $existing && -d $existing ) {

# Try and move the contents of the old workarea
Expand Down
2 changes: 1 addition & 1 deletion core/lib/Foswiki/Configure/Load.pm
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ sub findDependencies {
}
}
else {
while ( $fwcfg =~ m/\$Foswiki::cfg(({[^}]*})+)/g ) {
while ( $fwcfg =~ m/\$Foswiki::cfg((\{[^}]*\})+)/g ) {
push( @{ $deps->{forward}->{$1} }, $keypath );
push( @{ $deps->{reverse}->{$keypath} }, $1 );
}
Expand Down
2 changes: 1 addition & 1 deletion core/lib/Foswiki/Configure/Query.pm
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ sub check_current_value {
$e = $e->[0];

# Expand {x} as $Foswiki::cfg{x}
$e =~ s/(({[^}]+})+)/\$Foswiki::cfg$1/g;
$e =~ s/((\{[^}]+\})+)/\$Foswiki::cfg$1/g;
if ( $e =~ m/\S/ ) {
my $only_if;
eval("\$only_if=$e");
Expand Down
2 changes: 1 addition & 1 deletion core/lib/Foswiki/Query/Node.pm
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ sub newLeaf {
my ( $class, $val, $type ) = @_;

if ( $type == Foswiki::Infix::Node::NAME
&& $val =~ m/^({[A-Z][A-Z0-9_]*})+$/i )
&& $val =~ m/^(\{[A-Z][A-Z0-9_]*\})+$/i )
{

# config var name, make sure it's accessible.
Expand Down
2 changes: 1 addition & 1 deletion core/lib/Foswiki/Query/Parser.pm
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ use constant OPS => qw (match and eq lc lte not ref d2n gte length lt ob
sub new {
my ( $class, $options ) = @_;

$options->{words} ||= qr/([A-Z:][A-Z0-9_:]*|({[A-Z][A-Z0-9_]*})+)/i;
$options->{words} ||= qr/([A-Z:][A-Z0-9_:]*|(\{[A-Z][A-Z0-9_]*\})+)/i;
$options->{nodeClass} ||= 'Foswiki::Query::Node';
my $this = $class->SUPER::new($options);
foreach my $op ( OPS() ) {
Expand Down

0 comments on commit c8a9cbb

Please sign in to comment.