Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Item14605: More unescaped { braces
- Loading branch information
|
@@ -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++; |
|
|
|
@@ -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 ); |
|
|
|
|
@@ -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 |
|
|