Permalink
Browse files

Item14202: Bad logic in the link tracking check

  • Loading branch information...
gac410 committed Oct 23, 2016
1 parent 1f7cce3 commit fcae5c9a1c8144d7bb93ad55b60f45cd7cbdb089
Showing with 10 additions and 11 deletions.
  1. +10 −11 core/lib/Foswiki/PageCache.pm
@@ -468,19 +468,18 @@ sub addTopicRef {
#Foswiki::Func::writeDebug( "addTopicRef $webRef.$topicRef\n" ) if TRACE;
if ( defined $Foswiki::cfg{Cache}{TrackInternalLinks} ) {
return if ( $Foswiki::cfg{Cache}{TrackInternalLinks} eq 'off' );
my $session = $Foswiki::Plugins::SESSION;
return
unless (
( $Foswiki::cfg{Cache}{TrackInternalLinks} eq 'authenticated' )
&& $session->inContext('authenticated') );
}
my $session = $Foswiki::Plugins::SESSION;
return $this->addDependency( $webRef, $topicRef );
return $this->addDependency( $webRef, $topicRef )
if ( !defined $Foswiki::cfg{Cache}{TrackInternalLinks}
|| ( $Foswiki::cfg{Cache}{TrackInternalLinks} eq 'on' )
|| ( $Foswiki::cfg{Cache}{TrackInternalLinks} eq 'authenticated' )
&& $session->inContext('authenticated') );
# If we reach here, either:
# - It is a guest session and TrackInternalLinks was set to authenticated
# - TrackInternalLinks is set to off (or some unexpected value.
return;
}
=begin TML

0 comments on commit fcae5c9

Please sign in to comment.