Permalink
Browse files

Item13986: Merge branch 'Release02x01'

  • Loading branch information...
2 parents 8d393a3 + 9e6a267 commit e42889fb1a87c74af40690fac2e4a06971f75f60 @gac410 gac410 committed Nov 1, 2016
Showing with 28 additions and 5 deletions.
  1. +7 −5 UnitTestContrib/test/unit/PluginHandlerTests.pm
  2. +1 −0 core/lib/Foswiki/Meta.pm
  3. +20 −0 core/lib/Foswiki/Prefs.pm
@@ -188,7 +188,7 @@ sub beforeSaveHandler {
$tester->assert_str_equals($tester->{test_web}, $_[2], "THREE $_[2]");
$tester->assert($_[3]->isa('Foswiki::Meta'), "FOUR $_[3]");
$tester->assert_str_equals('Wibble', $_[3]->get('WIBBLE')->{wibble});
- Foswiki::Func::pushTopicContext( $this->{test_web}, 'Tropic' );
+ Foswiki::Func::pushTopicContext( $tester->{test_web}, 'Tropic' );
$tester->assert_str_equals( "BEFORE",
$_[3]->getPreference("BLAH"));
#Foswiki::Func::getPreferencesValue("BLAH") );
@@ -833,8 +833,9 @@ HERE
my $hashRef = eval
"\$Foswiki::Plugins::$this->{plugin_name}::called->{renderWikiWordHandlerLinks}";
use Data::Dumper;
- print STDERR "------ $html\n";
- print STDERR "------ " . Dumper($hashRef) . "\n";
+
+ #print STDERR "------ $html\n";
+ #print STDERR "------ " . Dumper($hashRef) . "\n";
#this is what we have - and it shows that you need to call expandMacros before calling renderText
$this->assert_deep_equals(
@@ -871,8 +872,9 @@ HERE
my $hashRef = eval
"\$Foswiki::Plugins::$this->{plugin_name}::called->{renderWikiWordHandlerLinks}";
use Data::Dumper;
- print STDERR "------ $html\n";
- print STDERR "------ " . Dumper($hashRef) . "\n";
+
+ #print STDERR "------ $html\n";
+ #print STDERR "------ " . Dumper($hashRef) . "\n";
#this is what we have - and it shows that you need to call expandMacros before calling renderText
$this->assert_deep_equals(
@@ -1188,6 +1188,7 @@ sub text {
_assertIsTopic($this) if DEBUG;
if ( defined($val) ) {
$this->{_text} = $val;
+ $this->{_session}->{prefs}->invalidatePath($this);
}
else {
@@ -1,6 +1,7 @@
# See bottom of file for license and copyright information
use strict;
use warnings;
+use Error;
BEGIN {
if ( $Foswiki::cfg{UseLocale} ) {
@@ -252,6 +253,25 @@ sub loadPreferences {
return $obj;
}
+sub invalidatePath {
+ my $this = shift;
+ my $path;
+ if ( ref( $_[0] ) ) {
+ ASSERT( $_[0]->isa('Foswiki::Meta') ) if DEBUG;
+ $path = $_[0]->getPath;
+ }
+ else {
+ $path = $_[0];
+ }
+
+ if ( $this->{paths}->{$path} ) {
+
+ #print STDERR "INVALIDATED: $this->{paths}->{$path}\n";
+ delete $this->{paths}->{$path};
+ }
+
+}
+
=begin TML
---++ ObjectMethod pushTopicContext( $web, $topic )

0 comments on commit e42889f

Please sign in to comment.